Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Fri Dec 03, 2010 10:45 pm   

[Help File] #DEBUGFILE
 
In the help file documentation for #DEBUGFILE it states to use the following:

#DEBUGFILE testraw.txt test.txt

However, I believe it should be the following:

#DEBUGFILE test.txt test.raw

At least that is the instruction that has been posted in every forum post that I have come across.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Fri Dec 03, 2010 10:47 pm   
 
By the way, does it slow down Cmud in any way while using #DEBUGFILE logging? I am just curious.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Dec 06, 2010 5:02 pm   
 
It doesn't matter what the actual file names are.

And yes, since CMUD is writing every network packet to the log files, the #DEBUGFILE logging will slow it down.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Dec 09, 2010 12:37 am   
 
That makes absolutely no sense to me. So I could give it an extension of .exe and it wouldn't matter?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Dec 09, 2010 1:13 pm   
 
Why would it matter? You can name anything you want .exe, or .db, or .doc. If you renamed a Word document to .exe, you could still open it in Word. The icon would be different, unless you manually changed the icon. Filename extensions are a convention which Windows takes (in my opinion, excessive) advantage of, not a rigorous standard. Windows will assign default programs to open files with specific extensions when you double click them, but when you are manually specifying a filename to open, you can use any extension you want.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Fri Dec 10, 2010 11:51 pm   
 
Don't be ridiculous. No you cannot. Well I mean you can but then you would have to manually specify what program to open it. Windows isn't Unix.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Dec 11, 2010 6:10 pm   
 
Actually Rahab is mostly correct. Windows uses the file extension to determine what application to use to open the file when you double-click on it in Windows Explorer. But that's it. Otherwise Windows doesn't care about file names.

For example, you can do this if you want:
Code:
#DEBUGFILE LogFile.EXE
#READ LogFile.EXE

and CMUD will write the log to the EXE file and read it with the #READ command just fine. The file extension has nothing to do with the actual data format within the file.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 11, 2010 7:12 pm   
 
Well of course you could. But should we really be doing something like this?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Dec 13, 2010 1:25 am   
 
You seem to think that the filename extension means a lot more than it does. Yes, you can, and there is no reason not to allow it. You can use any extension you want. In any case, in your original question, you suggested that the raw file should be text.raw. There is absolutely no reason to do that, since .raw isn't even an extension that Windows would recognize.

And yes, I have in fact named Word documents with extensions other than .doc, and can to read them just fine in Word later. The extension only tells Windows what software to use as a default. You can tell it to use anything you want.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Mon Dec 13, 2010 6:24 am   
 
Rahab wrote:
You seem to think that the filename extension means a lot more than it does. Yes, you can, and there is no reason not to allow it. You can use any extension you want. In any case, in your original question, you suggested that the raw file should be text.raw. There is absolutely no reason to do that, since .raw isn't even an extension that Windows would recognize.

And yes, I have in fact named Word documents with extensions other than .doc, and can to read them just fine in Word later. The extension only tells Windows what software to use as a default. You can tell it to use anything you want.


Okay this conversation is becoming so ridiculous now. I did not suggest anything. ZUGG is the one that tells everyone in every post explaining to use #DEBUGFILE to use test.txt and test.raw. Of course raw isn't an extension of a Windows program. However, file extensions identify the type of file and usually what program can open it. If you want to change text files to have an .exe extension feel free. I think it is silly, but whatever. Lets take an example, you create a text file in Notepad. Write the line "This is a test." and save it with an .exe extension. Now double click on it and Windows will throw an exception for illegal instruction because it identifies that file as a program. The same thing happens if you give it an extension of something like .jpg. Windows will identify it as an JPEG image file and you cannot open it unless you manually specify to open with Notepad. So the statement "The extension only tells Windows what software to use as a default." is important.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Dec 13, 2010 6:35 pm   
 
This is why the documentation is actually correct. When I tell people to use test.raw and send me the file, I'm just saving a few keystrokes in the file name. I can read the test.raw file just fine here because I'm replaying it in CMUD using the #READ command and am never trying to open the file in Windows. The documentation tells you to use the .txt extension which is better practice for Windows.

In any case, let's close this topic. I'm not changing the documentation as suggested in the original post.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net