Post by matsagos on Nov 21, 2020 12:41:48 GMT -5
Hello every body
I am trying to convert a Run Basic program to Liberty Basic without success.
Can any body help me?
The code in Run Basic is as follows.
I think that the problem is with the writing of sub [alpha] because i have converted many other programs with graphics
Best regards
matsagos
I am trying to convert a Run Basic program to Liberty Basic without success.
Can any body help me?
The code in Run Basic is as follows.
I think that the problem is with the writing of sub [alpha] because i have converted many other programs with graphics
graphic #w,800,600
#w fill("white")
input "Type n" ;n
input "Type x0";x0
for a=1 to 3.55 step .01
gosub [alpha]
#w size(5)
#w color("red")
#w place(300+100*a,300-310*xs(n))
#w box(301+100*a,301-310*xs(n))
#w color("blue")
#w place(300+100*a,300-310*xs(n-1))
#w box(301+100*a,301-310*xs(n-1))
#w color("blue")
#w place(300+100*a,300-310*xs(n-2))
#w box(301+100*a,301-310*xs(n-2))
#w color("blue")
#w place(300+100*a,300-310*xs(n-3))
#w box(301+100*a,301-310*xs(n-3))
#w color("blue")
#w place(300+100*a,300-310*xs(n-4))
#w box(301+100*a,301-310*xs(n-4))
#w color("blue")
#w place(300+100*a,300-310*xs(n-5))
#w box(301+100*a,301-310*xs(n-5))
#w color("blue")
#w place(300+100*a,300-310*xs(n-6))
#w box(301+100*a,301-310*xs(n-6))
#w color("blue")
#w place(300+100*a,300-310*xs(n-7))
#w box(301+100*a,301-310*xs(n-7))
#w color("red")
#w place(300+100*a,300-310*xs(n-8))
#w box(301+100*a,301-310*xs(n-8))
#w color("blue")
#w place(300+100*a,300-310*xs(n-9))
#w box(301+100*a,301-310*xs(n-9))
#w color("blue")
#w place(300+100*a,300-310*xs(n-10))
#w box(301+100*a,301-310*xs(n-10))
next a
#w size(4)
#w color("black")
#w line(0,300,800,300)
#w line(400,0,400,600)
#w size(2)
for h=0 to 800 step 100
#w line(h,0,h,600)
next h
#w size(.5)
for h=0 to 800 step 10
#w line(h,0,h,600)
next h
#w size(2)
for v=0 to 600 step 100
#w line(0,v,800,v)
next v
#w size(.5)
for v=0 to 600 step 10
#w line(0,v,800,v)
next v
render #w
end
[alpha]
dim xs(n+1)
xs(1)=x0
for n=1 to n
xs(n+1)= a*xs(n)-a*xs(n)^2
n=n+1
xs(1)= x0
n=100
print a;"output";xs(n-7);xs(n-6);xs(n-5);xs(n-4);xs(n-3);xs(n-2);xs(n-1); xs(n)
next n
return
Best regards
matsagos