| WRITEU | Index Level | WRITEVU |
| Syntax | WRITEV expression ON {file.variable ,} id.expression, ac.expression |
| Category | BASIC |
| Type | Statement |
| Description |
writes the value of an expression into the attribute designated in the attribute expression parameter, using the item-id specified in the item-id expression parameter.
This statement causes a "read" to occur prior to the "writev". If the file.variable parameter is omitted, the default file.variable is used. "-1" may be used as the value of the "ac.expression". This appends a new attribute to the end of the item. |
| Options | |
| See Also | statements & functions default file variables WRITEVU READV file.variable ac.expression MATREAD id.expression BEGIN WORK |
| Example |
writev time() on control.file,'control.list',3
|
| Warnings |
"writev" requires that the entire item be read into temporary workspace so that it can be rebuilt with the new attribute value, before it is written back to the file.
A series of "writev" statements addressing different attributes in the same item can get very slow since the item has to be re-read for every "writev". A further problem with "writev" is that it is not atomic. A "writev", although faster, is equivalent to the following fragment of FlashBASIC code: xx<attr> = str write xx on file,item |
| Compatibility | D3 7.0 AP R83 |
| WRITEU | Index Level | WRITEVU |