[RPL/2] did i found a bug ?

BERTRAND Joel joel.bertrand at systella.fr
Mar 9 Nov 11:11:33 CET 2010


DEMAINE Benoit-Pierre a écrit :
> maybe i am not up to date ...
>
> dhp at uranus ~ $ rpl
> +++RPL/2 (R) version 4.0.19 (Sunday 10/17/10, 18:25:38 CEST)
> +++Copyright (C) 1989 to 2009, 2010 BERTRAND Joel
>
> +++This is a free software with absolutely no warranty.
> +++For details, type 'warranty'.
>
> RPL/2>  100 1024* 50 *
>
> 2: 100
> RPL/2>  100 1024 * 50 /
> +++System : Memory allocation error [20314]
> dhp at uranus ~ $

	OK, I have found but I think I don't have time enough to quickly fix it.

	When you write 100 1024* 50 *, you create a logical name ('1024*'). As 
you have created a name, evaluation() creates for you an algebraic 
expression :

	'(1024*)*50'

that cannot be evaluated because parenthesis avoid first '*' to take 
argument in stack. A quick and dirty patch is to avoid in name all 
charaters that is not in (A-Za-z0-9) set, but I'm not sure that there is 
no side effect.

	Regards,

	JKB


Plus d'informations sur la liste de diffusion RPL2