[Gambas-user] Compiled version of class

Gianluigi bagonergi at gmail.com
Thu Jan 14 12:19:09 CET 2021


Il giorno gio 14 gen 2021 alle ore 09:47 Gianluigi <bagonergi at gmail.com> ha
scritto:

>
>
> Il giorno gio 14 gen 2021 alle ore 08:46 Olivier Coquet <
> ocoquet at 3d-phenomen.fr> ha scritto:
>
>> Hi Bruce,
>>
>> there are several reasons why..
>>
>
> you could take a look here:
>
> https://www.gambas-it.org/wiki/index.php?title=Importare_ed_utilizzare_librerie_.gambas#Assegnare_una_libreria_ad_un_progetto_in_modo_dinamico
> .
>
>
Of course, for it to work outside the Euro area, you need to change the
library code, for example to add pound and dollar:

' Gambas module file

Export

' Ritorna la somma dei numeri 'stringa' come una stringa formattata currency
Public Function ReturnAddString(value As String[]) As String

  Dim sCurr As String
  Dim iCurr As Long

  For i As Integer = 0 To value.Max
    sCurr = ReturnStringInteger(value[i])
    iCurr += CLong(sCurr)
  Next
  Return Format((iCurr / 100), "$,0.00")

End

Private Function ReturnStringInteger(value As String) As String
  ' Ritorna una stringa in forma di numero intero

  value = Trim(Replace(value, "£", ""))
  value = Trim(Replace(value, "$", ""))
  value = Trim(Replace(value, "€", ""))
  value = Replace(value, ".", "")
  value = Replace(value, " ", "")
  value = Replace(value, ",", "")
  Return value

End
'--------------------------------------------------------------
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210114/508b2ee4/attachment.htm>


More information about the User mailing list