[Mono-list] perl script -- alternative?
Daniel Carrera
dcarrera@math.toronto.edu
Thu, 18 Apr 2002 17:17:19 -0400 (EDT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---2140912637-1515467118-1019164639=:173346
Content-Type: TEXT/PLAIN; charset=US-ASCII
Here's another file.
Erik wrote:
...
> D:\mono>autogen.pl test.def --debug
> DEBUG: OS = 'MSWin32'
> DEBUG: OS recognized?... yes
> DEBUG: PATH = 'D:\mono
> '
> DEBUG: NAMESPACE = 'mono
> '
> DEBUG: VERBOSITY = 0
> ERROR: Could not open //.cs for writing
I think that this is because Windows terminates lines with the \r\f
characters instead of \n. I think I've fixed that. Again, I only have
Linux to test on.
Also, if it still can't open the right file, the program won't die.
Instead, it will print to STDOUT.
Can you redirect output in Windows?
On Thu, 18 Apr 2002, Jaak Simm wrote:
...
> If I am not mistaken unimplemented events should look something like this:
>
> [MonoTODO]
> public event ConvertEventHandler Format
> {
> add { throw new NotImplementedException (); }
> remove { throw new NotImplementedException (); }
> }
Thanks. Actually, I thought that events were like methods. Now you can
type events likeso:
SomeEvent{ar}
It behaves just like properties. The a's are replaced by the 'add' lines,
and the r's by the remove's.
Do you always have to have both when you implement evetns?
If not, how do you know which one to put in?
Thank you both for the help.
Cheers,
Daniel.
---2140912637-1515467118-1019164639=:173346
Content-Type: APPLICATION/x-perl; name="autogen.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.A41.4.30.0204181717190.173346@coxeter.math.toronto.edu>
Content-Description: 0.0.8
Content-Disposition: attachment; filename="autogen.pl"
IyEvdXNyL2Jpbi9wZXJsIC13CnVzZSBHZXRvcHQ6Okxvbmc7CgoKIwojIENv
bW1hbmQtbGluZSBvcHRpb25zLgojCm15ICRUT0RPICAgID0gMTsgIyBEZWZh
dWx0cyB0byAndHJ1ZScuCm15ICR2ZXJib3NlID0gMDsgIyBEZWZhdWx0cyB0
byAnZmxhc2UnLgp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