--------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F1^00007 Date: 01/28/98 From: AUKE REITSMA Time: 08:07pm \/To: CARLTON WALTERS (Read 0 times) Subj: i got another simple question Hi Carlton, On 27 Jan 98, 17:51, you wrote to All CW> the question is if i use typedef enum CW> { jan, feb ,mar etc CW> } mytype; CW> what i am trying to say is does typedef realy create a new data CW> type, or as i think just rename it. I know in c++ when you use CW> classes you create new data types. A typedef does not 'really' created a new data type. It merely assigns a new type-like name to something else. Actually it depends a bit on what you call a 'real' data type ... CW> ... i used void CW> main() the compiler told me main return type has to be an int i CW> know in c++ it can be any type i want including void. is this CW> part of the ansi c stantard that main return type must be int. The ANSI/ISO standard requires that the return type of main() is int. Greetings from _____ /_|__| Auke Reitsma, Delft, The Netherlands. / | \ -------------------------------------- --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F1^00008 Date: 01/28/98 From: AUKE REITSMA Time: 08:15pm \/To: SIMON AVERY (Read 0 times) Subj: traffic Hi Simon, On 26 Jan 98, 22:14, you wrote to Bill Birrell SA> @TAGID: Tag-O-Matic V.13e Reg'd 42d SA> Guten Tag, Bill >>> Auke! - You getting this? Is Zone2 again floating BB>> I've netmailed him at 2:281/400.20. I wouldn't hold my BB>> breath, though. It may take a day or two. Two problems BB>> spring to mind:- BB>> 1) This ruins your moderator nomination :-( SA> Ce la vie... ') C'est la vie, indeed ;-) I still need your email address ... BB>> 2) Unless we can route it through a local call I'm not BB>> volunteering to import it (internet???) direct from USA. SA> Shouldn't be neccessary. Should we wait a while to see if SA> anything pops up, or would it be better for you to ask someone SA> who's already importing Zone1 stuff to bung it on the end? I think you are back again ;-) After a disappearance of some weeks ... Greetings from _____ /_|__| Auke Reitsma, Delft, The Netherlands. / | \ -------------------------------------- --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F1^00009 Date: 01/29/98 From: TOM TORFS Time: 01:09am \/To: CARLTON WALTERS (Read 0 times) Subj: i got another simple question Carlton Walters wrote in a message to All: CW> the question is if i use typedef enum CW> { jan, feb ,mar etc CW> } mytype; CW> what i am trying to say is does typedef realy create a new data CW> type, or as i think just rename it. typedef indeed just provides an alias; in the above example the enum really creates the "data type" (enums are actually represented as ints but you'll get the point). CW> I know in c++ when you use classes you create new data types. C++ classes are somewhat similar to structs in standard C. CW> and also I tried compiling a program under ansi c. i used void CW> main() the compiler told me main return type has to be an int The compiler is right. main() returns an int; 0 or EXIT_SUCCESS for success or EXIT_FAILURE for failure (defined in ). CW> i know in c++ it can be any type i want including void. Really? I doubt that, but then again I don't know much about the C++ andard. CW> is this part of the ansi c stantard that main return type must be CW> int. Yes. The standard allows two forms for main(): int main(void) int main(int, char **) (or equivalent of course) Both return int. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F1^00010 Date: 01/30/98 From: HERBERT BUSHONG Time: 04:53am \/To: ``MATT RAYKOWSKI`` (Read 0 times) Subj: 32bit integers to 16bit i ::> Any comments on loading 16bit files under a 32bit compiler such as quit using the int type, and explicitly use short (or short int). int generally defults to 2 bytes on 16-bit, 4 bytes on 32-bit short is almost always 2 bytes (and it is in your case) long is almost always 4 bytes (and it is in your case). Anytime you are going to read/write from files, be explicit. # Herbert Bushong harchon@centuryinter.net [TEAM OS/2] - Blackbeard's BBS Intelec: 239:600/0 + Fido: 1:19/19 http://www.intelec.com/software/ --- RM 1.31 2508 If hot air rises, why isn't D.C. in orbit around Venus? * Origin: Blackbeard's BBS - Ville Platte, LA - 318-468-3385 (1:19/19) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2100000 Date: 01/31/98 From: TIKA CARR Time: 12:59am \/To: DAVE KELLY (Read 0 times) Subj: Help Needed -=> Quoting Dave Kelly to Roger Scudder <=- DK> I am using Microwares OS9 C compiler. My CPU is a Motorola m68306. DK> What I was looking for is an ANSI compliant version of find first/next DK> that I can use. From what I could gleem from the way these functions DK> were used, I would need to read the directory to confirm that a file DK> was there. I've forwarded this via e-mail to someone I know real well who works for Microware, and trains folks in use of OS-9. If he can find me the answer for you I'll post it to you here. If you have e-mail, you can also contact him t: allenh@microware.com. He specializes in your platform and OS, and does some programming in C himself. Maybe he can help. Tika The 3:00 am Club: http://www.geocities.com/SiliconValley/Haven/1420/ Tika Carr: tika@knightmoves.com [C/C++ Code, Libraries, Info...] ... This *** tagline is *** slightly *** buggy. *** ___ Blue Wave/DOS v2.30 --- QScan/PCB v1.17b / 01-0406 * Origin: Knight Moves - Rochester,NY 716-865-2106 (1:2613/313) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2100001 Date: 01/31/98 From: TIKA CARR Time: 12:59am \/To: SIMON AVERY (Read 0 times) Subj: Help Needed -=> Quoting Simon Avery to Dave Kelly <=- DK> I am not exactly sure what these functions do. Does findfirst just DK> confirm that a file exist? Is the need to read a certain number of DK> charecters neccessary? SA> They're (AFAIK) Borland specific. Their usage is to find the first SA> file of filespec, stuff the details in a ffblk struct. Findnext SA> finds the next. SA> { SA> int done; SA> struct ffblk ffblk; SA> done=findfirst("*.*",&ffblk, FA_DIREC+FA_SYSTEM+FA_HIDDEN+FA_RDONLY); Actually, iirc, they are found in PowerC and Microsoft Quick C 2.5 as well. Tika The 3:00 am Club: http://www.geocities.com/SiliconValley/Haven/1420/ Tika Carr: tika@knightmoves.com [C/C++ Code, Libraries, Info...] ... You have reached tech support. Read the manual. Goodbye. ___ Blue Wave/DOS v2.30 --- QScan/PCB v1.17b / 01-0406 * Origin: Knight Moves - Rochester,NY 716-865-2106 (1:2613/313) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2100002 Date: 01/31/98 From: TIKA CARR Time: 12:59am \/To: GERRY DANEN (Read 0 times) Subj: Geeks & Nerds -=> Quoting Gerry Danen to All <=- Now that* was a rather "entertaining" post. GD> be the future image of IT. Listen up, IT professionals: You're about GD> to become sexier. Hipper. More desirable. If a recent government GD> initiative has its way, the kind of work you do will be getting a GD> heavy-duty promo buff-and-polish from expensive TV ads. Oh great.... !!!! GD> Who knows? How about "Just Code It" with Bill Gates, body rippling and GD> breaking a sweat while pounding out an app in Visual Basic? They not only took over the OS and Browser world, they are after THE world! Imagine them trying to make everyone (literally) into programmers? I mean, sure programming languages may have gotten easier to use, but is that a good thing? I mean, look at me... er... uhm... let's not* look at me. GD> takes off you'll either be seeing a lot of Kim or a lot of celebrities GD> who don't know shell sorts from Shinola. Exactly! And IMHO, they have no business writing a computer program! (just my .02 cents on that issue). GD> According to a study released by the Information Technology GD> Association of America and Virginia Polytechnic Institute, GD> approximately 10% of all IT positions-or 346,000 jobs-are going GD> begging. To help close the gap, the Labor and Commerce departments plan GD> to spend some $28 million to train and recruit newcomers to IT. Makes me wish I knew how to really program, instead of just dabble. :/ But then nobody likes to hire someone who can't get out of the house. GD> Part of the deal is to rid the industry of what some see as an GD> unflattering public image -- the nerd with pocket protector -- by GD> publicizing the glories of IT. I'd like it to stay the way it is, and keep real* programmers in there. When you try to get your grandmother and your 2-yr old writing OS software, in ust 3 weeks, I begin to worry. By "glamorizing" it, they'll bring in all kinds of goofs. You wouldn't like someone like me (who can't even write an app) to write your next OS, now would you? GD> "Programming," she says. "You've Got The Power." Just what we need, more power hunger in the industry. Guess it comes with the territory, but 'ain't we got enough already? GD> A grizzled old-timer with a pockmarked face is lit only by his GD> monitor. He turns toward us. "Two weeks ago I was out on the street GD> without a home, without a job, without a high-school education. IOW, someone gave him some money to say that. In REAL life, things don't work out that way for 99.9% of folks. Most "get rich quick" schemes, as we all know, are scams. It takes years* of hard work and study and 3am sessions, and forgetting if you even went* to bed when you see the sunrise, before you can really turn out a useful application, let alone an OS. Ok, maybe some can do it in less time, but not two weeks! Here I went through years* as described and still* can't program one darn app! And believe me, I tried! GD> crucial code that keeps your computer from crashing. Now I've got a GD> good salary, stock options, all the Jolt cola I can drink, and the GD> unmitigated arrogance that comes with 'em. If I can do it, you can, GD> too." An announcer's voice tells where to E-mail for the free Uh huh. He got it because he said those things in the ad, not because he can program. ;) GD> Since it's crucial to "hook 'em young," expect girls to bond with toys GD> like Talking Programmer Barbie, complete with phrases like "Isn't this GD> little distributed object implementation just so cute?" Oh, pu-leeeeze!!! GD> The secret weapon for luring boys is likely to be a time-tested macho GD> icon making a triumphant return from retirement with a name change. GD> Hey, guys, no pushing for the T-shirt featuring that tough- guy GD> keyboard wizard, Joe Cobol! COBOL??!!! AAAAHAHAHAHA!!! (sorry to the COBOL programmers, no offence ;) I just laughed because unfortunately, I don't think they'll bring that language into the limelight. I wish* they'd bring BASIC more into it, but I think any here would agree, that C is more in position to become most popular. ;) GD> http://www.geocities.com/SiliconValley/Way/9823 Hi neighbor! :) GD> 1 year, 336 days, 3 hours, 13 minutes, and 4 seconds until January 1, GD> 2000. It will sure be interesting to see what happens then! GD> ... Happiness: A modem, a rainy day and e-mail friends. Yup! That's true (and stolen ;) Tika The 3:00 am Club: http://www.geocities.com/SiliconValley/Haven/1420/ Tika Carr: tika@knightmoves.com [C/C++ Code, Libraries, Info...] ... With inflation, my 2 cents is worth a dollar ___ Blue Wave/DOS v2.30 --- QScan/PCB v1.17b / 01-0406 * Origin: Knight Moves - Rochester,NY 716-865-2106 (1:2613/313) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2100003 Date: 01/29/98 From: AUKE REITSMA Time: 08:28pm \/To: JOHN GARDENIERS (Read 0 times) Subj: Pointer To A String Hi John, On 27 Jan 98, 22:21, you wrote to Auke Reitsma JG>>> Writing the docs is by *far* the most unfun part. ... AR>> With a good, careful, systematic and structured design both AR>> the debugging and the writing of the documentation are a snap. JG> Easy for you to say. You've no doubt had many years of practice. Call it decades ;-) JG> I have a background of writing stuff only for my own use. The JG> very concept of docs is still foreign to me. I'm foreign too ;-) And I prefer nurses over docs ... AR>> And note that writing at least half of the docs can be an AR>> inherent part of the design process. JG> Design? I just start with main() and see what happens. Nobody JG> told me I was supposed to design anything. So you're told NOW. Your way of working is very common though. But it leads to bad documentation and, BASICally, spaghetti code. Greetings from _____ /_|__| Auke Reitsma, Delft, The Netherlands.