Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Dealing with source code

Reply
Thread Tools

Dealing with source code

 
 
mistral
Guest
Posts: n/a
 
      10-06-2006
How to deal with source code? What format need be source files to
compile? I have source code on
html pages, or in .txt format (this is assembler, not c, but there is
no big difference, i think). What suitable editor to edit source code?
Notepad? What format source need be saved? I need compile Nasm source
into exe, parameters is:

nasmw -s -fbin -o filename.s filename.asm

should I run Nasm from MS-DOS window or from Run box?

m.

 
Reply With Quote
 
 
 
 
Cong Wang
Guest
Posts: n/a
 
      10-06-2006


On Oct 6, 4:45 pm, "mistral" <(E-Mail Removed)> wrote:
> How to deal with source code? What format need be source files to
> compile? I have source code on
> html pages, or in .txt format (this is assembler, not c, but there is
> no big difference, i think). What suitable editor to edit source code?
> Notepad? What format source need be saved? I need compile Nasm source
> into exe, parameters is:
>
> nasmw -s -fbin -o filename.s filename.asm
>
> should I run Nasm from MS-DOS window or from Run box?
>
> m.


It's off topic here.
It seems that you work in Microsoft Windows. You can, of course, run
that command in a MS-DOS window.
And you can edit the source code with UltraEdit.

 
Reply With Quote
 
 
 
 
jussij@zeusedit.com
Guest
Posts: n/a
 
      10-06-2006
mistral wrote:

> What suitable editor to edit source code?


Zeus for Windows IDE: http://www.zeusedit.com

Jussi Jumppanen
Author: Zeus for Windows IDE

 
Reply With Quote
 
pete
Guest
Posts: n/a
 
      10-07-2006
mistral wrote:
>
> How to deal with source code? What format need be source files to
> compile? I have source code on
> html pages, or in .txt format (this is assembler, not c, but there is
> no big difference, i think). What suitable editor to edit source code?
> Notepad? What format source need be saved?


C programs are made of text files.
Some compilers expect the name of a C program file
to end in .c, that's specifically a dot followed by a lower case c.
There can also be other extensions on other filenames in a C program.

--
pete
 
Reply With Quote
 
mistral
Guest
Posts: n/a
 
      10-07-2006

pete писал(а):

mistral wrote:

How to deal with source code? What format need be source files to
compile? I have source code on html pages, or in .txt format (this is
assembler, not c, but there is no big difference, i think). What
suitable editor to edit source code? Notepad? What format source need
be saved?

> C programs are made of text files.
> Some compilers expect the name of a C program file
> to end in .c, that's specifically a dot followed by a lower case c.
> There can also be other extensions on other filenames in a C program.


> --
> pete

-------

so, I just need save text file as with c extension, i.e. 'file.c'
(since this file type isn't registered in system, windows will save it
as file.c.txt) Same thing for nasm, i need save file as 'file.s'?

m.

 
Reply With Quote
 
pete
Guest
Posts: n/a
 
      10-07-2006
mistral wrote:
>
> pete писал(а):
>
> mistral wrote:
>
> How to deal with source code? What format need be source files to
> compile? I have source code on html pages, or in .txt format (this is
> assembler, not c, but there is no big difference, i think). What
> suitable editor to edit source code? Notepad? What format source need
> be saved?
>
> > C programs are made of text files.
> > Some compilers expect the name of a C program file
> > to end in .c, that's specifically a dot followed by a lower case c.
> > There can also be other extensions
> > on other filenames in a C program.


> so, I just need save text file as with c extension, i.e. 'file.c'
> (since this file type isn't registered in system, windows will save it
> as file.c.txt)


That won't work if the compiler is looking for file.c
You would need to find some way to end a file name with .c
Maybe you can register the file type
or maybe you can change the file name to file.c
after the editor saves the file as something else.

--
pete
 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      10-07-2006
In article <(E-Mail Removed). com>,
mistral <(E-Mail Removed)> wrote:

>so, I just need save text file as with c extension, i.e. 'file.c'
>(since this file type isn't registered in system, windows will save it
>as file.c.txt)


Recently in one of the newsgroups someone suggested putting "" around
Windows filename to force Windows to accept it exactly as is.

Also, if you have windows show you the file extensions then
you can do a rename of the extension.
--
Prototypes are supertypes of their clones. -- maplesoft
 
Reply With Quote
 
jussij@zeusedit.com
Guest
Posts: n/a
 
      10-09-2006
mistral wrote:

> (since this file type isn't registered in system, windows will
> save it as file.c.txt)


I suspect it is Notepad (or some other application) that is adding
the .txt extension to the file. Not Windows itself.

Jussi Jumppanen
Zeus For Windows - "The ultimate programmer's editor/IDE"
http://www.zeusedit.com

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      10-09-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) writes:
> mistral wrote:
>> (since this file type isn't registered in system, windows will
>> save it as file.c.txt)

>
> I suspect it is Notepad (or some other application) that is adding
> the .txt extension to the file. Not Windows itself.


<OT>
Notepad doesn't add an extension if you specify a file name that
already has one. If you tell it to save to foo.c it will save to
foo.c . If you tell it to save to foo, it will save to foo.txt . If
you tell it to save to "foo" (with the quotation marks), it will save
to foo .

I would expect other Windows text editors and other program to behave
similarly.

I wouldn't use Notepad to edit C code, but I don't do Windows
programming, so I don't have an alternative to suggest.
</OT>

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Coos Haak
Guest
Posts: n/a
 
      10-09-2006
Op 8 Oct 2006 18:53:44 -0700 schreef (E-Mail Removed):

> mistral wrote:
>
>> (since this file type isn't registered in system, windows will
>> save it as file.c.txt)

>
> I suspect it is Notepad (or some other application) that is adding
> the .txt extension to the file. Not Windows itself.
>
> Jussi Jumppanen
> Zeus For Windows - "The ultimate programmer's editor/IDE"
> http://www.zeusedit.com


<OT>
No, it's really you, I'm sorry;-(
Tell Windows to show extensions and it will only add the .txt extension if
you didn't. If you tell it's file.c then it won't add a superfluous .txt.
As simple as that
</OT>
--
Coos
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Panel with vivible=false in source code / large source Jens-Oliver Murer ASP .Net 1 10-17-2008 01:00 PM
Robustify code dealing with input Eric Lilja C Programming 13 06-05-2005 10:34 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi C Programming 0 12-29-2004 05:10 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
can't use View, Source menu to open the source code. Jenny Javascript 3 12-17-2004 07:01 AM



Advertisments