Alec Ross
6/2/2006 6:47:00 PM
In message <1149269107.233000.129240@h76g2000cwa.googlegroups.com>,
simonced <simonced@gmail.com> writes
>
>Robert Klemme vi0 >> simonced wrote:
>> > Hello.
>> >
>> > I have a complie error on this simple code :
>> >
>> > #si c'est un caractere ?
>> > if char=~/\w|\s/i then
>> > @buffer+=char
>> > @position+=1
>> >
>> > else if id==14 then
>> > #backSpace
>> > @buffer=@buffer[0..@buffer.length-2]
>> > @position-=1
>> >
>> > else
>> > puts "caractere non reconnu : #{id}"
>> >
>> > end
>>
>> Use "elsif" or "case"
>>
>> case
>> when /\w|\s/i =~ char
>> then
>> ...
>> when id == 14
>> then
>> ...
>> else
>> ...
>> end
>>
>> Regards
>>
>> robert
>
>elseif if not working, I don't understand why, that's why I also tried
no --^ 'e' here. Fixes the problem. No?
>"else if".
>but case is working fine. I just didn't know we could make tests with
>when oher than === (that's described in my reference book).
>
>thanks for all this help, I can go on now.
>Regards.
>
>ced.
>
--
Alec Ross