Bendesarts

380 Reputation

10 Badges

10 years, 226 days

MaplePrimes Activity


These are questions asked by Bendesarts

Hello,

I have a quite big program designed with packages and subpackages.

I realized that i'm not to well understand the operation of local/ global/ export variables in this case.

Let's detail the issue.

I consider a package like this :

MAIN PACKAGE:=module()

local XM

global YM

export ZM

      SUBPACKAGE1:=module()

      local X1

      global Y1

      export Z1

      end module;

      SUBPACKAGE2:=module()

      local X2

      global Y2

      export Z2

      end module;

end module;

Question:

Can you describe in the simpliest way the rules for accessing to the variables in the case the variables are local/ global/ export and in the case you are writting procedures inside the MAINPACKAGE or the SUBPACKAGEs ?

In others words may you help me to answer to these questions  ?

Is the local variable XM accessible to the procedures used in SUBPACKAGE1? no
Is the local variable X1 accessible to the procedure used in MAINPACKAGE ? no

Is the global variable YM accessible to the procedures used in SUBPACKAGE1? yes
Is the global variable Y1 accessible to the procedure used in MAINPACKAGE ? yes

Is the export variable ZM accessible to the procedures used in SUBPACKAGE1? yes
Is the export variable Z1 accessible to the procedure used in MAINPACKAGE ? yes with the syntax SUBPACKAGE:-Z1

I let my opinion but i need certainty on these points...

I attach a first draft that i would like you help me.

AboutModuleLocalGlobalExport.mw

I thank you in advance for your help.

Hello,

For a quite long program, i have to use the Maple debugger. But, i have never used it before.

For a package containing subpackages like this :

Package 

    Subpackage1

         proc 1

         proc 2

     Subpackage 2

It seems that i have a mistake for one of procedure.

Consequently, for using the Maple debugger, i have tried this : 
with(package);
with(subpackage1);
stopat(proc 1) 

But, it does nothing.

May you explain me how i can use the Maple debugger in a package ?

I find in the web this vidéo : https://www.youtube.com/watch?v=cUVbMOTQzRA

It describes how to use the Maple debugger but only on a very short procedure and not in a package.

I thank you in advance for your help and tips

Hello,

For debbugging big programs, i have been told that one good solution is to use the mint application.

I'm trying to do so that is to say to use the mint application with windows. But, i encounter some difficulties.

The program on which i would like to apply the mint is composed of several parts like in the package Shapes and the different parts of the module are called thanks to the $include syntax.

To test mint, i have launched a command window with the command cmd in windows.

After, i apply cd PathRepertoryContainingMint

On i am located in this repertory, i test the following syntax :
mint -I PathRepertoryContainingTheDifferentFiles PathRepertoryContainingTheMainProgram\program.mpl

In my case these two paths are the same.

I test also the following syntax:

mint -o PathRepertoryContainingTheOuput\mintoutput.mpl PathRepertoryContainingTheMainProgram\program.mpl

It may run but i don't know where i can recover the output of mint

I have been told also to set the Windows PATH variable to include the Maple bin directory (thank you @Joe Riel for this tip). I think that it should be a good idea but I never do this type of manipulation.

On the net, I find that the process to do so is the following : setx path "%path%;c:\directoryPath"

Questions: 

1) If you have some experience in using mint with windows, may you give some tips (precise the right syntax) to use it ? 

2) In case the option -o is not used, where the output of mint is coming ?

I thank you in advance for your help.

Hello,

I'm trying to use a text editor (notepad++) to developp a code in Maple. 

Before creating a package, i would like to test step by step the different procedures that i create.

To do so, i would like to launch some procedures created in notepad++. I guess i have to call the maple kernel from notepad++. How can i do to call the maple kernel from a editor (in my case notepad++) ?

Next, would it be possible for me to test directly on a worksheet a procedure that i have been created in notepad and launched from notepad ?

I thank you in advance for your help.

Hello,

In a maple code, i have the symbol dollar as an the last argument of a procedure.

What is the meaning of the use of dollar symbol as an argument in a maple procedure ?

Thank you for your help.

1 2 3 4 5 6 7 Last Page 1 of 33