jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

RE: JED documentation


Is it because '08' is not a valid octal number? Does integer("8") work? The
leading '0' is often used to indicate an octal number ... from memory this
is what SLang does, though it's been a while :)

-----Original Message-----
From: Brian Blais [mailto:bblais@xxxxxxxxxx]
Sent: Monday, 29 March 2004 11:18
To: jed-users@xxxxxxxxxxx
Subject: Re: JED documentation
Importance: Low


Hello,

Here's an interesting slang error.  Perhaps someone can tell me what's going
on?

The following code cannot translate the "08" into an integer.  It seems to
be
the only number that causes the problem.  Running this script gives the
error
below.

Weird!

                	Brian Blais


#!/usr/local/bin/jed -script

printf("%d\n",integer("02"));
printf("%d\n",integer("04"));
printf("%d\n",integer("06"));
printf("%d\n",integer("08"));


%--------------------------------  OUTPUT from script ----------

-> ./test.sl
2
4
6
S-Lang Error: Syntax Error: Unable to convert string to integer
S-Lang Traceback: integer
S-Lang Error: Syntax Error: called from line 6, file: test.sl



-----------------

            bblais@xxxxxxxxxx
            web.bryant.edu/~bblais

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]