[Gambas-user] Question about REPLACE$

Fabien Bodard gambas.fr at ...626...
Sun Jan 1 10:31:15 CET 2012


2012/1/1 nando <nando_f at ...951...>:
> Question: Code piece
>
>  dim i as integer
>  dim s as string
>
>  i = 12345
>  s = "the number is <NUM>"
>
>  Replace$( s , "<NUM>", STR$(i) , gb.case)
>  Replace$( s , "<ABC>", STR$(i) , gb.case)
>
>
> The first Replace will do the substitution
> The second Replace will not do the substitution
>
> The Question is this:
>
>  will the second Replace internally perform the STR$(i) conversion
>  to be ready for a possible substitution even though there are
>  no substitutions to do?
>
> -Fernando
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

You can control that yourself by making your own function

Public sub MyStr(value as varian) as string

Debug( "Conversion")
return str(Value)
end




More information about the User mailing list