LuckyMe Posted January 25, 2002 Posted January 25, 2002 For somereason I found that Abs(T) returns 1 and TextToNum(T) returns 1 as well which is wrong. It should return empty.:?? But Abs(Any string except) or TextToNUm(Any string except)returns empty. I think this is a FMP bug or do I miss any thing? Thank you
Steven H. Blackwell Posted January 25, 2002 Posted January 25, 2002 This is expected behavior. See what happens with "Y" and "N". Now, if there are actual number in the field as well, e.g. T345, then the behavior will be different yet again. Old Advance Man
Kurt Knippel Posted January 26, 2002 Posted January 26, 2002 Internally T = 1 = Y and F = 0 = N, so be aware when using these characters in boolean calculations. P.S. by Boolean logic the above is totally correct.
LuckyMe Posted January 26, 2002 Author Posted January 26, 2002 Why they set internally T = 1 = Y and F = 0 = N? In what case do we need it? And is this FMP things only?Right? Unless there is a good reason, otherwise I can use the If statement to set T = 1 = Y or F = 0 = N for my specific case? Example: If Left(Text, 1) = "T" do something, etc...... or If Left(Text, 1) = 1 do something, etc...... or Thanks
Steven H. Blackwell Posted January 26, 2002 Posted January 26, 2002 Use CASE statement rather than ensted IF's. It's easier to handle. The Y. N, T, F deals with boolean logic. And the rules vary, as I said, depending on whatelse is in the field. Old Advance Man
LuckyMe Posted January 28, 2002 Author Posted January 28, 2002 Thank you for the information. But I wonder why Abs(A) returns empty but Abs(T) returns 1. It is NOT CONSISTANT? Because A and T both are characters. Do you think? If they want to catch boolean, then they should have another built in function instead of Abs such as BL(T) will returns 1, etc.... Thank you
Steven H. Blackwell Posted January 28, 2002 Posted January 28, 2002 Y, T, F, and N are treated as boolean when they are used strictly by themselves in number fields. That's they way the program works. English version only. I believe the Spanish evrsion uses S and V instead of Y and T. Old Advance Man
Recommended Posts
This topic is 8339 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now