BBC BASIC for Windows
« using " DIM" »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:48pm



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: using " DIM"  (Read 484 times)
Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx using " DIM"
« Thread started on: Feb 27th, 2014, 05:36am »

pr$="PROBLEM"
DIM pr$(10)
FOR K= 1 TO 10
*FONT TERMINAL,10
PRINT TAB(39,25)laughr$(K)

NEXT K



I am trying to print "problem"out exp. PROBLEM (!) etc
can't get it to work
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: using " DIM"
« Reply #1 on: Feb 27th, 2014, 07:55am »

on Feb 27th, 2014, 05:36am, Wendell wrote:
I am trying to print "problem"out exp. PROBLEM (!) etc

I'm very sorry, but I can't figure out what it is you are trying to do, and your code doesn't make a lot of sense. You subject line is "using DIM" but you don't seem to need an array at all!

Can you attempt another explanation please, perhaps with an example of what you want the output to look like?

Please try to choose a more appropriate section to post in than 'General'.

Richard.
User IP Logged

Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx Re: using " DIM"
« Reply #2 on: Feb 27th, 2014, 10:25am »

thank you will wait until i get more familiar with programing before i ask questions.


PROBLEM (1)
PROBLEM (2)
PROBLEM (3)


I WA TRYING TO PUT PR$ IN A ARRAY TO PRINT 10 TIME IN A LOOP
User IP Logged

Edja
Developer

member is offline

Avatar




PM


Posts: 60
xx Re: using " DIM"
« Reply #3 on: Feb 27th, 2014, 12:20pm »

I suppose the following is already closer to what you are trying to do. At least it corrects a few mistakes and should help you further on the way.

*FONT TERMINAL,10
DIM pr$(10)
pr$()="PROBLEM"
FOR K= 1 TO 10
PRINT TAB(15,K) K pr$(K)
NEXT K

But it's not very clear what you are trying to do.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: using " DIM"
« Reply #4 on: Feb 27th, 2014, 3:28pm »

on Feb 27th, 2014, 12:20pm, Edja wrote:
*FONT TERMINAL,10
DIM pr$(10)
pr$()="PROBLEM"
FOR K= 1 TO 10
PRINT TAB(15,K) K pr$(K)
NEXT K

But it's not very clear what you are trying to do.

Although that code works fine, it works equally well without using an array at all:

Code:
pr$="PROBLEM"
FOR K= 1 TO 10
    PRINT TAB(15,K) K pr$
NEXT K 

Richard.
User IP Logged

Edja
Developer

member is offline

Avatar




PM


Posts: 60
xx Re: using " DIM"
« Reply #5 on: Feb 27th, 2014, 9:39pm »

Based on the subject line "Using DIM" I assumed Wendell was trying to figure out how to work with the DIM statement and how to initialize arrays. So I've stayed close to the original code and only corrected a few mistakes.

But indeed there is no need for an array at all.

Eddy
User IP Logged

Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx Re: using " DIM"
« Reply #6 on: Feb 28th, 2014, 6:17pm »

yes thank you ,,experimenting with the DIM statement can be mind bogging . thanks again
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: using " DIM"
« Reply #7 on: Feb 28th, 2014, 10:38pm »

on Feb 28th, 2014, 6:17pm, Wendell wrote:
experimenting with the DIM statement can be mind bogging

Have you worked through the relevant chapter of the Beginners' Tutorial?

http://www.bbcbasic.co.uk/bbcwin/tutorial/chapter14.html

Richard.
User IP Logged

Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx Re: using " DIM"
« Reply #8 on: Mar 1st, 2014, 01:41am »

I have browse that area. sometime a little confusing. i have some knowledge of liberty basic. I get them confuse sometimes. But i love BBC basic . especially Graphics or printing in FONTS AND COLORS.MUCH easier that liberty basic
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