Xbasic
FIELD.WIDTH_GET Function
Syntax
N Width_Get()
Description
The .WIDTH_GET() method returns the Field_Width of a field referenced by the object pointer.
Example
Display the table structure in the Trace window.
dim tbl as P
dim fld as P
tbl = table.current()
for i = 1 TO tbl.fields_get()
fld = tbl.field_get(i)
f_name = fld.name_get()
f_type = fld.type_get()
f_width = ltrim( str( fld.width_get() ) )
f_dec = ltrim( str( fld.dec_get() ) )
trace.writeln("Field " + ltrim(str(i) ) )
trace.writeln("Field Name: " + f_name)
trace.writeln("Field Type: " + f_type)
trace.writeln("Field Width: " + f_width)
trace.writeln("Field Dec: " + f_dec)
nextSee Also