主题:请大家帮我分析一个课本例子
DECLARE SUB myswap (m AS INTEGER ,nAS INTEGER)
DECLARE SUB order (x AS INTEGER,y AS INTEGER, z AS INTEGER)
REM main program
DIM a AS INTEGER,b AS INTEGER, c AS INTEGER
INPUT "a,b,c=";a,b,c
PRINT "(1)a=";a,"b=";b,"c=";c
order a,b,c
print "(2)a=";a,"b=";b,"c=";c
end
sub order(x AS integer ,y as integer, z as integer)
if x>y then call myswap(x,y) 在这个子程序时是怎么运算的?
if x>z then call myswap(x,z) 主要分析是怎样传递值的?
if y>z then call myswap(y,z)
end sub
sub myswap (m as integer ,n as integer )
p=m:m=n:n=p
end sub[em18]
DECLARE SUB order (x AS INTEGER,y AS INTEGER, z AS INTEGER)
REM main program
DIM a AS INTEGER,b AS INTEGER, c AS INTEGER
INPUT "a,b,c=";a,b,c
PRINT "(1)a=";a,"b=";b,"c=";c
order a,b,c
print "(2)a=";a,"b=";b,"c=";c
end
sub order(x AS integer ,y as integer, z as integer)
if x>y then call myswap(x,y) 在这个子程序时是怎么运算的?
if x>z then call myswap(x,z) 主要分析是怎样传递值的?
if y>z then call myswap(y,z)
end sub
sub myswap (m as integer ,n as integer )
p=m:m=n:n=p
end sub[em18]