mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-08-15 06:27:24 +00:00
Sample library
This commit is contained in:
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
|
Reference in New Issue
Block a user