Search found 8 matches

by Afrow_UK
Wed Oct 01, 2003 10:41 pm
Forum: QBasic / QuickBasic related
Topic: QBTree Data Engine
Replies: 6
Views: 3527

Re: QBTree Data Engine

This place is a bit dead :(

-Stu
by Afrow_UK
Wed Oct 01, 2003 10:40 pm
Forum: QBasic / QuickBasic related
Topic: Severe Error: Expression too complex!
Replies: 2
Views: 1378

Re: Severe Error: Expression too complex!

I think this is what I get also on my SearchFile% function.
It's stopping the compiler build an exe, but it runs fine.

-Stu
by Afrow_UK
Tue Sep 30, 2003 1:55 am
Forum: QBasic / QuickBasic related
Topic: Searching a file for a string
Replies: 4
Views: 2106

Re: Searching a file for a string

Help!!

-Stu  :)
by Afrow_UK
Sun Sep 28, 2003 9:50 pm
Forum: QBasic / QuickBasic related
Topic: Searching a file for a string
Replies: 4
Views: 2106

Re: Searching a file for a string

I had to modify the function to get it to work.

FUNCTION SearchFile% (LogFile$, Search$)
FOUND% = 0
OPEN LogFile$ FOR INPUT AS #1
DO UNTIL EOF(1)
LINE INPUT #1, LineText$
IF INSTR(LineText$, Search$) THEN
FOUND% = 1
EXIT DO
END IF
LOOP
CLOSE #1
SearchFile% = FOUND%
END FUNCTION

I am ...
by Afrow_UK
Wed Sep 24, 2003 10:19 pm
Forum: QBasic / QuickBasic related
Topic: Searching a file for a string
Replies: 4
Views: 2106

Re: Searching a file for a string

Thanks very much!

I'll be back :) (for more help likely)

-Stu
by Afrow_UK
Tue Sep 23, 2003 1:00 am
Forum: QBasic / QuickBasic related
Topic: Searching a file for a string
Replies: 4
Views: 2106

Searching a file for a string

I'm trying to write a function to search a file for a string, and once found, return with "yes" (for found).

Here's what I think is a finished function, but was wondering if you could check it through because I'm a QB newb.

FUNCTION SearchFile (FileName$, Name$)
NameLen = LEN(Name$)
SearchNum = 1 ...
by Afrow_UK
Mon Sep 22, 2003 2:58 am
Forum: QBasic / QuickBasic related
Topic: QBasic WRITE
Replies: 3
Views: 1573

Re: QBasic WRITE

Thanks!

So PRINT will become write while it sits in OPEN and CLOSE?

Edit: Print #1 works perfectly.
I've been reading a book on QB, which didn't refer to using the PRINT statement for file writes.

-Stu
by Afrow_UK
Sun Sep 21, 2003 9:44 pm
Forum: QBasic / QuickBasic related
Topic: QBasic WRITE
Replies: 3
Views: 1573

QBasic WRITE

I am trying to write multi-character strings to a file, in this case writing an html doc containing the output of my program.

Now, the problem is, html contains " in them, and also < >
The compiler takes these as open quotes for new parts and operators, but I want them to be just part of the same ...