[advanced search]
Results from the most recent live auction are here.
23 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 06-16-2008, 04:17 PM   · #1
Isis
Think for yourself
 
Isis's Avatar
 
Location: Az
Trader Rating: (6)
Join Date: Sep 2004
Posts: 954
NP$: 104.00 (Donate)
Isis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of light
Child Abuse
I need some BASIC help

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

Quote:
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

Quote:
Dear isis

Thank you very much for the million dollar donation.



any suggestions...

btw, i'm using liberty basic, which is identical to Qbasic ....


Please register or log-in into NamePros to hide ads
__________________
-----------------------------------------------
Great Deals on Cellular Phones
Isis is offline   Reply With Quote
Old 06-16-2008, 04:46 PM   · #2
weblord
www.1weblord.com
 
weblord's Avatar
 
Name: William R. Nabaza - williamrnabaza.com
Location: Philippines - www.Nabaza.com
Trader Rating: (224)
Join Date: Dec 2005
Posts: 18,121
NP$: 17090.78 (Donate)
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
Autism Protect Our Planet
this is their official mailing list HTH
http://groups.yahoo.com/group/libertybasic/
weblord is offline  
  Reply With Quote
Old 06-16-2008, 04:47 PM   · #3
Isis
Think for yourself
 
Isis's Avatar
 
Location: Az
Trader Rating: (6)
Join Date: Sep 2004
Posts: 954
NP$: 104.00 (Donate)
Isis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of lightIsis is a glorious beacon of light
Child Abuse
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
__________________
-----------------------------------------------
Great Deals on Cellular Phones
Isis is offline   Reply With Quote
Old 06-17-2008, 09:15 AM   · #4
tres
You are here: X
 
tres's Avatar
 
Location: US
Trader Rating: (22)
Join Date: Oct 2003
Posts: 422
NP$: 59.75 (Donate)
tres is a jewel in the roughtres is a jewel in the roughtres is a jewel in the rough
Originally Posted by Isis
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.
__________________
tres is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
EscrowDNS Get Your Site Linked at LinkedKeywords.com Buy Flash Arcade Game Script
Advertise your business at NamePros
All times are GMT -7. The time now is 04:06 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0