Re: TIB: Re: TI-89 Basic question
[Prev][Next][Index][Thread]
Re: TIB: Re: TI-89 Basic question
In a message dated 03/23/2000 6:48:08 PM Eastern Standard Time,
gbjohnson@yahoo.com writes:
<< you can't combine numbers and letters like that. try:
disp "y="&string(m)&"x+"&string(b)
you have to convert the variables m and b into strings, which is done
by string(). and to display several strings together, you have to use
&. >>
yeah, i thought that might be the problem, but wasnt sure how to go about
getting around it.
however, for whatever reason now, it's still not working as it should. the
program is, again, at the bottom of this mail. still, the slope calculation
part works fine. this time, with 2 for x, 3 for y, 7 for xx, and 7 for yy,
the y=mx+b part is displaying "y=4/5x+c=3-mx" (keeping in mind that the "c"
is the b part of the equation since thats what i stored that as).
program is below, any help is appreciated (by the way, this is my first shot
at any 89 basic programming. did a decent amount of 86 basic [although
nothing too complex], but this is my first try at 89) (also, another note.
for some reason, it doesnt let me set c as a local variable. if i do that,
when ran, the program gives me a "arguement must be a variable name" error
message.)
()
Prgm
Local x,y,xx,yy,m,b
Prompt x,y,xx,yy
(yy-y)/(xx-x)»m
Disp "Slope is"
Disp m
solve(y=mx+c,c)»b
Disp "y="&string(m)&"x+"&string(b)
EndPrgm