Why do I need to create field strings? Why can’t I use just simple variables?

Field strings give you a way of organizing your variables into groups. When you have hundreds of variables in a program, organizing them into field strings makes the relationships between the variables clearer. Using field strings to group fields together also enables you to perform an operation on a group of variables as if they were a single variable. So, for example, if you need to move 100 variables, you can usually code a single statement to perform the move from one field string to another, instead of coding 100 assignment statements for individual variables.

Moving a single field string is also more efficient than 100 move statements, so your program runs faster. You will see in the coming chapters that many statements can use a field string as an operand. If you can use field strings, you can take advantage of them, and they will save you a lot of coding and debugging time.

Popularity: 9% [?]

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Slashdot
  • StumbleUpon
  • Reddit

Leave a Reply

You must be logged in to post a comment.