TD 2005 Case statment - user defined constant

forum.gupta.bugreport (2005-2010)
Vincent Kars

TD 2005 Case statment - user defined constant

Post by Vincent Kars » 15 Aug 2005, 14:52

 Posted by:  Vincent Kars 

Code: Select all

Application Description: Gupta SQLWindows Standard Application Template
	Outline Version - 4.0.34
	Global Declarations
		External Functions
		Constants
			System
			User
				String: strConstant='This is a User defined constant'
		Application Actions
			On SAM_AppStartup
				Select Case sString
					Case strConstant
The compiler flags this as an error: A system or user defined constant or numeric value is required here.
strConstant is a user defined constant

Vincent
You do not have the required permissions to view the files attached to this post.

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: TD 2005 Case statment - user defined constant

Post by RainerE » 15 Aug 2005, 15:24

 Posted by:  Rainer Ebert 

Vincent,

from onlinehelp:
"With the Select Case statement, Centura successively compares the value of
an expression against Case constants. Both the expression and the constants
must be number data types."

Rainer

Vincent Kars

Re: TD 2005 Case statment - user defined constant

Post by Vincent Kars » 16 Aug 2005, 13:12

 Posted by:  Vincent Kars 

Rainer,
I know, Select Case works on numbers only for years
Personally I think it is highly convenient if it should also work with string constants
I logged this because the compiler message is misleading, it should state 'a system or user defined numeric constant'

Thanks,

Vincent

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests