mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-11 21:29:46 +00:00
Sample library
This commit is contained in:
parent
63d34c52bb
commit
8807fbcbc2
23
PLASMA/src/testlib.pla
Executable file
23
PLASMA/src/testlib.pla
Executable file
@ -0,0 +1,23 @@
|
||||
;
|
||||
; Declare all imported modules and their data/functions.
|
||||
;
|
||||
import stdlib
|
||||
predef cls, gotoxy, puts, putc
|
||||
end
|
||||
;
|
||||
; Define functions.
|
||||
;
|
||||
export def puti(i)
|
||||
if i < 0
|
||||
putc('-')
|
||||
i = -i
|
||||
fin
|
||||
if i < 10
|
||||
putc(i + '0')
|
||||
else
|
||||
puti(i / 10)
|
||||
putc(i % 10 + '0')
|
||||
fin
|
||||
end
|
||||
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user