Is there intelligent life after Progress...

mbraun

New Member
Hi all!

I have been working with Progress for quite a while now and
sometimes you encounter things which would probably be
totaly unacceptable with Programming languages like Java, C,
Basic, Pascal, etc...

I just thought it´s worth starting a thread which (maybe) could
end up in calling PSCs attention to these little, let´s say
"particularities".

1. Did someone try this?
message CHR(0) = CHR(32).

2. Is it higher or lower?
DEFINE VARIABLE myDate AS Date NO-UNDO INIT ?.
MESSAGE MAX(myDate,01/01/80) MIN(myDate,01/01/80).

These are the only two I´m aware of at the moment, but I´m sure
there are more out there...

Marc

PS: This might be a reason why the term "4GL" isn't so respectable for people that use traditional (3GL) languages.
which is a little bit sad because the advantages of a language
like Progress are amazing.
 
Well,

your first example is quite funny, but the second one doesn't amaze me that much.

In fact, Progress consider that the ? symbol is corresponding to the NIL value. When you are trying to compare a nil date with a valid date, you're asking Progress to compare a date with nothing. This is a total nonsense. Maybe you were thinking that comparing the max value between ? and 01/01/80 wil return 01/01/80, because YOU are thinking that ? is equal to zero.

This is the same thing when you want to make a query :

FOR EACH table WHERE table.date > 01/01/80 AND
table.date < 01/01/81 :

END.

This will only work if the table.date field contains VALID date. If one of your record contain a NIL date, it can (or cannot) match your query. The correct query is :

FOR EACH table WHERE table.date > 01/01/80 AND
table.date < 01/01/81 AND
table.date <> ? :

END.

Another example can be given with char values :

DEF VAR a AS CHAR NO-UNDO.
DEF VAR b AS CHAR NO-UNDO.

a = ?.
b = "hello".

MESSAGE a + b.

It will return ?, because nothing + something = nothing. Maybe it can surprise you, but this is quite logical afterall.

PS: I'm not in love with Progress too, and rather prefer coding with Delphi or PHP.
 

mbraun

New Member
Wow, 5 Years after I've opened this thread there's an answer!

THIS IS A SIGN! :D

@walkeryan
Did you try QT from Trolltech?

Even better than the real thing!
 

RKR

Member
Well,

your first example is quite funny, but the second one doesn't amaze me that much.

In fact, Progress consider that the ? symbol is corresponding to the NIL value. When you are trying to compare a nil date with a valid date, you're asking Progress to compare a date with nothing. This is a total nonsense. Maybe you were thinking that comparing the max value between ? and 01/01/80 wil return 01/01/80, because YOU are thinking that ? is equal to zero.

This is the same thing when you want to make a query :

FOR EACH table WHERE table.date > 01/01/80 AND
table.date < 01/01/81 :

END.

This will only work if the table.date field contains VALID date. If one of your record contain a NIL date, it can (or cannot) match your query. The correct query is :

FOR EACH table WHERE table.date > 01/01/80 AND
table.date < 01/01/81 AND
table.date <> ? :

END.

Another example can be given with char values :

DEF VAR a AS CHAR NO-UNDO.
DEF VAR b AS CHAR NO-UNDO.

a = ?.
b = "hello".

MESSAGE a + b.

It will return ?, because nothing + something = nothing. Maybe it can surprise you, but this is quite logical afterall.

PS: I'm not in love with Progress too, and rather prefer coding with Delphi or PHP.


This is not completely true, the question mark is not nill, or nothing. It is unknown....

when you look at it mathematically:

nothing + something = nothing. this is not true.
Nothing + Something = Something.

on the other hand when you say
Unknown + Something = Unknown you will see that this is true ;-)
 

DevTeam

Member
I've known Progress for like a year now, and I must admit that 1 thing is really strange to me : the "?" value for a boolean variable... This is the first time I see the concept of 3 values for a binary choice (even if ? is not a "real" value, I understand...)

I have developed a grammar in order to translate some Progress 4GL code into Java, it works but it took a loooooong time ! And performances aren't there...
 

lord_icon

Member
Greetings,4GL is soo old and outdated. The future is bright the future is OpenEdge ABL. 4GL are for spotty geeks, ABL is for real people with real business problems where OpenEdge is the market leader.
 

DevTeam

Member
Greetings,4GL is soo old and outdated. The future is bright the future is OpenEdge ABL. 4GL are for spotty geeks, ABL is for real people with real business problems where OpenEdge is the market leader.

I think it's safe to say that ABL is great, if you put aside the lacks in its OOP abilities...
 
Top