Most Pascal dialects do not come with a built-in big integer library. Most "3rd-party" big integer implementations for Pascal (or Delphi) simply overload the assignment operator, as in the example. The ncalc library raises an exception if s is not a valid big integer. s may also be a hexadecimal, octal or binary representation.
Extraneous characters past the end of a valid number are ignored. If there is not a valid number at the start of s, 0 is returned. This never raises an exception.