×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Jon,
Your mental model of Nullness doesn't match here. An empty string is not a null. It does have a value which is 0 characters so you can compare two empty strings (=, >, <). Nulls you can't even compare against each other. Null = Null is always false. You can only test for a null (if X is null) which I believe is what you're trying to say here.
http://en.wikipedia.org/wiki/Empty_string
Paul Morgan
Principal Programmer Analyst
IT Supply Chain/Replenishment
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Tuesday, October 11, 2011 11:44 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: RPG Error or ?
On Oct 11, 2011, at 11:16 AM, rpg400-l-request@xxxxxxxxxxxx wrote:
To me it isn't logical,
if you reset a variable field to "no value" you do it with
string = '';
%len(string) will display 0
so why is a compare with '' not equal to the setting of the field while
it (whatever there may be in memory) works if you do
Others have explained why it didn't work, but to me your original comparison was illogical. I have no concept (although you clearly do) of what "greater than null" means. Nullness surely can only be tested for existence or non-existence. So I expect If x <> ''; to work and If x = ''; But not < or > than.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
As an Amazon Associate we earn from qualifying purchases.