Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Hey, I Got a Question about Loading DATA From Another File

Author
Message
SeNsE
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 27th Nov 2002 10:23
K, this is the code I wrote for loading data from another file called DATA_420.txt

--------------------------------
Open to Read 1,"Data_420.txt"
Read String 1,TITLE$
Read String 1,QUALITY$
Print "Title : ",TITLE$
Print "Quality : ",QUALITY$
--------------------------------

This is the code thats in DATA_420.TXT :

TITLE$ = "How High"
QUALITY$ = "High Quality"


Now For some Reason it dosn't Work right. Can sombody help me please ??
jotomicron
21
Years of Service
User Offline
Joined: 17th Nov 2002
Location: Portugal
Posted: 27th Nov 2002 10:53
Try putting in DATA_420 just the following:

"How High"
"High Quality"

Darkbasic then reads the first string and name it like TITLE$ and reads the second string and name it QUALITY$. That's all.
Save and try again! It should work
SeNsE
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 27th Nov 2002 10:56
What if i wanted to search through several files like

Data_001
Data_002
Data_003

to get the information of the closest title search ?

SeNsE
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 27th Nov 2002 11:16
Open to Read 1,"Data_420.txt"
Read String 1,TITLE$
Read String 1,SCREEN$
Read String 1,QUALITY$
Read String 1,HOUR$
Read String 1,MIN$
Read String 1,SIZE$
Print "Title : ",TITLE$
Print "Screen : ",SCREEN$
Print "Quality : ",QUALITY$
Print "Length : ",HOUR$," Hour and ",MIN$," Minutes"
Print "Size : ",SIZE$," kb"

Here's what i got now but what would be the best way to make it search for a user entered result from several files.

Login to post a reply

Server time is: 2024-03-28 20:43:40
Your offset time is: 2024-03-28 20:43:40