.


:




:

































 

 

 

 





4

: ᒺ- ++.
: ++ , ; 㳺 , RTTI, -, .
: IBM- K.
: OC Windows, ++.
: . : , , . : ᒺ, , , , , , ; : ᒺ . : , RTTI, , , , typedef, .  
: 1. . 2. . 3.  

 


RTTI

, . , (, , ), . , , - / (RTTI).

C++: RTTI. (dynamic_cast) . ', , ' .

OP: RTTI. ( is as). RTTI published , . RTTI. , ( - DFM), Delphi, ', RTTI . TObject ( ) ClassName ClassType. ClassType , ' ( ).

Java: Object Pascal, Java , . (type-safe downcast) . getClass () (' , ), getName () , ' . instanceof. Java RTTI , JavaBeans. Java .

 

- , , . - , , .

C + +: C + + throw , try catch . - ' , . C + + . ' .

OP: Object Pascal : raise, try, except 䳺 . , , , '. , try finally, , , , . Delphi - Exception.

Java: C + +, Object Pascal, finally. ( -' , Borland C + + Builder 3.) finally , , '. Java , , , , . ֳ , , . Java '- Throwable.

, ( ):

try { line = console.readLine(); if (line.length() == 0) throw new EmptyLineException(", , !"); console.printLine(", %s!" % line);}catch (EmptyLineException exception) { console.printLine("!");}catch (Exception exception) { console.printLine(": " + exception.message());}else { console.printLine(" ");}finally { console.printLine(" ");}




:


: 2015-10-06; !; : 560 |


:

:

- , , .
==> ...

1538 - | 1348 -


© 2015-2024 lektsii.org - -

: 0.008 .