Siebel VB Language Reference > VB Language Reference >

Width Statement


This standard VB statement sets the output line width for an open file.

Syntax

Width [#]filenumber, width

Argument
Description

filenumber

The file number used in the Open statement to open the file

width

An integer expression indicating the width of the output line

Returns

Not applicable

Usage

A value of zero (0) for width indicates there is no line length limit. The default width for a file is zero (0).

Example

This example puts five spaces and the string ABCD into a file. The five spaces are derived by taking 15 Mod 10, or the remainder of dividing 15 by 10.

Sub Button_Click
   Dim str1 as String
   Dim x as String * 10
   str1 = "ABCD"
   Open "C:\TEMP001" For Output As #1
   Width #1, 10
   Print #1, Spc(15); str1
   Close #1
   Open "c:\temp001" as #1 Len = 12
   Get #1, 1,x
   Close #1
   Kill "c:\temp001"
End Sub

See Also

Open Statement
Print Statement

Siebel VB Language Reference