# > BLib.BASIC 1.01 29-Dec-2005 * v1.01 29-Dec-2005 JGH: Added RunAs() 0 v1.00 12-Nov-1998 JGH: Type and SizeOfReal (: !2 BASIC interpreter functions !< =========================== F: P BASIC_Type Z --------- d Discover interpreter type 'n Returns: 65 if Wilson/Acorn BASIC "x 86 if Russell BASIC ? --------------------------------------------------------- : #ݤBASIC_Type:?(P-3):=65 =86 : :  FNBASIC_SizeOfReal  ----------------- B Returns the size of real variables being used by the program D Knows about 4, 5, 8 and 12-byte reals by forcing underflows in D accuracy, using IEEE definintions of floating point numbers.  Returns 0 if size unknown E --------------------------------------------------------------- : ݤBASIC_SizeOfReal @ 2^-129=0: 1+2^-25=1:=4 : 8-bit exponent, 23-bit mantissa H 2^-129=0:=5 : 8-bit exponent, assume 31-bit mantissa I" 2^-1025=0:=8 : 11 bit exponent, assume 52-bit mantissa I, 2^-32769=0:=12 : 15 bit exponent, assume 63-bit mantissa 6=0: Unknown @: J: T FNBASIC_RunAs ^ ------------- /h Returns how the BBFW program has been run r Returns: 0 if unknown 5| 1 if run from the IDE (selected 'RUN') > 2 if run via the interpreter (CHAIN "file.bbc") ? 3 if run as a compiled executable (run file.exe) E --------------------------------------------------------------- : ݤBASIC_RunAs $ cmd%: "GetCommandLine" cmd%  $$cmd%,"bbcwin.exe"):=1  $$cmd%,"bbcwrun.exe"):=2 =3 :