<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<tt>Stefan Hajnoczi wrote:</tt>
<blockquote type="cite" cite="mid:1268560704-12411-2-git-send-email-stefanha@gmail.com">
  
  
  <title>[gPXE-devel] [PATCH] [script] Control flow using if and goto</title>
<!-- Converted from text/plain format -->
  <p><tt><font size="2">...<br>
&nbsp; : &lt;label&gt;<br>
  <br>
&nbsp; Define a label<br>
  <br>
&nbsp; goto &lt;label&gt;<br>
  <br>
&nbsp; Jump to label in a script.&nbsp; Not supported from the shell.</font></tt></p>
</blockquote>
<tt><br>
Suppose I have the following script:<br>
<br>
#!gpxe<br>
set space:hex 20<br>
set colon:string :<br>
set foo:string foo<br>
set mylabel:hex ${colon:hex}:${space:hex}:${foo:hex}<br>
echo Do some stuff<br>
if ${some-condition} goto ${foo:string}<br>
goto end<br>
${mylabel:string}<br>
echo Got to ${foo:string}<br>
: end<br>
<br>
I wanted to confirm that this patch's implementation of ': label' could
never establish a "foo" label due to the expansion and could never
output "Got to foo" regardless of some-condition.&nbsp; Is that so?&nbsp; If so,
does it matter?&nbsp; Might anyone wish to dynamically generate labels for
some reason?<br>
<br>
- Shao Miller<br>
</tt>
</body>
</html>