[Gambas-user] OPEN unexpected error

Charlie Reinl Karl.Reinl at ...2345...
Wed Jan 6 22:54:30 CET 2010


Am Mittwoch, den 06.01.2010, 18:14 -0300 schrieb norarg:
> Hi, 
> 
> I have switched over to Gambas 2.99 (3), and can not figure out where I
> have an error, this worked in ver. 2.13:
> 
> Dim hf1 As File
> .
> .
> .
> Open Application.Path & "/Generate/DATAPANEL_FORM.gen_parse" For Read As
> #hf1
> .
> .
> 
> In this line I get "unexpected open". I have searched around, eventually
> for a missing component, (stream), but then the dim of hf1 would have
> caused an error, I presume. I have more Open's, and the error occurs
> when compiling, not accessing. 
> 
> Please help, stay a bit stucked here.
> 
> Thanks and regards,
> norarg

Salut norarg,

your sure that was in 2.13?

http://gambasdoc.org/help/lang/open


' Prints the contents of a text file to the screen

DIM hFile AS File
DIM sLine AS String

hFile = OPEN "/etc/passwd" FOR INPUT

WHILE NOT Eof(hFile)
  LINE INPUT #hFile, sLine
  PRINT sLine
WEND


-- 
Amicalement
Charlie





More information about the User mailing list