Post Reply 
(50g) String inside string manipulation, UserRPL
10-16-2016, 10:21 AM (This post was last modified: 10-16-2016 10:34 AM by Vtile.)
Post: #8
RE: (50g) String inside string manipulation, UserRPL
(10-16-2016 05:49 AM)Gerald H Wrote:  The command

C$ n

n a positive integer takes the next n characters & produces an n length character string.
Much helpfull, now I get the snippet.

(10-16-2016 05:51 AM)Gerald H Wrote:  The programme here

http://www.hpcalc.org/details/6741

shows a nice use of C$.
Hah, nice program I actually meant also to do something partially similar with this string manipulation, related to userkey assigments. PS. Which now when I look at it still effects in sense that I have taken too complex aproach for creating a choose box. Obviously in case I show below the "phonebook" example is enough, since wrapping to program object is not needed... Oh, well.
(10-16-2016 05:46 AM)Gerald H Wrote:  
(10-15-2016 08:03 PM)Vtile Wrote:  Can you provide more information (or link and page to document ) of that mnemonic and the purpose of those components, I'm too old and grumpy to be a happy detective.

What I tested it in CMD line it do indeed create string with random success inside string with some text inside.. Can it be programmed dynamically or only static way.

Can't see why success is "random". "dynamically or static" - a self-modifying programme?
Well the randomness did come out since I didn't get the behaviour impact of the number 4 in your code snippet (calculating wrong the charcount of the outcome, while guessing that the purpose is something length related). While now seeing your second post, it is clear where did the "randomness" come from. It did come from my keyboard trying with different strings after command C$ n.

Yes. This is handy command and will easy up the creation of the "FOOSTR" variable. Its nature still seems to be somewhat more static than dynamic. Since it doesn't take argument before itself, but instead after itself. For more dynamic use in extreme with morphing code, you still need to use it more like in example in the first post.

The problem where this solution doesn't fit directy (as doesn't the Lib256 nor ->STR etc. UserRPL commands) is when I do need to create a program that constructs (parses) the choose window from datafile based on certain options. In my case I use source from standards IEC-60364 and CENELEC HD 60364 with "set to the stone" minimal values of certain electrical installation properties. The data is a multicolumn and -row table and I do not want to repeat and split it in different IFs or CASEs inside the main program. Instead I do create dynamically (these commands will be a small library) a sub-program(s) containing the data parsed from one big datafile containing whole table and one description in list of lists format. This provides two advances first is the substantial memory saving and another is ease of update. I only need to do minimal changes if the table values change over time (which they do at times). PS. Again this is too complex aproach for this case, I just need to put the parts to the stack, no need to create sub-program. The morphing userkey program that uses choosebox is still hounting back of my head.

I also now noticed the char example. Which I also tried before this thread, but reason or another didn't get "right results", maybe I did jump to different idea middle of testing, who knows. Must be the easiest way of creating the single """ object to be appented to existing string in any use that needs such thing.

Thank you for your input, it actually sorted out many things. I must edit my first post partially, since the use of << 34 CHR >> is the most elegant solution to use as FOOLSTR in 1st approach.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (50g) String inside string manipulation, UserRPL - Vtile - 10-16-2016 10:21 AM



User(s) browsing this thread: 1 Guest(s)