1. Subscripts

Hello All.

Another stupid question.

Code:

partA[num]= sprintf("%d %s %s %s %s %s %s %s %s %d %d\n", {x,names[x],dates[x],money[x],money2[x],money3[x],money4[x],money5[x],money6[x],lineNum[x], num[x]})

Error:

subscript must be an atom (assigning to subscript of a sequence)

What is a subscript?

Don Cole A Bug is an un-documentedfeature. A Feature is a documented Bug.

new topic     » topic index » view message » categorize

2. Re: Subscripts

DonCCole said...

Hello All.

Another stupid question.

Not stupid.

DonCole said...
 partA[num]=	sprintf("%d %s %s %s %s %s %s %s %s %d %d\n", 
    {x,names[x],dates[x],money[x],money2[x],money3[x],money4[x],money5[x],money6[x],lineNum[x], 
     num[x]}) 

Error:

    subscript must be an atom 
    (assigning to subscript of a sequence)  

What is a subscript?

A subscript is a number used to index an element in a sequence. Its the thing you put inside the square brackets.

In your case above you use 'num' as the subscript to 'partA' but 'num' seems to be a sequence as you also use 'x' as a subscript to 'num'.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Subscripts

DerekParnell said...
DonCCole said...

Hello All.

Another stupid question.

Not stupid.

DonCole said...
 partA[num]=	sprintf("%d %s %s %s %s %s %s %s %s %d %d\n", 
    {x,names[x],dates[x],money[x],money2[x],money3[x],money4[x],money5[x],money6[x],lineNum[x], 
     num[x]}) 

Error:

    subscript must be an atom 
    (assigning to subscript of a sequence)  

What is a subscript?

A subscript is a number used to index an element in a sequence. Its the thing you put inside the square brackets.

In your case above you use 'num' as the subscript to 'partA' but 'num' seems to be a sequence as you also use 'x' as a subscript to 'num'.

Thank you Derek,

I should have see that. Seeing x is a decimal; therefore num has to be a sequence.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu