This page is a quick syntax check for use with JustBasic. I like to collect files of this type when I use a programming language that I

am not sure about. It is not complete. Use the manual for details. 




 abs(x)          absolute value of x

 acs(x)          arc cosine of x in radians

 asc(a$)        ASCII value of first letter of string

 asn(x)          arc sine of x in radians

 cos(x)          cosine of x

 exp(n)          e^n

 int(x)            converts real number to integer

 log(x)           natural logarithm of x

 mod             a mod b       remainder of a/b

 randomize x  seeds random number generator with x

 rnd(1)           returns random number from 0 to 1

 sin(x)            sine of x

 sqr(x)           square root of x

 tan(x)           tangent of x

 timer 3000, [event]  go to label named [event] after 3 seconds and return.


 chr$(n)            returns character 0-255

 date$()            returns date

 Inkey$             returns character from keyboard  a$ = Inkey$

 input a             waits for data from keyboard. Must end with enter key

 input "enter data"; a

 left$(a$,x)       returns x number of letters from left side of string a$ 

 len(a$)            returns length of a$

 locate column,row        used before print statement to locate start point for print

 lower$(a$)        returns lower case leters

 lprint a$           prints to printer

 mid$(a$,x,n)     returns n characters starting at location x.  n is optional.

 print a$             prints string a$ + return

 print "print this"  print string between quote marks.

 print b$;            prints string b$ with no return

 printerfont$       font used in print commands. See manual to change.

 right$(a$,x)       returns x number of letters from right side of string a$

 space$(x)         string of x spaces

 statictext          used in text boxes. See manual.

 str$(x)              converts number to string



 time$()            returns system clock

 tab(x)              set cursor to location x for printing.

 val(a$)            converts string to number


 close #f          close file or window named #f

 defaultdir$      directory that contains Just Basic program

 drives$           contains system drive letters

 dump              causes lprint to print all

 eof(#f)             returns -1 if end of file has been reached. returns 0 if not.   a=eof(#f)

 field #f, list...



 get #f,x          


  kill a$            delete file

 lof(#f)             returns number of bytes in file.


 line input #f,a$    returns one line of characters from file. line ends with return


 open "c:\readme.txt" for input as #f                      open file for reading

 open " Program" for window_nf as #main              open window not full screen

                                          _fs   _nf  _nsb  _ins  _modal                 

 open "com2:9600,n,8,1" for random as #commHandle               open comm port

 open " Program" for graphics_fs as #main           open graphics window  full screen

 open " Program" for text_fs as #main                  open text window

 put #f,n


















    open "Drawing" for graphics as #G              Draw on Graphics window

    print #G, "home"       

    print #G, "up ; home ; down ; north ; go 50 ; fill red ; circle ; flush"

                  Other GRAPHICS COMMANDS:

             "box x y"  "boxfilled x y"  "circle r"  "circlefilled r"  "cls"  "color red"  

                   black, blue, brown, buttonface, cyan, darkblue, darkcyan, darkgray, darkgreen, darkpink,

                   darkred, green, lightgray, palegray, pink, red, white, yellow

             "color red(0-255)  green(0-255) blue(0-255)"   "discard"  "down" "drawbmp bmpname x y" 

             "drawbmp bmpname x y"   "ellipse w h"  "ellipsefilled  w h"   "fill COLOR"   

             "fill red(0-255)  green(0-255) blue(0-255)"  "flush"   "flush segmentName"  

             "font Times_New_Roman 10"  "getbmp bmpName x y width height"   " "go D"  "goto X Y" "home"

             "horizscrollbar on/off [min max]"   "line X1 Y1 X2 Y2"  "north"  "place X Y"  "posxy xVar yVar"

             "set x y" "size S"  "\text"  "turn A"  "up"  





 beep          plays default system wave file



         COMMANDS and LOOPS





 dim array()

 do loop





 gosub label

 goto label

 if then

















 restore   restore start point


 confirm string,a$       a$ is yes or no  string is message to confirm.


 global x,y,z               declare global variables


 name A$ as b$

 notice "message"




 prompt "expresion",a$    answer is in a$


 run a$,mode              run file name a$

 scan                         delay that looks for input

 trim$(a$)                   removes spaces in a$


 version$                    contains version number of Just Basic

Window types:

graphics               open a graphics window

graphics_fs open a graphics window full screen (size of the screen)

graphics_nsb open a graphics window w/no scroll bars

graphics_fs_nsb open a graphics window full screen, w/no scroll bars

graphics_nf_nsb open a graphics window with no sizing frame or scroll bars

text open a text window

text_fs open a text window full screen

text_nsb open a text window w/no scroll bars

text_nsb_ins open a text window w/no scroll bars, with inset editor

window open a basic window type

window_nf open a basic window type without a sizing frame

dialog open a dialog box

dialog_modal open a modal dialog box

dialog_nf open a dialog box without a frame

dialog_nf_modal open a modal dialog box without a frame

dialog_fs open a dialog box the size of the screen

dialog_nf_fs open a dialog box without a frame the size of the screen




Make a free website with Yola