On 21/01/2013 21:11, Sven Barth wrote:
On 21.01.2013 15:37, Flávio Etrusco wrote:
On Mon, Jan 21, 2013 at 7:00 AM, Sven Barth <[email protected]> wrote:
Am 21.01.2013 04:54, schrieb Alexander Klenin:

On Mon, Jan 21, 2013 at 4:43 AM, Sven Barth <[email protected]>
wrote:

      case gradeSelected of
           '12'..'12': tuitionFee := '14500.00';


             ^       ^   This should be easy to spot...

No, the error is in the line below.

           '8'..'11' : tuitionFee := '13500.00';

Note that strings are not numbers, so '8' > '11'.
Also, '1' < '11' < '7' < '8', so case branch labels intersect, which
is the reason for the second error.

it works! after I have removed the single quote and converted gradeSelected from string to integer.

Thanks for your contributions.
Right... I forgot that this is a case of string -.-

Regards,
Sven

Should case of string really allow ranges?

THAT is an interesting question.

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
Kind Regards

Eric Kom

System Administrator & Programmer - Metropolitan College
 _________________________________________
/ You are scrupulously honest, frank, and \
| straightforward. Therefore you have few |
\ friends.                                /
 -----------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (| Kom | )
    /'\_   _/`\
    \___)=(___/

2 Hennie Van Till, White River, 1240
Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334
[email protected] | [email protected]
www.kom.za.net | www.kom.za.org | www.erickom.co.za

Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to