HSEROUT and Commas, What? Help Me Understand


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    969


    Did you find this post helpful? Yes | No

    Default

    I was wondering why, in my case, does HSERIN need the commas to be transmitted
    You only need to transmit the commas if you expect HSERIN to read the commas. It is like sending a '0' character and expecting HSERIN to see a '0'. Think of it as a place holder or separator or as in C, a parameter separator. If you use it in that context, yes, you will need the comma to be transmitted as well as read.

    Examples you quoted of HSEROUT [B0. Dec num] send out the value of variable B0 followed by the Decimal representation of num. Let us take B0 to be holding a value 123 and the value in num to be just 5. What HSEROUT sends down the line is
    1235
    Now, when HSERIN is trying to decipher this stream it would not know how much of the number 1235 belongs to B0. So, put a 'non-number' between the 2 numbers and HSERIN will now smart up and know which numbers go where.
    let us see
    HSEROUT [B0, "," , Dec Num] will now send this
    123,5
    When HSERIN [B0var, CommaVar, NumVar] tries to read this, it will capture the number preceding the comma into B0var and the Comma into CommaVar and Num into Numvar. That is the reason for the commas in the odd places you see.

    Hope it is clear this time
    cheers

  2. #2
    Join Date
    Apr 2009
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    thanks that makes sense.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts