[Opensim-dev] Question about OSSL type conversion

Justin Clark-Casey jjustincc at googlemail.com
Wed Apr 23 08:30:41 UTC 2008


Eric wrote:
> Hi everyone,
> 
> I've noticed that numerous type conversions in OSSL are not 
> functioning.  Typecasting such as:
> 
> float f = 1.234;
> string s = (string)f;
> f = (float)s;
> 
> generates a CS0030 compiler error (cannot convert from 'string' to 
> 'double').  It seems that there are conversion methods from numeric and 
> complex (such as vector) types to string, but not the other way around.
> 
> Is this a known issue?  Is there a way to perform these conversions 
> aside from typecasting?

I can't remember seeing this in the Mantis database, so you might want 
to put an entry in there.

I'm not sure there is any other way to do this apart from casting, but 
my knowledge of LSL is fairly rusty.

-- 
justincc
Justin Clark-Casey
http://justincc.wordpress.com



More information about the Opensim-dev mailing list