Some Restrictions about
Working with Text Strings

[Note: This webpage is intended for users of SiMPLE.]

Click Here to Read About SiMPLE

As you probably already know, SiMPLE offers five different data types: Int, Int2, Float, Float2, and Text. Of these five, the Text data type requires some special attention since it is the only one that deals with non-numerical quantities.


As is pointed out in the SiMPLE tutorials:

          Because of the unique way in which SiMPLE handles text strings,
          the concatenation operation will not work as part of a task's (or
          function's) calling parameters. For example, the program:

         name = Keyin text ("Enter your name: ")
         Output ("Your name is " + name)

          will not compile. However, the program:

         name = Keyin text ("Enter your name: ")
         message = "Your name is " + name
         Output (message)

          will compile properly.

In addition, the keyword "Set" will sometimes not work with concatination statements. For example, the statement:

         Set a = "SiM" + "PLE"

will not compile. However, the statement:

         a = "SiM" + "PLE"

will compile properly.

On the other hand, the statement:

         a = "SiM" "PLE"

will not compile. But the statement:

         Output ("SiM" "PLE")

will compile properly! (It will display the word: SiMPLE )

Also, the program:

         name = "Robert"
         Output (name + " is your name")

will compile properly. (It will display: Robert is your name)

So, it is possible to concatinate two or more strings when used as a task's (or function's) calling parameters -- provided that all of the strings (except for the first one) are constants. (I.e., only the first string can be in a container.)

Initializing a Text Array

Unlike with the numerical  data types (Int, Int2, Float, and Float2), a text  array can be initialized only in a Common statement. For example, the following statement:

Text a[3] = {"AB", "CD", "EF"}
will generate an error message. But the statement:
Common Text a[3] = {"AB", "CD", "EF"}
will compile correctly.

(All of these restrictions are due to irreparable bugs in the SiMPLE compiler.)

  [ Webmaster | FAQ's | Home Page | Contact Us ]