Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
31
Task/Phrase-reversals/PureBasic/phrase-reversals.basic
Normal file
31
Task/Phrase-reversals/PureBasic/phrase-reversals.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#TEXT="rosetta code phrase reversal"
|
||||
|
||||
If OpenConsole("rosetta code phrase reversal")
|
||||
Define idx.i=1, txt.s=""
|
||||
|
||||
Print(~"Original:\t\t")
|
||||
PrintN(#TEXT)
|
||||
|
||||
Print(~"Reversed:\t\t")
|
||||
PrintN(ReverseString(#TEXT))
|
||||
|
||||
Print(~"Reversed words:\t\t")
|
||||
txt=StringField(#TEXT,idx," ")
|
||||
While Len(txt)
|
||||
Print(ReverseString(txt)+" ")
|
||||
idx+1
|
||||
txt=StringField(#TEXT,idx," ")
|
||||
Wend
|
||||
PrintN("")
|
||||
|
||||
Print(~"Reversed order:\t\t")
|
||||
idx-1
|
||||
txt=StringField(#TEXT,idx," ")
|
||||
While Len(txt)
|
||||
Print(txt+" ")
|
||||
If idx>1 : idx-1 : Else : Break : EndIf
|
||||
txt=StringField(#TEXT,idx," ")
|
||||
Wend
|
||||
|
||||
Input()
|
||||
EndIf
|
||||
Loading…
Add table
Add a link
Reference in a new issue