home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ST-Computer Leser-CD 2000 January
/
LCD_01_2000.iso
/
anwend
/
luna146
/
_english
/
scripts
/
asctable.lus
< prev
next >
Wrap
Text File
|
1999-11-12
|
948b
|
38 lines
; LunaScript by rgf
; Example number 2:
; Small calculations to create an Ascii-table:
f%=62
f%=add(f%,3)
keypress(f%,0) ; Might have a value 65, i.e. Ascii-"A"
return(0)
tput "Value of f% : " ; Output both for a check
tput div(f%,2) ; Output value
return(0) ; Line-wrap
tput "Value of 'A': "
tput asc("A") ; Output value
return(0)
return(0)
; Next exercise: Create the Ascii-table with two For/Next loops.
; It's best to switch off Tab expansion, otherwise one cannot see
; the Tab character).
tput " " ; First indent by 10 spaces
f%=1 ; Start at Ascii 1, zero is not permitted
; and will be ignored anyway
for a%=1 to 10 ; Lines
for i%=f% to add(f%,25)
keypress(i%,0)
next i%
add f%,26
return(0)
next a%
return(0)
tput "Finished...=:)"
return(0)
return(0)
end()