NameSilo

I need some BASIC help

SpaceshipSpaceship
Watch

Ixix

Think for yourselfEstablished Member
Impact
58
hi,

i took basic way back in community college and haven't looked at it since...
now i'm working on a little project for myself and am stuck.

btw, i'm using basic cuz it's simple for my application, and was the fastest thing i could download on my computer

anyway

lets say i have a file with a letter template

Dear <User Name>

Thank you very much for the <doodad>.

please

What i want to do in BASIC is to go into the file, create string variables for the <tags> then print the letter to a new file.

for example
Code:
input "username";username$
input "doodad";doodad$

so if i put username = isis and doodad = million dollar donation the letter would read

Dear isis

Thank you very much for the million dollar donation.

any suggestions...

btw, i'm using liberty basic, which is identical to Qbasic ....
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
i know i know....but finding what i'm looking for is like a needle in a hay stack...
i even posted the question there
 
0
•••
Isis said:
i know i know....but finding what i'm looking for is like a needle in a hay stack...
i even posted the question there

basic does not have a regular_expresion so you will have to use instr to find the start of the string to replace, i.e.
Code:
instr(txt$, '<name'>)

I don't remember how to replace strings in basic but in in perl, you can use something like
Code:
$string =~ s/regex/replacement/g;

The whole thing could be done in a few lines of perl or php.. which are much better for these types of task.
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back