Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Reverse-a-string/XBasic/reverse-a-string.basic
Normal file
19
Task/Reverse-a-string/XBasic/reverse-a-string.basic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
PROGRAM "progname"
|
||||
VERSION "0.0000"
|
||||
|
||||
DECLARE FUNCTION Entry ()
|
||||
DECLARE FUNCTION reverse$ (a$)
|
||||
|
||||
FUNCTION Entry ()
|
||||
s$ = "asdf"
|
||||
PRINT "'"; s$; "' reversed is '"; reverse$(s$); "'"
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION reverse$ (a$)
|
||||
b$ = ""
|
||||
FOR i = 1 TO LEN(a$)
|
||||
b$ = MID$(a$, i, 1) + b$
|
||||
NEXT i
|
||||
RETURN b$
|
||||
END FUNCTION
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue