| 
 
| 
|  Author | Topic: using " DIM"  (Read 483 times) |  |  
| 
| 
| Wendell New Member
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 28
 
 | 
|  | 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)
  r$(K) 
 NEXT K
 
 
 
 I am trying to print "problem"out exp.  PROBLEM (!) etc
 can't get it to work
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| admin Administrator
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 1145
 
 | 
|  | 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.
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Wendell New Member
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 28
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Edja Developer
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 60
 
 | 
|  | 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.
 
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| admin Administrator
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 1145
 
 | 
|  | 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.
 
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Edja Developer
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 60
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Wendell New Member
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 28
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Wendell New Member
 
 
 member is offline
 
  
 
 
 
 
  
 
 Posts: 28
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
 |