contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
format item   %b    
  Related Syntax    

Syntax

  % format-modifier b(counter-name)


Purpose

The "%b" format item represents the value of the counter item as a binary string. The characters are determined by converting each byte in the binary representation of the counter into the character that represents the value of that byte. A counter with a value of zero (0) would be expressed in one byte as the character "%0#", a value of 1 as the character "%1#", and so on.

In fact, when the field-width is 1, the "%b" format item is the dynamic analog of the content "%#" modifier.

The following modifiers can be used with the "%b" format:

Note that when both the ordering and field-width modifiers are specified, the field-width modifier must appear first. Otherwise, OmniMark cannot tell when the first modifier ends and the second begins.

To convert a number to a multi-character string, both the length of the desired string and the order of the characters in it need to be known. The following outputs the value in the counter "temp" in four characters with high-to-low ordering, using the "f" modifier to specify the length:

    Related Syntax
   binary
   binary-output
   %#
 
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:01 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.