Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
32
Task/Reverse-a-string/OxygenBasic/reverse-a-string-1.basic
Normal file
32
Task/Reverse-a-string/OxygenBasic/reverse-a-string-1.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
'8 BIT CHARACTERS
|
||||
|
||||
string s="qwertyuiop"
|
||||
sys a,b,i,j,le=len s
|
||||
'
|
||||
for i=1 to le
|
||||
j=le-i+1
|
||||
if j<=i then exit for
|
||||
a=asc s,i
|
||||
b=asc s,j
|
||||
mid s,j,chr a
|
||||
mid s,i,chr b
|
||||
next
|
||||
'
|
||||
|
||||
print s
|
||||
|
||||
'16 BIT CHARACTERS
|
||||
|
||||
wstring s="qwertyuiop"
|
||||
sys a,b,i,j,le=len s
|
||||
'
|
||||
for i=1 to le
|
||||
j=le-i+1
|
||||
if j<=i then exit for
|
||||
a=unic s,i
|
||||
b=unic s,j
|
||||
mid s,j,wchr a
|
||||
mid s,i,wchr b
|
||||
next
|
||||
'
|
||||
print s
|
||||
Loading…
Add table
Add a link
Reference in a new issue