484 Appendix A
Additional Lab Exercises
Using Strings and Globals
Using Strings and Globals
Manipulating Strings and Globals
Using string objects or functions, create a program that accepts a user’s name
in the following format: <space> <firstname> <space> <lastname>. After
the user enters a name, have the program strip off the first name and only
print the last name. Store the string into a global variable. Retrieve the string
using the
Formula object.
Solution—Manipulating Strings and Globals
Figure A-11 shows a solution to the exercise Manipulating Strings and
Globals.
Figure A-11. Manipulating Strings and Global Variables