BBC BASIC for Windows
« Filing Problem »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:16pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Filing Problem  (Read 923 times)
DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
xx 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 » User IP Logged

rtr2
Guest
xx 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.
User IP Logged

rtr2
Guest
xx 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls