Method, system, and program for performing conditional...

Data processing: software development – installation – and managem – Software program development tool – Testing or debugging

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S151000, C717S114000

Reexamination Certificate

active

06496975

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a method, system, and program for implementing conditional logic and, in particular, nested conditional logic within a computer program.
2. Description of the Related Art
Certain complex program coding requires the use of multiple nested conditional logic. Below is an example (1) of the use of nested conditional statements to determine whether a process will continue to request blocks of data.
Get a block  (1)
If block OK Then
Get another block
If block OK Then
Get another block
If block OK Then
Get another block
If block OK Then
 say hello
Else
 say goodbye
Else
Error
Else
Error
Else
Error
In the above example (1), the programmer must keep track of numerous nested conditional statements in order to implement a series of commands to get blocks of data,
as a failure to get one block will prevent the logic from obtaining the next block. The programmer must also ensure that the “Else” statements correspond to “If” statements. The layout of the “if” and “else” statements to implement nested conditional logic can be confusing and time consuming to organize.
Thus, there is a need in the art for an improved method, system, and program for implementing conditional logic.
SUMMARY OF THE PREFERRED EMBODIMENTS
To address the shortcomings in the prior art discussed above, preferred embodiments disclose a method, system, and program for implementing conditional logic statements within a computer program. Program logic is invoked in response to processing a first method statement. During the execution of the program logic for the first method statement, at least one operation is performed and a return variable is set to at least one of two values depending on an outcome of performing the at least one operation. Program logic is invoked in response to processing a second method statement following the first method statement in the computer program. The second method statement is passed a condition parameter and the return variable. During the execution of the program logic for the second method statement, a determination is made as to whether the return variable set by the first method statement satisfies a condition specified in the condition parameter and one of at least two operations are performed, depending on whether the return variable satisfies the condition.
In further embodiments, the step of performing one of at least two operations is dependent on whether the return variable satisfies the condition comprises performing at least one operation specified in the program logic for the second method statement if the return variable satisfies the condition or bypassing performing any operations specified in the second method statement if the return variable does not satisfy the condition.
In still further embodiments, the computer program further comprises additional method statements following the second method statement. The method statements following the second program statement are passed at least one condition parameter and the return variable. During the execution of the program logic for the method statements following the first method statement, at least one operation is performed depending on whether the return variable satisfies the condition specified in the at least one condition parameter and the return variable is set to one of the two values depending on the outcome of performing the operation.
In still further embodiments, the same operations are performed by the method statements following the first method statement and the same condition parameters are passed to the method statements following the first method statement. Still further, the series of method statements may form nested conditional logic.
Preferred embodiments provide a technique to implement conditional logic that is less cumbersome than current methods that utilize “if” and “else” statement pairs, especially when numerous if/else pairs are nested within each other. With preferred embodiments, the conditional logic is implemented within a method statement that performs a certain operation conditional on specified condition parameters and a return value set during the execution of a previous method statement. In this way, nested conditional logic can be implemented with a series of single program statements without the need to organize the layout of “if” and “else” pairs within each other.


REFERENCES:
patent: 4967351 (1990-10-01), Zmyslowski et al.
patent: 5081572 (1992-01-01), Arnold
patent: 5167023 (1992-11-01), de Nicolas et al.
patent: 5497463 (1996-03-01), Stein et al.
patent: 5526491 (1996-06-01), Wei
patent: 5659722 (1997-08-01), Blaner et al.
patent: 5706490 (1998-01-01), Beard et al.
patent: 5748951 (1998-05-01), Webb et al.
patent: 5790844 (1998-08-01), Webb et al.
patent: 5805876 (1998-09-01), Bose et al.
patent: 5805918 (1998-09-01), Blomgren et al.
patent: 5881229 (1999-03-01), Singh et al.
patent: 6119116 (2000-09-01), Rose
IBM BookManager Print Preview; “MVS JCL Reference”; Document No. GC28-1757-05; Program No. 5647-A01; Nov. 4, 1998, Sections of Ch. 16 and 17.
IBM BookManager Print Preview; “MVS JCL User's Guide”; Document No. GC28-1758-03; Program No. 5647-A01; Jan. 28, 1998, Sections from Ch. 3.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method, system, and program for performing conditional... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method, system, and program for performing conditional..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method, system, and program for performing conditional... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2984566

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.