SBASIC/SuperBASIC Reference Manual Online Logo
latest
  • Foreword
    • 2015 Foreword
    • Online Edition Foreword
  • Introduction
    • Contributing Authors
    • Installing Toolkits
  • Credits
    • Other Notices
  • Structure
    • Syntax
      • Square Brackets ([ ])
      • Square Brackets With Superscript Asterisks (*[ ]*)
      • Curly Brackets ({ })
      • Channels (#ch)
      • Location
    • Description
    • Examples
    • Notes
    • [Implementation] Notes
    • Warning
    • Cross-Reference
  • Writing Programs
    • Compiling SuperBASIC Programs
    • Writing Programs to Run Under the Pointer Environment
      • Using the Pointer and Menu Facilities
    • Multitasking Programs
  • Keywords Introduction
  • Toolkits in this Manual
    • Ähnlichkeiten
    • ARRAY
    • ATARI Emulators
    • ATARIDOS
    • ATARI_REXT
      • ATARI_REXT - Pre v1.21
      • ATARI_REXT - v1.21
      • ATARI_REXT - v1.24 to v2.15
      • ATARI_REXT - v1.29
      • ATARI_REXT - v2.10
      • ATARI_REXT - v2.12
      • ATARI_REXT - v2.15
      • ATARI_REXT - v2.17
      • ATARI_REXT - v2.22
      • ATARI_REXT - v2.25
      • ATARI_REXT - v2.27
      • ATARI_REXT for QVME - v2.31
    • Amiga QDOS - v3.20
    • BGI
    • BIT
    • BTool
    • BeuleTools
    • COMPICT
    • CONCAT
    • CONVERT
    • CRYPTAGE
    • DESPR
    • DEV device
    • DIY Toolkit
      • Volume A - Alias
      • Volume B - Basic Tools
      • Volume C - Channels
      • Volume E - Error Control
      • Volume F - File Tools
      • Volume G - Graphics
      • Volume H - Heap and Horology
      • Volume I - Serial Mouse
      • Volume J - Jobs
      • Volume M - MultiBASIC
      • Volume P - Pipes and Parameters
      • Volume Q - Queues and QDOS
      • Volume R - Replace
      • Volume S - Qlipboard
      • Volume T - Traps
      • Volume U - Environment Variables
      • Volume V - More
      • Volume W - Windows
      • Volume X - MSearch and Vocab
      • Volume Y - FlexyNet
      • Volume Z - Array Search
    • Djtoolkit v1.16
    • Disk Interfaces
    • ETAT
    • Ecran Manager
    • Environment Variables
    • FACT
    • FKEY
    • FN
      • FN v1.02 Onwards
    • FONTS
    • FRACT
    • Fast PLOT/DRAW Toolkit
    • GETSTUFF
    • Gold Card
      • Gold Card - v2.24
      • Gold Card - v2.67
    • GPOINT
    • HCO
    • HOTKEY II
    • Hard Disk Driver
    • History Device
    • Hyper
    • Hyperbola
    • KEYMAN
    • KILL
    • LWCUPC
    • Level-2 Device Drivers
    • MINMAX2
    • MULTI
    • Math Package
    • Minerva
    • Minerva - Trace Toolkit
    • Minerva Extensions Toolkit
    • NDIM
    • PAR/SER Interfaces
    • PEX
      • PEX - v20
    • PICEXT
    • PIE
    • PRIO
    • PTRRTP
    • Path device
    • Pointer Interface - v1.23 Onwards
    • QL ROM
      • QL ROM JM Onwards
    • QPC / QXL
    • QSOUND
    • QView Tiny Toolkit
    • QVME - Level E-19 Drivers onwards
    • QXL
    • Qjump RAMPRT
    • RES
    • REV
    • SDUMP_REXT
    • SERMouse
    • SMS
      • SMS - v2.31
    • SMSQ
      • SMSQ - 3.26
    • SMSQ/E
      • SMSQ/E - v2.50 Onwards
      • SMSQ/E - v2.55 Onwards
      • SMSQ/E - v2.58 Onwards
      • SMSQ/E - v2.71 Onwards
      • SMSQ/E - v2.73 Onwards
      • SMSQ/E - v2.98 Onwards
      • SMSQ/E - v3.00 Onwards
      • SMSQ/E - v3.01 Onwards
      • SMSQ/E - v3.12 Onwards
      • SMSQ/E - v2.73 for Atari
      • SMSQ/E for QPC
    • ST/QL
      • ST/QL - Pre v2.24
      • ST/QL - Level B-11 Onwards
      • ST/QL - Level C-17 Onwards
      • ST/QL - Level C-19 Onwards
      • ST/QL - Level C-20 Onwards
      • ST/QL - Level D00 Onwards
      • ST/QL - level D.02 Onwards
    • STAMP
    • SWAP
    • SYSBASE
    • Shape Toolkit
    • Super Gold Card
    • SuperQBoard
    • SuperWindow Toolkit
    • THOR
      • THOR 8
      • THOR 8 - v4.20 Onwards
      • THOR XVI
    • TRIM
    • TRIPRODRO
    • TRUFA
    • TinyToolkit
      • TinyToolkit - Pre v1.10
      • TinyToolkit - v1.10 Onwards
    • Toolfin
    • Toolkit II
      • Toolkit II - Hardware Version Only or SMS
    • Trump Card
    • Turbo Toolkit
      • Turbo Toolkit - v3.00
      • Turbo Toolkit - v3.20
    • UNJOB
    • WIPE
    • WM
    • XKBD
  • Keywords A
    • ABS
    • ABS_POSITION
    • ACCEL_OFF
    • ACCEL_ON
    • ACCEL_SET
    • ACCEL_STATE
    • ACOPY
    • ACOS
    • ACOT
    • ADATE
    • ADDREG
    • ADELETE
    • ADIR
    • AFORMAT
    • AJOB
    • ALARM
    • ALCHP
    • ALIAS
    • ALINE
    • ALLOCATION
    • ALPHA_BLEND
    • ALT
    • ALTER
    • ALTKEY
    • AND
    • APOINT
    • APPEND
    • AQCONVERT
    • ARC
    • ARC_R
    • ARCOSH
    • ARCOTH
    • ARSINH
    • ARTANH
    • ASIN
    • ASK
    • ASTAT
    • AT
    • ATAN
    • ATARI
    • ATARI_EXT
    • ATN
    • ATN2
    • AUTO
    • AUTO_DIS
    • AUTO_TK2F1
    • AUTO_TK2F2
    • A_BLANK
    • A_EMULATOR
    • A_MACHINE
    • A_OLDSCR
    • A_PROCESSOR
    • A_RDATE
    • A_SDATE
    • A_SPEED
  • Keywords B
    • BASIC
    • BASICP
    • BASIC_B
    • BASIC_W
    • BASIC_L
    • BASIC_B%
    • BASIC_W%
    • BASIC_F
    • BASIC_INDEX%
    • BASIC_NAME$
    • BASIC_POINTER
    • BASIC_TYPE%
    • BAT
    • BAT$
    • BAT_USE
    • BAUD
    • BAUDRATE
    • BCLEAR
    • BEEP
    • BEEPING
    • BELL
    • Beule_EXT
    • BGCOLOUR_QL
    • BGCOLOUR_24
    • BGET
    • BGIMAGE
    • BICOP
    • BIN
    • BIN$
    • BINOM
    • BIT%
    • BLD
    • BLOCK
    • BLOOK
    • BLS
    • BMOVE
    • BORDER
    • BPEEK%
    • BPEEK_W%
    • BPEEK_L
    • BPOKE
    • BPOKE_W
    • BPOKE_L
    • BPUT
    • BREAK_ON
    • BREAK_OFF
    • BREAK
    • BREAK%
    • BTool_EXT
    • BTool_RMV
    • BTRAP
    • BUTTON%
    • BVER$
    • BYTES_FREE
  • Keywords C
    • CACHE_ON
    • CACHE_OFF
    • CALL
    • CAPS
    • CATNAP
    • CBASE
    • CCHR$
    • CDEC$
    • CD_ALLTIME
    • CD_CLOSE
    • CD_EJECT
    • CD_FIRSTTRACK
    • CD_HOUR
    • CD_HSG2RED
    • CD_INIT
    • CD_ISCLOSED
    • CD_ISINSERTED
    • CD_ISPAUSED
    • CD_ISPLAYING
    • CD_LASTTRACK
    • CD_LENGTH
    • CD_MINUTE
    • CD_PLAY
    • CD_RED2HSG
    • CD_RESUME
    • CD_SECOND
    • CD_STOP
    • CD_TRACK
    • CD_TRACKLENGTH
    • CD_TRACKSTART
    • CD_TRACKTIME
    • CEIL
    • CHANGE
    • CHANID
    • CHANNELS
    • CHANNEL_ID
    • CHAN_B%
    • CHAN_W%
    • CHAN_L%
    • CHARGE
    • CHAR_DEF
    • CHAR_INC
    • CHAR_USE
    • CHBASE
    • CHECK
    • CHECK%
    • CHECKF
    • CHK_HEAP
    • CHR$
    • CIRCLE
    • CIRCLE_R
    • CKEYOFF
    • CKEYON
    • CLCHP
    • CLEAR
    • CLEAR_HOT
    • CLIP%
    • CLIP$
    • CLOCK
    • CLOSE
    • CLOSE%
    • CLRMDV
    • CLS
    • CLS_A
    • CMD$
    • CODE
    • CODEVEC
    • COL
    • COLOUR_NATIVE
    • COLOUR_PAL
    • COLOUR_QL
    • COLOUR_24
    • COMMAND_LINE
    • COMPILED
    • COMPRESS
    • CONCAT
    • CONNECT
    • CONTINUE
    • ConvCASE$
    • CONVERT
    • COPY
    • COPY_B
    • COPY_H
    • COPY_L
    • COPY_N
    • COPY_O
    • COPY_W
    • COS
    • COSH
    • COT
    • COTH
    • CSIZE
    • CTAB$
    • CUR
    • CURDIS
    • CURSEN
    • CURSOR
    • CURSOR%
    • CURSOR_OFF
    • CURSOR_ON
    • CVF
    • CVI%
    • CVS$
    • CVL
  • Keywords D
    • DATA
    • DATAD$
    • DATAREG
    • DATASPACE
    • DATA_AREA
    • DATA_USE
    • DATE
    • DATE$
    • DAY$
    • DAY%
    • DBL
    • DDOWN
    • DEALLOCATE
    • DEBUG
    • DEBUG_LEVEL
    • DEFAULT
    • DEFAULT%
    • DEFAULT$
    • DEFAULT_DEVICE
    • DEFAULT_SCR
    • DEFine xxx
    • DEFine FuNction
    • DEFine PROCedure
    • DEFINED
    • DEG
    • DELETE
    • DEL_DEFB
    • DESPR
    • DESTD$
    • DEST_USE
    • DEMO
    • DET
    • DEV_NAME
    • DEVICE_SPACE
    • DEVICE_STATUS
    • DEVLIST
    • DEVTYPE
    • DEV_LIST
    • DEV_NEXT
    • DEV_USE
    • DEV_USEN
    • DEV_USE$
    • DIM
      • Numeric Arrays
      • String Arrays
      • Sub-Sets of Arrays
      • Omitting Indices
      • Un-Dimensioned Strings
      • ERRORS
      • EXAMPLES
    • DIMN
    • DIR
    • DISCARD
    • DISP_BLANK
    • DISP_INVERSE
    • DISP_RATE
    • DISP_SIZE
    • DISP_TYPE
    • DISP_UPDATE
    • DISPLAY_WIDTH
    • DIV
    • DIV
    • DJ_OPEN
    • DJ_OPEN_IN
    • DJ_OPEN_NEW
    • DJ_OPEN_OVER
    • DJ_OPEN_DIR
    • DJTK_VER$
    • DLINE
    • DLIST
    • DMEDIUM_DENSITY
    • DMEDIUM_DRIVE$
    • DMEDIUM_FORMAT
    • DMEDIUM_FREE
    • DMEDIUM_NAME$
    • DMEDIUM_RDONLY
    • DMEDIUM_REMOVE
    • DMEDIUM_TOTAL
    • DMEDIUM_TYPE
    • DNEXT
    • DO
    • DOS_USE
    • DOS_DRIVE
    • DOS_DRIVE$
    • DOTLIN
    • DRAW
    • DRAW
    • DROUND
    • DUP
  • Keywords E
    • EASTER
    • ED
    • EDIT
    • EDITF
    • EDIT%
    • EDIT$
    • EDLINE$
    • EL
    • ELIS
    • ELLIPSE
    • ELLIPSE_R
    • ELSE
    • END
    • END DEFine
    • END FOR
    • END IF
    • END REPeat
    • END SELect
    • END WHEN
    • END_CMD
    • END_WHEN
    • ENV_DEL
    • ENV_LIST
    • ENL
    • EOF
    • EOFW
    • EPROM_LOAD
    • EPS
    • EQ$
    • ERLIN
    • ERLIN%
    • ERNUM
    • ERNUM%
    • ERR_XX
    • ERRor
    • ERT
    • ESC
    • ET
    • ETAB$
    • ETAT
    • EW
    • EX
    • EXCHG
    • EXEC
    • EXEC_W
    • EXEP
    • EXIT
    • EXP
    • EXPAND
    • EXPLODE
    • EXTRAS
    • EXTRAS_W
  • Keywords F
    • FACT
    • FALSE%
    • FASTEXPAND
    • FBKDT
    • FDAT
    • FDEC$
    • FETCH_BYTES
    • FEXP$
    • FET
    • FEW
    • FEX
    • FEX_M
    • FF
    • FGET%
    • FGET$
    • FGETB
    • FGETL
    • FGETF
    • FGETH$
    • FILE_BACKUP
    • FILE_DAT
    • FILE_DATASPACE
    • FILE_LEN
    • FILE_LENGTH
    • FILE_OPEN
    • FILE_POS
    • FILE_POSITION
    • FILE_PTRA
    • FILE_PTRR
    • FILE_TYPE
    • FILE_UPDATE
    • FILL
    • FILL$
    • FILLMEM_B
    • FILLMEM_W
    • FILLMEM_L
    • FIND
    • FLASH
    • FLEN
    • FLIS
    • FLP_DENSITY
    • FLP_DRIVE
    • FLP_DRIVE$
    • FLP_EXT
    • FLP_JIGGLE
    • FLP_SEC
    • FLP_START
    • FLP_STEP
    • FLP_TRACK
    • FLP_USE
    • FLUSH
    • FLUSH_CHANNEL
    • FMAKE_DIR
    • FNAME$
    • FOPEN
    • FOP_DIR
    • FOP_IN
    • FOP_NEW
    • FOP_OVER
    • FOR
    • FORCE_TYPE
    • FORMAT
    • FPOS
    • FPOS_A
    • FPOS_R
    • FPUT$
    • FPUT%
    • FPUTB
    • FPUTF
    • FPUTL
    • FRACT
    • FREAD
    • FREAD$
    • FREE
    • FREE_FAST
    • FREE_MEM
    • FREEZE
    • FREEZE%
    • FSERVE
    • FSETH$
    • FTEST
    • FTYP
    • FuNction
    • FUPDT
    • FVERS
    • FWRITE
    • FWRITE$
    • FXTRA
  • Keywords G
    • GCD
    • GER_MSG
    • GER_TRA
    • GET
    • GET_BYTE$
    • GET_BYTE
    • GET_FLOAT
    • GET_LONG
    • GET_STRING
    • GET_STUFF$
    • GetHEAD
    • GET_WORD
    • GETXY
    • GO SUB
    • GO TO
    • GPOINT
    • GRAB
    • GREGOR
    • GT$
  • Keywords H
    • HEADR
    • HEADS
    • HEX
    • HEX$
    • HGET
    • HIS_SET
    • HIS_SIZE
    • HIS_UNSET
    • HIS_USE
    • HIS_USE$
    • HOT
    • HOT_CHP
    • HOT_CHP1
    • HOT_CMD
    • HOT_DO
    • HOT_GETSTUFF$
    • HOT_GO
    • HOT_KEY
    • HOT_LIST
    • HOT_LOAD
    • HOT_LOAD1
    • HOT_NAME$
    • HOT_OFF
    • HOT_PICK
    • HOT_REMV
    • HOT_RES
    • HOT_RES1
    • HOT_SET
    • HOT_STOP
    • HOT_STUFF
    • HOT_THING
    • HOT_THING1
    • HOT_TYPE
    • HOT_WAKE
    • HPUT
  • Keywords I
    • I2C_IO
    • IDEC$
    • IF
    • IFORMAT
    • INARRAY%
    • INF
    • INK
      • STANDARD COLOUR DRIVERS
      • EXTENDED COLOUR DRIVERS
    • INKEY$
    • INPUT
    • INPUT$
    • INSTR
    • INSTR_CASE
    • INT
    • INTMAX
    • INVERSE
    • INVXY
    • IO_PEND%
    • IO_PRIORITY
    • IO_TRAP
    • IQCONVERT
    • IS_BASIC
    • IS_PEON
    • IS_PTRAP
  • Keywords J
    • JBASE
    • JobCBS
    • JOBID
    • JOBS
    • JOB$
    • JOB_NAME
  • Keywords K
    • KBD_RESET
    • KBD_TABLE
    • KBD_USE
    • KBYTES_FREE
    • KEY
    • KEYROW
    • KEYW
    • KEY_ADD
    • KEY_RMV
    • KILL
    • KILLN
    • KILL_A
    • KJOB
    • KJOBS
  • Keywords L
    • LANG_USE
    • LANGUAGE
    • LANGUAGE$
    • LAR
    • LBYTES
    • LCM
    • LDRAW
    • LEFT
    • LEN
    • LET
    • LEVEL2
    • LGET
    • LINE
    • LINE_R
    • LINKUP
    • LINT2
    • LIST
    • LIST_TASKS
    • LMAR
    • LN
    • LOAD
    • LOADPIC
    • LOCal
    • LOCK
    • LOG2
    • LOG10
    • LOOKUP%
    • LOWER$
    • LPOLL
    • LPR_USE
    • LPUT
    • LRESFAST
    • LRESPR
    • LRUN
    • LSCHD
    • LWC$
  • Keywords M
    • MACHINE
    • MAKE_DIR
    • MATADD
    • MATCOUNT
    • MATCOUNT1
    • MATEQU
    • MATDEV
    • MATIDN
    • MATINPUT
    • MATINV
    • MATMAX
    • MATMEAN
    • MATMIN
    • MATMULT
    • MATPLOT
    • MATPLOT_R
    • MATPROD
    • MATREAD
    • MATRND
    • MATSEQ
    • MATSUB
    • MATSUM
    • MATTRN
    • MAX
    • MAX_CON
    • MAX_DEVS
    • MAXIMUM
    • MAXIMUM%
    • MB
    • MD
    • MERGE
    • MIDINET
    • MIN
    • MINIMUM
    • MINIMUM%
    • MISTake
    • MKF$
    • MKI$
    • MKL$
    • MKS$
    • MNET
    • MNET%
    • MNET_OFF
    • MNET_ON
    • MNET_S%
    • MNET_USE
    • MOD
    • MOD
    • MODE
    • MONTH%
    • MORE
    • MOUSE_SPEED
    • MOUSE_STUFF
    • MOVE
    • MOVE_MEM
    • MOVE_POSITION
    • MRUN
    • MSEARCH
    • MT
    • MTRAP
  • Keywords N
    • NDIM
    • NDIM%
    • NET
    • NETBEEP
    • NETPOLL
    • NETRATE
    • NETREAD
    • NETSEND
    • NETVAR%
    • NET_ID
    • NEW
    • NEWCHAN%
    • NEW_NAME
    • NEXT
    • NFS_USE
    • NIX
    • NO_CLOCK
    • NOCAPS
    • NOKEY
    • NORM
    • NOR_MSG
    • NOR_TRA
    • NOT
    • NRM
    • NXJOB
  • Keywords O
    • ODD
    • OFF
    • OJOB
    • ON
    • ON…GO TO
    • ON…GO SUB
    • OPEN
    • OPEN_DIR
    • OPEN_IN
    • OPEN_NEW
    • OPEN_OVER
    • OR
    • OUTL
    • OUTLN
    • OVER
  • Keywords P
    • PAGDIS
    • PAGLEN
    • PAGLIN
    • PAINT
    • PALETTE_QL
    • PALETTE_8
    • PAN
    • PAPER
    • PARHASH
    • PARNAM$
    • PARNAME$
    • PARSEPA
    • PARSTR$
    • PARTYP
    • PARTYPE
    • PARUSE
    • PAR_ABORT
    • PAR_BUFF
    • PAR_CLEAR
    • PAR_DEFAULTPRINTER$
    • PAR_GETFILTER
    • PAR_GETPRINTER$
    • PAR_PRINTERCOUNT
    • PAR_PRINTERNAME$
    • PAR_PULSE
    • PAR_SETFILTER
    • PAR_SETPRINTER
    • PAR_USE
    • PAUSE
    • PE_BGOFF
    • PE_BGON
    • PEEK
    • PEEK_FLOAT
    • PEEK_STRING
    • PEEK_W
    • PEEK_L
    • PEEKS
    • PEEKS_W
    • PEEKS_L
    • PEEK$
    • PEEK_F
    • PEND
    • PENDOWN
    • PENUP
    • PEOFF
    • PEON
    • PEX$
    • PEX_INI
    • PEX_SAVE
    • PEX_XTD
    • PHONEM
    • PI
    • PICK$
    • PICK%
    • PIE_EX_OFF
    • PIE_EX_ON
    • PIE_OFF
    • PIE_ON
    • PIF$
    • PINF$
    • PIXEL%
    • PJOB
    • PLAY
    • PLOT
    • PLOT
    • POINT
    • POINT_R
    • POKE
    • POKE_FLOAT
    • POKE_STRING
    • POKE_W
    • POKE_L
    • POKES
    • POKES_W
    • POKES_L
    • POKE$
    • POKE_F
    • PRINT
    • PRINT_USING
    • PRIO
    • PRIORITISE
    • PRO
    • PROCESSOR
    • PROCedure
    • PROGD$
    • PROG_USE
    • PROT_DATE
    • PROT_MEM
    • PROUND
    • PRT_ABORT
    • PRT_ABT
    • PRT_BUFF
    • PRT_CLEAR
    • PRT_USE
    • PRT_USE
    • PRT_USE$
    • PTH_ADD
    • PTH_LIST
    • PTH_RMV
    • PTH_USE
    • PTH_USE$
    • PTH$
    • PTR_FN%
    • PTR_INC
    • PTR_KEY
    • PTR_LIMITS
    • PTR_MAX
    • PTR_OFF
    • PTR_ON
    • PTR_POS
    • PTR_X
    • PTR_Y
    • PURGE
    • PUT
    • PUT_BYTE
    • PUT_FLOAT
    • PUT_LONG
    • PUT_STRING
    • PUT_WORD
    • PXOFF
    • PXON
    • PX1ST
    • P_ENV
  • Keywords Q
    • QACONVERT
    • QCOPY
    • QCOUNT%
    • QDOS$
    • QFLIM
    • QICONVERT
    • QLINK
    • QLOAD
    • QLRUN
    • QL_PEX
    • QMERGE
    • QMRUN
    • QPC_CMDLINE$
    • QPC_EXEC
    • QPC_EXIT
    • QPC_HOSTOS
    • QPC_MAXIMIZE
    • QPC_MINIMIZE
    • QPC_MSPEED
    • QPC_NETNAME$
    • QPC_QLSCREMU
    • QPC_RESTORE
    • QPC_SYNCSCRAP
    • QPC_VER$
    • QPC_WINDOWSIZE
    • QPC_WINDOWTITLE
    • QPTR
    • QRAM$
    • QSAVE
    • QSAVE_O
    • QSIZE%
    • QSPACE%
    • QTRAP
    • QuATARI
    • QUEUE%
    • QUIT
  • Keywords R
    • RAD
    • RAE
    • RAFE
    • RAMTOP
    • RAM_USE
    • RAND
    • RANDOMISE
    • READ
    • READ_HEADER
    • RECHP
    • RECOL
    • REFRESH
    • RELEASE
    • RELEASE
    • RELEASE_HEAP
    • RELEASE_TASK
    • RELJOB
    • RELOAD
    • REL_JOB
    • REMAINDER
    • REMark
    • REMOVE
    • REMOVE_TASK
    • RENAME
    • RENUM
    • REPeat
    • REPLACE
    • REPLY
    • REPORT
    • RESAVE
    • RESERVE
    • RESERVE_HEAP
    • RESET
    • RESFAST
    • RESPR
    • RESTORE
    • RES_SIZE
    • RES_128
    • RETRY
    • RETurn
    • REV$
    • RJOB
    • RMAR
    • RMODE
    • RND
    • ROM
    • ROM_EXT
    • ROM_LOAD
    • ROMs
    • RTP_R
    • RTP_T
    • RUN
  • Keywords S
    • SAR
    • SARO
    • SAUTO
    • SAVE
    • SAVE_O
    • SAVEPIC
    • SB_THING
    • SBASIC
    • SBYTES
    • SBYTES_O
    • SCALE
    • SCLR
    • SCRBASE
    • SCREEN
    • SCREEN_BASE
    • SCREEN_MODE
    • SCRINC
    • SCROLL
    • SCROF
    • SCRON
    • SCR2DIS
    • SCR2EN
    • SCR_BASE
    • SCR_LLEN
    • SCR_REFRESH
    • SCR_SAVE
    • SCR_SIZE
    • SCR_STORE
    • SCR_XLIM
    • SCR_YLIM
    • SDATE
    • SDP_DEV
    • SDP_KEY
    • SDP_SET
    • SDUMP
    • SEARCH
    • SEARCH
    • SEARCH_C
    • SEARCH_I
    • SEARCH_MEM
    • SELect
    • SELect ON
    • SEND_EVENT
    • SERMAWS
    • SERMCUR
    • SERMOFF
    • SERMON
    • SERMPTR
    • SERMRESET
    • SERMSPEED
    • SERMWAIT
    • SERNET
    • SER_ABORT
    • SER_BUFF
    • SER_CDEOF
    • SER_CLEAR
    • SER_FLOW
    • SER_GETPORT$
    • SER_PAUSE
    • SER_ROOM
    • SER_SETPORT
    • SER_USE
    • SET
    • SET
    • SetHEAD
    • SET_HEADER
    • SET_CLOCK
    • SET_FBKDT
    • SET_FUPDT
    • SET_FVERS
    • SET_GREEN
    • SET_RED
    • SET_LANGUAGE
    • SET_XINC
    • SET_YINC
    • SEXEC
    • SEXEC_O
    • SGN
    • SGN%
    • SHOOT
    • SI
    • SIGN
    • SIN
    • SINH
    • SINT
    • SIZE
    • SJOB
    • SLOAD
    • SLUG
    • SMOVE
    • SND_EXT
    • SNET
    • SNET%
    • SNET_ROPEN
    • SNET_S%
    • SNET_USE
    • SORT
    • SOUNDEX
    • SPJOB
    • SPL
    • SPLF
    • SPL_USE
    • SP_JOB
    • SQR
    • SQRT
    • SSAVE
    • SSHOW
    • SSTAT
    • SSTEP
    • STAMP
    • STAT
    • STEP
    • STOP
    • STRIP
    • SUB
    • SUSJOB
    • SWAP
    • SXTRAS
    • SYNCH%
    • SYSBASE
    • SYS_BASE
    • SYS_VARS
    • S_FONT
    • S_LOAD
    • S_SAVE
    • S_SHOW
    • SYSTEM_VARIABLES
  • Keywords T
    • TAN
    • TANH
    • TCA
    • TCONNECT
    • TEE
    • THEN
    • THING
    • TH_FIX
    • TH_VER$
    • TINY_EXT
    • TINY_RMV
    • TK2_EXT
    • TK_VER$
    • TNC
    • TO
    • TOP_WINDOW
    • TPFree
    • TRA
    • TRIM$
    • TRINT
    • TROFF
    • TRON
    • TRUE%
    • TRUNCATE
    • TTALL
    • TTEDELETE
    • TTEFP
    • TTEOPEN
    • TTET3
    • TTEX
    • TTEX_W
    • TTFINDM
    • TTINC
    • TTME%
    • TTMODE%
    • TTPEEK$
    • TTPOKEM
    • TTPOKE$
    • TTREL
    • TTRENAME
    • TTSUS
    • TTV
    • TT$
    • TURBO_diags
    • TURBO_F
    • TURBO_locstr
    • TURBO_model
    • TURBO_objdat
    • TURBO_objfil
    • TURBO_optim
    • TURBO_P
    • TURBO_repfil
    • TURBO_struct
    • TURBO_taskn
    • TURBO_window
    • TURN
    • TURNTO
    • TXTRAS
    • TYPE
    • TYPE_IN
    • T_COUNT
    • T_OFF
    • T_ON
    • T_RESTART
    • T_START
    • T_STOP
  • Keywords U
    • UINT
    • UNDER
    • UNJOB
    • UNL
    • UNLOAD
    • UNLOCK
    • UNSET
    • UPC$
    • UPPER$
    • UPUT
    • USE
    • USE_FONT
  • Keywords V
    • VA
    • VAR
    • VER$
    • VFR
    • VG_HOCH
    • VG_LOAD
    • VG_PARA
    • VG_PRINT
    • VG_RESO
    • VG_WIND
    • VIEW
    • VOCAB
  • Keywords W
    • WAIT_EVENT
    • WBASE
    • WCOPY
    • WCOPY_F
    • WCOPY_O
    • WDEL
    • WDEL_F
    • WDIR
    • WEEKDAY%
    • WGET
    • WHEN condition
    • WHEN ERRor
    • WHERE_FONTS
    • WIDTH
    • WINDOW
    • WINF$
    • WIN2
    • WIN_BASE
    • WIN_DRIVE
    • WIN_DRIVE$
    • WIN_FORMAT
    • WIN_REMV
    • WIN_SLUG
    • WIN_START
    • WIN_STOP
    • WIN_USE
    • WIN_WP
    • WIPE
    • WLD
    • WM
    • WM_BLOCK
    • WM_BORDER
    • WM_INK
    • WM_MOVEMODE
    • WM_PAPER
    • WM_STRIP
    • WMAN$
    • WMON
    • WMOV
    • WPUT
    • WREN
    • WSET
    • WSET_DEF
    • WSTAT
    • WTV
    • W_CRUNCH
    • W_SHOW
    • W_STORE
    • W_SWAP
    • W_SWOP
  • Keywords X
    • XCHANGE
    • XDRAW
    • XLIM
    • XOR
    • X_PTR%
  • Keywords Y
    • YEAR%
    • YLIM
    • Y_PTR%
  • Keywords Z
    • ZAP
  • Keywords Other
    • _DEF%
    • _DEF$
    • _NAME$
  • Appendices Introduction
  • A1. Minerva
    • A1.1 INTRODUCTION
    • A1.2 Windows and Closing Windows
    • A1.3 Dual Screen Mode
    • A1.4 Border
    • A1.5 Empty Brackets
    • A1.7 MultiBASICs
    • A1.8 Strings
  • A2. SMSQ/E
    • A2.1 Introduction
    • A2.2 The EOF Function
    • A2.3 Empty Brackets
    • A2.4 Multiple Sbasics
    • A2.5 Improved Interpreter
    • A2.6 Numbers in Programs
    • A2.7 Inbuilt Pointer Environment
    • A2.8 Undefined Variables
    • A2.9 Extended Display
      • A2.9.1 Extra Colours
      • A2.9.2 Hi-resolution Displays
    • A2.10 Problems
      • A2.10.1 Lightning/Speedscreen
      • A2.10.2 Toolkit III and System Toolkit
      • A2.10.3 Serial to Parallel Converters
      • A2.10.4 Aurora
      • A2.10.5 Disk Access
  • A3. Emulators
    • A3.1 Introduction
    • A3.2 Apple Macintosh
      • A3.2.1 Q-Emulator
    • A3.3 IBM Compatible PCs
      • A3.3.1 QPC and QPC2
      • A3.3.2 QXL II
      • A3.3.3 QLAY
      • A3.3.4 Q-Emulator for Windows95
    • A3.4 Atari Computers
    • A3.4.1 The ST/QL Emulator
      • (a) Atari-QL Emulator
      • (b) Extended4-Emulator
      • (c) QVME
      • In General
      • Microdrives
      • BEEP
      • MODE 8
      • MODE 4
      • ROM Memory
      • Network
      • Devices
      • Lightning/Speedscreen
      • Qliberator
    • A3.4.2 SMSQ/E
      • Lightning/Speedscreen
      • Qliberator
    • A3.4.3 SMS2
    • A3.5 Commodore Amigas
      • A3.5.1 Amiga QDOS
      • ROM Cartridges
      • Network & Microdrives
      • MODE 8
      • BEEP
      • MODE 4
      • DEVICES
      • TAS INSTRUCTIONS
    • A3.6 Unix Systems
      • A3.6.1 UQLX
  • A4. Thor Computers
    • A4.1 Introduction
    • A4.2 KEYROW
    • A4.3 MODE
    • A4.4 The Thor Windowing System
    • A4.5 BEEP
  • A5. Expansion Boards
    • A5.1 GOLD CARD
    • A5.2 SUPER GOLD CARD
    • A5.3 AURORA
    • A5.4 Q40
    • A5.5 HERMES / SuperHERMES
    • A5.6 QuBIDE
  • A6. Compatibility
    • A6.1 Addressing
    • A6.2 Speed
    • A6.3 The Operating System
    • A6.4 Memory
    • A6.5 The Stack Pointer
    • A6.6 Compilers
    • A6.7 High Resolution Displays
    • A6.8 String Lengths
    • A6.9 Later Processors & Gold Cards
    • A6.10 Finally
  • A7. Multiple Basics
    • A7.1 MINERVA MultiBASICS
      • A7.1.1 Channels OPENed automatically in MultiBASICs
      • A7.1.2 Starting a MultiBASIC with the Original QL ROM Commands only
      • A7.1.3 Multitasking a MultiBASIC Program
      • A7.1.4 What Happens to the Rest of the Command String?
      • A7.1.5 Loading Toolkits into a MultiBASIC
    • A7.2 SMS Multiple SBASICs
      • A7.2.1 Channels OPENed automatically in SBASICs
      • A7.2.2 The Command String
      • A7.2.3 Starting an SBASIC with the Original QL ROM Commands only
      • A7.2.4 Multitasking an SBASIC Program
      • A7.2.5 Loading Toolkits into an SBASIC
      • A7.2.6 Defining the Name of an SBASIC
      • A7.2.7 Channel #0, #1 and #2
      • A7.2.8 Removing an SBASIC
      • A7.2.9 Keywords Which are Useful in SBASICs
  • A8. Error Messages
    • A8.1 Standard English Error Messages
    • A8.2 Foreign Error Messages
    • A8.3 Dates
    • A8.4 SMS Messages
  • A9. Character Set, Keyboards
    • A9.1 The Character Set
    • A9.2 Keyboard Layouts
      • British QL
      • German QL
      • French QL
      • Swedish QL
      • Finnish QL
      • Danish QL
  • A10. Designing New Character Sets (Fonts)
    • A10.1 Fonts on the QL
    • A10.2 Changing Fonts in Programs
  • A11. Mathematics
    • A11.1 Degrees and Radians
    • A11.2 Triangles and Trigonometrics
    • A11.3 Boolean Logic
    • A11.4 Operators
    • A11.5 Hexadecimal and Binary Numbers
    • A11.6 Integers
    • A11.7 Faster Mathematics
    • A11.8 Precision
  • A12. Device Drivers
    • A12.1 Devices in General
    • A12.2 Directory Device Drivers
      • Microdrive (MDV)
      • Floppy Disk (FLP)
      • RAMdisk (RAM)
      • Hard Disk (WIN)
      • QL ROMDisq (ROM)
    • A12.3 Window Device Drivers
      • Console (CON)
      • Screen (SCR)
    • A12.4 Other Device Drivers
      • Parallel Port (PAR)
      • THOR XVI
      • ST Emulators, Super Gold Card AND SMSQ/E
      • AMIGA-QDOS
      • Serial Ports (SER)
      • Standard QL
        • (a) Output SERial devices
        • (b) Input SERial devices
        • (c) The Standard QL Device Driver
      • ST Emulators and SMSQ/E
      • THOR XVI
      • Serial Ports (SRX)
      • Serial Ports (STX)
      • Printer Ports (PRT)
      • Qjump RAMPRT, Trump Card, QXL and Gold Cards
        • ST Emulators and SMSQ/E
        • Memory Driver (MEM)
      • Network Drivers (NET)
      • Communication Drivers (PIPE)
        • Standard QL ROM
        • Minerva ROM
      • Named Pipe Drivers, SMS
      • Communication Drivers (HISTORY)
      • Nul Driver (NUL)
        • Input
        • Output
    • A12.5 DIRECT SECTOR ACCESS
    • A12.6 Level-1 Device Drivers
    • A12.7 Level-2 Device Drivers
    • A12.8 Level-3 Device Drivers
    • A12.9 Using Alien Format Disks
  • A13. Extended Pointer Environment
  • A14. Coercion
  • A15. Mouse Drivers
    • A15.1 A Mouse for the Standard QL
      • A15.1.1 Quanta Mouse (or QIMI Mouse)
      • A15.1.2 AURORA Mouse Interface
      • A15.1.3 Serial Mouse
        • SERMouse (by Albin Hessler Software)
        • DIY Toolkit Serial Mouse (Vol I)
        • SuperHERMES
    • A15.2 A Mouse for QPC / QXL
    • A15.3 A Mouse for ATARIs
    • A15.4 A Mouse for Unix and Macintoshes
    • A15.5 A Mouse for the Amiga
  • A16. The QL Display
    • A16.1 The Screen Address
    • A16.2 The Screen Size
    • A16.3 On-Screen Colours
      • Standard QL Colour Drivers
        • MODE 4
        • MODE 8
      • Aurora Enhanced Colour Drivers
      • The Master Control Register ($18063)
      • The Enhanced Mode Control Register ($18043)
      • The Monitor Preset Register ($18043)
      • 16 Colour Mode
      • 256 Colour Mode
      • QPC/QXL Enhanced Colour Drivers
      • QL Colour Mode (COLOUR_QL)
      • PAL Colour Mode (COLOUR_PAL)
      • Native Colour Mode (COLOUR_NATIVE)
      • 24 Bit Colour Mode (COLOUR_24)
      • Q40/Q60 Enhanced Colour Drivers
      • QL Colour Mode (COLOUR_QL)
      • PAL Colour Mode (COLOUR_PAL)
      • Native Colour Mode (COLOUR_NATIVE)
      • 24 Bit Enhanced Colour Drivers
      • MISCELLANEOUS COLOUR MODES
        • MODE 2 (Monochrome Drivers)
        • MODE 12 (16 Colour Mode)
    • A16.4 USING HIGH RESOLUTION DISPLAYS
  • A17. Networks
    • A17.1 QNet
      • A17.1.1 Connecting Machines
      • A17.1.2 The Device Driver
      • A17.1.3 Sending / Receiving Data
      • A17.1.4 QNet without Toolkit II
      • A17.1.5 QNet Under Toolkit II
    • A17.2 Flexynet (DIY Toolkit - VOL X)
    • A17.3 Midinet
    • A17.4 Sernet
    • A17.5 Amadeus Interlink
    • A17.6 QL - PC Fileserver
  • A18. Configuring Programs
    • CONFIG Level 1 & Level 2
    • Passing Parameter with EXEC
    • Making the configuration part of the program.
    • Using a separate configuration file.
    • Using Environment Variables
    • DATA_USE etc
SBASIC/SuperBASIC Reference Manual Online
  • Docs »
  • Keywords P »
  • PRINT_USING
  • Edit on GitHub
Next Previous

PRINT_USING¶

Syntax PRINT_USING [#ch,] format$, *[itemi]*
Location Toolkit II

This command allows you to send output to the specified channel (default #1) in a particular format. This for example, allows you to print neat columns of figures easily, all lined up on the decimal point.

The format$ is made up of a mixture of special characters, text and fields. Basically, PRINT_USING will print out format$ as normal, until one of these special characters is met. The special characters currently supported are: © (copyright) + - ( # * , . ! \ ‘ ” and $. These have the following effects:

Character Effect
© This forces PRINT_USING to print out the next character in format$ even if it is a special character. If you want to print some text including one of the special characters, this must be used.
+ This is used to either prefix or postfix a decimal field. If present, then the sign of the decimal number is written out in this position.
- This is used to either prefix or postfix a decimal field. The sign of the decimal number will only be written in this position if the number is negative. This and the closing bracket can be used to surround a decimal field, in which case if the number is negative, it will appear in brackets.
# (Hash) This is used to mark a type of field (see below).
* (Asterisk) This is also used to mark a type of field (see below).
\ This will force a newline to take place. Unlike PRINT, PRINT_USING does not automatically carry out a newline after finishing its work.
” and ‘ Anything between either single or double quotation marks will be printed out without looking for special characters.
$ This is used to signify the start of a currency field. Any characters between this sign and the next ‘#’ symbol are taken to be the name of the currency and are pushed right to line up with the actual amount.

The fields in the format$ allow you to print text and/or figures in specific formats. Each item following format$ is then read and inserted in place of each field. If however, a numeric field is not long enough to hold the specified figure, then the field appears as just ‘#’ marks on screen. Text fields will just truncate the text supplied to fit. The fields which are recognised are:

Field Meaning
#### If item is text, write it left justified and truncate to fit size of field if necessary. If item is a number, write the integer part of the number right justified (eg. PRINT_USING ‘###’,’Hello’ will print Hel).
**** This is the same as #### except that any unused part of the field to the left of the characters is filled with ‘*’ characters. (eg. PRINT_USING ‘****’,1.234 will print ***1).
###.## Print a fixed decimal point number right justified to a set number of decimal places. (eg. PRINT_USING ‘##.#’,1.26 will print 1.3).
***.** The same as ###.## except that any unused part of the field is filled with ‘*’ characters.
#,###.## This is the same as ###.## except that a comma will be used to separate thousands.
*,***.** This is similar to #,###.## except that any unused part of the field will be filled with ‘*’.
-#.###!!!! This is used for an exponential field with the sign only being shown if the figure is negative. (eg. PRINT_USING ‘-#.##!!!!’,3120 will print 3.12E+03). An exponential field must always begin with a sign followed by one # mark and a decimal point, and always end with four ! marks.
+#.###!!!! This is the same as -#.###!!!! except that the sign of the number is always shown.
###.>> This is introduced by SMSQ/E v2.73+ and is the same as ###.## except that it is for fixed point decimal figures, scaled accordingly. This allows you, for example, to convert a calculation from pennies into pounds. (eg. PRINT_USING ‘###.>>’,312.01 will print 3.12). You can add more > characters after the decimal point if you need to convert to three decimal places.
***.>> This is introduced by SMSQ/E v2.73+ and is the same as ###.>> except that any unused part of the field is filled with ‘*’ characters.

Example

A program which prints out a stocklist, which might be useful for a small business:

100 RESTORE
110 MODE 4
120 WINDOW 448,200,32,16:PAPER 0:INK 7:CLS
130 CSIZE 2,0:AT 1,10:UNDER 1:PRINT 'STOCK LIST'
140 CSIZE 1,0:AT 5,0
150 PRINT 'NO ITEM IND. PRICE TOTAL'
160 UNDER 0
170 total=0:Lines=6
180 REPeat loop
190   IF EOF:EXIT loop
200   READ equipment$,items,ind_price
210   price=ind_price*items
220   total=total+price:Lines=Lines+1
230   PRINT_USING '#,###. ##############',items,equipment$
240   PRINT_USING ' $##.## $##,###.##\',ind_price,price
250   END REPeat loop
260 OVER 1:AT Lines-1,0:UNDER 1
270 PRINT FILL$(' ',45):UNDER 0
280 IF INT(total)<>total:total=total*100
290 PRINT TO 23;'Total Stock £';CDEC$(total,9,2)
1000 DATA 'Minerva',110,40,'Minerva MKII',205,65.61
1010 DATA 'Hermes',100,25,'68008 CPU',1230,8.7

NOTE 1

On Toolkit II versions before v2.08, this command could cause problems if an empty string was passed to it.

NOTE 2

Some versions of the Toolkit II manual get the copyright symbol (’©’) mixed up with the ‘at’ symbol (‘@’). The latter has no special meaning.

NOTE 3

Because of variations in the way in which numbers are represented in different countries, either a comma or full stop is recognised as a decimal point by PRINT_USING. If a field only contains one comma or full stop, that is taken to be the decimal point, however, if more than one comma and/or full stop appears in the field, the last one is taken to be the decimal point, the others being assumed to be thousands separators. If you want numbers to be printed with thousands separators but no decimal point, use a comma or full stop as the last character of the field.

CROSS-REFERENCE

See also FDEC$, IDEC$ and CDEC$.

Next Previous

© Copyright 2005-2019, Rich Mellor (plus contributers) Revision e3aa01b8.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
working
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.