cherokee
7th March 2006, 23:06
Hello everyone,

I am having a problem when compiling a simple program... I can't find the problem.


domain tckoor t.koor.s

function get.demand.info()
{
on case t.koor.s
case 1:
break
case 3:
break
case 4:
break
case 6:
break
endcase
......


Error: Case value should have type LONG

where t.koor.s contains order type from timrp010.koor

I do not know why is giving me this error message at the compilation time...

Does anyone can see a problem with this?

Thanks in advance,

Carlos
:mad:

Eddie Monster
7th March 2006, 23:27
on case lval(t.koor.s)

or

on case lval(str$(t.koor.s))

cherokee
7th March 2006, 23:31
thanks,

It did worked with the lval(str$(t.koor.s)). the domain of this variable is long already, isn't it?

thanks anyways.

Carlos

lbencic
8th March 2006, 00:42
koor is an enumerated domain. Another way to write it is:

on case etol(tckoor, t.koor.s)

etol = Enumerate to Long

cherokee
8th March 2006, 15:31
yes, you are right... I just forgot about the etol() function.... sorry..

also other way is,

on case t.koor.s
case tckoor.act.sfc:
break
case tckoor.act.sls:
break
case tckoor.mps.sfc:
break

......


Thanks again,
Carlos
;)