[Gambas-user] Error in Left$ and Mid$ functions to the gb.ncurses component

Benoît Minisini gambas at ...1...
Sun May 20 16:44:02 CEST 2012


Le 20/05/2012 16:26, William Cabrera a écrit :
> Hi, I have been testing the component ncurses and so far everything well,
> but the functions mentioned in the title simply do not work. Below is a
> sample code:
>
> #!/usr/bin/env gbs3
>
> USE "gb.ncurses"
>
> dim hwin As Window
> dim cadena, cad as string
> cadena = "Hola Mundo"
> cad = left(cadena)
> hwin = New Window(0, 0, 20, 30)
> hwin.Background = Color.Blue
> hwin.show()
> hwin.Full()
> hwin.print(right$(cadena), 0, 0)
> hwin.print(right$(cadena, 3), 0, 1)
> hwin.print(right$(cadena, -3), 0, 2)
> hwin.print(left$(cadena), 0, 3)
> hwin.print(left$(cadena, 3), 0, 4)
> hwin.print(left$(cadena, -3), 0, 5)
> hwin.print(mid$(cadena, 2, 2), 0, 6)
> hwin.WaitKey()
>
> And this is the output
>
> o
> ndo
> a Mundo
> Hola Mundo
> Hola Mundo
> Hola Mundo
> ola Mundo
>
> [System]
> OperatingSystem=Linux
> Kernel=3.2.0-1-686-pae
> Architecture=i686
> Memory=2065228 kB
> DistributionVendor=Asturix
> DistributionRelease="Asturix 4"
> Desktop=Gnome
>
> [Gambas 3]
> Version=3.1.90
> Path=/usr/local/bin/gbx3
>
> [Libraries]
> Qt4=libQtCore.so.4.8.1
> GTK+=libgtk-x11-2.0.so.0.2400.10
>
> P.D. Sorry for my english, this is not my native language
>
> ------
> William Cabrera
> http://willicab.gnu.org.ve

This is a bug in the gb.ncurses component whose methods do not read 
their string arguments correctly. Tobi are you here?

-- 
Benoît Minisini




More information about the User mailing list