I stand corrected...here's the modified code then:
int main(void)
{
printf("\a");
return(0);
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Hamish Moffatt
Sent: Friday, April 21, 2000 12:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Programing in C...
On Thu, Apr 20, 2000 at 08:02:32AM -0700, Michael Anderson wrote:
> if you just want a beep, then try for more portable code:
> #include <stdio.h>
>
> void main(void)
> {
> printf("\7");
> }
Actually, printf("\a") would be more portable. \7 assumes your computer
is using the ASCII character set.
If you want to get really picky, a lot of ANSI C compilers will not
compile "void main" because it is not a valid prototype for main.
main must return an int.
Hamish
--
Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>