Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with Strings
#1
Hi Guys,

I'm far away from being a programmer and I need a Tip to deal with strings.

Several times I have to create a code with a lot of strings

Ex:
HtmlDoc d.InitFromWeb("http://www.googgle.com")
ARRAY(str) a; d.GetTable(6 a)

int i nc=2
ICsv x._create; x.ColumnCount=nc
for i 0 a.len/nc
str& firstCell=a[i*nc]
firstCell.rtrim("?")
x.AddRowSA(i nc &firstCell)

But then I'd like to duplicate the code right below the previous, seeking to change the web page (Ex). Which results in "this variable is already declared".

So I have to rename all the strings...this is very tiring.

Do you have any tip to help me ?

Thank you.
#2
http://www.quickmacros.com/help/QM_Help ... NTIPS.html
http://www.quickmacros.com/help/Other/I ... MACRO.html

Macro Macro2764
Code:
Copy      Help
sub.Func "http://www.googgle.com"
sub.Func "http://www.googglee.com"


#sub Func
function str'url

HtmlDoc d.InitFromWeb(url)
ARRAY(str) a; d.GetTable(6 a)

int i nc=2
ICsv x._create; x.ColumnCount=nc
for i 0 a.len/nc
,str& firstCell=a[i*nc]
,firstCell.rtrim("?")
,x.AddRowSA(i nc &firstCell)
#3
Thanks.
I'll study this material.


Forum Jump:


Users browsing this thread: 1 Guest(s)