1. Re: Sorting Numbers
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 21, 2001
- 393 views
- Last edited Mar 22, 2001
------=_NextPart_000_0004_01C0B301.270B6010 charset="iso-8859-1" I thought I'd play around a bit with non-standard uses of the TYPE functionality. Attached is two files, ezscreen.e and b24.ex ezscreen.e has some weird uses of 'type'. This is strictly experimental and I not promoting anything here. It allows things like... Row = 5 Col = 7 ScreenText = "Hello, World!" to move the cursor to line 5, column 7 and display some text. Both Row and Col can use negative numbers to move backwards. Row = -2 -- Move up two rows or they can use the Current_Row/Current_Column syntax. Col = Current_Column + 7 -- Move right 7 places. or Last_Row/Last_Column Row = Last_Row - 2 -- Move to the third last line. ScreenText can handle strings, integers, floating numbers and formatting instructions. ScreenText = 5 -- Display "5" ScreenText = 3.142 -- Display "3.14200" ScreenText = {"The answer, %s, is %d", {"Derek", 42}} b24.ex is another way of doing the "Sorting Numbers" problem using the include file above. This is just for fun stuff, nothing serious. ----------- cheers, Derek Parnell ------=_NextPart_000_0004_01C0B301.270B6010 name="b24.ex"