POV-Ray : Newsgroups : povray.general : Turn a string of digits into a number? : Re: Turn a string of digits into a number? Server Time
27 Apr 2024 10:24:36 EDT (-0400)
  Re: Turn a string of digits into a number?  
From: Bald Eagle
Date: 1 Dec 2021 21:55:00
Message: <web.61a8348efbbd28521f9dae3025979125@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.