Namespace MyTask
Class B
Private x As String = "abc", y As Integer = 700
Sub New()
End Sub
Shared Function Create() // To create instances in paxPascal
Return (New B())
End Function
End Class
End Namespace
After that we create the second module in paxC:
namespace MyTask {
class A {
var
x = 100, y = [500, 800];
void A(){}
static void Create(){ // To create instances in paxPascal
return (new A());
}
}
}
Now we can use both modules in paxPascal:
program Demo; uses MyTask; var x: A; y: B; begin x := A.Create(); y := B.Create(); print x; print y; end;
paxPascal:
writeln('Hello from paxPascal!');
paxC:
using paxPascalNamespace;
writeln('Hello from paxPascal!');
paxBasic:
imports paxPascalNamespace writeln "Hello from paxPascal!"