PxPlus User Forum

Twitter Twitter Twitter

Author Topic: STP function change can lead to unexpected results  (Read 1500 times)

PxPlus

  • Administrator
  • Diamond Member
  • *****
  • Posts: 1091
    • View Profile
STP function change can lead to unexpected results
« on: May 30, 2018, 03:56:04 PM »
The STP function can now accept string strip types operators.

The problem can be seen on a line entered as:

    R$=STP(R$,$0A$)

The system syntax checks accepts the line however during execution it failed with an error 26.

At issue is that the STP function accepts a string strip type ("L", "R", "C", "A", or "B") and as such the syntax of a STP function can be

    STP (String$, String$)

However you will get a run-time error if the second string is not one of the possible stripping forms.

This can prove difficult to detect and debug due to the fact that forgetting to include a strip type value would be a common typing mistake.