Previous Page Next Page Contents

TEXTWIDTH -- the maximum number of characters in an output line

Introduction

The environment variable TEXTWIDTH determines the maximum number of characters in one line of screen output.

Call(s)


TEXTWIDTH
TEXTWIDTH := n

Parameters

n - a positive integer smaller than 2^31. The default value is 75.

Related Functions

fprint, PRETTYPRINT, print

Details

Example 1

The maximal length of a line is set to 20 characters:

>> oldTEXTWIDTH := TEXTWIDTH:
   TEXTWIDTH := 20: 30!
      2652528598121910586\
      36308480000000

We restore the previous value:

>> TEXTWIDTH := oldTEXTWIDTH: 30!
                     265252859812191058636308480000000

Example 2

The following procedure adds empty characters to produce output that is flushed right:

>> myprint := proc(x) local l; begin
                if domtype(x) <> DOM_STRING then
                   x := expr2text(x);
                end_if;
                l := length(x);
                print(Unquoted, _concat(" " $ TEXTWIDTH - l, x))
              end_proc: 
>> myprint("hello world"):  myprint(30!):  myprint("bye bye"):
                                                          hello world
      
                                    265252859812191058636308480000000
      
                                                              bye bye
>> delete myprint:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000