{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 1 }{CSTYLE "Help Head ing" -1 26 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Courier " 1 10 255 0 255 1 2 2 2 2 2 1 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {SECT 0 {PARA 0 "" 0 "" {TEXT 26 6 "Error:" }{TEXT -1 22 " re cursive assignment" }}{PARA 0 "" 0 "" {TEXT -1 101 "This occurs when y ou attempt to assign a variable a value which contains the name of tha t variable. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "x:= 'x':\nx := x + 1;" }}{PARA 8 "" 1 "" {TEXT -1 28 "Error, recursive assignment \n" }}}{PARA 0 "" 0 "" {TEXT -1 123 "If Maple were to accept this assi gnment (as it did in previous releases), trouble would occur if you at tempted to evaluate " }{MPLTEXT 0 21 1 "x" }{TEXT -1 29 ". Maple woul d first replace " }{MPLTEXT 0 21 1 "x" }{TEXT -1 14 " by its value " } {XPPEDIT 18 0 "x+1" "6#,&%\"xG\"\"\"F%F%" }{TEXT -1 12 ". But then " }{XPPEDIT 18 0 "x+1" "6#,&%\"xG\"\"\"F%F%" }{TEXT -1 30 " must be eval uated, obtaining " }{XPPEDIT 18 0 "x+2" "6#,&%\"xG\"\"\"\"\"#F%" } {TEXT -1 142 ". The process would continue in what would be an infini te loop, except that Maple would run out of stack space and produces a n 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 originally 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 f irst, and the result 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 153 "Thus a common case where \+ this error arises is when you attempt to change the value of a loop va riable, but forget to give this variable an initial value." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 210 "The error also d oes not arise in defining a function. Recursive definitions of functi ons can be quite legitimate. Of course you should provide some way of avoiding an infinite 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#>%%factGR6#%\"tG6\"6$%)operatorG%&arrowGF(*& 9$\"\"\"-F$6#,&F-F.F.!\"\"F.F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "fact(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 "assignment" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "Assi gnments do not commute" 2 "Assignments_do_not_commute" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "Error: too many levels of recursion" 2 "Error:too_ many_levels_of_recursion" "" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT 26 22 "M aple Advisor Database" }{TEXT -1 18 " R. Israel, 2000" }}}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{MARK "0 12" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }