Re: How to Return the Exponent

2024-12-18 Thread Roger Guay via use-livecode
Thanks, Bob. That works. My bad Roger > On Dec 18, 2024, at 8:16 AM, Bob Sneidar via use-livecode > wrote: > > ITEM 2 not WORD 2. > > Bob S > > >> On Dec 17, 2024, at 7:07 PM, Roger Guay via use-livecode >> wrote: >> >> Oops. I take it back. It does not work. >> >> set the itemDel

Re: How to Return the Exponent

2024-12-18 Thread Bob Sneidar via use-livecode
ITEM 2 not WORD 2. Bob S > On Dec 17, 2024, at 7:07 PM, Roger Guay via use-livecode > wrote: > > Oops. I take it back. It does not work. > > set the itemDel to “^" > put char 3 of word 2 of "((1234…)^1/x)” > > returns blank > > Bummer! > >> On Dec 17, 2024, at 6:54 PM, Roger

Re: How to Return the Exponent

2024-12-18 Thread Roger Guay via use-livecode
Thanks to Bernd, Scott and Rick for helping me out. I have never run into token before and learned so much from Bernd’s use of it here. I invariably learn valuable lessons from this list. . . ChatGPT, not so much. Cheers, Roger > On Dec 18, 2024, at 2:02 AM, scott--- via use-livecode > wrot

Re: How to Return the Exponent

2024-12-18 Thread scott--- via use-livecode
Roger, I don’t believe that setting the itemDel will change how WORDs break. It will allow you to find ITEM 2: ^1/x) I was getting char 3 of item 2 and that would work as long as x was a single digit (which you implied originally) but Bernd’s solution is more robust (as usual!) because it wi

Re: How to Return the Exponent

2024-12-18 Thread Niggemann, Bernd via use-livecode
Hi Roger, This does work: Please note the quotes, in your mail it was curly quotes that do not work apart from asking for "word" instead of "token". on mouseUp set the itemDel to "^" put token 3 of item 2 of "((1234…)^1/x)" into field 1 set the itemDelimiter to "/" put cr & toke