PB 6.40 a3 StringBuilder does not end with #PB_Any

Post bugreports for the Windows version here
User avatar
ChrisR
Addict
Addict
Posts: 1581
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

PB 6.40 a3 StringBuilder does not end with #PB_Any

Post by ChrisR »

StringBuilder seems to work using #PB_Any, but it doesn't end, with 12% CPU usage here

Code: Select all

#UsePBAny = #True ;#False

CompilerIf #UsePBAny
  SB = CreateStringBuilder(#PB_Any, 32)
  AppendStringBuilderString(SB, "Hello World !")
  s$ = FinishStringBuilder(SB)
CompilerElse
  CreateStringBuilder(0, 32)
  AppendStringBuilderString(0, "Hello World !")
  s$ = FinishStringBuilder(0)
CompilerEndIf
MessageRequester("StringBuilder", "StringBuilder: " + s$)

Otherwise, does it use the required size at each Append or a default cache value if used with CreateStringBuilder(0, 0) ?