Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Reverse-a-string/PostScript/reverse-a-string-1.ps
Normal file
12
Task/Reverse-a-string/PostScript/reverse-a-string-1.ps
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/reverse{
|
||||
/str exch def
|
||||
/temp str 0 get def
|
||||
/i 0 def
|
||||
str length 2 idiv{
|
||||
/temp str i get def
|
||||
str i str str length i sub 1 sub get put
|
||||
str str length i sub 1 sub temp put
|
||||
/i i 1 add def
|
||||
}repeat
|
||||
str pstack
|
||||
}def
|
||||
5
Task/Reverse-a-string/PostScript/reverse-a-string-2.ps
Normal file
5
Task/Reverse-a-string/PostScript/reverse-a-string-2.ps
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[1 2 3] reverse % input
|
||||
[3 2 1]
|
||||
|
||||
(Hello World) reverse % input
|
||||
(dlroW olleH)
|
||||
Loading…
Add table
Add a link
Reference in a new issue