POV-Ray : Newsgroups : povray.general : How to check an identifier type? Server Time
4 Dec 2024 21:18:56 EST (-0500)
  How to check an identifier type? (Message 1 to 7 of 7)  
From: And
Subject: How to check an identifier type?
Date: 23 Jul 2023 09:05:00
Message: <web.64bd250d9955bd97119738b6aa81652d@news.povray.org>
How to check... a defined identifier string?

or number?


Post a reply to this message

From: jr
Subject: Re: How to check an identifier type?
Date: 23 Jul 2023 09:35:00
Message: <web.64bd2b9e45edcfe680c03e9d6cde94f1@news.povray.org>
hi,

"And" <49341109@ntnu.edu.tw> wrote:
> How to check... a defined identifier string?
> or number?

not sure if you're using Linux, or have access to.  if so, have a look perhaps
at  WFP's 'povr' branch.  eg
<http://news.povray.org/60abd77d%241%40news.povray.org>.


regards, jr.


Post a reply to this message

From: And
Subject: Re: How to check an identifier type?
Date: 24 Jul 2023 02:25:00
Message: <web.64be187b45edcfe62eea71a2aa81652d@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "And" <49341109@ntnu.edu.tw> wrote:
> > How to check... a defined identifier string?
> > or number?
>
> not sure if you're using Linux, or have access to.  if so, have a look perhaps
> at  WFP's 'povr' branch.  eg
> <http://news.povray.org/60abd77d%241%40news.povray.org>.
>
>
> regards, jr.

No, I don't use Linux. I'm writing a macro, it input a file_name string. If
(file_name = ""), it will not output that file.

I just found a method using concat(file_name) to avoid inputting non-string
type.


Post a reply to this message

From: jr
Subject: Re: How to check an identifier type?
Date: 24 Jul 2023 05:40:00
Message: <web.64be463a45edcfe680c03e9d6cde94f1@news.povray.org>
hi,

"And" <49341109@ntnu.edu.tw> wrote:
> ...
> No, I don't use Linux. I'm writing a macro, it input a file_name string. If
> (file_name = ""), it will not output that file.
> I just found a method using concat(file_name) to avoid inputting non-string
> type.

good.

caution, blatant advertising :-) :
<https://drive.google.com/file/d/10pGH0yi_-8aBTQvTwQPB4AdfRl9JsTGg/view?usp=sharing>


regards, jr.


Post a reply to this message

From: And
Subject: Re: How to check an identifier type?
Date: 26 Jul 2023 08:35:00
Message: <web.64c1122b45edcfe62eea71a2aa81652d@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "And" <49341109@ntnu.edu.tw> wrote:
> > ...
> > No, I don't use Linux. I'm writing a macro, it input a file_name string. If
> > (file_name = ""), it will not output that file.
> > I just found a method using concat(file_name) to avoid inputting non-string
> > type.
>
> good.
>
> caution, blatant advertising :-) :
> <https://drive.google.com/file/d/10pGH0yi_-8aBTQvTwQPB4AdfRl9JsTGg/view?usp=sharing>
>
>
> regards, jr.

Thank you. In fact, I used very elementary with write/read data whether POV-Ray
or Java. First time think about what is CSV (Comma Separated Values).

Your document style looks clean.
I will read it.


Post a reply to this message

From: kurtz le pirate
Subject: Re: How to check an identifier type?
Date: 27 Jul 2023 02:39:54
Message: <64c2113a$1@news.povray.org>
On 24/07/2023 08:21, And wrote:
>
> 
> No, I don't use Linux. I'm writing a macro, it input a file_name string. If
> (file_name = ""), it will not output that file.
> 

I'm not sure I understand the need, but if you want to test whether the
file name is empty, you can use the strlen() function.

#if(strlen(file_name))
  // file name is defined
  ...
#else
  // file name is empty
  ...
#end



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: jr
Subject: Re: How to check an identifier type?
Date: 27 Jul 2023 09:00:00
Message: <web.64c2699345edcfe680c03e9d6cde94f1@news.povray.org>
hi,

"And" <49341109@ntnu.edu.tw> wrote:
> ...
> Thank you. In fact, I used very elementary with write/read data whether POV-Ray
> or Java. First time think about what is CSV (Comma Separated Values).

yes, thinking about data from various "different angles" can be helpful.


> Your document style looks clean.
> I will read it.

thank you.  (hope the code, too, will "stand up under scrutiny" ;-))


regards, jr.


Post a reply to this message

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