| HotBasic Compiler Help
HOME CONTACT APPENDIX CREDITS Updated: Sep 10, 2008 Update your Manual local copy with HotIDE::Tools:: Update Help Files Artwork by Don HotBasic Doctor HotBasic Tips Common Mistakes | A major goal is program source code that compiles and behaves the same on Windows or Linux platforms. Compiler Getting Started Documentation Switches Error Levels and Run-Time Errors Directives $APPTYPE $ARRAYPOS $DEFINE $DUPARGERR $DUPPROCERR $ELSE $ENDIF $EQUALPREC $ESCAPECHARS $GTKFORM $GUIOBJ $IFDEF $IFNDEF $INCLUDE $MACRO OFF ON $OPTIMIZE $OPTION $RESOURCE $SYMBOLTABLE $TYPECHECK $UNDEF $UPPERCASE $X11 $XPSTYLE Statements Variables and Types BUTTON BYTE CANVAS CHECKBOX COMBOBOX DATE DOUBLE DWORD EDIT FILE FILELISTBOX FORM FUNCTION GAUGE GRID GROUPBOX IMAGE INT64 INTEGER LABEL LIST LISTBOX LISTVIEW LONG MEMORY PANEL RADIOBUTTON REAL10 RECT RICHEDIT RICHEDIT2 SCROLLBAR SHORT SINGLE SOCKET SPLASH SQLITE STATUSBAR STRING SUB TABCONTROL TIMER TOOLBAR TRACKBAR TREEVIEW UPDOWN VARIANT WORD Dimension AS CONST CREATE DEFBYTE DEFDBL DEFDWORD DEFINT DEFINT64 DEFLNG DEFREAL10 DEFSHORT DEFSNG DEFSTR DEFWORD DIM EXTENDS OBJECT REDIM STATIC TO TYPE Arrays Console CLS COLOR FREECONSOLE INPUT LOCATE PAUSE PRINT SETCONSOLEMODE SETCONSOLETITLE SHOWCONSOLE Loops and Code Blocks CASE DO ELSE ELSEIF END EXIT FOR IF IS LOOP NEXT SELECT STEP THEN TO UNTIL USE WEND WHILE Procedures BYREF BYVAL CALL CALLFUNC CDECL DECLARE END EXIT FUNCTION GOSUB LIB RESULT RETURN RETVAL STD SUB Directories and Files CHDIR CHMOD COPY DELETE EXTRACTRESOURCE KILL LIBRARYINST MKDIR MOVE RENAME RMDIR UNLOADLIBRARY Data DATA READ RESTORE Sound BEEP SOUND Miscellaneous BYTESWAP DEC DOEVENTS END ENVIRON FREECONSOLE GOTO IADD IDIV IMOD IMUL INC INITARRAY ISHL ISHR ISUB NOTHING OUT OUTW RANDOMIZE REDIM RUN SHELL SHELL1 SHOWCONSOLE SHOWMESSAGE SLEEP SWAP THIS WAITTHREAD WITH Advanced Techniques ARRAYREF ARRAYREF$ ASM BYREF BYREF$ CALLFUNC EXTERNAL FUNCCALL MEMCPY MEMSET POP PUSH REDIMEX RETVAL RUNONCE SETGTK SYSCALL WINDOW Threads BEGIN CREATETHREAD END EXIT LOCKOBJ STACK STACKALLOC STACKFREE THREAD UNLOCKOBJ WAITOBJ WAITTHREAD String Functions [] ANSI$ ARRAYREF$ BIN$ BYREF$ CHR$ COMMA COMMAND$ COMMANDLINE$ CRLF CURDIR$ DATE$ DELETE$ DIR$ ENVIRON$ FIELD$ GET$ GETGTK$ HEX$ IIF$ INKEY$ INPUT$ INSERT$ LCASE$ LEFT$ LTRIM$ MID$ NULL PATH$ QUOTE REPLACE$ REPLACESUBSTR$ REVERSE$ RIGHT$ RTRIM$ SPACE SPACE$ STR$ STRING$ TAB TIME$ TRIM$ UCASE$ VARIANTREF$ VARPTR$ WIDE$ WINDIR$ WINDOW Numeric Functions @ - ABS ACOS ARRAYREF ASC ASIN ATAN ATN BOOL BOOLEAN BYREF BYTESWAP CALLBACK CEIL CINT CLNG CODEPTR COMMANDCOUNT COS CREATETHREAD CSRLIN DIREXISTS EAX EXP FALSE FILEEXISTS FIX FLOOR FRAC GETGTK GETLASTERROR HCOS HEX2DW HIWORD HSIN HTAN IADD IDIV IIF IMOD IMUL INP INPW INSTR INT ISCONSOLE ISHL ISHR ISUB LBOUND LEN LN LNTWO LOG LOG2E LOG2TEN LOGTWO LOWORD MEMCMP NEG NOT OBJPTR ONE PI POS POSTMESSAGE RESOURCE RESOURCECOUNT RETFUNC RGB RND ROUND SCREEN SGN SENDMESSAGE SHELL SHELL1 SIN SIZEOF SQR TALLY TAN TIME TIMER TRUE UBOUND VAL VARIANTREF VARPTR VARTYPE WAITTHREAD WINDOW ZERO Objects APPLICATION ErrorLevel Handle (numeric) ExeName Path (string) Methods: ErrorLevel Icon OnExit Terminate OnFPUerror Title CONSOLE with keyboard and mouse events, color and cursor control CUSTOM Objects With custom properties, methods and functions DATE Year Month Day DayOfWeek DayofYear Hour Minute Second (numeric) METHODS: LoadInt64 SaveInt64 Update DIALOGS OpenDialog and SaveDialog implemented. Thus far, the .Flags property is not used. Otherwise, it is coded as in Windows applications. FILE FILEREC Attr Inode Dev Nlink Uid Gid DevType Size BlkSize Blocks LastRead LastWrite LastChange (numeric) Date DateLastRead DateLastWrite Time TimeLastRead TimeLastWrite (string) (R only). Access these values after use of DIREXISTS, FILEEXISTS or DIR$ FONT GTK-mode supports .Name, .Height, .Weight and .Italic properties. X11-mode supports the .Name property, which can include other properties up to 32 characters. FORM Objects BUTTON CANVAS CHECKBOX COMBOBOX EDIT FILELISTBOX GAUGE GRID GROUPBOX IMAGE LABEL LISTBOX LISTVIEW PANEL RADIOBUTTON RICHEDIT RICHEDIT2 SCROLLBAR SPLASH STATUSBAR TABCONTROL TOOLBAR TRACKBAR TREEVIEW UPDOWN This Manual for Linux is a work in progress and may lag developments reported in the Yahoo! HotBasic_Linux Forum, especially for GUI appplications in X11 or GTK modes. X11-Mode: Introduction Properties Methods Events GTK-Mode: Introduction Properties Methods Events Details (Windows or Linux): Properties Methods Events By Keyword FPU HotBasic exclusive LIST MEMORY Streams with Encrypt and Decrypt methods MENU MainMenu MenuItem. Thus far, FORM menu bars are supported. In GTK-mode, menu bars are native; in X11-mode, please use xmenu.inc. In both, one-level menu trees are supported; that is, a MAINMENU cannot (yet) be a child of a MAINMENU. Certain Windows' bells and whistles such as .Checked and .CheckedBMP are not supported, mainly because GTK does not have a MENUITEM object which is manipulable on-the-fly -- rather it has a number of different objects which can be hard-wired in source code. RECT Left Top Right Bottom (RW) SCREEN Height Width (R only) SOCKET SQLITE requires SQLite.dll (needs update to use sqlite.so) STRING All MEMORY and LIST properties and methods apply to STRING objects TIMER VARIANT Type VERSION SysName NodeName Release Version Machine DomainName (string) Operators and Precedence Order: higher to lower (& for VB strings) ^ * / \ SHL SHR MOD INV + - [relational] NOT AND OR XOR Appendix ASSEMBLER Inserts VARIANT Qualified Type RECURSIVE Procedure Calls Credits Thanks to Armando I. Rivera for extensive support in HotBasic Linux development with amazing trouble-shooting, testing and problem-solving including special builds of binary utilities (ldw and objcopyw) able to input Windows .obj files and Linux .o files. Thanks to Raymond Filiatreault for permission to use two of his FPU routines: conversion of string to FPU value and FPU value to string. Thanks to Don for permission to use his "Hot! Basic" artwork. Thanks to D. Richard Hipp for writing sqlite.dll used by the HotBasic SQLITE object. Copyright © 2003-2007 James J Keene PhD HotBasic™ is a trademark of James J Keene Original Publication: May 29, 2003