[Gambas-user] Error in Left$ and Mid$ functions to the gb.ncurses component
William Cabrera
cabrerawilliam at ...626...
Sun May 20 16:26:13 CEST 2012
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
More information about the User
mailing list