Programming Help 48GX - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Programming Help 48GX (/thread-67254.html) |
Programming Help 48GX - Rick - 01-02-2005 Given : N45.5645E , How can I drop the number and get NE alone?
Re: Programming Help 48GX - Vieira, Luiz C. (Brazil) - 01-02-2005 Hi, Rick; the following solution is completely focussed on User RPL, O.K.? If N45.5645E is a string, you could use the following routine: 2 OVER SIZE 1 - SUB OBJ->This only works if both left- and right-most characters must be discarded and the number within has a valid syntax. Hope this helps. (there are SYSRPL solutions, but I guess others can place them here; I'm just standing in front of the rabit's hole and observing...)
Luiz (Brazil) Edited: 2 Jan 2005, 9:38 p.m.
Re: Programming Help 48GX - V-PN - 01-03-2005 Q:"Given : N45.5645E , How can I drop the number and get NE alone?" Oops! My answer does the opposite... Sorry! - Vieira, Luiz C. (Brazil) - 01-03-2005 Hi, Rick; After reading VPN's (correct) answer I realized that I dropped what you wanted to be kept and kept what you wanted to drop... My mistake! Sorry...
Thanks guys, I love this site. - Rick - 01-03-2005 Glad for both solutions Luiz. I also needed the value. Re: Thanks guys, I love this site. - Vieira, Luiz C. (Brazil) - 01-03-2005 HI, Rick; if you want to put both in the same "package", maybe using local variables is easier. You can try this: (VPN, I'm using part of your 'engine', O.K.?) « DUP SIZE OVER -> S TThe program holds a copy of the original string and returns both the number and the two ASCII characters bordering it. If you don't need a copy of the original argument, you can try this one: « DUP SIZE -> T S Hope this is closer to what you actualy want. Cheers. Luiz (Brazil)
Edited: 3 Jan 2005, 10:26 a.m.
Re: Thanks guys, I love this site. - V-PN - 01-03-2005 One possible solution: |