Question: Jedit:- How do I use it?

I have just installed jEdit. Have written 2 files.Started with "open in mode  maple". So text gets nicely coloured. Can save the files ok as .mpl. I have several questions
1) How do I make the code indent/format?

2)How should I test the code? Can jEdit show me errors? I am running jEdit and maple side by side. Save, Read, hit bug...

3)How do I format an imported .mpl from maple?

4)How do I get $include to work?

Testr1:=proc(a,b)
description "Jedit test";
local A,B;
A:=a;B:=b;
if is(A<B) then print ('smaller')
elif is(A>B) then print('bigger')
else print('cant_say')
end if;
return cos(A+B), sin(A-B),A,B;
end proc;
TestjEdit:=module()
option pagkage;
export Testr1;
$include "Testr1.mpl"
end module;
#imported file
Antisym := proc (V::{Matrix(3,3,shape = antisymmetric,algebraic), Vector(3)})
local M; description "converts vector to antisymmetric matrix and back"; if 
type(V,Vector) then M := Matrix(3,3,shape = antisymmetric); M[1,2] := -V[3]; M
[1,3] := V[2]; M[2,3] := -V[1] else M := Vector(3,[-V[2,3], V[1,3], -V[1,2]])
end if; M end proc;

restart

currentdir()

"C:\Users\Ronan\Documents\MAPLE\Rational_Trigonometry"

(1)

read "C:\\Users\\Ronan\\Documents\\jEdit\\Testr1.mpl"

proc (a, b) local A, B; description "Jedit test"; A := a; B := b; if is(A < B) then print('smaller') elif is(B < A) then print('bigger') else print('cant_say') end if; return cos(A+B), sin(A-B), A, B end proc

(2)

"print("'Testr1'")"

(3)

Testr1(2, 4)

cos(6), -sin(2), 2, 4

(4)

Testr1(x, 5)

cos(x+5), sin(-5+x), x, 5

(5)

Testr1(x, x+1)

cos(2*x+1), -sin(1), x, x+1

(6)

restart

read "C:\\Users\\Ronan\\Documents\\jEdit\\TestjEdit.mpl"

$include "Testr1.mpl";
^

Error, while reading ``C:\Users\Ronan\Documents\jEdit\TestjEdit.mpl``

 

TestjEdit:-Testr1(2, 1)

Error, `TestjEdit` does not evaluate to a module

 

``


 

Download Jedit_testing.mw
 

restart

currentdir()

"C:\Users\Ronan\Documents\MAPLE\Rational_Trigonometry"

(1)

read "C:\\Users\\Ronan\\Documents\\jEdit\\Testr1.mpl"

proc (a, b) local A, B; description "Jedit test"; A := a; B := b; if is(A < B) then print('smaller') elif is(B < A) then print('bigger') else print('cant_say') end if; return cos(A+B), sin(A-B), A, B end proc

(2)

"print("'Testr1'")"

(3)

Testr1(2, 4)

cos(6), -sin(2), 2, 4

(4)

Testr1(x, 5)

cos(x+5), sin(-5+x), x, 5

(5)

Testr1(x, x+1)

cos(2*x+1), -sin(1), x, x+1

(6)

restart

read "C:\\Users\\Ronan\\Documents\\jEdit\\TestjEdit.mpl"

$include "Testr1.mpl";
^

Error, while reading ``C:\Users\Ronan\Documents\jEdit\TestjEdit.mpl``

 

TestjEdit:-Testr1(2, 1)

Error, `TestjEdit` does not evaluate to a module

 

``


 

Download Jedit_testing.mw

 

Please Wait...