<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>That's correct - it is 1 parameter versus 3, but for a different reason.<br><br><div>DoStuff( a b c )<br><br>Processes each as 3 different variables to be passed, each of type and value a, b, and c respectively.<br><br></div><div>DoStuff( "a b c" )</div><br>Processes it as 1 variable - a string containing the value "a b c".<br><br>If you have the string<br><br><div>DoStuff( "a;b;c" )<br><br>Then that variable will be of the value "a;b;c" with literal semi-colons in it. I believe that was Bill's point.<br></div><br>Ben<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Robert
Dailey <rcdailey@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Bill Hoffman <bill.hoffman@kitware.com><br><b><span style="font-weight: bold;">Cc:</span></b> cmake@cmake.org; a.neundorf-work@gmx.net<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, March 30, 2009 3:47:15 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [CMake] Proper way to define a list<br></font><br>
<div class="gmail_quote">On Mon, Mar 30, 2009 at 2:41 PM, Bill Hoffman <span dir="ltr"><<a rel="nofollow" ymailto="mailto:bill.hoffman@kitware.com" target="_blank" href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Alexander Neundorf wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Monday 30 March 2009, Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
What's the proper way to define a list? Suppose I have 3 words: Foo, Bar,<br>
and Baz. I want these 3 strings to be in a list called Stuff. Would I do<br>
this:<br>
<br>
set( Stuff "Foo;Bar;Baz" )<br>
<br>
Is this correct? <br>
</blockquote>
<br>
Yes, this is identical to<br>
set( Stuff Foo;Bar;Baz )<br>
and also to set( Stuff Foo Bar Baz )<br>
<br>
</blockquote>
<br></div>
Actually set(var "a;b;c") with the double quotes will create a string with literal ;'s in it...</blockquote><div><br></div><div>I thought quotes were used to force whatever is inside of it to be treated as a single parameter. So for example, if I had a function called DoStuff, you could call it 2 ways:</div>
<div><br></div><div>DoStuff( a b c )</div><div>DoStuff( "a b c" )</div><div><br></div><div>My understanding is that the first one will send 3 parameters to DoStuff. The second will send only 1 parameter that is a list of 3 items.</div>
<div><br></div><div>Also, what if I do this:</div><div><br></div><div>set( Stuff foo bar;baz )</div><div><br></div><div>What will happen here? </div></div>
</div></div></div></body></html>