On 11/8/07, Constantine Frangos <[EMAIL PROTECTED]> wrote: > > In the function below, I tried to use the following commands > > )display value Acon > print(['Acon = Acon]) > > to print one or more variable. > > However, I get very strange behaviour and error messages, so had to comment > them out. There might be a bug somwhere in my program. > ...
What do you mean by "strange behaviour"? Do you mean for example the error message: (12) -> print('Aconnull = Aconnull) There are 3 exposed and 0 unexposed library operations named equation having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op equation to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named equation with argument type(s) Variable Aconnull List Vector Expression Integer Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. ------ This error should be expected since you are trying to produce an equation (which like everything in Axiom must have a type) between two things of quite different kind. I cannot think of any equation which has Variable on one side and List on the other. You might try to construct something of type: Equation Polynomial Integer For example (1) -> x=1 (1) x= 1 Type: Equation Polynomial Integer In this equation both sides of this equation can be considered Polynomials. In this case maybe you want to create an equation of type: Equation List Vector Expression Integer Like this: [['Aconnull]] = Aconnull Now the lefthand side can be interpreted as a 'List Vector Expression Integer' so the expression print([['Aconnull]] = Aconnull) is ok. Maybe you should not be trying to create an equation just to print a result? Probably output("Aconnull =", Aconnull) is more like you intended to do. The command )display values is a command. As such it is not intended to be used inside of a function definition such as testkinemat1 == --)read expandsincos.input Acon := matrix([[1 , 0 , Lo1*sin(phi) , -sin(phi)*a , 0 , 0 , 0 , 0 , 0],_ [0 , 1 , -Lo1*cos(phi) , a*cos(phi) , 0 , 0 , 0 , 0 , 0],_ ... as you wrote above. Why are you writing? testkinemat1 == This does not make sense to me in your code. Are you intending to use this name testkinemat1 for some purpose later? This is not the usual way in which one would use a definition like this. Perhaps you can explain what you really want to do with this code. If you forget about trying to define the function testkinemat1, then you can use )display values in the normal way in the rest of you code because this is just a series of expressions and command to be evaluated. This works fine for me. Regards, Bill Page. _______________________________________________ Axiom-math mailing list Axiom-math@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-math