{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 } {CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "2 D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 }{CSTYLE "Help Heading" -1 26 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning " 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Error" 7 8 1 {CSTYLE "" -1 -1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 0 {PARA 0 "" 0 "" {TEXT 26 8 "Warning:" }{TEXT -1 30 " \+ recursive definition of name" }}}{PARA 0 "" 0 "" {TEXT -1 101 "This oc curs when you attempt to assign a variable a value which contains the \+ name of that variable. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 " x:= 'x':\nx:= x + 1;" }}{PARA 7 "" 1 "" {TEXT -1 37 "Warning, recursiv e definition of name" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"xG,&F$\"\" \"F&F&" }}}{PARA 0 "" 0 "" {TEXT -1 78 "Despite the warning, the assig nment is performed. But an attempt to evaluate " }{MPLTEXT 0 21 1 "x " }{TEXT -1 20 " produces an error:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "x;" }}{PARA 8 "" 1 "" {TEXT -1 35 "Error, too many lev els of recursion" }}}{PARA 0 "" 0 "" {TEXT -1 39 "To evaluate this, Ma ple first replaces " }{MPLTEXT 0 21 1 "x" }{TEXT -1 14 " by its value \+ " }{XPPEDIT 18 0 "x+1" ",&%\"xG\"\"\"\"\"\"F$" }{TEXT -1 12 ". But th en " }{XPPEDIT 18 0 "x+1" ",&%\"xG\"\"\"\"\"\"F$" }{TEXT -1 30 " must \+ be evaluated, obtaining " }{XPPEDIT 18 0 "x+2" ",&%\"xG\"\"\"\"\"#F$" }{TEXT -1 133 ". The process continues in what would be an infinite l oop, except that Maple runs out of stack space and produces the error \+ message." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 17 "The construction " }{MPLTEXT 0 21 7 "x:= x+1" }{TEXT -1 31 " would have been legitimate if " }{MPLTEXT 0 21 1 "x" }{TEXT -1 56 " had ori ginally been assigned a value (not depending on " }{MPLTEXT 0 21 1 "x " }{TEXT -1 20 " itself). Then the " }{MPLTEXT 0 21 1 "x" }{TEXT -1 108 " on the right side would have been evaluated first, and the resul t would be simply to increase the value of " }{MPLTEXT 0 21 1 "x" } {TEXT -1 6 " by 1." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "x:= 3: \nx:= x+1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"xG\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 155 "Thus a common case where this warning arises is \+ when you attempt to change the value of a loop variable, but forget to give this variable an initial value." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 212 "The warning also does not arise in d efining a function. Recursive definitions of functions can be quite l egitimate. Of course you should provide some way of avoiding an infin ite loop in evaluating the function." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "fact:= t -> t*fact(t-1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%factG:6#%\"tG6\"6$%)operatorG%&arrowGF(*&9$\"\"\"-F$ 6#,&F-F.!\"\"F.F.F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "fa ct(0):= 1:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "fact(10);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"(+)GO" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 9 "See also:" }{TEXT -1 1 " " }{HYPERLNK 17 "assignment" 2 "a ssignment" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "Assignments do not commu te" 2 "Assignments_do_not_commute" "" }{TEXT -1 2 ", " }{HYPERLNK 17 " Error: too many levels of recursion" 2 "Error:too_many_levels_of_recur sion" "" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 22 "Maple Advisor Databas e" }{TEXT -1 18 " R. Israel, 1997" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }