Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] need help....please!!!!

Expand Messages
  • Charles K. Clarkson
    Check out sprintf and printf. HTH, Charles K. Clarkson ... From: James Ross one more question; what is a nice easy way to print a formated string to a file
    Message 1 of 7 , Feb 1, 2001
    • 0 Attachment
      Check out sprintf and printf.

      HTH,
      Charles K. Clarkson

      ----- Original Message -----
      From: James Ross

      one more question; what is a nice easy way to print a formated string to a
      file like:

      stmt Locn code statement
      1 0000 0001 A CON 0001 ;load 2 to 0
      power
      2 0002 0002 B CON 0002 ;load multiplier
      3 0004 0100 MAX CON 0100 ;limit (256
      decimal)

      i will prob use a foreach loop to go through a file collect items in
      variables, and then print to a file at the end....is there a nice way to get
      my info written to a disk to look like the above? Again, thx for your
      help..
    • Kul
      ... I would recommend a little talked about facility in perl that is designed specifically for this exact function, its called FORMAT. It will do EXACTLY what
      Message 2 of 7 , Feb 1, 2001
      • 0 Attachment
        James Ross wrote:

        > one more question; what is a nice easy way to print a formated string to a file like:stmt Locn code statement
        > 1 0000 0001 A CON 0001 ;load 2 to 0 power2 0002 0002 B CON 0002 ;load multiplier3 0004 0100 MAX CON 0100 ;limit (256 decimal) i will prob use a foreach loop to go through a file collect items in variables, and then print to a file at the end....is there a nice way to get my info written to a disk to look like the above? Again, thx for your help..

        I would recommend a little talked about facility in perl that is designed specifically for this exact function, its called FORMAT. It will do EXACTLY what your asking, and nice and tidily !
        Regards
        Kul
      Your message has been successfully submitted and would be delivered to recipients shortly.