Friday, October 8, 2010

A small difference in usage of " if - else if - else " in pl/sql , vb , Unix

The underlying logic of all the programs are same , only there is slightly change in their syntax and usage.I had worked on VB 6  past so always in that mode whenever using the other languages like PL/SQL .As i was working on "if-then-else " for pl/sql and found that it was flashing the syntax error . There is a small difference of this usage in three languages .

The following are the differences of  IF-THEN-ELSE used in VB , PL/SQL and UNIX shell scripts :

1) VB :

if ( condition ) then
    some_statements
else if  ( condition )
    other_statements
else
    final_statements
end if


2) PL/SQL :

if ( condition ) then
    some_statements ;
elsif  ( condition )

    other_statements ;
else
    final_statements ;
end if ;

UNIX :

if ( condition ); then
    some_statements
eif  ( condition );
    other_statements
else
    final_statements

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails
Make Money Blogging