GeorgeJ

1080 Reputation

9 Badges

15 years, 300 days

MaplePrimes Activity


These are questions asked by GeorgeJ

I wonder if someone would be kind enough to explain the output I am getting in the simple attached file. I understand the array that is being output - that is what I want. But why the 9 below it, and the pair 'true,true' near the bottom? -Thanks View 2292_IncrementGroup.mw on MapleNet or Download 2292_IncrementGroup.mw
View file details
Suppose I want to use a proc to change an element in a list. I run into this problem > TestProc := proc (s) s[3] := 5 end proc; > s := [1, 2, 3, 4]; [1, 2, 3, 4] > TestProc(s); Error, (in TestProc) illegal use of a formal parameter I realize I could make s a global variable, but what if I want my proc to be able to operate on *any* list? In C++ one would use a pointer, but I don't see that kind of capability in MAPLE. Is there another way to do it? -Thanks
OuterProc := proc () local i, j; InnerProc := proc () i := 15 end proc; i := 0; InnerProc(); i end proc; The following proceedure returns 15, just as I want it to. However, compliation generates a warning saying that the variable i is implicitly local in Innerproc, which it is not. Is there any way to turn off this warning without turning off legitimate warnings about implicit declarations of local variables?
I’ve learned a fair amount about programming in MAPLE but am still perplexed by some things. I’m not sure how to simulate VB user defined types. Do I use modules, records, tables, some combination of the above? I wrote a Sudoku solving program in VB. The program used the following type and variable declarations: Private Type Square_ NumPossible As Integer Possible(9) As Boolean Number As Integer End Type Dim Square(9, 9) As Square_ If Square (i,j) had been solved then Square(i,j).Number was not equal to 0. If the number 7 were still a possibility in Square (i,j) then Square(i,j).NumPossible(7) returned TRUE.
I wonder if someone can tell me why the label (7) appears twice in my file and what I could do to get rid of one of the occurences. As always, thanks for the help. View 2292_Kepler4B.mw on MapleNet or Download 2292_Kepler4B.mw
View file details
3 4 5 6 7 8 9 Last Page 5 of 14