Is it a Bug or a feature?

arjenmeijer

New Member
PROCEDURE x:
define variable a as character no-undo.
define variable b as character no-undo.

if a = b then
END PROCEDURE.

This will be accepted by the compiler, where as we (as in the programmers at our company) say it should be an error. Progress says: "undocumented feature".
 

-Zigo-

Member
display '12345' format "x(50)"
display '12345' format "x (50)"

Mvg, MvG.:rolleyes:
That's correct.

FORMAT "x(50)" is just shorthand of saying FORMAT "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (ie. x 50 times)

When you say FORMAT "x (50)", you're saying you only want one x, ie. one character, so the '12345' gets truncated to the first character, which is '1'. And then you're saying you want to display ' (50)' after it.
 

-Zigo-

Member
Code:
NO-LOCK.
or:
Code:
EXCLUSIVE-LOCK.
or indeed:
Code:
SHARE-LOCK.

Compile perfectly well on their own, but what exactly does the compiler think is happening?!
 

schaapie

Member
Code:
NO-LOCK.
or:
Code:
EXCLUSIVE-LOCK.
or indeed:
Code:
SHARE-LOCK.

Compile perfectly well on their own, but what exactly does the compiler think is happening?!

I know what the compiler thinks:
Code:
display exclusive-lock.
display share-lock.
display no-lock.
 
Top