The Ansys Innovation Space website recently experienced a database corruption issue. While service has been restored there appears to have been some data loss from November 13. We are still investigating and apologize for any issues our users may have as a result.
Embedded Software

Embedded Software

Topics related to SCADE Suite, SCADE Display, SCADE One and more.

Replacing Nth element of array

    • jeremy.rutman
      Subscriber

      I can replace the element at a fixed index of an array using the Assign of Structured Element Array Operator. 
      However I need to replace the Nth element, where N is an input to my function - when I try this (using N instead of some constant) I hit 

      Type Error ERR_105 Not a size expression at REFRESH_CMD_TIMEOUT/_L21= 

      Identifier N should be bound to a static size expression 

      Can someone let me know if a. this is possible, and b. if possible, how to proceed

    • jeremy.rutman
      Subscriber

      For the Assign of Structured Element hidden parameter (the index) you can set [N] in  the parameters box at the bottom. 
      Why this allows you to  now use dynamic index is a mystery to me.  If you go out of the array bounds nothing happens, so apparently Scade knows not to write past array bounds. 
      But if it knows how to do that then why throw the 'Identifier N should be static' that started me on this little journey?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.