POV-Ray : Newsgroups : povray.advanced-users : #read robustness and string functions Server Time
23 Nov 2024 10:04:01 EST (-0500)
  #read robustness and string functions (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: #read robustness and string functions
Date: 1 Jun 2017 13:05:00
Message: <web.593048371fb1c2d4c437ac910@news.povray.org>
I'd like to be able to read through data files, and be able to reject malformed
entries.

I'm assuming that to do this in SDL, I will have to read in _everything_ as a
string first, and then decide what to do with the information in that string
based upon its content.

Has anyone worked out macros to deal with strings such as left() mid() right()
Upper/Caps(), Lower(), Val[ue](), etc?

hexidecimal conversion? (to decimal)

Apparently there are macros to synthesize strings, but not analyze them.


Post a reply to this message

From: Bald Eagle
Subject: Re: #read robustness and string functions
Date: 1 Jun 2017 14:25:01
Message: <web.59305bf2fcf54607c437ac910@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

ARggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhh.................

Of course I find most of the string functions I was looking for AFTER I asked.
(the docs are hard to navigate/search sometimes - esp online, and the string
functions are split up into different sections)


strlen()
strcomp()

substr()  [ mid() ]
strupr()  [ Upper/Caps() ]
strlwr()  [ Lower() ]
val()     [ Val[ue]() ]

asc()
chr()
str()
vstr()

and alignment macros in shapes.inc


Post a reply to this message

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