|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
String functions for POVray include ways to turn a numerical value into a
string. But is there a function to do the converse, turn a string of digits into
an integer? Of course there is a workaround, use a loop and multiply the value
you have by 10 with each iteration as you examine the string from left to right.
That seems awkward to me. Please tell me I missed something.
My specific task is to write a script that will parse move notation for a board
game and produce an image of the position, possibly animated.
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Jonathan Bush" <djb### [at] gmxcom> wrote:
> String functions for POVray include ways to turn a numerical value into a
> string. But is there a function to do the converse, turn a string of digits into
> an integer?
You want val().
http://www.povray.org/documentation/view/3.6.1/228/
val(S) Convert string S to float. Returns a float value that is represented by
the text in string S. For example val("123.45") is 123.45 as a float.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Jonathan Bush" <djb### [at] gmxcom> wrote:
> > String functions for POVray include ways to turn a numerical value into a
> > string. But is there a function to do the converse, turn a string of digits into
> > an integer?
>
> You want val().
>
> http://www.povray.org/documentation/view/3.6.1/228/
>
> val(S) Convert string S to float. Returns a float value that is represented by
> the text in string S. For example val("123.45") is 123.45 as a float.
Thank you! I missed that. I don't see any way to change the subject to include
the word Solved, using a browser.
Post a reply to this message
|
|
| |
| |
|
|
From: Alain Martel
Subject: Re: Turn a string of digits into a number? [solved]
Date: 3 Dec 2021 11:10:40
Message: <61aa4180$1@news.povray.org>
|
|
|
| |
| |
|
|
Le 2021-12-02 à 19:20, Jonathan Bush a écrit :
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> "Jonathan Bush" <djb### [at] gmxcom> wrote:
>>> String functions for POVray include ways to turn a numerical value into a
>>> string. But is there a function to do the converse, turn a string of digits into
>>> an integer?
>>
>> You want val().
>>
>> http://www.povray.org/documentation/view/3.6.1/228/
>>
>> val(S) Convert string S to float. Returns a float value that is represented by
>> the text in string S. For example val("123.45") is 123.45 as a float.
>
> Thank you! I missed that. I don't see any way to change the subject to include
> the word Solved, using a browser.
>
>
>
>
In a news group, you can't change the title of the thread. All you can
do is change the title of your reply like I did in Thinderbird.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |