[Gambas-user] array of string

daniel danielcampos at ...277...
Mon Jan 5 22:37:50 CET 2004


El lun, 05-01-2004 a las 17:10, Olivier Coquet escribió:
> somebody can help me to use array of string please?
> 
> How ca i create it??
> 
> how can i use it??
> 
> thanks
> regards
> olivier
> 
> 

Hope this helps:

Create a project with a formulary and a Button (Button1). Add this
code to that formulary:

PUBLIC SUB Print_Array(A AS String[])
  
  DIM Maxi AS Integer
  DIM MyLoop AS Integer
  
  Maxi=A.Count
  FOR MyLoop=0 TO Maxi-1
    PRINT A[MyLoop] 
  NEXT 
  
END


PUBLIC SUB Button1_Click()

  DIM B AS NEW String[]
  B.Add("Hello")
  B.Add("World")
  B.Add("")
  B.Add("From")
  B.Add("An")
  B.Add("Array")
  Print_Array(B)

END

That's easy!

Regards,

Daniel Campos


> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list