We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.

# inconsistent behavior with assigned arrays

#### Replies:

92657 Jan 28,2010 05:27 PM UTC Feb 4,2010 05:39 AM UTC ASP.NET Web Forms (Classic) 1
 Subscribe to this post Tags: Calculate
Asked On January 28, 2010 05:27 PM UTC

My code is as follows...

Dim tCalculator As New CalcQuickBase()
tCalculator.Engine.ResetVariableNames()
tCalculator.FormulaCharacter = "="c

tCalculator("A") = "{1, 2, 3, 4}"

' Invalid
label_Result1.Text = tCalculator.ParseAndCompute("=[A]")
' Works
label_Result2.Text = tCalculator.ParseAndCompute("={1, 2, 3, 4}")

For some reason, the result for label_Result1 is "invalid expression", yet for label_Result2 I get "1,2,3,4"

Doing aggregations on [A] will work though, for example tCalculator.ParseAndCompute("=sum([A])")
will return "10"

Is there to assign [A] and return it properly the same way it will return "1, 2, 3, 4"?

Jaffersathick B [Syncfusion]
Replied On February 4, 2010 05:39 AM UTC

Hi Drew,

Thank you for your interest in Syncfusion products.

We suggest you to assign the array of value with the formula character if you are not using it with the aggregate function and for using with the aggregate function we suggest you to assign them without formula character.

// Assigning with formula character
tCalculator("A") = "={1, 2, 3, 4}"

// Assigning without formula character for using it in aggregate functions.
tCalculator("A") = "{1,2,3,4}"

Let me know if you have any queries.

Regards,
Jaffer.B

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.