| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Literature |
I hear ya. I have self taught myself two languages now. A
friend has impressed me with the power of Powerbasic but I am having a
hard time getting started due to the lack of available books.
A good book made a difference in learning to program in C. It
took two before I found one that I could follow. As far Powerbasic
trying to teah yourself from the help files just doesn't work.
--- PCBoard (R) v15.21/M 2
---------------
** A related thread FOLLOWS this message.
FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CENQ0132 Date: 10/19/95
From: TIMOTHY DUEHRING Time: 09:02pm
\/To: DWAYNE GARTNER (Read 4 times)
Subj: R: Literature
Dwayne,
I am having a
DG>hard time getting started due to the lack of available books.
DG> A good book made a difference in learning to program in C.
I am trying to teach myself also, just getting started, so I lurk in
these echoes picking up whatever I can. I just recieved a book titled
"Learning Basic" by Don Inman that includes a disk of Power Basic
ver 2.1g from Surplus Software 1-800-753-7877. The price is $19.99.
Timothy Duehrinig
tduehrin@execpc.com
___
* UniQWK #5098* Exec-PC. The best connection your modem will ever make
---------------
>>>>>>>>>>>>>>>>>>>>>> LAST Message In Thread <<<<<<<<<<<<<<<<<<<<<<
FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CEN00001 Date: 10/18/95
From: ZACK JONES Time: 01:16pm
\/To: ALL (Read 4 times)
Subj: What's Wrong with This?
Howdy All!
I'm just getting back into Basic programming and I've run into a problem.
Take a look at this code:
dim OneLine as string
dim FileHandle1 as Integer
FileHandle1 = FreeFile
Open "FD.LOG" for input as FileHandle1
While not(EOF(FileHandle1))
Line Input FileHandle1, OneLine
'Line Input #1, OneLine
Wend
As written this won't compile. When I try to compile it I get a compiler
error 425 "String variable Expected". If I comment the line "Line Input
FileHandle1, OneLine" and use the line that's currently commented the
compiler compiles it just fine.
What's wrong with the code I'm attempting to use?
Thanks in advance to anyone who can help.
Take Care, Zack Jones
zack@hom.net
--- InterMail 2.29g
---------------
** A related thread FOLLOWS this message.
FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CEQ10619 Date: 10/21/95
From: KURT KUZBA Time: 01:10am
\/To: ZACK JONES (Read 4 times)
Subj: R: What's Wrong with This?
ZJ> Take a look at this code:
ZJ> dim OneLine as string
ZJ> dim FileHandle1 as Integer
ZJ> FileHandle1 = FreeFile
ZJ> Open "FD.LOG" for input as FileHandle1
ZJ> While not(EOF(FileHandle1))
ZJ> Line Input FileHandle1, OneLine
ZJ> 'Line Input #1, OneLine
ZJ> Wend
ZJ> As written this won't compile.
ZJ> When I try to compile it I get a compiler error 425
ZJ> "String variable Expected".
ZJ> If I comment the line "Line Input FileHandle1, OneLine"
ZJ> and use the line that's currently commented the compiler
ZJ> compiles it just fine.
zj>........................................
You forgot to say, "Pretty please with sugar on it?"
Line Input #FileHandle1, OneLine
Now it will work. The "#" makes all the difference by identifying
the input source as a file handle. Your code was looking for your
line input to come from the keyboard and became confused when you
requested that line input, which is a string function, be used with
FileHandle1, which is NOT a string variable, or so I believe.
In any case, It works with the "#" in my tests here.
---
> ] * Origin: (1:266/170)* Origin: Zack's Gotta Point (1:3611/18.10) * Origin: United Bbs Systems Europe MailGate to -> Fido USA (2:283/529.0) |
|
| SOURCE: echomail via exec-pc | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.