Monday, November 08, 2010 at 12:03 AM.


on version () { //return the version string for the Frontier application
	<<Thursday, November 11, 1999 at 2:34:19 AM by AR
		<<Implemented as a kernel verb in Frontier 6.1.
		<<Old code
			<<on version ()
				<<9/25/98; 7:39:14 PM by DW
					<<Frontier.version (), from now on, means the version of the Frontier app.
					<<Including this script in the updates process has become fairly meaningless.
					<<The root updates process chugs along at its own rate, independent from the app.
				<<if not defined (system.temp.frontierVersionString)
					<<local (version = file.getVersion (Frontier.getProgramPath ()))
					<<if string.lower (version) beginsWith "trial " //PBS 1/20/99: remove "Trial " from version string
						<<version = string.delete (version, 1, 6)
					<<system.temp.frontierVersionString = version
				<<return (system.temp.frontierVersionString)
	kernel (Frontier.version)}
<<bundle //test code
	<<local (i, s, ticks)
	<<ticks = clock.ticks ()
	<<for i = 1 to 10000
		<<s = frontier.version ()
	<<clipboard.putvalue (string (double (clock.ticks () - ticks) / 60000))

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.