Instrucciones LSET y RSET

Objetivo:

Mover datos de memoria a un parachoques de archivo arbitrario y dejado - o justificarlo derecho en preparación para una declaración PUT.

Sintaxis:

LSET string variable=string expression
RSET string variable=string expression

Comentarios:

Si string expression requiere que menos bytes que fueran presentados para string variable, LSET dejado - justifica la cuerda en el campo, y RSET justifica derecho la cuerda (los espacios son usados para rellenar las posiciones suplementarias).

Si la cuerda es demasiado larga para el campo, los caracteres son dejados caer del derecho.

Convertir valores numéricos a cuerdas antes del LSET o declaración RSET es usado, ver MKI$, MKS$, y funciones MKD$.

El LSET o RSET también pueden ser usados con una variable de cuerda no presentada a izquierdo - justifican o justifican derecho una cuerda en un campo dado.

Ejemplos:

110 A$=SPACE$(20)
120 RSET A$=N$

Estas dos declaraciones justifican derecho la cuerda N$ en un campo de 20 caracteres. Este puede ser valioso para formatear la salida imprimida.

 

LSET and RSET Statements

Purpose:

To move data from memory to a random-file buffer and left- or right-justify it in preparation for a PUT statement.

Syntax:

LSET string variable=string expression
RSET string variable=string expression

Comments:

If string expression requires fewer bytes than were fielded to string variable, LSET left-justifies the string in the field, and RSET right-justifies the string (spaces are used to pad the extra positions).

If the string is too long for the field, characters are dropped from the right.

To convert numeric values to strings before the LSET or RSET statement is used, see the MKI$, MKS$, and MKD$ functions.

LSET or RSET may also be used with a nonfielded string variable to left-justify or right-justify a string in a given field.

Examples:

110 A$=SPACE$(20)
120 RSET A$=N$

These two statements right-justify the string N$ in a 20-character field. This can be valuable for formatting printed output.

1