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. 

      

           MATH

 

 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.



         TEXT


 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

 textbox

 texteditor

 time$()            returns system clock

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

 val(a$)            converts string to number


         FILE


 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...

 filedialog

 files

 get #f,x          

 input$(#f,n)

  kill a$            delete file

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

 loc(#f)

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

 open

 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

 rmdir()

 seek

 upper$(a$)



         GRAPHICS


 bmpbutton

 bmpsave

 button

 cls

 combobox

 displaywidth

 displayheight

 groupbox

 graphicbox

 listbox

 loadbmp

 checkbox

 unloadbmp


    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"  


 

          SOUND

 playmidi

 playwave

 beep          plays default system wave file

 midipos()

 stopmidi



         COMMANDS and LOOPS


 byref

 call

 commandline$

 confirm

 dim array()

 do loop

 drives$

 end

 exit

 for...next

 function

 gosub label

 goto label

 if then

 mainwin

 menu

 mkdir()

 nomainwindow

 redim

 rem

 return

 rmdir()

 sub

 redim

 wait

 while...wend



       DATA

 

 read

 data

 restore   restore start point


      Other


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

 dump

 global x,y,z               declare global variables

 instr(a$,b$,n)

 name A$ as b$

 notice "message"

 oncomerror

 platform$

 printerfont

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

 readjoystick

 run a$,mode              run file name a$

 scan                         delay that looks for input

 trim$(a$)                   removes spaces in a$

 txcount(#handle)

 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