File extension

this is an extremely weird question, but is it possible to define and write your own file extension. if so is it an easy process or a complex waste of time

all I want to do is define a source file for a programming lang I write
closed account (18hRX9L8)
Yes you can, but it will be like a text file. For example: you save a file with an extension rndm. So on the desktop the file looks like: example.rndm. When you click on it, it will say: Windows doesn't know how to open this file. Please select a program and you can open it with your TextEditor or IDE. It will open just like a text document. So, there is really is no point for changing up the file extension (Although, I guess it makes you feel cool). Also, if you change your file extension to .exe or .vbs ... They are already predefined so you might lose all your data in the file. That is why it is safe to save text files with no extension, because libraries like <iostream> etc.. are just "Files" with no extension.

I believe this correct but if someone else with more knowledge could come in and help that would be nice.
Last edited on
In linux/unix systems, file extensions don't matter as much. You can either have them or do without them. Windows on the other hand is quite fussy about this.

Filename extensions are really just the type of encoding the content of your file is in. So, if you are making a new programming language, you have to find a way to teach your computer the encoding and syntax of your program then create an extension for it which the computer will recognize.

umm, gl
I know it was just a text file but I didn't know it was that simple

thanx
Topic archived. No new replies allowed.