@listserver.u2ug.org
Sent: Thu, Aug 1, 2013 11:16 am
Subject: Re: [U2] What is true
Hi again,
I have been on a site where they insisted that
A = B = C
should be written as
A = B EQ C
to emphasise that the second operator is a relational test.
Personally, I use
A = (B = C)
even though
understanding what your code is doing
that is time well worth spent
-Original Message-
From: Martin Phillips martinphill...@ladybridge.com
To: 'U2 Users List' u2-users@listserver.u2ug.org
Sent: Thu, Aug 1, 2013 11:16 am
Subject: Re: [U2] What is true
Hi again,
I have been
To clarify
In multivalue, True is not False, where False is anything that is 'falsy'
i.e. zero or empty.
Obviously different than other languages, notably those where true is -1
(all bits set on a signed integer).
So:
A = HELLO
IF A THEN CRT A : WORLD
Gives HELLO WORLD
Regarding file
-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach
Sent: Thursday, August 01, 2013 4:40 AM
To: 'U2 Users List'
Subject: Re: [U2] What is true
To clarify
In multivalue, True is not False, where False is anything that is 'falsy
To: U2 Users List
Subject: Re: [U2] What is true
Hi,
To add a little more to the discussion. I know in UniVerse this is true and I
suspect it is true in other flavors of Pick.
If you wrap a variable in parenthesis it will be treated as a Boolean test.
For example:
A=''
IF (A) THEN CRT 'TRUE
...@listserver.u2ug.org] On Behalf Of Jim Swain
Sent: 01 August 2013 13:24
To: U2 Users List
Subject: Re: [U2] What is true
This is not true as when A='HELLO' IF (A) returns true.
You use the parenthesis to set a Boolean variable, i.e BRITISH = (COUNTRY =
'ENGLAND' OR COUNTRY = 'WALES') etc the var BRITISH is set
Business Solutions
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach
Sent: Thursday, August 01, 2013 4:40 AM
To: 'U2 Users List'
Subject: Re: [U2] What is true
To clarify
In multivalue, True
on universe (not sure of unidata), you can use FILEINFO() to see if something
is a file variable:
x=
crt fileinfo(x,0)
returns 0. Would return 1 for an open file.
On Jul 31, 2013, at 4:47 PM, Wols Lists antli...@youngman.org.uk wrote:
On 31/07/13 09:06, Martin Phillips wrote:
Of course,
Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: 01 August 2013 14:41
To: U2 Users List
Subject: Re: [U2] What is true
Do people
on universe (not sure of unidata), you can use FILEINFO() to see if something
is a file variable:
x=
crt fileinfo(x,0)
returns 0. Would return 1 for an open file.
This originated in Prime Information and is available on UniVerse, UniData,
PI/open, QM, and probably a few others.
Martin
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jim Swain
Sent: Thursday, August 01, 2013 8:24 AM
To: U2 Users List
Subject: Re: [U2] What is true
This is not true as when A='HELLO' IF (A) returns true.
You use
:52
To: U2 Users List
Subject: Re: [U2] What is true
Here is a simple program I wrote and ran on UV 11.1.9. It would be interesting
to hear if UD behaves the same way.
0001: A=''
0002: CRT 'A = ':QUOTE(A):' ':
0003: IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE'
0004: A=0
0005: CRT 'A = ':QUOTE
-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: 01 August 2013 14:41
To: U2 Users List
Subject: Re: [U2] What is true
Do people from Wales take well to being called British? Sadly, almost
everything I know about Wales
on universe, it looks like only fileinfo(var,0) will let you test.
fileinfo(var,1) etc will abort complaining that var isn't a file variable
On Aug 1, 2013, at 9:52 AM, Martin Phillips martinphill...@ladybridge.com
wrote:
on universe (not sure of unidata), you can use FILEINFO() to see if
Fascinating stuff. :)
I don't like the idea of spaces being numeric but when I get data from
unknown sources I do tend to TRIM and test for NUM(x).
With the following program:
- Universe in Information flavor reports True on all tests.
- Unidata only reports 3-8 as True
- D3 does not consider any
Just adding a little more subtlety. Consider:
X = Y = 3
In some languages this sets Y to 3 and then X to Y, so X=3. But in
BASIC, as Brian said, we need to force the precedence on Y=3 before
X=Y.
In other contexts, parentheses force an equation. Consider:
SUBROUTINE FOO( X,Y,Z )
and
CALL FOO(
contact
postmas...@zafire.com
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno
Sent: 01 August 2013 17:34
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] What is true
Just adding a little more subtlety
Which is why I used it in my response.
Brian
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: 01 August 2013 17:10
To: U2 Users List
Subject: Re: [U2] What is true
on universe, it looks like only
...@listserver.u2ug.org] On Behalf Of Jim Swain
Sent: 01 August 2013 17:46
To: U2 Users List
Subject: Re: [U2] What is true
Now I'm getting confused... its not a case of precedence
In the case of X = Y = 3
X is set to 1 (true) when Y = 3
X is set to 0 (false) when Y # 3
X in this instance will never = 3
You're right. X is never 3, but I did say so. As I said below, that's
the way it works in languages other than BASIC. X=Y=3 will set both
values to 3 because of the order of operations.
And I was wrong when I said we Need to force precedence. It doesn't
Need to be forced in BASIC, but in other
Hi again,
I have been on a site where they insisted that
A = B = C
should be written as
A = B EQ C
to emphasise that the second operator is a relational test.
Personally, I use
A = (B = C)
even though the brackets serve no purpose. It just helps when reading the code.
Martin Phillips
On 01/08/13 17:10, Ed Clark wrote:
on universe, it looks like only fileinfo(var,0) will let you test.
fileinfo(var,1) etc will abort complaining that var isn't a file variable
Which is why I think the UV implementation is CRAP!
You should not be able to *crash* your program simply by
On 01/08/13 19:15, Martin Phillips wrote:
Hi again,
I have been on a site where they insisted that
A = B = C
should be written as
A = B EQ C
to emphasise that the second operator is a relational test.
A lot of fellow coders have wondered at it, but as someone who learnt
coding in
easier.
Cheers,
Dan
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Thursday, August 01, 2013 12:48 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] What is true
On 01/08/13 17:10, Ed Clark
To further complicate things, I was instructed at one job to use the IF VAR
THEN syntax as this was treated a boolean operation and executed faster than IF
VAR # ''. We were working on Prime Information at the time. A few years later
I went to work for a VAR. I had made changes to the their
Martin, that's actually one of my standards. Due to the ambiguity of
several characters, most notably , , and =, we use EQ, NE, LT, LE, GT,
and GE for comparison and use for array extraction and replacement and =
for assignment. Except in SB+, which doesn't allow such critters. And
kudos for
Hi,
About the true/false thing, I always use 0 and 1 but I was chastised
about that by a colleague recently, that it might not be completely
cross-platform, and now I stutter on it every time I do that,
wondering if I'm not really following a best practice
I seem to recall this same topic
And then there's the query language:
Suppose INVOICED field is supposed to be true or false. Stored as 1 or
0, but maybe left null in some records (We've all been there.):
SELECT CUSTOMER WITH INVOICED
If INVOICED is 0 or null, will said CUSTOMER record be selected or not?
UV selects
, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: 31 July 2013 11:46
To: U2 Users List
Subject: Re: [U2] What is true
And then there's
Of Charles Stevenson
Sent: Wednesday, July 31, 2013 3:46 AM
To: U2 Users List
Subject: Re: [U2] What is true
And then there's the query language:
Suppose INVOICED field is supposed to be true or false. Stored as 1 or 0,
but maybe left null in some records (We've all been there.):
SELECT
Services
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Wednesday, July 31, 2013 3:46 AM
To: U2 Users List
Subject: Re: [U2] What is true
And then there's the query language:
Suppose
On 31/07/13 09:06, Martin Phillips wrote:
Of course, nothing is ever completely black and white. As multivalue Basic
has developed, internal data types have gone beyond
simply numbers and strings. If I write
IF FVAR THEN ...
where FVAR is a file variable, what do I expect this to do? The
at once.
-Original Message-
From: Wols Lists antli...@youngman.org.uk
To: u2-users u2-users@listserver.u2ug.org
Sent: Wed, Jul 31, 2013 1:48 pm
Subject: Re: [U2] What is true
On 31/07/13 09:06, Martin Phillips wrote:
Of course, nothing is ever completely black and white. As multivalue
Hi Wil,
That indeed was my code - ten years old now!
I think I read the same article as Kevin. I don't use it in my day to day
programming (which is in Universe and QM, thus using @TRUE and @FALSE) but I
think I still would use it for Pickwiki. Just a style thing - de gustibus non
disputandum
From: Keith Johnson
Hi Tony,
'Twas a teensy bug under an unusual circumstance... Hey, wait a
minute, you're the one who complained that no-one updated other
people's code! You wouldn't be trying to yank Will's chain, would
you?
Indeed I do comment occasionally on the proportion of takers to
I picked up that trick from some old code may years ago, and haven't used
it in a while since @TRUE and @FALSE have been available on Unidata and
Universe, but you may be seeing some of my old code. As far as I have
seen, TRUE is usually 1 on MV platforms, but at the time I started writing
that
I saw it here by KRJ whoever that is
http://www.pickwiki.com/cgi-bin/wiki.pl?Compare
-Original Message-
From: Kevin King ke...@precisonline.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, Jul 30, 2013 6:10 pm
Subject: Re: [U2] What is true
I picked up
From: Wjhonson
I saw it here by KRJ whoever that is
http://www.pickwiki.com/cgi-bin/wiki.pl?Compare
That's Keith Johnson in NZ. What an unusual last name... ;)
Ironically, it looks like he recently modified one of your postings to
PickWiki too.
About the true/false thing, I always use 0 and
For me it was more of a concern when there were new players entering the
market. As we haven't really seen any new MV platforms in a good long
while it seems like this is much less of a concern.
On Tue, Jul 30, 2013 at 9:21 PM, Tony Gravagno 3xk547...@sneakemail.comwrote:
From: Wjhonson
I
39 matches
Mail list logo