Author |
Topic: Filing Problem (Read 923 times) |
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: Filing Problem
« Reply #1 on: Dec 9th, 2014, 08:52am » |
|
Hi Tom,
By inserting PRINTs in varied places, it appears that the problem actually arises when you get to the
Code:
PRINT#channel%,"Number of people it will serve " numofpeople%
The problem is you have a string and then a variable with no separator. Try sticking a comma in (for each of those lines).
As you say, you'll need to use STR$(num) to convert the numbers to ascii equivalents.
best wishes,
D
|
| « Last Edit: Dec 9th, 2014, 08:53am by DDRM » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Filing Problem
« Reply #2 on: Dec 9th, 2014, 12:09pm » |
|
on Dec 9th, 2014, 08:00am, tomwalford wrote:| One of my students has an issue with a problem he has been set (by me) and I'm struggling to see why his code doesn't work. |
|
You posted exactly the same question at BBC-BASIC-ICT and I've replied there.
Richard.
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Filing Problem
« Reply #3 on: Dec 9th, 2014, 12:44pm » |
|
on Dec 9th, 2014, 08:52am, DDRM wrote:Try sticking a comma in (for each of those lines). As you say, you'll need to use STR$(num) to convert the numbers to ascii equivalents. |
|
Just to clarify, you can do one or the other; so either of these changes will avoid the error:
Code:PRINT#channel%, "Number of people it will serve ", numofpeople%
PRINT#channel%, "Number of people it will serve " + STR$(numofpeople%) I explain in my reply at BBC-BASIC-ICT some of the issues surrounding the choice between these options.
Richard.
|
|
Logged
|
|
|
|
|