Futurebasic/Language/Reference
Language Reference
#
#define newTypeName as oldTypeName#define newTypeName as {Pointer to|@|^|.} oldTypeName#define newTypeName as {Handle to|@@|^^|..} oldTypeName#if condition[statementBlock1]
[ #else[statementBlock2] ]
#endIffunctionAddress& = @fn functionName
A
positiveValue = abs (expr)radianAngle# = acos (expr)positiveResult# = acosh (expr)result = exprA and | && expBannuityFactor# = fn annuityY# (rate, periods)appearance button [#] [-] id& [, [ state ] [, [ value ] [, [ min ] [, [ max ] [, [ title$ ] [, [ rect ] [, [ type ] ] ] ] ] ] ]appearance window [#] [-] id& [, [ title$ ] [, [ rect ] [, [ windowClass ] [, [ windowAttributes ] [, [ FBAttributes ] ] ] ] ] ]append [#] fileIDapple menu string$string$ = AppleEventMessage$ASCIIcode% = asc (string$)ASCIIcode% = asc (container$$)radianAngle# = asin(expr)result# = asinh(expr)radianAngle# = atan(expr)result# = atanh(expr)radianAngle# = atn(expr)autoclip [=] booleanExpr /* Not Supported in FBtoC */
B
beepbegin enum [start [,inc]]begin globalsbegin record typeNamebegin unionBeginAssem /* Not Supported in FBtoC */binString$ = bin$ (expr)bitValue = bit (bitPos)BlockMove sourceAddr&, destinationAddr&, numberBytes&box [ fill ] [h, v] to h1, v1 [ to h2, v2 ...]buttonState = BUTTON [ (ID [, selector ]) ]buttonHandle& = BUTTON& (btnID&|%)BUTTON [#] btnID, state, title, btnRect [, btnType ]BUTTON CLOSE [#] btnIDpString$ = FN BUTTONTEXTSTRING$ (bRefNum&)
C
[ CALL ] toolboxProcName [ modifiers ] [ ([ { #addrExpr1& | arg1 } [,{ #addrExpr2& | arg2 }...] ]) ]CASE - See the SELECT CASE statementcharacter$ = CHR$ (expr)CFINDEX.INCLignore = FN CFINDEXSORT (whichIndex)CIRCLE [ FILL ] x, y, radius [ { TO | PLOT } startAngle, angleSize ]CLEARCLEAR bytes& [, indexID ]CLEAR numElements&, indexID, eltSizeCLEAR -1CLEAR INDEX$ [ indexID ]CLEAR LOCAL - See the LOCAL statementCLEAR LPRINTCLEARCLOSE FOLDER wdRefNum%CLOSE LPRINTCLS [ LINE | PAGE ]COLOR WINDOW {_true | _false}COLOR [=] colorExprCOMPILE END IF - See the COMPILE LONG IF statement /* Not Supported in FBtoC. See #ENDIF */COMPILE LONG IF condition /* Not Supported in FBtoC. See #IF */[statementBlock1]
[ COMPILE XELSE[statementBlock2] ]
COMPILE END IFCOMPILE SHUTDOWN "Optional Quoted Remark"COMPILE [ tickCount ] [, compileFlags ]COMPILE XELSE - See the COMPILE LONG IF statement /* Not Supported in FBtoC. See #ELSE */flag& = COMPILEFLAGS (_compileConstant)versionNum& = COMPILERVERSIONcompoundFactor# = FN COMPOUND# (rate, periods)COMPRESS DYNAMIC arrayNameConstant declaration : _constantName = staticExprCOORDINATE WINDOWtheCosine# = COS (expr)result# = COSH (expr)currentLine = CSRLINCURSOR [=] intExpr (Standard BASIC)CURSOR cursorID [, cursorType ] (Appearance Runtime)var& = CVI (string$)
D
DATA item1 [, item2 ...]dateString$ = DATE$DEC (intVar)DEC { LONG | WORD | BYTE } (addr&)DEF APNDLNG (longExpr, handle&)DEF APNDSTR (string$, STR#resourceHndl&)DEF BLOCKFILL (startAddr&, numBytes&, byteValueExpr)DEF BORDER (twoPixelBorder, { rect | #rectAddr& })DEF BTNRECT ({ rect | #rectAddr& }, buttonID%)DEF BUTTONHELPDISPLAY (bntID) /* Not Supported in FBtoC */DEF BUTTONHELPSETTEXT (btnID%|&, helpMessage$)DEF BUTTONHELPSHOW (showHideFlag)DEF CBOX ({ rect | #rectAddr& }, stringVar$)DEF CHANGEDRESOURCE (rHndl&)DEF CHECKONEITEM (menuID%, itemID%)DEF CLEARHANDLE (handle&)DEF CREATERESFILE (fileName$)DEF CYCLE (min%, max%, var%)DEF DEBUGNUMBER (numericExpression)DEF DEBUGSTRING (stringExpression)DEF DISPOSEH (handle&)DEF DRAWIMAGEFILE (fName$, vRef%) /* Not Supported in FBtoC */DEF DYNAMICINSERTITEMS (gMyDynamicArray,Where&,HowMany&,FillPtr&)DEF DYNAMICREMOVEITEMS (gMyDynamicArray,First&,HowMany&,SavePtr&)DEF EMBEDBUTTON (childButtonID&, parentButtonID&)DEF FLASHDEF FN functionName [(var1 [, var2 ...])] = exprDEF FN functionName [ (var1 [, var2 ...]) ]DEF FN functionName [(var1 [, var2 ...])] USING FNaddress&DEF GETBUTTONDATA (bRefNum&, part%, tagType&, maxSize&, dataPtr&, actualSize&)DEF GETBUTTONTEXTSELECTION (bRefNum&, selStart, selEnd)DEF GETIMAGEFILERECT (fName$,vRef%,r AS RECT) /* Not Supported in FBtoC */DEF LBOX ({ rect | #rectAddr& }, stringVar$)DEF LCASE (string$)DEF LCOPYDEF LEN [=] stringVarLength /* Not Supported in FBtoC */DEF LONGBLOCKFILL (startPtr&, numBytes&, byteValExpr)DEF LPRINTDEF NEWWINDOWPOSITIONMETHOD (pMethod)DEF OPEN [=] typeCreatorString$DEF ORSICN (x%, y%, sicnID%)DEF PAGEDEF PLOTSICN (x%, y%, sicnID%)DEF PRINTEDITFIELD (efNum& | %)DEF RBOX ({ rect | #rectAddr& }, stringVar$)DEF REMOVESTR (str#handle&, item%)DEF SETBUTTONDATA (bRefNum&, part%, tagType&, size&, dataPtr&)DEF SETBUTTONFOCUS (bRefNum&)DEF SETBUTTONFONTSTYLE (bRefNum&, controlFontRecord)DEF SETBUTTONTEXTSELECTION (bRefNum&, selStart, selEnd)DEF SETBUTTONTEXTSTRING (bRefNum&, pString$)DEF SETDOUBLEBYTE /* Not Supported in FBtoC */DEF SETSINGLEBYTE /* Not Supported in FBtoC */DEF SETWINDOWBACKGROUND (_backgroundConstant,applyNowBool)DEF SETWINDOWBACKGROUND (rgbColor,applyNowBool)DEF SHADOWBOX ({ rect | #rectAddr& })DEF SHOWPOP ({ rect | #rectAddr& })DEFSTR { LONG | WORD | BYTE }DEF TAB [=] fieldWidthDEF TITLERECT (title$, titlePosition%, { rect | #rectAddr& })DEF TOGGLE ({ var% | #intPtr& })DEF TRANSITIONRECT (left%, top%, right%, bottom%)DEF TRUNCATE ({ var$ | #stringPtr& })DEF USING [=] intlMoneyFormat&DEF WINDOWCATEGORY (wNum&, category&)DEF WINDOWREPOSITION (wRefNum&, parentRefNum&, positionMethod)DEFSNG letter1 [- thruLtr1 ] [, letter2 [- thruLtr2 ]...]DEFDBL letter1 [- thruLtr1 ] [, letter2 [- thruLtr2 ]...]DEFSTR letter1 [- thruLtr1 ] [, letter2 [- thruLtr2 ]...]DEFINT letter1 [- thruLtr1 ] [, letter2 [- thruLtr2 ]...]DEFLONG letter1 [- thruLtr1 ] [, letter2 [- thruLtr2 ]...]DELAY countevnt% | & = DIALOG (0)id% | & = DIALOG (evnt)DIALOG = expr%DIM declaration1 [, declaration2 ...]DIM DYNAMIC - see the DYNAMIC statementDIM END RECORD - see the DIM RECORD statement /* Not Supported in FBtoC */DIM RECORD recordName /* Not Supported in FBtoC */DIM SYSTEM staticExpr& [, preferredSize& [, version& [, release& [, aboutStringWith4CharPrefix$ ] ] ] ]DO [statementBlock]UNTIL expr[ DIM ] DYNAMIC arrayName(maxSub1 [, maxSub2 ...]) [AS dataType]
E
EDIT = fieldMarginfieldContents$ | container$$ = EDIT$ (fieldID)fieldContents$ | container$$ = EDIT$ (fieldID, lineNumber)fieldContents$ | container$$ = EDIT$ (fieldID, -1)fieldContents$ | container$$ = EDIT$ (fieldID, selStart, selEnd)
EDIT$ (efID) = string$ | &ZTXThandle& | %TEXTresID% | #container$$ font, size, style, mode, red, green, blue
EDIT$ (efID,lineNumber) = string$ | &ZTXThandle& | %TEXTresID% | #container$$ font, size, style, mode, red, green, blue
EDIT$ (efID,-1) = string$ | &ZTXThandle& | %TEXTresID% | #container$$ font, size, style, mode, red, green, blue
EDIT$ (efID,selStart,selEnd) = string$ | &ZTXThandle& | %TEXTresID% | #container$$ font, size, style, mode, red, green, blue
EDIT FIELD CLOSE [#] fieldID% | &EDIT FIELD- Standard BASIC:
EDIT FIELD [#] idExpr [, [ text ] [, [ rect ] [, [ type ] [, efClass ] ] ] ]EDIT FIELD 0
- Appearance Manager:
EDIT FIELD [#] idExpr [, [ text ] [, [ rect ] [, [ type ], [ efClass ],[ keyFilterProc ] ] ] ]EDIT FIELD - idExprEDIT FIELD 0
- Standard BASIC:
EDIT MENU menuParmEDIT TEXT- Standard BASIC:
EDIT TEXT [ #optionalFieldNum%,] [ font ] [, [ size ] [, [ style ] [, [ mode ] [, red, green, blue ] ] ] ]
- Appearance Runtime:
EDIT TEXT [ #optionalFieldNum%,] [ font ] [, [ size ] [, [ style ] [, [ mode ] [, foreRGB ] [, backRGB ] ] ] ]
- Standard BASIC:
EJECT driveExpr /* Not Supported in FBtoC */END ENUM - See the BEGIN ENUM statementEND FN - See the LOCAL FN and LONG FN statementEND GLOBALS - See the BEGIN GLOBALS statementEND IF - See the LONG IF statementEND RECORD - See the BEGIN RECORD statementEND SELECT - See the SELECT statementENDASSEM - See the BEGINASSEM statement /* Not Supported in FBtoC */ENTERPROC- Syntax 1:
"statementLabel"ENTERPROC [ (intVar1 [, intVar2 ...]) ][statementBlock]
EXITPROC [= intVar3 ]
- Syntax 2:
"statementLabel"ENTERPROC FN fnName[ (intVar1 [, intVar2 ...]) ] [= type ][statementBlock]
EXITPROC [= returnValue ]
- Syntax 1:
error# = FN ERF# (z#)complementaryError# = FN ERFC# (z#)errorInfo% = ERRORERROR = _noErreventRecPtr& = EVENTeventInfo% = EVENT%EventInfo& = EVENT&EVENT% = shortIntValue%EVENT& = longIntValue&EXIT CASEEXIT DOEXIT FNEXIT FOREXIT NEXTEXIT UNTILEXIT WENDEXIT WHILEEXIT "label"EXITPROC - See the ENTERPROC statementresult# = EXP (expr)
F
result& = FN FBCOMPARECONTAINERS (a$$, b$$)result& = FN FBCOMPAREHANDLES (a&, b&)ignored = FN FBGETCONTROLRECT (cHndl &, rect)ignored = FN FBGETSCREENRECT (rect)name$ = FN FBGETSYSTEMNAME$ (nameType)FN FBMAKEFSSPEC (inVol%, inDir&, name$, FSSpec ) /* Not Supported in FBtoC */result& = FN FBTESTFORLIBRARY ("Library Name") /* Not Supported in FBtoC */fileType$ = FILES$folderName$ = FILES$ (_fFolder,[ prompt$ ],, refNumVar%)folderName$ = FILES$ (_FSSpecFolder,[ prompt$ ],, FSSpec)fileName$ = FILES$ (_fOpen,[ typeListString$ ], [ promptString$ ], refNumVar%)fileName$ = FILES$ (_fOpenPreview,[ typeListString$ ], [ promptString$ ], refNumVar%)fileName$ = FILES$ (_FSSpecOpen,[ typeListString$ ], [promptString$], fileSpecRecord)fileName$ = FILES$ (_FSSpecOpenPreview,[ typeListString$ ], [ promptString$ ], fileSpecRecord)fileName$ = FILES$ (_fSave,[ prompt$ ],[ defaultName$ ], refNumVar%)fileName$ = FILES$ (_FSSpecSave,[ prompt$ ],[ defaultName$ ], fileSpecRecord)FILL h, vaction = FINDERINFO (countVar%, nameVar$, typeVar&, dirRefNumVar%)action = FINDERINFO (countVar%, @FSSpec[(array)],@OSType&[(array)], dirRefNumVar %)wholeNum# = FIX (expr#)FLUSHEVENTSFLUSHWINDOWBUFFER [ { wRef | { _FBAutoFlushOff | _FBAutoFlushOn } ]result = FN ToolboxFunctionName [ modifiers ] [ ([ { #addrExpr1& | arg1 }[,{ #addrExpr2& | arg2 }...] ]) ][ result =] FN functionName [(param1 [, param2 ...])]folderRefNum% = FOLDER (path$, refNum%)parentFolderVRef% = FOLDER (":",refNum%)FOR indexVar = firstValue TO lastValue [ STEP stepValue ][ statementBlock ]
NEXT [ indexVar ]fractionValue# = FRAC (expr)
G
GET FIELD ZTXThandle&, efIDGET PREFERENCES prefFileName$, prefRecordGET WINDOW [#] wndID, windowPtrVar&GETPROCESSINFO index%, processName$ [, PSN ]GLOBALS "filename1" [, "filename2" ...]GOSUB { lineNumber | "statementLabel" }GOTO { lineNumber | "statementLabel" }
H
HANDLEEVENTSHANDSHAKE portID, handshakeTypehexString$ = HEX$ (expr)
I
IF expr THEN { dest1 | statement1 [: statement2 ...]} [ ELSE { dest2 | statement3 [: statement4 ...]}]INC (intVar)intVar ++numericVariable += IntegerValToAdd
INC {LONG|WORD|BYTE} (addr&)INCLUDE { "<path>" | alisResID }stringVar$ = INDEX$ (element [, indexID ])INDEX$ (element [, indexID ]) = stringExpr$INDEX$ D (element [, indexID ])INDEX$ I (element [, indexID ]) = stringExpr$foundElement = INDEXF (string$ [, startElement [, indexID ] ])stringVar$ = INKEY$stringVar$ = INKEY$ (deviceID)INPUT [@(col, row)| % (h, v)] [ "prompt" ;] var1 [, var2 ...]INPUT# deviceID, var1 [, var2 ...]foundPosition = INSTR (startPos, targetString$ | targetContainer$$, searchString$ | searchContainer$$)nearestInteger& = INT (expr#)ignored = FN INVALRECT (rect)
K
KILL path$ [, refNum% [, dirID& ]]KILL APPLEEVENT eventType&, eventClass&KILL DYNAMIC arrayNameKILL FIELD handle&KILL PICTURE pictureHandle&KILL PREFERENCES prefFileName$KILL RESOURCES "resType", resID%, [ "resType", resID% ...]
L
subString$ = LEFT$ (string$, numChars)subContainer$$ = LEFT$$ (container$$, numChars)stringLength = LEN (string$ | container$$)[ LET ] var = expr[ LET ] var;length = address&LIBRARY "LibraryName"LIBRARYlineAddress& = LINE "label"LINE INPUT [@(col, row)| % (h, v)] [ "prompt" ;] stringVar$LINE INPUT# deviceID, stringVar$result = LOC (deviceID)[ CLEAR ] LOCAL [ MODE ][ CLEAR ] LOCAL FN functionName [(arg1 [, arg2 ...])][statementBlock]
END FN [= expr ]LOCATE h,vnumRecords = LOF (deviceID [, recordLength ])naturalLog# = LOG (expr)commonLog# = LOG10 (expr)base2Log# = LOG2 (expr)LONG COLOR bluePart, greenPart, redPart [, foregroundFlag ]LONG FN functionName [(arg1 [, arg2 ...])][statementBlock]
END FN [= expr ]LONG IF expr[statementBlock1]
[ XELSE[statementBlock2] ]
END IFLPRINT [@(col, row)|%(h, v)] [ itemList ]
M
MACHLG { constant | variable }[,{ constant | variable }...] /* Not Supported in FBtoC */MAXWINDOW h, vtrueOrFalse = MAYBEinfo& = MEM (expr)selectedMenu = MENU (_menuID)selectedItem = MENU (_itemID)MENU menuID, itemID, state [, string$ ]MENUMENU resID%,{_resMenu| _resSubMenu }, state [, resType$ ]MENU PREFERENCES menuID, itemIDsubString$ = MID$ (string$, startPos [, numChars ])subContainer$$ = MID$$ (container$$, startPos [, numChars ])MID$ (stringVar$, startPos, numChars) = replaceString$MID$$ (container$$, startPos, numChars) = replaceString$ / contnr$$MINWINDOW h, vstring$ = MKI$ (intExpr)remainder = expr MOD modulusbuttonStatus = MOUSE (_down)clickType = MOUSE (0)locationInfo = MOUSE (locationType)horzPosition = MOUSE (_horz)vertPosition = MOUSE (_vert)
N
result& = exprA { NAND | ^&} exprBNEXT - See FOR statementresult& = exprA { NOR | ^|} exprBvalue = NOT expr
O
octalString$ = OCT$ (expr)byteOffset = OFFSETOF (fieldName IN { recordType | trueRecVar })byteOffset = OFFSETOF (const [ IN pseudoRecVar ])ON APPLEEVENT (eventtype&, eventClass&) { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON BREAK { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON DIALOG { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON EDIT { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON ERROR { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON ERROR ENDON ERROR RETURNON EVENT { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON FINDERINFO { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON expr GOSUB { "label1" | lineNum1 }[,{ "label2" | lineNum2 }...]ON expr GOTO { "label1" | lineNum1 }[,{ "label2" | lineNum2 }...]ON LPRINT { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON MENU { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON MOUSE { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON OVERFLOWS { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON STOP { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}ON TIMER (interval) { FN userFunction| GOSUB { lineNumber | "stmtLabel" }}TIMER ENDTIMER OFFOPEN "method[fork]", fileID, path$|@FSSpec [, [ recLen ] [, refNum% [, dirID& ] ] ]OPEN "C", portID, baud [, [ parity ] [, [ stopbit ] [, [ wordLength ] [, buffer ] ] ] ]OPEN "UNIX", fileID, UNIXcommand$result& = exprA { OR exprBOUTPUT [ FILE ] "filePath"OVERRIDE Local Fn fnNameOVERRIDE Runtime fnNameOVERRIDE EnterProc fnNameOVERRIDE _constantName = newValue
P
lineCount = PAGEPAGEPAGE LPRINTPARENTID = directoryID& /* Not Supported in FBtoC */byteValue = PEEK [ BYTE ] (address&)shortIntValue% = PEEK WORD (address&)longValue& = PEEK LONG (address&)PEN [ penWidth ] [, [ penHeight ] [, [ visible ] [, [ mode ] [, pattern ] ] ] ]pictureHandle& = PICTUREPICTURE [(h1, v1)] [-(h2, v2)] [, pictureHandle& ]PICTURE FIELD [#] pfID [, [ pict ] [, [ rect ] [, [ type ] [, just ] ] ] ]PICTURE ON [(h1, v1)] [-(h2, v2)]PICTURE OFF [, pictHandleVar &]PLOT h, vPLOT TO h, vPLOT h1, v1 TO h2, v2 [ TO h3, v3 ...]POKE [ BYTE ] address&, byteExprPOKE WORD address&, shortIntExprPOKE LONG address&, longIntExprPOP (var) /* Not Supported in FBtoC */POP { BYTE | WORD | LONG }(address&) /* Not Supported in FBtoC */numCharacters = POS (deviceType)userCancelled = PRCANCELpRecH& = PRHANDLEPRINT [@(col, row)|%(h, v)] [ printItem [{,|;}[ printItem ]...] ]PRINT [@(col, row)|%(h, v)] [POINT [{,|;}[POINT]...] ]PRINT# deviceID,[ printItem [{,|;}[ printItem ]...] ]procAddress& = PROC "label"string$ = PSTR$ (address&)PSTR$ (addressVar&) = string$PUSH (var) /* Not Supported in FBtoC */PUSH { BYTE | WORD | LONG }(address&) /* Not Supported in FBtoC */PUT PREFERENCES prefFilePath$, prefRecord
R
RANDOM [ -IZE ] [ expr ]RATIO h, vREAD { var | PSTR$ (addressVar&)}[,{ var | PSTR$ (addressVar&)}...]READ # deviceID,{ recVar | numVar | strVar$ ; len } [,{ recVar | numVar | strVar$ ; len }...]READ DYNAMIC deviceID,arrayNameREAD FIELD [#] deviceID,handleVarREAD FILE [#] deviceID,address&,numBytes¤tRecord = REC (fileID)RECORD [#] fileID, recordNum [, positionInRecord ]currentA5& = REGISTER(A5) /* Not Supported in FBtoC */REGISTER ON /* Not Supported in FBtoC */REGISTER OFF /* Not Supported in FBtoC */[statement] REM [remarks][statement] ' [remarks][statement] // [remarks][statement] /* [blockRemarks]*/ [statement]RENAME oldPath$ { TO |,} newFileNameOnly$ [, refNum% [, dirID& ]]RESETRESOURCES "[ pathname ]" [," ttttcccc "]RESTORE [ expr ]RETURN [ "label" ]subString$ = RIGHT$ (string$,numChars)subContainer$$ = RIGHT$$ (container$$,numChars)randomInteger% = RND (expr%)
To re-route text and graphics:
To re-route text:
RUN path$ [, refNum% [, dirID& ]]RUNTIME routineName [(arg1 [, arg2 ...]) ]END RUNTIME
S
SCROLL (h1, v1)-(h2, v2), hPixels%, vPixels%SCROLL BUTTON [#] idExpr [, [ current ] [, [ min ] [, [ max ] [, [ page ] [, [ rect ] [, type ] ] ] ] ] ]SEGMENT [ minSegmentSize ] /* Ignored in PPC */SEGMENT RETURN /* Ignored in PPC */
SELECT [ CASE ] targetExprCASE testExpr [, testExpr ...] [, max32TestExpr ...][statementBlock]
[ CASE testExpr [, testExpr ...] [,max32TestExpr ...][statementBlock]...]
[ CASE ELSE[statementBlock] ]
END SELECT
SELECT [ CASE ]CASE booleanExpr [, booleanExpr ...] [, max32T booleanExpr ...][statementBlock]
[ CASE booleanExpr [, booleanExpr ...] [, max32T booleanExpr ...][statementBlock]...]
[ CASE ELSE[statementBlock]]
END SELECT
SENDAPPLEEVENT eventtype&, eventClass&, dataAddress& dataSize&, processName$SETSELECT startSelect%, endSelect%SETZOOM [#] windowID [,(h1, v1)-(h2, v2)]SETZOOM [#] windowID, @ rectsignOfExpr = SGN (expr)SHUTDOWN [ msg$ ]theSine# = SIN (expr)result# = SINH (expr)dataSize = SIZEOF ({ var | typeName | ptrType ^| hdlType ^^})SOUND ENDSOUND pitch, duration [, [ volume ] [, async ]]SOUND soundIDstring$SOUND %resIDNumberSOUND &soundHandle&soundIsPlaying = SOUND%stringOfSpaces$ = SPACE$ (numChars)SPC (numChars)squareRoot# = SQR (expr)STOP [ string$ ]stringFromList$ = STR# (resourceID%, index%)numberString$ = STR$ (numericExpr)stringFromHandle$ = STR& (handle&, index%)stringOfChars$ = STRING$ (numChars,{ char$ | asciiValue% })container$$ = STRING$$ (numChars,{ char$ | asciiValue% })STRINGLIST ON /* Not Supported in FBtoC any form */STRINGLIST OFFSTRINGLISTSTRINGLIST = resID [, ResourceName$ ]STRINGLIST OPTSTRINGLIST NOPTSTRINGLIST ENDSWAP variable1, variable2systemErrorCode% = SYSERRORSYSERROR = OSErrorCode%systemInformation = SYSTEM (whichInfo)SYSTEM
T
theTangent# = TAN (expr)result# = TANH (expr)TBALIAS oldName, NewName /* Not Supported in FBtoC */editFieldHandle& = TEHANDLE (fieldID) /* Not Supported in FBtoC */fieldInfo = TEHANDLE (- fieldID)char$ = TEKEY$TEKEY$ = string$TEXT [ font% ] [, [ size% ] [, [ face% ] [, copyMode% ] ] ]THREADBEGIN FN name [, parameter& [, stackMin&] ]abortBoolean = THREADSTATUS [ (ticks&) ]currentTime$ = TIME$secondsSinceMidnight& = TIMERTIMER = intervalTIMER (0) OFFTIMER (0) ENDTOOLBOX [ FN ] functionName [(arg1 [, arg2 ...]) ] [= returnParam ] [` 0x0000, 0x0000 ...]TRON [ ALL ]TRON BREAKTROFFTRON XdataType = TYPEOF ({ variable | typeName })
U
theTangent# = TAN (expr)upperCaseString$ = UCASE$ (string$)upperCaseContainer$$ = UCASE$$ (container$$)returnVar = UNIVERSALFN (procPtr&, flags [, parm1 [, parm2 ...] ]) /* Not Supported in FBtoC */UNIVERSALPROC (procPtr&, flags [, parm1 [, parm2 ...] ]) /* Not Supported in FBtoC */UNLOADSEGMENT "statementLabel " /* Not Supported in FBtoC */digitString$ = UNS$ (expr)UNTILstring$ = USING format$ ; exprreturnValue& = USR fnIndicator (expr)absValue& = USR ABS (expr)dataHandle& = USR APPLESCRIPTGETRESULTerrorFlag = USR APPLESCRIPTLOADANDRUN (fSpec, resID%)errorFlag = USR APPLESCRIPTRUN (errorMessage$)errFlag = USR APPLESCRIPTSTORE (fSpec, resID%, scriptName$)err = USR CONVERTIMAGEFILE (srcName$,srcRef%, destName$,destRef%, newTypeIn&, newCreator &)err = USR COPYFILE (SrcName$, SrcVol%, SrcDir&, DestName$, DstVol%, DstDir&)elementSize& = USR DYNAMICITEMSIZE (whichIndex)evenNumber& = USR EVEN (expr)boolean = USR FILEEXISTS (fileName$, vRefNum%, dirID&)fontHeight = USR FONTHEIGHTboolean = USR FSFILEEXISTS (fsSpec)error = USR FSSENDFILETOTRASH (FSSpec)resultCode = USR FSGETFOLDERNAME (fsSpec,folderName$)resultCode = USR FSGETFULLPATHNAME (fsSpec,pathName$)boolean = USR GETDOUBLEBYTE /* Not Supported in FBtoC */resultCode = Usr FSGETFOLDERNAME (fsSpec, folderName$)resultCode = USR GETFULLPATHNAME (vRef%,dirID&,pathName$)boolean = USR GETSINGLEBYTE /* Not Supported in FBtoC */pictHandle& = USR GETPICT ({ rect | #rectAddr& })buttonID% = USR HANDLE2BTN (ctrlRecHandle&)pictHandle& = USR IMAGEFILETOPICT (fileName$, vRef%)err = USR MOVEFILE (SrcName$,SrcVol%,SrcDir&,DstVol%,DstDir&)resRef = USR OPENRFPERM (fileName$,vRef%,permission) /* Not Supported in FBtoC */rHndl& = USR REPLACERESOURCE (rHndl&, rTp&, rID%,rName$, rRef%)wholeNumber = USR ROUND (numericExpression)wholeNumber = USR ROUNDUP (numericExpression)wholeNumber = USR ROUNDDOWN (numericExpression)err% = USR SAVEIMAGEFILEASPICT (srcName$, srcVol%, destName$,destVol%)resultCode = USR SCANFOLDER (FileScanRecord)error = USR SENDFILETOTRASH (fileName$, vRefNum %) /* Not Supported in FBtoC */offset& = USR STROFFSET (element%, resID% | handle&)WindowID% = USR WPTR2WNUM (WindowPtr&)
V
numericValue = VAL (string$)integerValue& = VAL& (string$)ignored = FN VALIDRECT (rect)address& = VARPTR ({ var | FN userFunction})address& = @ var
W
WIDTH [ LPRINT ] [=]{_noTextWrap|_textWrap| numChars }WindowInformation = WINDOW(expr)WINDOW [#] idExpr [, [ title$ ] [, [ rect ] [, [ type ] [, class ] ] ] ]WINDOW CLOSE [#] windowIDWINDOW FILL [[#] expr ]WINDOW OUTPUT [#] idExprWINDOW PICTURE [#] windowID,pictHandle&ptr& = WNDBLK /* Not Supported in FBtoC */WRITE [#] deviceID,{ var | strngVar$ ; len } [,{ var | strngVar$ ; len }...]WRITE DYNAMIC deviceID, arrayNameWRITE FIELD [#] deviceID, handle&WRITE FILE [#] deviceID, address&, numBytes&
X
XELSE - See the LONG IF statementresult& = exprA {XOR | ^^} exprBXREF arrayName (maxSub1 [, maxSub2 ...]) [ AS dataType ]
XREF@ arrayName (maxSub1 [, maxSub2 ...]) [ AS dataType]
Template (to be removed later)
Go here: <http://en.wikibooks.org/wiki/Futurebasic/language/reference> to admire the long list of keywords to work on.
Use template page (the link is just above).
To edit an entry:
1 - Click on the link titled Template (above the list of keywords).
2 - A new page is displayed in your browser showing how the layout of an entry looks like. Click on the top most link on the right of the screen (probably titled [edit] in English).
3 - The browser opens a new page displaying a form. The main field contains the code used to create the template. It looks like the following:
= <span style="color:red">Layout Template (remove this line)</span> = == Keyword Goes Here == === Statement Function Operator or Other? (update the checkmarks below) === ✔ χ Appearance ✔ χ Standard ✔ χ Console === Syntax === <pre> code syntax goes here and is pre-formatted (plain text) </pre> === Revised === Date & release (remove the Revised section if no date) === Description === Description goes here. === Example === <pre> Sample code goes here (remove the Example section if no sample code) </pre> === Notes === Special notes. (leave this section if no notes) === See Also === cross-reference [[Futurebasic/language/reference|Language Reference]]
4 - Copy the whole text (you can possibly paste it in a text editor window to have it handy at a later time).
5. - If you haven't already done so, put beer in fridge
6 - Now go find a keyword in the list whose entry is empty, and paste the template code and click on the Save button.
If you're not comfortable with HTML, leave to someone else the updating of the entry and repeat the process for another empty keyword entry (i.e. GOTO #6).
If you want to proceed further:
7 - Open the FB Help page in a new browser window or better a text editor. If you're using a browser you will have to display the HTML source code.
Now, depending on your skill with HTML coupled with wiki idiosyncrasy you might do the following:
8a - Edit again the keyword entry updating each section with the corresponding HTML code of the FB Help page.
9a - Save your change and leave to someone else the pleasure to clean up the mess.
or
8b - Clean up the HTML code in your text editor. Sometimes, there are a bunch of tags to remove and even to use more efficiently, I guess. Leave the links related to the missing image resources, it might help later to find out which entries require illustrations. Maybe Christopher can tell us how we can manage the image files.
FB snippets of code of the Ref manual need serious cleaning since they are inserted inside <pre></pre> tags therefore they cannot embed any other HTML code. Other things are worth to know (perhaps for another post), but I think the rule of thumb is to end-up with the less HTML code as possible.
9b - Update each section of the keyword entry with the appropriate clean HTML code.
10 - Repeat ad nauseum (i.e. GOTO #6) with a variant, though: try to find also keyword entries whose template has not been updated.
11 - Celebrate in true Staz style (with beer) when you're done (optional).