Post Reply 
Little explorations with HP calculators (no Prime)
10-22-2017, 08:50 AM
Post: #236
RE: Little explorations with HP calculators (no Prime)
Little discovery about SREPL (likely documented somewhere but not in the 50g AUR).

SREPL returns
L2: string with replacements done
L1: number of substitutions

L1 in output is not mentioned by the AUR.

Practical example.

From list in RPL to array for javascript (using highcharts.js for plotting, recommended!):
Code:

gpConvertListToJsArray
  \<<
    @input a list
    @transform in string
    \->STR
    @replace the string opening and closing with squared brackets
    "{" "[" SREPL DROP
    "}" "]" SREPL DROP
    
    @replace the "." of the real numbers with no decimals
    "." "," SREPL
    DROP @drop the number of replacements
  \>>

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with HP calculators (no Prime) - pier4r - 10-22-2017 08:50 AM



User(s) browsing this thread: 2 Guest(s)