Util-Get info

From Vectorlab
Jump to: navigation, search


Procedure to get basic info about the running session. You need this for most script and it is the only sub-routine in this site demanding globals. By Orso B. Schmid


{ Orso ****************************** }
{ get version and platform }
{ needs following globals, which are always useful. Paste these in the VAR declaration:
	gVers : INTEGER;
	gIsMac, gIsMetrical : BOOLEAN;
	gDelim : CHAR;
	gUPI : REAL;
}
PROCEDURE U_GetInfo;
	VAR
		major, minor, maintenance, platf: INTEGER;
	
	BEGIN
		GetVersion(major, minor, maintenance, platf);
		gVers := Str2Num(Concat(major, minor, maintenance));
		gIsMac := (platf = 1);
		gUPI := GetPrefReal(152);
		gIsMetrical := GetPref(173);   
		
		gDelim := ':';
		IF NOT gIsMac THEN
			gDelim := '\';
	END;