Embedded Software

Embedded Software

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

Correct usage of “mapfoldw” iterator.

    • fdtsaid
      Subscriber

      In Scade Language Reference 8.5 Operator Application and Higher-Order Patterns, it illustrated that the usage of foldw:
       

      idx, acc = (foldw op << size >> if cond0)(acc0, A1,...,An)
       
      is equivalent to particular form of mapfoldw:
       
      idx, _, acc = (mapfoldw 1 op << size >> if cond0)(acc0, A1, ..., An)
       
      Should it be the following form instead?
      idx, _, acc = (mapfoldw 1 op << size >> if cond0 default ())(acc0, A1, ..., An)
       
      Because the syntax definition of mapfoldw is 
      operator ::= (iterator_mw operator << size >> if expr default expr)
      iterator_mw ::= mapfoldw [[ INTEGER ]]
Viewing 0 reply threads
  • You must be logged in to reply to this topic.