-
- Downloads
Terminate R^d vectors declarations and affectation
One can now write `` R^3 u = (1, 2, 3); R^3 v = u; R^3 w = 0; // One cannot give another scalar value: just the constant value 0 // that is `R^3 w = 1-1;` is an error! w += u; // w and u belong to the same space R^d (with d=3 here) v *= 2.5-1;// the right hand side is a scalar expression that can be naturally // cast to an R v -= u; `` These constructions are allowed for small vectors: valid types are `R^1`, `R^2` and `R^3`. Remark: tuples are only allowed in initialization: `` R^2 v = (0,1); // ok R^2 w ; w = (2,3); // ok w += (1,4); // forbidden ``
Showing
- src/language/ASTNodeAffectationExpressionBuilder.cpp 93 additions, 7 deletionssrc/language/ASTNodeAffectationExpressionBuilder.cpp
- src/language/ASTNodeDataType.cpp 1 addition, 1 deletionsrc/language/ASTNodeDataType.cpp
- src/language/node_processor/AffectationProcessor.hpp 71 additions, 0 deletionssrc/language/node_processor/AffectationProcessor.hpp
Please register or sign in to comment