PDA

View Full Version : defining a vector within a string


dunkel3d
07-06-2003, 05:13 PM
my expression string contains a vector but when I try to define it I get this error:

float $One = 1.0;
float $Two = 2.0;
float $Three = 3.0;

string $expressionString =
"vector $myVector;\n"
"$myVector = <<" + $One + ", " + $Two + ", " + $Three + ">>;\n";

// Error: "$myVector = <<" + $One + ", " + $Two + ", " + $Three + ">>;\n"; ; //
// Error: Line 3.16: Syntax error //

:annoyed: S

dstripinis
07-06-2003, 07:52 PM
not sure esactly what you are trying to do...

why not:

vector $myVector = << $one, $two, $three >>;

?

Duncan
07-06-2003, 09:54 PM
Try the following:

float $One = 1.0;
float $Two = 2.0;
float $Three = 3.0;

string $expressionString =
("vector $myVector;\n"
+"$myVector = <<" + $One + ", " + $Two + ", " + $Three + ">>;\n");

Duncan

CGTalk Moderation
01-15-2006, 02:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.