Post Reply 
SIGN Function
01-04-2017, 03:12 PM
Post: #7
RE: SIGN Function
Not sure I understand why you are using SIGN() here as you are testing if it’s equal to 0 which occurs only is the parameters itself equals to 0.
So you can do: IF J==0 OR M==0 OR A==0 THEN …
And even more simple a single test will do the same thing: IF J*M*A==0 THEN … as J*M*A will be equal to zero if at least one of J, M or A is equal to zero.

So in a concise way:
Code:
EXPORT OKDATE(J,M,A)
BEGIN
  IFTE( J*M*A,PRINT("Date OK"),PRINT("Date ??") );
END;

If J*M*A is not zero (True condition) the first PRINT is executed, if it's zero (False condition) it's the second one.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
SIGN Function - ggauny@live.fr - 01-04-2017, 08:19 AM
RE: SIGN Function - Carlos295pz - 01-04-2017, 10:58 AM
RE: SIGN Function - DrD - 01-04-2017, 11:04 AM
RE: SIGN Function - ggauny@live.fr - 01-04-2017, 11:38 AM
RE: SIGN Function - DrD - 01-04-2017, 11:55 AM
RE: SIGN Function - ggauny@live.fr - 01-04-2017, 12:19 PM
RE: SIGN Function - StephenG1CMZ - 01-04-2017, 04:19 PM
RE: SIGN Function - Didier Lachieze - 01-04-2017 03:12 PM
RE: SIGN Function - ggauny@live.fr - 01-04-2017, 03:34 PM
RE: SIGN Function - Didier Lachieze - 01-04-2017, 04:10 PM
RE: SIGN Function - cyrille de brébisson - 01-05-2017, 06:26 AM
RE: SIGN Function - DrD - 01-05-2017, 12:38 PM
RE: SIGN Function - cyrille de brébisson - 01-09-2017, 06:56 AM
RE: SIGN Function - DrD - 01-09-2017, 10:33 AM



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