Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam Hierarchy of FunctionsHierarchy of Functions Solving.

Similar presentations


Presentation on theme: "March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam Hierarchy of FunctionsHierarchy of Functions Solving."— Presentation transcript:

1 March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam Hierarchy of FunctionsHierarchy of Functions Solving text/string problemsSolving text/string problems Problem examplesProblem examples

2 March 2005 2R. Smith - University of St Thomas - Minnesota The Exam “Open book” as last time (notes allowed in book)“Open book” as last time (notes allowed in book) TopicsTopics –Functions Role of parameters/argumentsRole of parameters/arguments Returning resultsReturning results “Scope” of variables“Scope” of variables –Arrays: Characters and Strings The appearance vs. the numeric (internal) valueThe appearance vs. the numeric (internal) value Using classification functions (isalpha() etc)Using classification functions (isalpha() etc) String lengthString length Scanning a stringScanning a string Using index valuesUsing index values Copying/appending stringsCopying/appending strings

3 March 2005 3R. Smith - University of St Thomas - Minnesota Let’s look for a hierarchy At the ‘top’ is ‘main()’At the ‘top’ is ‘main()’ Next level: things called by main()Next level: things called by main() Then, things called by thoseThen, things called by those The most ‘primitive’ things are at the bottomThe most ‘primitive’ things are at the bottom Building a program: top/down and bottom/upBuilding a program: top/down and bottom/up

4 March 2005 4R. Smith - University of St Thomas - Minnesota Other ‘String’ Problems How do we ‘take apart’ some text?How do we ‘take apart’ some text? –“Parsing” Examples:Examples: Tab format (super easy)Tab format (super easy) “CSV” format“CSV” format Arithmetic expressionsArithmetic expressions Computer text (HTML, XML)Computer text (HTML, XML) “All major computer problems are database problems”“All major computer problems are database problems”

5 March 2005 5R. Smith - University of St Thomas - Minnesota “Primitives” for Strings You often write your ownYou often write your own –I wrote some for your Pig Latin program How do we classify characters?How do we classify characters? How do we find a string’s length?How do we find a string’s length? How do we look for a ‘type’ of character?How do we look for a ‘type’ of character? How do we ‘construct’ strings?How do we ‘construct’ strings?

6 March 2005 6R. Smith - University of St Thomas - Minnesota Solving those problems Tab format (super easy)Tab format (super easy) “CSV” format“CSV” format Arithmetic expressionsArithmetic expressions Computer text (HTML, XML)Computer text (HTML, XML)

7 March 2005 7R. Smith - University of St Thomas - Minnesota Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.


Download ppt "March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam Hierarchy of FunctionsHierarchy of Functions Solving."

Similar presentations


Ads by Google