//flex table opened by JP

Click to See Complete Forum and Search --> : QBASIC (simple problem)


christaylors
06-15-2001, 07:08 PM
Hello all.

Here is the little bit I wrote


***************
LET blah = 0

LET i = 0
FOR i = i TO 255

blah = blah + 1

OPEN "nbget.bat" FOR APPEND AS #blah
PRINT #blah, "nbtstat -A ", "10.0.0.", i, ">> results.txt"
CLOSE

NEXT i
********************

This is a very very simple deal
It creates the bat file
with the line
nbtstat -A 10.0.0. 1 >> results.txt


I lack any docs so I have very little reference material (just what i've found on the web).
My plea is this
How do I make
PRINT #blah, "nbtstat -A ", "10.0.0.", i, ">> results.txt"

so in the string spit out there are not any spaces in between the strings/variables in the file it creates unless I want them
("i.e. 10.0.0. 1")
(I want it to read "10.0.0.1")

Thanks for any help.

nick1
06-15-2001, 09:15 PM
replace PRINT with this
PRINT #blah, "nbtstat -A ", "10.0.0." & i & " >> results.txt"

BangorDude
06-18-2001, 06:18 AM
In VB we use a semicolon between variables when we want to to print to the next available space, and a comma when we want to print to the next available section.