Re: Small Problem
- Posted by Christopher B <president at insight-concepts.com> Jun 27, 2002
- 397 views
:) On Thu, 27 Jun 2002 14:24:10 -0600, Travis Beaty wrote: > >The answer is quite simple. > >In order to prevent overrunning of the list, we, in cooperation= with >Albert Einstein, Stephen Hawkings, >and the late Douglas Adams, have created a feature by which the= user >may receive the answer to their >question before asking the question, thereby negating the need= to >ask the question. =A0Our patented >Casuality Effect 8-ball=AE=A0system here at Topica is state of art, >although it has not been invented yet. =A0To >obtain this high technology, we used the Causuality Effect= 8-ball=AE >to download the Causuality Effect 8- >ball=AE, which we used to download the Causuality Effect 8-ball=AE, >which we used to download the Causuality >Effect 8-ball=AE. > > >Mr. Manager >Topica >June 27, 2032 > > >6/27/2002 1:36:07 PM, Christopher B= <president at insight-concepts.com> >wrote: > >> >>LOL!!! What is up with this mailing list? I originally sent= this >>message out yesterday. Now that is a >delay :) >> >>Chris >> >> >>>Hi All, >>>I have a small problem I need help with. I have a procedure= that >>>opens a file and reads text from four separate lines.= Example: >>> >>>procedure int_command() >>>sequence command, port,arg1,arg2,arg3,temp >>>integer fn, message >>>command =3D "0" >>>arg1 =3D "0" >>>arg2 =3D "0" >>>arg3 =3D "0" >>>fn =3D0 >>>fn =3D open("example.dat", "r") >>>=A0if fn =3D -1 >>>=A0then >>>message =3D message_box( =A0=A0"Where is example.dat?\n"&"Program= is >>>shutting down!","Missing Dat File" , MB_ICONHAND+MB_TASKMODAL= ) >>>=A0closeWindow(MainWin) >>>=A0else >>>=A0=A0temp =3D gets(fn) >>>=A0=A0=A0command =3D temp[1..length(temp) - 1] >>>=A0=A0temp =3D gets(fn) >>>=A0=A0=A0arg1 =3D temp[1..length(temp) - 1] >>>=A0=A0temp =3D gets(fn) >>>=A0=A0=A0arg2 =3D temp[1..length(temp) - 1] >>>=A0temp =3D gets(fn) >>>=A0=A0=A0arg3 =3D temp[1..length(temp) - 1] >>>=A0=A0=A0close(fn) >>>=A0=A0=A0end if >>>=A0end procedure >>> >>>It works okay if there are four lines to read, but if the file= only >>>has three or less lines I get an error: type_check failure,= temp >>>is - >>>1 >>> >>>If I use: >>>=A0if temp=3D-1 then ?ect..ect.... =A0=A0I get an error: true/false >>>condition must be an ATOM >>> >>>Any suggestions from preventing the type_check error? >>> >>>Thanks, >>>Chris >>> >>> >>-- >> >> > > > --