Oxygen Basic

Programming => Problems & Solutions => Topic started by: chrisc on March 22, 2018, 06:11:59 AM

Title: Equivalent of PB STRING$() function
Post by: chrisc on March 22, 2018, 06:11:59 AM
in PB there is a STRING$() function which
         Return a string consisting of multiple copies of the specified character.

Code: [Select]

Syntax
s$ = STRING$(Count&, Character%)

example
A$ = STRING$(8, "0")             '  Results  A$ = "00000000"


Is there an equivalent function in O2 ?
Title: Re: Equivalent of PB STRING$() function
Post by: chrisc on March 22, 2018, 06:40:43 AM
i found it,    STRING$()   becomes  STRING()

it is the same
Title: Re: Equivalent of PB STRING$() function
Post by: JRS on March 22, 2018, 06:54:48 AM
With Script BASIC, the $ reference for strings and string functions are optional. It would be nice if O2 followed suit.

LET and line numbers (line labels) are allowed if you think they are needed.
Title: Re: Equivalent of PB STRING$() function
Post by: Charles Pegge on March 22, 2018, 07:16:30 AM
Hi John,

$ endings are allowed but ignored.

let is suported, but not PB's object syntax.

line numbers are supported as labels

Title: Re: Equivalent of PB STRING$() function
Post by: JRS on March 22, 2018, 08:08:31 AM
Sounds like O2 is already SB compatible.  ;)