[Gambas-user] scan() example not working for me

Fabien Bodard gambas.fr at ...626...
Sun Jan 6 09:30:56 CET 2008


Le Sunday 06 January 2008 00:44:39 lawrence pires, vous avez écrit :
> i have taken the example code from
> here<http://gambasdoc.org/help/lang/scan>and wraped it into a click,
> (trying to build a progress bar...)
>
>
> PUBLIC SUB Button1_Click()
> DIM sResult AS String
> DIM sLine AS String
> DIM sElt AS String
>
> EXEC "df" TO sResult
>
> FOR EACH sLine IN Split(sResult, "n")

FOR EACH sLine IN Split(sResult, "\n")

\n reprensent a chr(10) element = end of line

>   FOR EACH sElt IN Scan(sLine, "* * * * *")
>     PRINT sElt; "|";
>   NEXT
>   PRINT
> NEXT
> END
>
> this is the exact example taken. why does it not compile and error?, is it
> me or does the documention need updating? i was expecting output when
> button pressed? or am i to blame?
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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