Go to the first, previous, next, last section, table of contents.


F.3.1 Picture String Formation

  1. A well-formed picture String, or simply picture String, is a String value that conforms to the syntactic rules, composition constraints, and character replication conventions specified in this clause.

Dynamic Semantics

  1. picture_string ::=
       fixed_$_picture_string
     | fixed_#_picture_string
     | floating_currency_picture_string
     | non_currency_picture_string
    
  2. fixed_$_picture_string ::=
       [fixed_LHS_sign] fixed_$_char {direct_insertion}
         [zero_suppression] number [RHS_sign]
    
     | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
         number fixed_$_char {direct_insertion} [RHS_sign]
    
     | floating_LHS_sign number fixed_$_char {direct_insertion}
         [RHS_sign]
    
     | [fixed_LHS_sign] fixed_$_char {direct_insertion}
         all_zero_suppression_number {direct_insertion}  [RHS_sign]
    
     | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number
         {direct_insertion} fixed_$_char {direct_insertion}
         [RHS_sign]
    
     | all_sign_number {direct_insertion} fixed_$_char
         {direct_insertion} [RHS_sign]
    
  3. fixed_#_picture_string ::=
       [fixed_LHS_sign] single_#_currency {direct_insertion}
         [zero_suppression] number [RHS_sign]
    
     | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
         zero_suppression number [RHS_sign]
    
     | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
         number fixed_#_currency {direct_insertion} [RHS_sign]
    
     | floating_LHS_sign number fixed_#_currency {direct_insertion}
         [RHS_sign]
    
     | [fixed_LHS_sign] single_#_currency {direct_insertion}
         all_zero_suppression_number {direct_insertion} [RHS_sign]
    
     | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
         all_zero_suppression_number {direct_insertion} [RHS_sign]
    
     | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number
         {direct_insertion} fixed_#_currency {direct_insertion}
         [RHS_sign]
    
     | all_sign_number {direct_insertion} fixed_#_currency
         {direct_insertion} [RHS_sign]
    
  4. floating_currency_picture_string ::=
       [fixed_LHS_sign] {direct_insertion} floating_$_currency
         number [RHS_sign]
     | [fixed_LHS_sign] {direct_insertion} floating_#_currency
         number [RHS_sign]
     | [fixed_LHS_sign] {direct_insertion} all_currency_number
         {direct_insertion} [RHS_sign]
    
  5. non_currency_picture_string ::=
       [fixed_LHS_sign {direct_insertion}] zero_suppression
         number [RHS_sign]
     | [floating_LHS_sign]
         number [RHS_sign]
     | [fixed_LHS_sign {direct_insertion}]
       all_zero_suppression_number {direct_insertion} [RHS_sign]
     | all_sign_number {direct_insertion}
     | fixed_LHS_sign direct_insertion {direct_insertion}
         number [RHS_sign]
    
  6. fixed_LHS_sign ::=  LHS_Sign
    
  7. LHS_Sign ::=  + | - | <
    
  8. fixed_$_char ::= $
    
  9. direct_insertion ::=  simple_insertion
    
  10. simple_insertion ::=  _ | B | 0 | /
    
  11. zero_suppression ::=  Z {Z
                          | context_sensitive_insertion}
                          | fill_string
    
  12. context_sensitive_insertion ::=  simple_insertion
    
  13. fill_string ::=  * {* | context_sensitive_insertion}
    
  14. number ::=
       fore_digits [radix [aft_digits] {direct_insertion}]
     | radix aft_digits {direct_insertion}
    
  15. fore_digits ::= 9 {9 | direct_insertion}
    
  16. aft_digits ::=  {9 | direct_insertion} 9
    
  17. radix ::= . | V
    
  18. RHS_sign ::= + | - | > | CR | DB
    
  19. floating_LHS_sign ::=
       LHS_Sign {context_sensitive_insertion} LHS_Sign
         {LHS_Sign | context_sensitive_insertion}
    
  20. single_#_currency ::= #
    
  21. multiple_#_currency ::= ## {#}
    
  22. fixed_#_currency ::= single_#_currency | multiple_#_currency
    
  23. floating_$_currency ::=
       $ {context_sensitive_insertion} $ {$
       | context_sensitive_insertion}
    
  24. floating_#_currency ::=
       # {context_sensitive_insertion} # {#
       | context_sensitive_insertion}
    
  25. all_sign_number ::=  all_sign_fore [radix [all_sign_aft]] [>]
    
  26. all_sign_fore ::=
       sign_char {context_sensitive_insertion} sign_char {sign_char
       | context_sensitive_insertion}
    
  27. all_sign_aft ::= {all_sign_aft_char} sign_char
    
    all_sign_aft_char ::=  sign_char | context_sensitive_insertion
    
  28. sign_char ::= + | - | <
    
  29. all_currency_number ::=  all_currency_fore
      [radix [all_currency_aft]]
    
  30. all_currency_fore ::=
       currency_char {context_sensitive_insertion}
         currency_char {currency_char | context_sensitive_insertion}
    
  31. all_currency_aft ::= {all_currency_aft_char} currency_char
    
    all_currency_aft_char ::= currency_char
                              | context_sensitive_insertion
    
  32. currency_char ::= $ | #
    
  33. all_zero_suppression_number ::=  all_zero_suppression_fore
      [ radix [all_zero_suppression_aft]]
    
  34. all_zero_suppression_fore ::=
       zero_suppression_char {zero_suppression_char
       | context_sensitive_insertion}
    
  35. all_zero_suppression_aft ::= {all_zero_suppression_aft_char}
      zero_suppression_char
    
    all_zero_suppression_aft_char ::=  zero_suppression_char
                                       | context_sensitive_insertion
    
  36. zero_suppression_char ::= Z | *
    
  37. The following composition constraints apply to a picture String:
    1. A floating_LHS_sign does not have occurrences of different LHS_Sign Character values.
    2. If a picture String has '<' as fixed_LHS_sign, then it has '>' as RHS_sign.
    3. If a picture String has '<' in a floating_LHS_sign or in an all_sign_number, then it has an occurrence of '>'.
    4. If a picture String has '+' or '-' as fixed_LHS_sign, in a floating_LHS_sign, or in an all_sign_number, then it has no RHS_sign.
    5. An instance of all_sign_number does not have occurrences of different sign_char Character values.
    6. An instance of all_currency_number does not have occurrences of different currency_char Character values.
    7. An instance of all_zero_suppression_number does not have occurrences of different zero_suppression_char Character values, except for possible case differences between 'Z' and 'z'.

  1. A replicable Character is a Character that, by the above rules, can occur in two consecutive positions in a picture String.
  2. A Character replication is a String
  3. char & '(' & spaces & count_string & ')'
    
  4. where char is a replicable Character, spaces is a String (possibly empty) comprising only space Character values, and count_string is a String of one or more decimal digit Character values. A Character replication in a picture String has the same effect as (and is said to be equivalent to) a String comprising n consecutive occurrences of char, where n=Integer'Value(count_string).
  5. An expanded picture String is a picture String containing no Character replications.

    NOTES

  6. (3) Although a sign to the left of the number can float, a sign to the right of the number is in a fixed position.


Go to the first, previous, next, last section, table of contents.