Error message Illegal Natural Number

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
User avatar
DeFleur
Posts: 41
Joined: Sat Feb 07, 2009 7:49 am
Location: Switzerland

Error message Illegal Natural Number

Post by DeFleur »

With this

Code: Select all

startshape SM_CURve

Re1=840	         
Re2=580

shape SQU
{SQUARE [s 25 1 y .5] }

shape RUNsm(natural REC) 
{
if(REC>=Re1)
{SQU [ ]
RUNsm(REC--1) [y 1 r 1]}
else if (REC>=Re2)
{SQU [ ]
RUNsm(REC--1) [y 1 r -1]}
}
shape SM_CURve 
{RUNsm(1001) [ ]}
I am getting an error message on REC with REC >1000
quote Expression does not evaluate to a legal natural number
unquote. However, if parameter REC is chosen <= 1000
there is no such error message. It seems this appears since v30
and was not with preceeding v29. Any help available ?
kind regards from DeFleur

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: Error message Illegal Natural Number

Post by MtnViewJohn »

This is a new feature in the latest release. In the previous version the maximum natural number is 9007199254740992. In the current release it is set by the CF::MaxNatural variable. The default value for CF::MaxNatural is 1000, but you can set it to anything you want between 1 and 9007199254740992.

User avatar
DeFleur
Posts: 41
Joined: Sat Feb 07, 2009 7:49 am
Location: Switzerland

Re: Error message Illegal Natural Number

Post by DeFleur »

Thank you for prompt reply. The 9007199254740992 will just make it then for my need....
kind regards from DeFleur

Post Reply