RE: Pike 8.0 RC1
郭雪松 <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
I am pretty sure that there is some bug in Process.run(). Sometimes, the returned value ->stdout is "", but it should not be. I cannot yet reproduct this bug, buy I know it is there. Process.pmod in Pike 7.8 is ok. Just be ware of it. From: [email protected] To: [email protected]; [email protected] Subject: RE: Pike 8.0 RC1 Date: Sun, 26 Oct 2014 22:36:57 +0800 The CHANGES file: o Added new syntax for literal-string constants #{, #( and #[ starts a literal string, and it is ended by the corresponding end marker: #}, #) and #] respectively. No character is modified at all inside the literal string, including newlines, \ " and '. So, the string #["\n\'##] will be equivalent to "\"\\n\\'#". The main use-case is to write code in code: | string code = #[ | void main(int c, array v) { | string x = ""; | foreach( v[1..], string elm ) | x += reverse(elm)+","; | write("Testing: %s\n", reverse( x )); | #]; The three different start/end markers might be useful if you write code in code in code, since there is no way to quote the start/end markers. o Added the '?:' operator for compatibility with other C-like languages. It is identical to '||' in pike. > Subject: RE: Pike 8.0 RC1 > To: [email protected] > From: [email protected] > Date: Sun, 26 Oct 2014 14:20:01 +0000 > > I've never seen #{ etc, where/when are those used? > > >About '?:' . Is it just equal to '||' ? if so, why should we added > >this? We cannot be compatible with every C-like languages. Why > >should we be compatible with a special one? > > ?: is not equal to || and it has been in Pike since µLPC (1993 or so). > I think it's not a same '?:' we talked about.