This is correct behaviour as documented.
If you are on U2 or QM, use the COMPARE() function. For other environments you need to force a string comparison by doing something contrived such as
IF A:'X' = B:'X' THEN …
to add the same non-numeric suffix to both strings.
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
SCMP(x, y)
Returns -1 if x<y
Returns 0 if x=y
Returns 1 if x>y
OR
X:” “ = y:” “
David A. Green
From: mvd...@googlegroups.com [mailto:mvd...@googlegroups.com] On Behalf Of David Laansma
Sent: Monday, July 10, 2017 7:39 AM
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
Subject: [mvdbms] All numeric strings being compared as numbers instead of as strings
Greetings Team,
--
IF THIS.ELEMENT:’X’ = LAST.ELEMENT:’X’ THEN
True…
END ELSE
False…
END
Dan Ell Technical Support Engineer P: 949-383-2429 E: da...@jbase.com | W: jbase.com A: 9245 Research Drive, Irvine, CA 92618
Sent: Monday, July 10, 2017 10:39 AM
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
Subject: [mvdbms] All numeric strings being compared as numbers instead of as strings
Greetings Team,
--
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
Thank you everyone. One nugget of information is that I'm on Unidata.Here are the results of my tests with your various suggestions:1. I find no documentation on a COMPARE () function in the Rocket Unidata Unibasic Commands Reference Version 8.1.0 document.2. The SCMP function returned zero, indicating the two strings were the same.3. IF A:"X" = B:"X" THEN X worked, perfectly logical.I understand why it's doing what it's doing, but I would think there's a function that would do this for me.
THIS.ELEMENT = 0001234556789LAST.ELEMENT = 0123456789
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
... consider that in JavaScript and PHP there are two equality operators and both languages
As to "I think there would be a function". You have it. Concatenating a string to a variable forces it to be a string. That's simply different syntax
Hi Kevin,
QM has the double equals
IF A == B THEN …
to force a string comparison. There is no need for a numeric equivalent as the ordinary = relational operator converts to numeric if it can.
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200
From: mvd...@googlegroups.com [mailto:mvd...@googlegroups.com] On Behalf Of Kevin Powick
Sent: 11 July 2017 16:45
To: Pick and MultiValue Databases
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
And soon in D3 as well...
On Jul 19, 2017, at 6:43 PM, Peter McMurray <pgmcm...@gmail.com> wrote:
Perhaps somebody can explain exactly what they perceive to be the difference between UDF and a subroutine either included internally on compile or simply called externally. D3 does both extremely well.I use them for things like stripping comma delimiters (ThankYou Grigory for a quick and easy solution) splitting numbers into words as used on cheques, setting up printers etc.etc.
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
On Jul 20, 2017, at 12:54 PM, Kevin King <precis...@gmail.com> wrote:Is that standard across mv implementations, that parameters passed to functions are immutable?
To unsubscribe, email to: mvdbms+un...@googlegroups.com
Forgot about that trick. Works in UniData.
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
Is that standard across mv implementations, that parameters passed to functions are immutable?
On Jul 20, 2017 9:14 AM, "Kevin Powick" <kpo...@gmail.com> wrote:
--Compared to CALLed subroutines, UDF returns a result, not updated param values. Result = MyUDF(p1,p2,...)Compared to CALLed subroutines, Params of the UDF are passed by value, so immutable by UDF to calling program.Compared to INCLUDEd code, Variables in UDF are local to the function only. i.e. No global variables.Compared to INCLUDEd code, If UDF changes, no need to recompile programs using the UDF--Kevin Powick
On Wednesday, 19 July 2017 18:43:40 UTC-4, Peter McMurray wrote:Perhaps somebody can explain exactly what they perceive to be the difference between UDF and a subroutine either included internally on compile or simply called externally. D3 does both extremely well.I use them for things like stripping comma delimiters (ThankYou Grigory for a quick and easy solution) splitting numbers into words as used on cheques, setting up printers etc.etc.
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
UniData will allow you to change Function arguments.
Plus, you cannot use a Function in an I-Descriptor in UniData only Subroutines.
From: mvd...@googlegroups.com [mailto:mvd...@googlegroups.com] On Behalf Of Kevin King
Sent: Thursday, July 20, 2017 9:54 AM
To: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com