POV-Ray : Newsgroups : povray.general : String Problem... Server Time
8 Aug 2024 01:17:31 EDT (-0400)
  String Problem... (Message 1 to 3 of 3)  
From: Eitan Tal
Subject: String Problem...
Date: 5 May 2001 04:28:27
Message: <3AF3C74C.F029F88D@netvision.net.il>
somewhy this command doesn't pass:
  #declare tempStr = imgPath + cardNum + "_" + cardType + ".gif"
with the error: No matching } in pigment, + found instead.

is there a way to add Strings?


Post a reply to this message

From: Ib Rasmussen
Subject: Re: String Problem...
Date: 5 May 2001 05:08:52
Message: <3AF3C30A.34B3F657@ibras.dk>
Eitan Tal wrote:
> 
> somewhy

Is that a word?

> is there a way to add Strings?

You may want to try the concat function. See the docs under string
functions.

/Ib
------------------------------
Gallery: htt://www.ibras.dk


Post a reply to this message

From: Bob H 
Subject: Re: String Problem...
Date: 6 May 2001 05:40:07
Message: <3af51bf7@news.povray.org>
"Ib Rasmussen" <ib### [at] ibrasdk> wrote in message
news:3AF3C30A.34B3F657@ibras.dk...
> Eitan Tal wrote:
>
> > is there a way to add Strings?
>
> You may want to try the concat function. See the docs under string
> functions.

Such as:

#declare imgPath="C:\\images\\"
#declare cardNum=99;
#declare cardType="abc"

#declare tempStr = concat ( imgPath, str(cardNum,0,0), "_", cardType,
".gif" )

plane {z,0 pigment {image_map {gif tempStr}}}

text {ttf "times.ttf", tempStr, .1,0 pigment {rgb 1} scale .5 translate
<-2.5,-.5,-.5>}

If you're like me and don't always use this kind of thing it can be
difficult to remember the correct way to go about it.

Bob H.


Post a reply to this message

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