[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convertion de typeType Conversion


On 12/14/25 6:21 AM, Fabien Bodard wrote:
Is it exist a function like

Cast(Value as Variant, Type as integer) ?

I know there is "Val" that does that. But I need something that be able to convert in the way I want

Try MyVariant = Cast(MyVariant, Type)
If error then Error.raise("Not able to convert into type)

Couldn't you use whatever conversion function is appropriate to convert the way you want?
https://gambaswiki.org/wiki/cat/conv


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


References:
Convertion de typeType ConversionFabien Bodard <gambas.fr@xxxxxxxxx>