[Gambas-user] mid$

Rob sourceforge-raindog2 at ...94...
Tue Dec 7 06:43:13 CET 2004


On Monday 06 December 2004 21:11, Marius Mauch wrote:
> > In each case, the result of the function is the input string
> > starting at the 5th character (in Gambas, you count from 0.)
> Maybe I'm just misunderstanding something, but in one case we
> drop "help" (4 chars) and in the other case we drop "Gam" (3
> chars), I'd guess the manual is wrong then if we start at
> index 0.

Sorry, I must have been high on cold medicine.  But what version 
of Gambas are you using?  I have 0.99.RC4.  In mine, where I go 
like this:

DIM mystring AS String
myString = "help me to understand mid String in gambas"
PRINT Mid$(myString, 4)
PRINT Mid$("Gambas",4)

I get

p me to understand mid String in gambas
bas

so basically, each string starting with the 4th character, which 
is as you'd expect.  It drops characters 1 through 3.

Rob






More information about the User mailing list