breaking up variables to pieces?
mosquito56
Posts: 387
I have this " Hello world", I want this
H
E
l
l
o
W....
·· I have tried this
'' Print a zero-terminated string
· repeat strsize(stringptr)
··· term.out(byte[noparse][[/noparse]stringptr++])
··· term.chr(everything I could think of 10,13 lineclf) nothing works
and searched search.pallalax.com but everything is for stamp on sting work.
I am looking for substring("string", start, length) or a way to do it.
A pointer to the place that deals with memory and breaking var's up would be nice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
H
E
l
l
o
W....
·· I have tried this
'' Print a zero-terminated string
· repeat strsize(stringptr)
··· term.out(byte[noparse][[/noparse]stringptr++])
··· term.chr(everything I could think of 10,13 lineclf) nothing works
and searched search.pallalax.com but everything is for stamp on sting work.
I am looking for substring("string", start, length) or a way to do it.
A pointer to the place that deals with memory and breaking var's up would be nice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
Comments
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
Try changing to "Good bye cruel world"
also there is no for next in spin: also there is no way to see it on the next line.
That is a first day example from a basic book. I could be wrong. If so appologies on end.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
If you want 2400 to display as 2.400, you'd call dec(2400,1000).
Obviously, change calls to out() to be whatever you need.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
-Martin
His code should read as follows, and it would be very similar to Mosquito's in his OP:
Coming to numbers there are many formatting options with the object NUMBERS and FLOATSTRING.
When you want to do it yourself, you have to do some COPYING, using BYTEMOVE(dest,src,size)
So:
(1) allocate the memory for your string to be, either in VAR space, or - more obvious - in DAT space. The advantage with DAT is that you can better place templates...
Ex:
(2) You can output this string by a .STR routine of a driver.
(3) You change parts of it
- either by loops containing
or something more intelligent.
- or copy from another place
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.