; PSPad clip definition file for SHARP Pocket BASIC
; modified from QBASIC def file by Torsten Mücker
; author QBASIC def: Kamil Havlíček (hakam@centrum.cz) from XAGA
; -----------------------------------------------------------------------------
; important signs
; -----------------------------------------------------------------------------
[' | offline comment]
' 
["" | quotation marks]
"|"
[: | colon]
 : |
;----
[ABS | absolute value of a number]
ABS(|)
[ASC | ASCII code]
ASC(|$)
[CHR$ | returns character by ASCII]
CHR$(|)
[EXP | exponential (natural) of the number]
EXP(|)
[HEX$ | returns a hexadecimal string variable]
HEX$(|)
[INKEY$ | returns the character of a pressed key]
INKEY$|
[INT | returns the largest number that is less than or equal to the variable]
INT(|)
[LEFT$ | returns left part of a string]
LEFT$(|$,)
[LEN | returns string length]
LEN(|$)
[LN | the natural logarithm of the number]
LN(|)
[LOG | logarithm (decimal) of the number]
LOG(|)
[MID$ | returns a part of a string ]
MID$(|$,)
[POINT | returns pixel state]
POINT (|X,Y)
[RIGHT$ | returns right part of a string ]
RIGHT$(|$,)
[RND | returns a randomly generated number]
RND |[(n)]
[SGN | sign of a number ]
SGN(|)
[SQR | square root]
SQR(|)
[STR$ | converts numeric data into a string ]
STR$(|)
[TEN | exponential (decimal)of the number]
TEN(|)
[VAL | converts a string of numeric characters to a decimal number]
VAL(|$)
; trigonometric functions
[ASN | arc sine of a number]
ASN(|)
[ACN | arc cosine of a number]
ACN(|)
[ATN | arc tangent of a number]
ATN(|)
[COS | cosine of angle]
COS(|)
[SIN | sine of angle]
SIN(|)
[TAN | tangent of angle]
TAN(|)
[HSN | sine hyperbolic of angle]
HSN(|)
[HCS | cosine hyperbolic of angle]
HCS(|)
[HTN | tangent hyperbolic of angle]
HTN(|)
[AHS | arc sine hyperbolic of a number]
AHS(|)
[AHC | arc cosine hyperbolic of a number]
AHC(|)
[AHT | arc tangent hyperbolic of a number]
AHT(|)
;----
[AREAD | Reads a variable from the command line]
: AREAD |
[BEEP | Beep buzzer]
: BEEP |[Counter]
;---
[CALL | Call ML procedure]
: CALL |offset[,argument list]
;--
[CIRCLE | draw a circle or ellipse on the printer]
: CIRCLE |center coordinate x, y),radius[,[color] [,[start angle] [,[end angle] [,aspect][,distribution][,sector]]]]
[LINE | draw a line or rectangle on the screen]
: LINE [(x1,y1)]-(x2,y2) [,[attribute] [,[bit pattern] [,X]]]]
[LLINE | draw a line or rectangle on the printer]
: LLINE [(x1,y1)]-(x2,y2) [,[line type],[color] [,[B]]
[CLS | CLear the Screen]
: CLS |
[CLEAR | delete variables]
: CLEAR |
[DATA | Data for restore or functional expression]
: DATA |
[DIM | Sizes variables]
: DIM |()
[DEGREE | Sets angle functions to old degrees]
: DEGREE|
[END | ends a program]
: END
|
[ERASE | delete array]
: ERASE | array name [,array name]...
[GOSUB | branches to a subroutine with label]
: GOSUB "|"
[GOTO | jumps to a label]
: GOTO "|"

[GOTO | jumps to a number]
: GOTO |

[GRAD | Sets angle functions to new degrees]
: GRAD|
[INPUT | Reads input from the command line ]
: INPUT "|="; 
[LET | assign values or strings to variables]
 LET |=
[PAUSE | writes expression list {;|,} to the screen and continues]
: PAUSE |
[PRINT | writes expression list {;|,} to the screen]
: PRINT |
[PRINT# | writes data to a file]
: PRINT# |[filename$;] [expression list] [,]
[LPRINT | prints expression list {;|,} through the printer]
: LPRINT |
[ON GOSUB | Subroutine call dependent on a variable]
: ON | GOSUB 
[ON GOTO | Branching depending on a variable]
: ON | GOTO 

[RADIAN | Sets the angle functions to radians]
: RADIAN|
[RESTORE | sets the data pointer for read to a label]
: RESTORE "|"
[RETURN | returns back from the subroutine]
: RETURN
|
[RANDOM | initializes the random number generator]
: RANDOM|
[RANDOMIZE | initializes the random number generator E500]
: RANDOMIZE| 
[REM | comment]
: REM |
[STOP | breaks a program]
: STOP|
[TROFF | Trace off ]
: TROFF|
[TRON | Trace on ]
: TRON|
[USING | Print format]
USING "|"
[WAIT | Waiting for Print]
: WAIT |
;----
; File related commands
[RUN | runs a program (running again or another)]
RUN [{linenumber oder mark$}]
[CHAIN | hands over control to another Basic program]
: CHAIN filename$
[CLOAD M | load memory saved with CSAVE M]
: CLOAD M |[filename$;] [offset, autostart]
[CSAVE M | save the memory to a tape device]
: CSAVE M |[filename$;] [offset, autostart]
[FILES | view directory contents]
: FILES [file mask$]
[KILL | erases the file from the disk]
: KILL filename$
[LIST | Lists the file in main memory]
LIST filename$
[OPEN | opens a file or device]
: OPEN filename$ [FOR mode] AS [#]filenumber
[CLOSE | closes 1 or more files or devices]
: CLOSE [[#]file number[,[#]file number]...]
;---
[IF..THEN | IF THEN condition (one line)]
: IF | THEN 
[IF..THEN..ELSE | IF THEN ELSE condition (statements at one line)]
: IF |condition THEN statementsTrue ELSE statementsFalse
;
[IF..THEN | IF true block]
: IF |condition THEN
:  StatementBlockTrue
: ENDIF
[IF..THEN..ELSE | IF both blocks]
: IF |condition THEN
:  StatementBlockTrue
: ELSE
:  StatementBlockFalse
: ENDIF
;---
[FOR TO | head of loop with the final number]
: FOR |= TO 
[STEP | counter step (FOR loop)]
 STEP |
[FOR .. NEXT | loop with the final number of passes (FOR loop)]
: FOR |= TO end [STEP increment]
:  StatementBlock
: NEXT counter
[NEXT | bottom of loop with the final number]
: NEXT |
;---
[WHILE .. WEND | loop with condition at the beginning]
: WHILE |condition
:  
:  
: WEND

;---
[CASE | CASE condition-testing variable]
: SWITCH |expressionToBeTested
: CASE expressionList1
:   StatementBlock1
: CASE expressionList2
:   StatementBlock2
: ...
: DEFAULT
:   StatementBlockN
: ENDSWITCH
