Case statement error 3583 HELP

Posted by Admin on 29-May-2009 08:31

HELP!  I have never used a case statement before and a unable to get progress 9.1d to run my statement, even in using an example I have in a book.

I am sure that I am just missing something obvious, can anyone tell me why this does not work?

def var x as integer.

x = random(0,5).
display x.

case x :
    when 1 then message "one" view-as alert-box info.
    otherwise message "???" view-as alert-box info.

    end case.

All Replies

Posted by kevin_saunders on 01-Jun-2009 09:21

The code works fine for me (10.1C).

What is the message prior to (or just after) the 3583, as 3583 is a very generic message?

Posted by Admin on 01-Jun-2009 09:27

Unfortunately I did not get any other message.  I am going to assume that CASE does not work in my current version of 9.1D.  I used ELSEIF without a problem, CASE just seemed slightly easier.

Posted by kevin_saunders on 01-Jun-2009 09:30

IIRC the CASE statement has been supported since Version 7.

I suspect there is a missing period (.) in a statement just above the CASE statement that is causing compiler to spew out erroneous error messages..

Posted by Admin on 01-Jun-2009 09:33

Try pasting the code I have above, that would not even work for me.

Posted by kevin_saunders on 01-Jun-2009 09:42

I did copy/paste the code and it works fine.

Try commenting (or completely removing) the CASE block of code and see if the compiler still complains.

Posted by Admin on 01-Jun-2009 09:45

Commenting out the CASE block worked fine, but when I uncomment it i get that error.

Posted by kevin_saunders on 01-Jun-2009 10:12

Can you paste the statements that come before and after the CASE block?

Posted by ChUIMonster on 01-Jun-2009 10:34

While it is true that 9.1D is ancient, obsolete and unsupported the CASE statement works fine in 9.1D.

I tried your example verbatim with 9.1D and it worked without any error or objection.

Posted by Admin on 01-Jun-2009 10:43

The code I pasted is all i tried to run.  I was trying to troubleshoot why my program got the same error, but as the error occurs with just this simple code block, I am either doing something wrong, or I have something wrong with my version of progress.

Posted by ChUIMonster on 01-Jun-2009 10:54

I just copied it and pasted into the 9.1D07 editor.  It runs fine.

What service pack of 9.1D are you running?  On what platform?

Posted by Admin on 01-Jun-2009 10:59

I'm running on SCO UNIX.  I don't see a service pack in the information area.  Is there an easy way to find out what Service Pack is installed?

Posted by kevin_saunders on 01-Jun-2009 11:01

In the $DLC directory, there is a file called 'version' - that will contain the information about SP level.

Posted by Admin on 01-Jun-2009 11:40

/home/dlc >more version
PROGRESS Version 9.1D as of Wed May  8 16:30:39 EDT 2002

Posted by ChUIMonster on 01-Jun-2009 11:50

Unpatched 9.1D.

CASE should still work.

Just for kicks try changing the MESSAGE to a plain old MESSAGE -- get rid of the "view-as alert-box info" and see if that helps.

Posted by Admin on 01-Jun-2009 11:53

That did nothing either.  It must be a patch that we don't have installed.

Posted by ChUIMonster on 01-Jun-2009 12:12

Vanilla 9.1D is 7 years old.  You might want to give some thought to upgrading 

But I have a hard time believing that that code doesn't compile.  Even on such a clunker of an old release.  If it's a bug it's a new one on me.

This thread is closed