To understand the issue, remember that everything in Mathematica is an expression:
head[ e1, e2, ... ]
The ; is a shortcut for CompoundExpression:
CompoundExpression[ expr1, expr2] === (expr1; expr2)
(* True *)
You can see what is happening by using FullForm:
Analyse [data_, name_] := Module [{};
Text[Row[{"data is:", data}]];
Text[Row[{"name is:" , name}]];
] // FullForm
Testing your function again reveals an error message and a full form display of the specific DownValue for Analyse[] (which I have commented and reformatted for clarity):
Analyse[ 1, "Paul" ]
Module::argmu: Module called with 1 argument; 2 or more arguments are expected.
Module[
(* argument 1 *)
CompoundExpression[
List[],
Text[Row[List["data is:",1]]],
Text[Row[List["name is:","Paul"]]],
Null
]
(* slot for missing argmument 2 *)
]
So, your two arguments have been well taken, but the Moduleis only having one argument, which is the CompoundExpression. Module does take two arguments:
Module[ {vars}, body ]
So simply drop the last semicolon (because you do not want Null being the last expression in a compound expression and thus have no output) and replace all other semicolons by , as shown by e.doroskevic.
;and,. Try replacing the first;in theModule...with a,, see what happens, then consult the documentation to consolidate your learning. – High Performance Mark Aug 18 '16 at 07:31now i have changed but i expected to get to lines printed but nothing happend ;-)
– Melanie Gerster Aug 18 '16 at 07:36;does. – Kuba Aug 18 '16 at 07:432 2, it multiplies the content inModule, if you need to output aGrid/Columnor something like that, just use it. – Kuba Aug 18 '16 at 07:44- As you receive help, try to give it too, by answering questions in your area of expertise.
- Take the tour and check the faqs!
- When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– Aug 18 '16 at 08:09