Number Function


the number of <components> [in | of <location>] or
number(<components> [in | of <location>]) Applies to global


The number function can be used to count a variety of components. This function is particularly useful when you want to script an action that depends on the quantity of a particular type of object, or if you want to control a loop affecting each of the components in turn. The following list indicates which components can be counted in which location. Components: chars, characters, words, items, lines Location: text container Components: rows, columns Location: pickLists, dataSheets Components: cards Location: stack, background Component: card objects Location: card Component: backgrounds Location: stack


Note that when counting objects, if you omit the [in <location>] clause, the current card is used as the context for counting. When counting cards or backgrounds, if you omit the [in <location>] clause, the current stack is used as the context.


Type the following statements into the Message Box and press Enter after each: the number of cards the number of words in field "Names" the number of words in "Hello there!" the number of characters in word 1 of bg fld ID 12 number(buttons in this card)
This text has been mechanically extracted from the Oracle Media Objects MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.