How does one connect to Oracle?

One can use the "oralogon" function to establish an Oracle connection and the "oralogoff" function to disconnect from the database. Look at this sample OraTCL script:

set connect scott/tiger@orcl
set lda [oralogon $connect]
if {$oramsg(rc) == 0} {                              # ????
   puts "Successfully connected to Oracle."
} else {
   puts "Unable to connect: $oramsg(rc)"
}
oralogoff $lda