Claus writes,
> I am searching for the toolkit containing the functions
>
> CHAN_W%
> JUST$
>
> Thanks in advance,
CHAN_W% can be found in SNG's DIY toolkit, but other versions are also
available, including one by me (Ive mailed you a copy). JUST$ is also
probably mine. I dont have a separate version - it is contained in many of
my numerous ad hoc toolkits. However, below is a more or less functional
equivalent in Basic (not as rigorously debugged as the m/c version).
10 DEFine FuNction JUST$(lcr%, w%, txt$)
11 LOCal l%, f%
12 l% = LEN(txt$)
13 IF l% * w% = 0: RETurn FILL$(' ', w%)
14 IF lcr% = 0 THEN
15 REMark Center Justify
16 IF l% > w% THEN
17 f% = INT((l% - w%) / 2 + .5)
18 RETurn txt$(f% TO INT(f% + w% - .5))
19 ELSE
20 f% = INT((w% - l%) / 2)
21 RETurn FILL$(' ', f%) & txt$ & FILL$(' ', w% - f% - l%)
22 END IF
23 ELSE
24 IF lcr% < 0 THEN
25 REMark Left Justify
26 IF l% > w% THEN
27 RETurn txt$(1 TO w%)
28 ELSE
29 RETurn txt$ & FILL$(' ', w% - l%)
30 END IF
31 ELSE
32 REMark Right Justify
33 IF l% > w% THEN
34 RETurn txt$(l% - w% + 1 TO l%)
35 ELSE
36 RETurn FILL$(' ', w% - l%) & txt$
37 END IF
38 END IF
39 END IF
40 END DEFine
41 :
Per