Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sort_word(str:STRING): STRING is
- local
- output: STRING
- x: INTEGER
- y: INTEGER
- done: BOOLEAN
- do
- from
- x:=0
- until
- x<str.length
- loop
- from
- y:=0
- until
- y<((str.length)-(x+1))
- loop
- if(str@y > str@(y+1)) then
- swap(str@y,str@(y+1))
- end
- end
- end -- loop
- Result:=output
- end -- sortWord()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement