Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 22 MAR 2001 08:13:05PM Peter Richards wrote:

Hi,

Having some problems with using OConv, at first thought it was because the value to be converted was a record mark, but have found the following:

TestFF=OConv(IConv("FF","HEX"),"HEX") ;* won't return value 'FF'

TestFE=OConv(IConv("FE","HEX"),"HEX") ;* ditto

TestFD=OConv(IConv("FD","HEX"),"HEX") ;* ditto

 etc,etc

TestF8=OConv(IConv("F8","HEX"),"HEX") ;* returns val 'F8'

I'm working with MPEG frame headers in OI 3.7.2, and the first byte of the frame hdr is always hex 'FF' (or should be). The ascii equiv of course is a record marker. How to get around the OConv bug without hard code (yuk !! ) ??

Also, is there an easier way to convert from ASCII –] BINARY, rather than

Param1=ÿ

?d"

MpegFrameHdr=OConv(IConv(OConv(Param1,"HEX"),"MX"),"MB")

The above doesn't work of course , if any of the ascii values are \FF\ through to \F9\

Regards,

Peter


At 22 MAR 2001 08:29PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Peter,

You could resort to something like this:-

<code>

FUNCTION HEXCONV(PARAM)

OUTPUT=' FOR I=1 TO LEN(PARAM)

CHAR=PARAMI,1
IF SEQ(CHAR) The Sprezzatura Group[/url]

World Leaders in all things RevSoft


At 22 MAR 2001 11:01PM Peter Richards wrote:

Hi,

Thank you, I have just tested the Function HEXCONV you supplied, it does the job perfectly.

Peter

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/fa4889c6fd992ae285256a18000132ce.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1