Progress-gl - What's Benefit Of Placing Variable Declaration On Top Of The Procedure

  • Thread starter Wutipong Wongsakuldej
  • Start date
Status
Not open for further replies.
W

Wutipong Wongsakuldej

Guest
I've been doing Progress 4GL for 8 years though it's not my main responsibility. I do C++ and Java a lot more. When programming in other language it's suggested to have the declaration close to the usage. With 4GL however I see people place the declaration on top of the file. It's even in the coding standard.

I think placing them on top of them file would lead to 'vertical separation' problem. In most other language it's even suggested to do the assignment at the same line as the declaration.

The question is why it's suggested to do so in 4GL ? What's the benefit ? I know that it's possible to place the declaration anywhere in the file, given that it's declared before it is used.

Continue reading...
 
Status
Not open for further replies.
Top