Author Topic: Equivalent of PB STRING$() function  (Read 1212 times)

0 Members and 1 Guest are viewing this topic.

chrisc

  • Guest
Equivalent of PB STRING$() function
« 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 ?

chrisc

  • Guest
Re: Equivalent of PB STRING$() function
« Reply #1 on: March 22, 2018, 06:40:43 AM »
i found it,    STRING$()   becomes  STRING()

it is the same

JRS

  • Guest
Re: Equivalent of PB STRING$() function
« Reply #2 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.

Charles Pegge

  • Guest
Re: Equivalent of PB STRING$() function
« Reply #3 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


JRS

  • Guest
Re: Equivalent of PB STRING$() function
« Reply #4 on: March 22, 2018, 08:08:31 AM »
Sounds like O2 is already SB compatible.  ;)