<div dir="ltr"><div><font face="monospace, monospace">Thank you Adam for pointing out the errors in my previous attempts doing pattern-matching on a record.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">As a test, I'm now trying a very simple pattern as follows:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  fun getSomeColNam someCols =</font></div><div><font face="monospace, monospace">    case someCols of </font></div><div><font face="monospace, monospace">        { colNam = _ , </font><span style="font-family:monospace,monospace">... } => colNam</span></div><div><font face="monospace, monospace">      | _ => error</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">I'm still getting syntax errors:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  syntax error: replacing  OF with  LPAREN</font></div><div><font face="monospace, monospace">  Field name not constant in pattern</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">The syntax errors always start at the position of the keyword `of` - but I assume the error could be elsewhere (later) in the pattern.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">I'm trying to follow the syntax for the "flexible record pattern" from page 14 of the manual:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  {(x = p,)+, ... }            flexible record pattern</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">I can't find the error in my syntax.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">---------</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Observation: </font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Assuming that fields are un-ordered, the above example may not only be very *simple* - it might also be *non-deterministic*, as it seems like it could match an *arbitrary* field name.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">This apparent non-determinism might be somehow related to the error itself in the above syntax.</font></div><div><br></div></div>