Documentation for SOOP API Library v1.0
Table of Contents

SOOP Low Level Routines

Low Level routines for use in the SOOP Library, and others.


These routines are utilizations of common functions that are required throughout the SOOP Library, and offers good features. Should you find a need to use them in your own program, feel free to do so, but remember that they do not effect the SOOP Library in any way.

  • func soop_adderror( eSeq msg )   
  • proc soop_error( sfStr func, eSeq args, eObj msg )   Internal SOOP Error Routine.
  • func soop_fast_merge( eSeq Source, eSeq New)   
  • func soop_fast_merge_add( eSeq Source, eSeq New, eSeq Extra)   
  • func soop_iff( eInt Expresion, eObj True, eObj False )   
  • func soop_IsString( eSeq data )   Returns True if the Sequence given is a ASCII Printable string
  • func soop_reverse( eSeq dat )   
  • func soop_sprints( eObj data )   Converts a Sequence Data into a ASCII Printable String

    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_adderror
    ( eSeq msg )

    Returns: Identifier pointer to message

    Category: SOOP Low Level Routines

    This function is used to decleare a new Error Message, oftenly used with soop_error() as a way to display error messages for easier display of messages. This should only be used if you know what youa re doing.

    See Also: soop_error, soop_fast_merge, soop_fast_merge_add, soop_iff, soop_IsString, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    soop_error
    ( sfStr func, eSeq args, eObj msg )

    Internal SOOP Error Routine.

    Category: SOOP Low Level Routines

    This procedure is used internally to display SOOP Errors to the end user. This program will cause the abort of the program with a 1/0 error, but utilizes the crash_message() routine to display the actual message.

    Example Output: new("MyClassA",{}): Class not defined at this point.

    See Also: soop_adderror, soop_fast_merge, soop_fast_merge_add, soop_iff, soop_IsString, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_fast_merge
    ( eSeq Source, eSeq New)

    Returns: Merged sequence of Source and New

    Category: SOOP Low Level Routines

    This function merges two sequences, or sequence parts, into 1 sequence. It uses a fast merging method as displayed in reverse().

    See Also: soop_adderror, soop_error, soop_fast_merge_add, soop_iff, soop_IsString, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_fast_merge_add
    ( eSeq Source, eSeq New, eSeq Extra)

    Returns: Merged sequence of Source and New, appending the Extra to the New

    Category: SOOP Low Level Routines

    Much like soop_fast_merge(), this function uses the same method as reverse() to merge two sequences into 1, or two sequence parts into 1. The diffrence is, though that all New objects will get the Extra data added to the New Object.

    Extra can be a 2 part sequence, where the first part determins where in the New sequence, the data should be added.

    Example:

    sequence s
    s = soop_fast_merge_add({"Apple","Orange"},{"Lemon","Lime"},{0,"Sour "})
    -- s is now {"Apple","Orange","Sour Lemon","Sour Lime"}
    s = soop_fast_merge_add({"Lemon","Lime"},{"Watermelon","Apple"},{-1," Sweet"})
    -- s is now {"Lemon","Lime","Watermelon Sweet","Apple Sweet"}
    

    See Also: soop_adderror, soop_error, soop_fast_merge, soop_iff, soop_IsString, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_iff
    ( eInt Expresion, eObj True, eObj False )

    Returns: Returns based apon Expression.

    Category: SOOP Low Level Routines

    This function is basically like an if statement, in how it evaluates the expression, then returns what is in the True variable, if the expression is true, or returns the False variable, if the expression is False.

    Example:

    puts(1,soop_iff(1+1=2,"True","False"))
    -- Prints onto the screen "True"
    puts(1,soop_iff(1+2=2,"True","False"))
    -- Prints onto the screen "False"
    

    See Also: soop_adderror, soop_error, soop_fast_merge, soop_fast_merge_add, soop_IsString, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_IsString
    ( eSeq data )

    Returns True if the Sequence given is a ASCII Printable string

    Returns: Boolean True or False

    Category: SOOP Low Level Routines

    This function checks the sequence given is a Flat Sequence, that has data stored in it, that is a ASCII Printable string.

    See Also: soop_adderror, soop_error, soop_fast_merge, soop_fast_merge_add, soop_iff, soop_reverse, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_reverse
    ( eSeq dat )

    Returns: Returns the sequence in reversed order.

    Category: SOOP Low Level Routines

    This is just like the reverse() defined in misc.e, only supplied here to keep from including extra libraries, that are not nesscary.

    See Also: soop_adderror, soop_error, soop_fast_merge, soop_fast_merge_add, soop_iff, soop_IsString, soop_sprints


    Documentation for SOOP API Library v1.0
    Table of Contents

    [func]
    soop_sprints
    ( eObj data )

    Converts a Sequence Data into a ASCII Printable String

    Returns: ASCII Printable String

    Category: SOOP Low Level Routines

    This function is very similar to pretty_print(), however, instead of doing multiple lines, it only does 1 line. This is commonly used in Error messages, for display the arguments received by a internal function.

    See Also: soop_adderror, soop_error, soop_fast_merge, soop_fast_merge_add, soop_iff, soop_IsString, soop_reverse