questions about arrays and how to use them....

by mike (no login)

 

ok, heres my problem. im working on WG4 and i was looking at all the variables and the fact i have 21 seperate data files (one for each nation).
it would probably be easier if i used arrays, but i dont know really anything about them. how would i save them into a RA file? and do i have to declare or dim the variables i use in the array?


for example, right now i have this to save data:

for c=1 to 21 :c$=str$ (c)
open "war4-"+ c$ for random as 1
put 1,1,jt%:put 1,2,tr&:put 1,3,ps% (etc, etc)
close
next c


that method creates 21 seperate files to save the data. how do i do the same thing but only have 1 data file? im pretty sure arrays are the way to go, but need help figuring them out.

Posted on Dec 2, 2009, 5:48 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
That takes planning...Pete on Dec 2
 trying to figure out yor code petemike on Dec 3
  Not alone thereUnseenMachine on Dec 3
   He didn't ask anything about FIXED strings. You confused the issue!Clippy on Dec 3
    self evidentUnseenMachine on Dec 3
     Let's see...Clippy on Dec 3
     You are welcome to help out here anytime...Pete on Dec 3
      ok, my badUnseenMachine on Dec 3
      * Were you referring to me or PSET? :-)Clippy on Dec 3
      * oooooh I hates graphics!!!!! PSETPete on Dec 3
       hope this make up for my previous Rodney momentUnseenMachine on Dec 3
        edit...TXT2 = MID$(TXT, CSN,SR)UnseenMachine on Dec 3
         MODS please merge this into last post-another editUnseenMachine on Dec 3
          Perhaps you should change your name to OFTENSEEN...Clippy on Dec 3
           LOL@OFTENSEENPete on Dec 3
  Re: trying to figure out yor code petePete on Dec 3
   thanks pete, clippy, and unseenmike on Dec 4
    * You MIGHT want to save them for a user continue option.Clippy on Dec 4
     no continues in WG4mike on Dec 4
      * Boy are you tough! I wanna cry.....Clippy on Dec 5
    * Why make files just to KILL them? Just use arrays.Clippy on Dec 6
     looking at my program...mike on Dec 6
Arrays store values inside a program. Files save values permanently.Clippy on Dec 2
 thanks clippy.mike on Dec 3
  Fixed length stringsClippy on Dec 3
  About arrays!Cyperium on Dec 5
   My girlfriend will like thatUnseenMachine on Dec 5
    AS is better, but it won't be apparent that it is a string in the code.Clippy on Dec 5

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement