Cooper
2010-02-16 11:56:41 UTC
Hello, i have this small problem, me need check a string and to second of
content of string take a choose, so i have thinked to this solution (just a
example):
case mystring of
// Action
'dog' : out := 'cane';
'cat': out := 'gatto';
'fish': out := 'pesce';
else
// Error (do something)
end;
Doing so, delphi back me error telling me that required ordinal type. I
suppose that mystring not can to be a string but a integer value and that
cases value need to be integer value too.
But so i can solve this situation? Me have string value and not integer
value.
Thanks for help.
content of string take a choose, so i have thinked to this solution (just a
example):
case mystring of
// Action
'dog' : out := 'cane';
'cat': out := 'gatto';
'fish': out := 'pesce';
else
// Error (do something)
end;
Doing so, delphi back me error telling me that required ordinal type. I
suppose that mystring not can to be a string but a integer value and that
cases value need to be integer value too.
But so i can solve this situation? Me have string value and not integer
value.
Thanks for help.