[help][blitz] Text files?
Author |
Message |
Paul

|
Posted: Sat Apr 03, 2004 5:59 pm Post subject: [help][blitz] Text files? |
|
|
Can blitz input stuff into variables from text files?
Im looking for something like
var txt : string := "text.txt"
var input: int
open : input, txt, get
the blitz equivilant to this.
oh yea while I m on this thread, anyone know why this doesn't work? I was trying out the mouse functions, this is suppose to put the x coord of the mouse when clicking
code: |
Graphics 640,480
While Not KeyHit(1)
#x1=MouseX()
If MouseDown(1) Then
Print x1
End If
Wend
End
|
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Cervantes

|
Posted: Thu Apr 08, 2004 7:53 pm Post subject: (No subject) |
|
|
oh no. sorry it has taken so amazingly long to reply here. for whatever reason the thing didn't turn orange:?
anyways. as to your question:
Can Blitz input stuff into variables from text files?
Do you doubt blitz? of course it can
however, I've never learned how to do file manipulation in Turing: haven't found a need to. So nor have I learned it in Blitz. But if you go to the Command Reference and scroll down (you should be in 2D categorized) until you see the File/Stream section. That should be everything you need.
As for your program: what exactly is your problem with it? I try to run it and i get "expecting: wend". doesn't seem to make much sense
however, after playing with it for a while, I realized you put the # before thr x1. it should be x1#, not #x1. Or you could just leave the # off.
once the # is fixed, it should work fine. |
|
|
|
|
 |
|
|