Question
I am a bit confused. I tried to use the following
SpreadSheetPlugin code in my sandbox.
%CALC{$INT(08)}%
It returns
"ERROR: Illegal octal digit '8', at end of line"
I did some tests and it only returns this error for 09 and 08 so basically this error only happens when either the number 8 or 9 has a leading zero.
The reason they have a leading zero is because I am trying to do a simple calculations using the current days date which is always returned with a leading zero.
Does someone know whats going on? Is this a bug?
Environment
--
GregGardinier - 08 Sep 2007
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
Bug or feature, that is the question. The plugin uses the underlying Perl functions to process functions. In Perl, a leading zero indicates an octal number, hence the error message for illegal octal 08. Octal numbers are in the geek zone, so the plugin should be fixed.
--
PeterThoeny - 09 Sep 2007
Oh, okay thanks. I wound up writing an if statement that removed leading zeros. At least now I understand whats going on.
--
GregGardinier - 09 Sep 2007
Workaround: Write
%CALC{$INT($VALUE(08))}% to get 8
--
PeterThoeny - 09 Sep 2007