Find Character in Null-Terminated String (STRCHRNULL)

Instruction Syntax

Bound Program Access
Built-in number for STRCHRNULL is 21.
STRCHRNULL (                                                                    
            null_terminated_string   : address of aggregate(*)                  
            search_character         : signed binary(4) - rightmost byte           
                                                   specifies the search         
                                                   character  OR                
                                       unsigned binary(1)  OR                      
                                       aggregate(1)                              
) :   space pointer(16) to the first character in the null-terminated string that       
      matches the search character.  If the character is not found,             
      null pointer value is returned                                                    

Description:

The string specified by null terminated string is searched for the value specified by search character. The search terminates if the value is found or the null (ie. zero) character is reached. If the value is found, a space pointer to the character is returned. Otherwise, a null pointer value is returned.

Authorization Required

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
  • 24 Pointer Specification
    • 2401 Pointer Does Not Exist
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation