format specifiers


  format specifiers

A format specifier consists of an optional repeat count (an integer), followed by zero or more format characters.

   Specifier   Format
   C           Character
   D           Decimal
   Fn          Floating point
   HX          Hexadecimal
   M           Memory dump
   P           Pointer
   R           Record
   S           String (default)

Examples of Expressions with Format Specifiers

 ( Declarations )
   NamePtr = ^NameRec;
   NameRec = record
               Next: NamePtr;
               Count: Integer;
               Name: string[31];
   List: array[1..10] of Integer;
   P: NamePtr;

Examples of Expressions that Can Be Constructed Using Format Specifiers

 List:           (10,20,30,40,50,60,70,80,90,100)
 List[6],3X:     $3C,$46,$50
 P:              PTR($3EA0,$C)
 P,P:            3EA0:000C
 P^:             (PTR($3EF2,$2),412,'John')
 P^.Next^,RX:    (NEXT:NIL;COUNT:$19C;'Joe')
 Mem[$40:0],8M:  F8 03 F8 02 00 00 00 00
 Mem[$40:0],8MD: 248 3 248 2 0 0 0 0

Тэги: format-specifiers
| G+
Код для вставки: :: :: :: ::
Поделиться: // //