9.0
222
Description
Write a variable's value to StreamNum.
Parameter Description
StreamNum Streams 1 through 255 are private to each macro. Streams 256 through 511 are
shared by all macros.
RecordNum For Random mode files this is the record number. The first record is 1. Otherwise, it
is the b
y
te
p
osition. The first b
y
te is 1. If this is omitted then the current
p
osition
(
o
r
record number) is used.
var This variable value is written to the file. For a fixed length variable (like Long) the
number of bytes required to store the variable are written. For a Variant variable two
bytes which describe its type are written and then the variable value is written
accordingly. For a usertype variable each field is written in sequence. For an array
variable each element is written in sequence. For a dynamic array variable the
number of dimensions and range of each dimension is written prior to writing the
array values. All binary data values are written to the file in little-endian format.
Note: When a writing string (or a dynamic array) to a Binary mode file the string
length (or array dimension) information is not written. Onl
y
the strin
g
data or arra
y
elements are written.
See Also: Get, Open.
Example
Sub Main
Dim
V As Variant
Open
"SAVE_V.DAT" For Binary Access Write As #1
Put #1, , V
Close
#1
End
Sub
QBColor Function
Syntax
QBColor(num)
Group
Miscellaneous
Description
Return the appropriate color defined by Quick Basic.
num color
0 black
1 blue
2 green
3 cyan
4 red
5 magenta
6 yellow
7 white
8 gray










