PDA

View Full Version : turning off conversion warnings?


ktpr
05-31-2003, 01:08 AM
I convert an string "37]" to an int to get rid of the ']'. Is this faster than match (I'm repeating this command many times)

Is there a way to get rid of the warning:
"Converting string "xx]" to an int value of xx."

cheers
ktpr

tymznd
05-31-2003, 05:53 AM
Can you put this in context?

It seems that you could do it without the warnings by using something like this:

string $name = "37]";
string $under = "]";
string $buffer[];

$numToken = `tokenize $name $under $buffer`;

string $new_name = $buffer[0];

ktpr
05-31-2003, 07:35 AM
I was trying to extract vert numbers from a selection list. I ended up with:

// mapIndex is the vert #
string $mapIndex = "v" + match( "^[0-9]+", `match "[0-9]+\]$" $node`);

A double match. Kinda cheap and ugly.

cheers
ktpr

CGTalk Moderation
01-15-2006, 08:00 AM
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.