CSV String vs Arrays: Is this too stringly typed?
I came across some existing code in our production environment given to us by our vendor.  They use a string to store comma seperated values to store filtered results from a DB.  Keep in mind that this is for a **proprietary scripting language called PowerOn** that interfaces with a database residing on an AIX system, but it's a language that supports strings, integers, and arrays.

For example, we have;

    Account
    ----------------
    123
    234
    3456
    28390

The psuedo code might look like;
   
    Define accounts As String
    For Each Account
       accounts=accounts + CharCast(Account) + ","
    End

as opposed to something I would expect to see like

    Define accounts As Integer Array(99)
    Define index as Integer=0
    For Each Account
       accounts(index)=Account
       index=index+1
    End


By the time the loop is done, `accounts` will look like; `123,234,3456,28390,`.  The string is later used to test if a specific instance exists like so

    If CharSearch("28390", accounts) > 0 Then Call DoSomething

In the example, the statement evaluates to true and `DoSomething` gets called.  Given the option of arrays, why would want to store integer values whithin a string of comma seperated values?  Every language I've come across, it's almost always more expensive to perform string based operations than integer based operations.

Considering I haven't seen this technique before and my experience is somewhat limitted, **is there a name for this? Is this common practice or is this just another example of being too stringly typed?**  Did we get cruddy code from our vendor?
CSV String vs Arrays: Is this too stringly typed?
===

I came across some existing code in our production environment given to us by our vendor.  They use a string to store comma seperated values to store filtered results from a DB.  Keep in mind that this is for a **proprietary scripting language called PowerOn** that interfaces with a database residing on an AIX system, but it's a language that supports strings, integers, and arrays.

For example, we have;

    Account
    ----------------
    123
    234
    3456
    28390

The psuedo code might look like;
   
    Define accounts As String
    For Each Account
       accounts=accounts + CharCast(Account) + ","
    End

as opposed to something I would expect to see like

    Define accounts As Integer Array(99)
    Define index as Integer=0
    For Each Account
       accounts(index)=Account
       index=index+1
    End


By the time the loop is done, `accounts` will look like; `123,234,3456,28390,`.  The string is later used to test if a specific instance exists like so

    If CharSearch("28390", accounts) > 0 Then Call DoSomething

In the example, the statement evaluates to true and `DoSomething` gets called.  Given the option of arrays, why would want to store integer values whithin a string of comma seperated values?  Every language I've come across, it's almost always more expensive to perform string based operations than integer based operations.

Considering I haven't seen this technique before and my experience is somewhat limitted, **is there a name for this? Is this common practice or is this just another example of being too stringly typed?**  Did we get cruddy code from our vendor?