Can someone show me this?
Oldbitcollector (Jeff)
Posts: 8,091
Now that I've got a handle on storing information from the keyboard, I'm attempting to figure out ways to manipulate it.
for Instance, if I store "type filename" into @command can someone show me how to strip the "type " off leaving
only the "filename" in @command?
It looks like I've got to dump everything after the space to get this right, but I haven't cracked it.
Thanks
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
for Instance, if I store "type filename" into @command can someone show me how to strip the "type " off leaving
only the "filename" in @command?
It looks like I've got to dump everything after the space to get this right, but I haven't cracked it.
Thanks
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
Comments
Desilva: Yes, I'm starting to see the similarities to C in spin. That's practical advice.
Actually, I'm pretty close to a working solution. If I use @buffer[noparse][[/noparse]#] I could grab each
character of the part I need since I know where the starting position is in each command.
Not a pretty solution, but one I can understand at the level I'm at.
Now that I've gotten my mind wrapped around some of the concepts of byte,and case
(which kept going right over my head initially) The section in the manual for .spin
commands is starting to make sense. There is a real gap that has to be crossed for
someone like myself with limited experience in object-oriented programming.
One of the walls I ran into early with the Propeller is that there is an assumption
of experience in with other micros when starting with the Propeller, a wall
I've been chipping away 'hardware-wise' with the Cookbook.
I'm still building the foundation for a text called ".spin for BASIC programmers"
Perhaps I can bridge this learning gap for others.
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
Mike, how's the flux_capacitor.spin program coming along?
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I reject your reality and substitute my own!
| - Adam Savage
[noparse];)[/noparse]
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
BTW, my vinculum host responses are already in stuffed into a LockPool, so I'll be modifying Mike's code to work from there. If anyone else wants a version that reads from a memory pool stay tuned and I'll post the code here.