Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

328 STRING$ Purpose This produces a long string consisting of multiple copies of a shorter string. Thus STRING$(6,"--0") would be --0--0--0--0--0--0 . This function is useful for decorative features. It should be used whenever the user needs to generate a long string from identical short strings. It is very important, to avoid wasting memory space, that strings are set to their maximum length the first time that they are allocated. This can easily be done by using STRING$ . For example to set to contain up to 40 characters one could write A$=STRING$(40," ") can then be set back to empty using A$="" before use.

Examples 400 A$=STRING$(x,pattern$) 560 B4$=STRING$(5,"0+") PRINT STRING$(10,"hello") A string function returning multiple concatenations of a string. Description Syntax = STRING$ ( , )