Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
simonuk74
17
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 3rd Nov 2002 15:13
hi,

I need some help in saving arrays.
when I select to save the current info, I need to save 3 arrays, I want to save all 3 with a user-chosen filename, but with the extensions, `.LOC , .SFT & .ITM`. how can I alter a user-chosn string ?
I tried..
SAVE ARRAY "C:\SAVEDATA\";FILE$;".LOC",LOC(0)
but just gives a syntax error, it seems I need to create the string completely before hand, so
SAVE ARRAY SAVEFILE$,LOC(0) would work ?

if so, how do I write the code to do this..
`savefile$=drive/path/filname.LOC,
where the drive, path and filename are user-chosen ?

TIA

Simon
Shadow Robert
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Nov 2002 17:24
simple... with strings you use the "+" operator
so SAVE ARRAY "C:\SAVEDATA\"+FILE$+".LOC",LOC(0)

however setting up strings before hand would make more sense - and allows for editing before hand.
And remember you can't write or save to something that is already there (db can't overwrite) so you'll have to check prior to doing so

Anata aru kowagaru no watashi!
simonuk74
17
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 3rd Nov 2002 18:22
Thanks very much, Raven

great help!

simon

Login to post a reply

Server time is: 2020-07-14 22:05:37
Your offset time is: 2020-07-14 22:05:37