Re: FIND or INDEX builtin function
On Thu, 1 Mar 2018 10:49:06 -0500, Andre Schoeman wrote: >As Jonathan Scott pointed out, the proposed NFIND and NINDEX functions >are not currently part of the HLASM version that is out there, but it would be >nice if they could be delivered as part of the builtin functions with the next >release. But as Jonathan said, they've had the design for 14 years, and implementing it would be tricky. Delivery "with the next release" would be very unexpected, and rather miraculous if it were to happen. -- Walt
Re: FIND or INDEX builtin function
Thanks to all who responded. My original questions did indeed revolve around the invocation of macro language builtin functions, during assembly of source code. As Jonathan Scott pointed out, the proposed NFIND and NINDEX functions are not currently part of the HLASM version that is out there, but it would be nice if they could be delivered as part of the builtin functions with the next release. I've since constructed my own macro language logic that provides the functionality that is needed, during assembly time. Best regards, Andre
Re: FIND or INDEX builtin function
On 2018-03-01 08:17, Gord Tomlin wrote: On 2018-03-01 03:16, Keven wrote: Alas the assembler doesn’t execute in-line assembly language That wouldn't be much of an assembler. Are you working with something other than IBM HLASM? My bad, Keven, you were pointing out that execution-time code can't be run at assembly time. The coffee hadn't kicked in yet. -- Regards, Gord Tomlin Action Software International (a division of Mazda Computer Corporation) Tel: (905) 470-7113, Fax: (905) 470-6507 Support: https://actionsoftware.com/support/
Re: FIND or INDEX builtin function
On 2018-03-01, at 06:17:48, Gord Tomlin wrote: > On 2018-03-01 03:16, Keven wrote: >> Alas the assembler doesn’t execute in-line assembly language > > That wouldn't be much of an assembler. Are you working with something other > than IBM HLASM? > Please supply a couple coding examples, one using FIND and the other using TRT. -- gil
Re: FIND or INDEX builtin function
Andre Schoeman wrote: >...a string of characters contains leading blanks and I want to find the 1st non-blank character in that string. Isn't TRT the canonical way to do this? Uses more memory but sure is fast (assuming the common case is a number of leading blanks--clearly if the norm is that a single CLI/JNE would do it, that's probably faster). ...phsiii
Re: FIND or INDEX builtin function
On 2018-03-01 03:16, Keven wrote: Alas the assembler doesn’t execute in-line assembly language That wouldn't be much of an assembler. Are you working with something other than IBM HLASM? -- Regards, Gord Tomlin Action Software International (a division of Mazda Computer Corporation) Tel: (905) 470-7113, Fax: (905) 470-6507 Support: https://actionsoftware.com/support/
Re: FIND or INDEX builtin function
TRT as in TRanslate and Test? Alas the assembler doesn’t execute in-line assembly language but it does have an external function facility that can call assembler code. On Thu, Mar 1, 2018 at 12:28 AM -0600, "Robin Vowels" wrote: TRT will do it. On 1/03/2018 2:32 AM, Andre Schoeman wrote: > Is there a way to use the inverse of either the FIND or INDEX functions ?? > > For example, a string of characters contains leading blanks and I want to find > the 1st non-blank character in that string. > > Trying "INDEX('string',NOT ' ')" or "INDEX(NOT 'string',' ')" yields assembly > errors. > (I've tried both the logical-expression and function-invocation formats of the > INDEX and FIND functions) > > Has anyone else successfully used such inverse formats of any of these > functions, > or is there another function (that I can't see) that can yield the results > I'm after. > > Best regards, Andre >