Re: [q-lang-users] where
Brought to you by:
agraef
From: Rob H. <hub...@gm...> - 2006-10-10 09:34:40
|
If you wish to use "let" syntax, then the "let" clause could end in "in" rather than a semi-colon: let N = #S - 1 in strip C S = strip C $ sub S 0 (N-1) if (S!N = C); that would prevent it looking like a separate definition. Further definitions sharing the let clause could be separated by something like "and also" (as opposed to "and" or "and then"). I can't see a way to provide elegant, "Q-ish" nesting without a terminating delimiter for a let clause though. This: let T2 = 2*T in let S = T2+1 in f T = sin S //"end let" and also let P = T2-1 in g T = cos P; //"end let" //"end let" would still be ambiguous: which "let" does the "and also" match? An "end let" would just produce blocks, which Albert has already indicated would not be in keeping with Q. It's a problem. Rob. PS. It's just "Mr." :-( but I'm perfectly happy being referred to as just "Rob". |