POV-Ray : Newsgroups : povray.newusers : File I/O Problems && How to test if an identifier is a Float or a vector : Re: File I/O Problems && How to test if an identifier is a Float or a vector Server Time
7 Sep 2024 01:22:48 EDT (-0400)
  Re: File I/O Problems && How to test if an identifier is a Float or a vector  
From: KalleK
Date: 17 Mar 2002 08:40:17
Message: <3c949cc1$1@news.povray.org>
> It is very simple and I hope the manual explains it:  Use vstr to turn
> vectors and str to turn floats into strings.
>
>     Thorsten

Well, thanks, Thorsten.
But that was not exactly my problem. I #wrote only vectors to file, but when
I #read them in again, and tried to put them in a already declared
(array-)vector-identifier, I got errors like described in the first post.
I wanted to #debug and to see the content of what I #read out of the file.
Therefore I have to convert those (strange) mix of vectors and floats to
Strings. But how can I decide wether there's a vector or a float within my
identifier. I asked if there's a method like "isNumber(<identifier>)" and
"isVector(<identifier>)"...
Then I could use str of vstr, of course.

But I decided to work around that problem, by #writing to a file and
#including this one lateron instead of #reading it. (That's the way, it's
done in the examplefile life.pov)

Thank you anyway...

Kalle


Post a reply to this message

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