Skip to end of banner
Go to start of banner

Array Creation

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Any variable type can be transformed into an array by adding the array symbols [] after the type declaration.

Example 1 - Empty array

string [] fruit;

Example 2 - Array with values

string [] fruit = {"Apple", "Apricot", "Banana", "Cherry"};

Example 3 - Array with values from string

string [] produce = "Apple|Apricot|Avocado|Banana|Blackberry|Blueberry|Cherry|Coconut";

The SIL language will automatically convert a string containing pipe delimited text into an array.

  • No labels