Logo2
Logo
 
 

Hisoft Basic (not included)

Command reference

AREA [Step] (x,y)

Adds a point to the list used by next areafill statement.
Example: AREA (70,70)

=ASC(string)

this returns a numeric value that is ASCII code for the first character

=ATN(numeric_expression)

returns arctangent or angle whose tangent is numeric_expression

BEEP

flashes screen

=BIN$(numeric_expression)

returns representation of integer part

BLOAD filename,address

loads binary file into specified buffer

BREAK {on off stop}

modifies break event trapping to change effect of ON...BREAK statements

BSAVE filename,address,length

saves contents of specified buffer to output device filename

CALL sub_program_name

calls a sub program

CALL LOC address [,parameter]

call a machine-code routine

CALL sub_program_variable

calls a sub-program indirectly

=CDBL(numeric_expression)

converts expression to a double precision

CHAIN filename

loads and executes another program

CHDIR pathname

changes current directory

=CHR$(ascii_code)

returns one character

=CINT(numeric_expression)

converts expression to integer value

CIRCLE [STEP] (x_centre,y_centre),radius

draws a circle, ellipse or arc

CLEAR

clears all variables and closes all channels

=CLNG(numeric_expression)

converts to long integer value

CLOSE [[#]channel_number[,[#]channel_number]...]

terminates i/O

CLS

clears current output window

COLLISION {ON OFF STOP}

modifies collision event trapping

=COLLISION(object_id)

provides information about object collisions

COLOR [foreground_col][,background_col][,drawing_mode]

sets colour to be used in current window

COMMAND$

returns command line of program

COMMON SHARED variable

global variable may be accessed through any sub-program

CONST name=integer_constant

defines constants for use in place of integer variable

=COS(numeric_expression)

returns cosine

=CSNG(numeric_expression)

converts to single precision number

=CSRLIN

returns current line position in current window

=CVD,CVFFP,CVI,CVL,CVS

return internal numeric values of strings in bytes

DATA constant

defines data to be used by READ statement

=DATE$

returns current date

DECLARE subname

declares parameters of a sub-program

DECR numeric_value

subtract one

DEF FN function_name

define single- or multi-line functions

DEFDBL, DEFINT, DEFLNG, DEFSNG, DEFSTR letter_range

declares variables to be double precision, integer, long int, single precision or string

DIM variable

defines maximum value for array-variable subscripts and allocates the necessary storage

DO...LOOP

repeats statements within while conditions are true

END

ends program, function and so on

=EOF(channel_number)

tests for end-of-file

ERASE array_name

de-allocates arrays

ERL, ERR

return error status of current program

ERROR integer_expression

simulates occurrence of run time error

EXIT

exits a finction definition

=EXP(numeric_expression)

calculates exponential function

=FEXISTS(filename)

determines whether or not a particular file exists

FIELD channel_number

allocates space for variables in a random access buffer

FILES [file_spec]

lists names of files in specified directory

FILL x_start,y_start

fills shapes already drawn on screen

=FIX(numeric_expression)

produces truncated integer part

FOR....NEXT

....

=FRE(numeric_expression)

returns size of free heap space or AmigaDOS free memory

GET [#]channel_number

reads a record from a random-access disk file

GET ...

stores binary images from any part of current window

GOSUB...RETURN

branch to and return from subroutine

GOTO {line number or label}

jump to specified line

=HEX$(numeric_expression)

returns string specified by hexadecimal value

IF...THEN...ELSE

conditional executing

INCR numeric_variable

adds one to variable

=INKEY$

reads character from keyboard

INPUT ...

prompts the user for imput

INPUT #channel_number,variable_list

reads data and assigns it to variable_list

INPUT$ (n[#]channel_number])

reads n characters from specified channel

=INSTR([start,]1st_string,2nd_string)

returns location of first occurrence of strings

=INT(numeric_expression)

returns largest integer less than or equal to expression

KILL file_spec

all files fitting are deleted

=LBOUND(array[,dimension])

returns smallest available subscript

=LCASE$(string_expression)

returns a string with every alphabetic character in lower case

=LEFT$(string_expression,n)

returns a string made up of the leftmost n characters

=LEN(string_expression)

returns number of characters in expression

[LET] variable = expression

assigns variable the value of expression

LIBRARY library_name

defines which amiga libraries are to be used by the program

LINE...

draws a line, box or filled box in the current window

LINE INPUT string_variable

assigns entire line of input to string variable

LINE INPUT #channel_number,string_variable

reads sequence of characters from device or file

=LOC(channel_number)

returns current position within opened file

LOCAL variable_list

declares variables as local

LOCATE [row][,column [,cursor]]

puts cursor on column and row and can enable or disable cursor

=LOF(channel_number)

returns length of file

LOG, LOG10, LOG2 (numeric_expression)

returns natural logarith base e, base 10, or base 2

=LPOS(argument)

returns position of printer head

LPRINT, LPRINT USING format_string

print data through current printer port

LSET string_variable=string_expression

left-justify a string variable

MENU ...

adds and changes menu items

=MENU(n)

returns title and item of last menu item selected

=MID$(string_expression,n[,length])

returns length characters starting at nth character

MID$(string_variable,n[,length])=string_expression

modifies parts of string

MKDIR pathname

creates subdirectory

=MKI$,MKFFP$,MKL$,MKS$,MKD$ (expression)

convert expression to string

=MOUSE(attribute)

read current position of mouse and status of left mouse button

MOUSE {ON OFF STOP}

modifies mouse event

NAME old-filename AS new_filename

renames file

OBJECT statements and functions

AmigaBASIC compatible object statements and function

=OCT$(numeric_expression)

returns a string which is octal representation of expression

ON BREAK GOSUB {linenumber linelabel 0}

determines subroutine that is called when ctrl-c or A are pressed

ON COLLISION GOSUB {linenumber linelabel}

Determines subroutine that is called when object collides

ON ERROR GOTO {linenumber linelabel}

enable error handling and specify routine

ON n GOSUB {linenumber linelabel} [,{linenumber linelabel}]

calls one of a list of routines depending on value

ON n GOTO ...

causes program execution to branch

ON MENU GOSUB ...

determines subroutine when menu item is clicked

ON MOUSE GOSUB ...

determines subroutine when left mouse button is clicked

ON....TIMER

sets or disables timer event

OPEN file_spec [FOR mode] AS [#]channel_num [LEN=record_size]

prepares file for reading and writing

OPTION BASE {0 1}

defines lowest subscript value of arrays

PAINT [STEP] (x,y) [,paint_colour],[,border_colour]

fills an enclosed with given colour

PALETTE colour_number,red,green,blue

allows to change the physical appearance of colours on screen

PATTERN [line_pattern][,area_array]

sets line pattern and/or area fill pattern for graphics

PCOPY

dump current screen to printer

PEEK, PEEKB, PEEKL, PEEKW (address)

return contents of the memory specified

POINT(x_pixel,y_pixel)

returns colour of a particular pixel

POKE, POKEB, POKEL, POKEW address, byte_value

write data direct into memory

POS(x)

returns column number of current cursor position

PRESET [STEP] (x_pos,y_pos) [,colour]

resets or sets a pixel to a given colour

PRINT...

prints data on screen

PRINT #channel_num, [USING format_string] expression_list [;]

write formatted data to file or device

PRINT USING format_string; expression_list [{, ;}]

prints list according to format string

PSET [STEP] (x_pos,y_pos) [,colour]

plots a pixel of a given colour in current window

PTAB(x[,y])

moves to a given pixel position whilst printing

PUT [#]channel_number[,record_number]

writes record from buffer to file

PUT (x,y),array_name[,verb]

copies image onto screen saved with GET

RANDOMIZE [expression]

provides random number generator

READ variable_list

assigns values from DATA statements to variables

REDIM [APPEND] array(subscripts)[,array(subscripts)]

changes size of array

REM remarks

...

REPEAT name  ... END REPEAT name

statements are executed until EXIT statement

RESET

closes all open files

RESTORE [{line_number label}]

enables READ statement to access a DATA statement

RESUME {line_number line_label}

resumes execution from within an error handling routine

RETURN [{line_number label}]

returns execution from a subroutine

RIGHT$(string_expression,n)

returns string starting at nth character

RMDIR pathname

removes empty subdirectory

RND[(n)]

returns pseudo-random single-precision number between 0 and 1

RSET string_variable=string_expression

moves data in buffer

RUN [{line_number file_spec}]

restarts current program or that defined by file_spec

SADD(string_expression)

returns address of string_expression

SAY string_expression[,mode_array]

amiga speak given a string of phonemes

SCREEN screen-id,width,height,planes,mode[,type]

creates or closes screen

SCROLL (x1,y1)-(x2-y2),delta_x,delta_y

scrolls region of current output window

SELECT....END SELECT

executed depending on variable

SGN(numeric_expression)

returns sign of numeric_expression

SHARED variable_list

enables subprogram to access varaibles from main program

SIN(numeric_expression)

returns sine of expression which must be in radians

SLEEP

causes program to wait until event occurs

SOUND frequency,duration,[,[volume][,voice]]
SOUND WAIT
SOUND RESUME

produces sound from speaker

SPACE$(n)

returns string of spaces, the length of which is specified by n

SPC(n)

causes n spaces to be skipped in a PRINT statement

SQR(numeric_expression)

returns square root of expression

STATIC variable_list

declares variables as local

=STICK(n)

returns x and y positions of the two joysticks

STOP [process_returncode]

causes program to end

STR$(numeric_expression)

returns string of value of expression

=STRIG(n)

returns status of joystick fire button

=STRING$(m,n)

returns string composed of n which is of m length

SUB global_name ... END SUB

define a sub-program

SWAP 1st_variable, 2nd_variable

causes value to be exchanged

=SYSTAB

returns address of an internal system table

SYSTEM

causes program execution to end

=TAB(n)

causes print position to move to nth column

=TAN(numeric_expression)

returns tangent of expression

=TIME$

returns current system time

TIMER {ON OFF STOP}

modifies timer event to change effect of ON...TIMER

=TIMER

returns number of seconds since midnight as a single-precision number

=TRANSLATE$(string_expression)

converts string from english in phonemes suitable for SAY

TRON, TROFF

allow tracing of a program by line number as it runs

=UBOUND(array_name[,dimension])

returns largest available subscript of the array

=UCASE$(string_expression)

returns a string in upper case

=VAL(string_expression)

returns numeric value ofexpression

=VARPTR(variable_name) or VARPTR(#channel)

returns address in memory of variable or buffer

=VARPTRS(subname)

returns address in memory of the sub-program

WAVE voice,{wave_array SIN}

controls waveforms used by SOUND statement

WHILE...WEND

statements are executed until condition becomes false

WIDTH ....

assign a line width to specified file, screen or printer

WINDOW...

Creates and closes windows

=WINDOW(n)

enables certain information to be found about windows

WRITE [expression_list]

prints data to screen

WRITE #channel_number, expression_list

writes data to sequential file

 

All trademarks used on this site, whether marked or not, are protected by law.
AMIGA™ is a registered trademark of Amiga, Inc. Use of the software or downloading is entirely and wholly at the users risk.