Announcement

Collapse
No announcement yet.

String conversion help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • String conversion help

    Converting from a string to an integer or a real isn't working for me.

    Click image for larger version

Name:	stringladder.PNG
Views:	106
Size:	130.3 KB
ID:	126727

    Both sub strings are returning what I think are expected values, but the conversions aren't working.

    Click image for larger version

Name:	stringdata.PNG
Views:	72
Size:	44.3 KB
ID:	126728

    Probably a rookie mistake - can anyone point to the right direction?

    Cheers,

    Scott.


  • #2
    They don’t appear to be numeric strings in the source data. They appear to be raw numeric data, in big endian, I’m guessing. Instead of extracting to a string, use STRGETB to extract to a D location for integers, then SWAPB to reorder the bytes if required. You’ll need to extract to an R and likely reorder for the other.

    Comment



    • #3
      Thanks BobO. Had already tried STRGETB but didn't do the SWAPB. Integer & real both working now. Much appreciated.

      Comment

      Working...
      X