This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthieu Moy wrote:
> You'd better use "Hello world!\n", because the IO are usually buffered
> by your system, and will not appear until your process outputs a '\n'.

All the \n does is outputs a new line, so rather than the program doing
this:

[someuser at aunixmachine ~] $ ./a.out
Hello world![someuser at aunixmachine ~] $ _

it will put the newline on the end of the string, making it look like this:

[someuser at aunixmachine ~] $ ./a.out
Hello world!
[someuser at aunixmachine ~] $ _

Not sure about it not appearing at all.  I think it would appear when
the program ends, but then again, I may be wrong.

>
> But  the solution is  to call  ./a.out, or  to add  '.' to  your $PATH
> environment variable :
>
> PATH=${PATH}:.
> export PATH
>
> using  bash. (Type  it once  in every  new shell,  or put  it  in your
> ~/.bashrc file.)
>

Actually, if you've got root access, you can add the following line to
your /etc/profile, or as above, your ~/.bashrc file:

export PATH="$PATH:."

>
> BTW, forget about kwrite : you should use Emacs or vi ;-)
>

	Actually, gVim may not be such a bad idea.  It's vi, but has a
graphical frontend with menus, etc.  Emacs, yeah, I've used it, not bad,
but I've become a vim person myself.  Also, there's PICO (a really basic
editor), or Jed (quite a nice tool).

	Nothing wrong with kwrite, it isn't too bad to use.  Basically, use
anything you like, just make sure it spits the file out as plaintext
(nothing like MS Word formatting characters to add to the compiller
messages and mangle your code).
- --
+-------------------------------------------------------------+
| Stuart Longland           stuartl at longlandclan.hopto.org |
| Brisbane Mesh Node: 719             http://stuartl.cjb.net/ |
| I haven't lost my mind - it's backed up on a tape somewhere |
| Griffith Student No:           Course: Bachelor/IT @ Nathan |
+-------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1-nr1 (Windows 2000)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+h+6OIGJk7gLSDPcRAokfAJ4pUm501LEt1rls7xkjHsd7QWqxiQCdGho5
GUbrduHom4t3eemZ+LVGa8g=
=ALjO
-----END PGP SIGNATURE-----



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]