10.07.2015 Views

Data Types & Type Checking - Ace

Data Types & Type Checking - Ace

Data Types & Type Checking - Ace

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Strings in Programming Languages• C and C++:– Implemented as null terminated char arrays.– A library of functions in string.h that provide string operations.– Many operations are inherently unsafe (ex: strcpy).– C++ string class from the standard library is safer.• Java (C# and Ruby):– Primitive via the String class (immutable).– Arrays via the StringBuilder class (mutable, w/ subscripting).• StringBuffer for multithreading• Fortran:– Primitive type.Lecture 0628

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!