[fpc-pascal] Any chance to add the TStringBuilder to FCL?

Marco van de Voort marcov at stack.nl
Sat Apr 16 18:36:55 CEST 2016


In our previous episode, J?rgen Hestermann said:
> > > while with 0-based indices high() may give -1.
> >
> > Indices in Pascal are always signed.
> >
> >
> Yes, but I could store indices in DWORD if they would be 1-based
> and would not risk an exception if the index is "not valid" (which
> would be 0 in this case while it's -1 for 0-based indices).

You would have to check everywhere before decrementing. This can be annoying
in loops. (it is that way in M2 btw, where the basetype is unsigned. Not
happy with that)




More information about the fpc-pascal mailing list