POV-Ray : Newsgroups : povray.beta-test : problem with value of local parameter/variable : problem with value of local parameter/variable Server Time
29 Jul 2024 22:23:04 EDT (-0400)
  problem with value of local parameter/variable  
From:
Date: 15 Feb 2002 10:41:45
Message: <ja9q6us8gv2phn0dgr4t7jnqjtovvkpv0c@4ax.com>
POV 3.5 b 11 icl on WinNT Sp 6 PII 233 with 128 MB

Below example use macro kerning() from
http://news.povray.org/sa6q6u8ic6tt2ntql1kt4mm2fiebtf1pih%404ax.com.

The problem is: 
1. start below script - it outputs <0,0,0> vector in message window
2. change Position at and of vletter macro to (Position) <- added parentheses
    it outputs <3.5,0,0>
3. undo parantheses and remove first or second line of kerning macro
    again <3.5,0,0> in output
3. undo removed line in above change and change warning to:
    #warning Str(vletter("crystal.ttf","POV",0,3).x)
    again <3.5,0,0> in output
4. remove included "strings" and change warning to:
    #warning str(vletter("crystal.ttf","POV",0,3).x,0,-1)
    again <3.5,0,0> in output

Could it be somehow releted to direct returning locals?
I though it was fixed in some beta. Any confirmation ?

//START
#macro kerning(Font,String,Thickness,Offset,Position)
  #local HelpText=text{ttf Font String Thickness 0};
  #local Text=HelpText;
  #local Text=<version,0,0>;
  Text
#end

#macro vletter(Font,String,Offset,Position)
  #if(Position=1)
    #local Position=(0*x);
  #else
    #local Position=kerning(Font,String,0,Offset,Position);
  #end
  Position
#end

#include "strings.inc"
#warning VStr(vletter("crystal.ttf","POV",0,3))
//END

ABX


Post a reply to this message

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