Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Reverse-a-string/True-BASIC/reverse-a-string.basic
Normal file
11
Task/Reverse-a-string/True-BASIC/reverse-a-string.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
FUNCTION reverse$(a$)
|
||||
LET b$ = ""
|
||||
FOR i = 1 TO LEN(a$)
|
||||
LET b$ = (a$)[i:i+1-1] & b$
|
||||
NEXT i
|
||||
LET reverse$ = b$
|
||||
END FUNCTION
|
||||
|
||||
LET s$ = "asdf"
|
||||
PRINT "'"; s$; "' reversed is '"; reverse$(s$); "'"
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue