|
Post by jarychk on Jul 22, 2022 6:58:34 GMT
...not giving any spaces, and I know these should have some.
This whole sample program which fails to give the spaces according to the line of code:
'use between the columns, of 13 13 13
nm1$="conical" nm2$="rectangular" nm3$="square" nm4$="cylinder"
print i;space$(6);nm1$;space$(len(nm1$)-13);nm2$;space$(len(nm2$)-13);nm3$;space$(len(nm3$)-13);nm4$
END
I cannot understand what is wrong that only the first two variables are given the spaceing but the others are smashed together.
|
|
|
Post by jarychk on Jul 22, 2022 7:07:48 GMT
Maybe I found something to help in straightening my own problem in this example try.
Including two different "print" code lines, one of the seems much better than the other:
'use columns of 13 13 13
nm1$="conical" nm2$="rectangular" nm3$="square" nm4$="cylinder"
print space$(6);nm1$;space$(len(nm1$)-13);nm2$;space$(len(nm2$)-13);nm3$;space$(len(nm3$)-13);nm4$ print space$(6);nm1$;space$(13-len(nm1$));nm2$;space$(13-len(nm2$));nm3$;space$(13-len(nm3$));nm4$
END
|
|
|
Post by Rod on Jul 22, 2022 7:33:40 GMT
Since the word conical is seven characters long and you deduct thirteen from it you get minus six spaces! Reverse the maths.
|
|
|
Post by jarychk on Jul 22, 2022 7:41:48 GMT
I figured out the remedy. I believe what I did is same as what you just told me. I see you found what I might do while I was doing it. (Fixed the problem in a different program too.)
|
|