outputting_20text_20with_20word-wrap
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
outputting_20text_20with_20word-wrap [2018/03/31 13:19] – external edit 127.0.0.1 | outputting_20text_20with_20word-wrap [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Outputting text with word-wrap===== | =====Outputting text with word-wrap===== | ||
- | //by Richard Russell, August 2009//\\ \\ BBC BASIC (by default) automatically ' | + | //by Richard Russell, August 2009//\\ \\ BBC BASIC (by default) automatically ' |
+ | |||
+ | <code bb4w> | ||
| | ||
| | ||
| | ||
| | ||
- | Note that **PROCww** and **PROCwwp** do not output a newline after the string; to do that you must concatenate **CHR$13+CHR$10** to the end of the string (or output them separately using **PROCvww** or **PROCvwwp**).\\ \\ Here are the routines necessary to implement word-wrap:\\ \\ | + | </ |
+ | |||
+ | Note that **PROCww** and **PROCwwp** do not output a newline after the string; to do that you must concatenate **CHR$13+CHR$10** to the end of the string (or output them separately using **PROCvww** or **PROCvwwp**).\\ \\ Here are the routines necessary to implement word-wrap: | ||
+ | |||
+ | <code bb4w> | ||
DEF PROCww(A$) | DEF PROCww(A$) | ||
LOCAL I% | LOCAL I% | ||
Line 60: | Line 66: | ||
ENDIF | ENDIF | ||
ENDPROC | ENDPROC | ||
- | Note that the usual restrictions caused by the use of **PRIVATE** apply. You must not attempt to resume execution if an error occurs (even an ESCape error) within the **PROCvww** or **PROCvwwp** routines. Ensure that any **ON ERROR** handler in your program aborts execution in such a case. | + | </ |
+ | |||
+ | Note that the usual restrictions caused by the use of **PRIVATE** apply. You must not attempt to resume execution if an error occurs (even an ESCape error) within the **PROCvww** or **PROCvwwp** routines, unless you execute a **RESTORE LOCAL** as part of your error handler. Ensure that any **ON ERROR** handler in your program aborts execution in such a case. |
outputting_20text_20with_20word-wrap.1522502372.txt.gz · Last modified: 2024/01/05 00:17 (external edit)