Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 2nd, 2006, 11:05 AM   #31
notchent
Newbie
 
Join Date: Jun 2006
Posts: 1
Rep Power: 0 notchent is on a distinguished road
It's not for C language, but you may find the following tutorial useful. It helps you get a lot of useful things accomplished right away:

http://musiclessonz.com/rebol_tutorial.html
notchent is offline   Reply With Quote
Old Jun 5th, 2006, 5:10 PM   #32
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
I'm on float and stuff right now.. but can one do OOP in C? Or can that only be done in C++ or is it better to wait untill I start with c++?

what say ye?

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old Jun 5th, 2006, 5:31 PM   #33
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Object oriented design is an approach, not a language feature. Hardware and mechanical designers use it all the time. Think of it that way. A wheel is an object, rolling it is a procedure. The software gurus that have all you guys thinking it's a language feature ought to be stood against a wall and de-nutted.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 5th, 2006, 5:58 PM   #34
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
oh... still... is it possible to approach it in c? unless that was your way to say yes

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old Jun 5th, 2006, 6:42 PM   #35
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 579
Rep Power: 5 Benoit is on a distinguished road
That was DaWei's way of saying yes...Object-oriented concepts can be applied in C by using things such as structures/unions
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Jun 19th, 2006, 10:45 AM   #36
SittingDuck
Programmer
 
SittingDuck's Avatar
 
Join Date: Nov 2005
Location: Moseley, Birmingham, England, Earth
Posts: 51
Rep Power: 4 SittingDuck is on a distinguished road
Quote:
Originally Posted by thondal
when i said more complex ways of making the program wait i meant like you said for example an endless loop
Don't do that - don't use endless/intensive wait loops under an operating system - it's not fair on other programs - the OS thinks you're actually doing something so keeps switching control back to you, instead of spending time with other programs. Use a function from the operating system instead to wait for something.
SittingDuck is offline   Reply With Quote
Old Jul 6th, 2006, 6:56 AM   #37
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
Feel like I'm almost done with C now. Like the learning face. Allthough I'm not good at it yet, but does anyone think there would be a problem for me to now move on to C#? Any advice here (I'm hoping I don't have to learn c++ first... no special reason, just want to start with C#)

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old Jul 6th, 2006, 1:29 PM   #38
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
An English-Norwegian ddictionary program is harder than it sounds, as you'd have to take into account various conjugations, inflections, etc., i.e. you'd have to make sure that it knew that "work", "works", and "worked" were the same word. You'd have to do the same on the Norwegian end as well, which may be worse (I'm not sure how inflected the Norwegian language is.) The problem would be exacerbated by the fact that Norwegian wasn't designed as a translation of English. I don't speak Norwegian so I can't give any concrete examples, but there are certainly many words in English such that one word represents the meanings of many diverse Norwegian words; the opposite is also true. If that's not enough for you yet, the whole mess is made worse by the fact that neither "English" nor "Norwegian" are unified and standardized languages. We're talking about something that grew naturally, not something like Esperanto. There are numerous important variations in English. "Color" or "colour"? "Diaper" or "Nappy"? "Burglarize" or "Burgle"? As you're well aware (but I'll mention for the sake of anyone else who's reading this) there are a great deal of spoken dialects of Norwegian, and the written language has been polished and standardized into two competing and significantly different forms, namely Nynorsk and Bokmål.

If this hasn't been enough to deter you, then by all means, go ahead!
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials.
--WilliamSChips on Slashdot
uman is offline   Reply With Quote
Old Jul 6th, 2006, 1:33 PM   #39
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
Responding to your other post, no, there's no reason to move to C#. You'll have to unlearn some of the things about pointers and memory management you learned in C though to program in C#.

Kilo might not like you for it, but a lot of us would agree that C# is a great (and easy!) language.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials.
--WilliamSChips on Slashdot
uman is offline   Reply With Quote
Old Jul 6th, 2006, 2:06 PM   #40
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
Thank you for that Uman I thought through it here a while ago, and decided not to... instead I decided to try to make a text based game, like the ones they used to make around the mid 80's and early 90's, you can see what i've done so far (30 min) further down the page.

Quote:
Originally Posted by uman
Responding to your other post, no, there's no reason to move to C#. You'll have to unlearn some of the things about pointers and memory management you learned in C though to program in C#.

Kilo might not like you for it, but a lot of us would agree that C# is a great (and easy!) language.
You kind of talked against yourself there.... Did you mean that I should not move over to C#?, anywais, I'm not nearly through with C yet. Here is why. I'm thinking that when this text based "game" is done and working, I can move on

here's what i've got... any comment? just worked about 30 min on it or so.
It's not good at all, but it is a start i guess. Haven't learned if and else yet... oh well..

#include <stdio.h>

int main()
{
    char navn[25];
    char rase[15];
    char sex[8];
    char klasse[15];
    char svar[5];
    
    printf("Welcome to \"Lands End\" rpg game.\n\nTake on the role as a Hero in an ever growing world,\nwhere you can decide the fate of the world you are in.\n");
    gets(svar);
    printf("The God \"...\" has given you life.\nUse it to promote goodness in this world, be neutral or aid the darkness.\n");
    printf("First, what is the name you whish to be known by?\n");
    gets(navn);
    printf("Are you Male or Female?\n");
    gets(sex);
    printf("Are you an Elf or Human?\n");
    gets(rase);
    printf("Are you, a fighter, mage or ranger?\n");
    gets(klasse);
    printf("\n\nWelcome to \"Lands end\" %s,\nYou enter this world as a %s %s, and belong to the race of %s.\nYour powers grow as you train, use them wisely...\n",navn,sex,klasse,rase);
    gets(svar);
    printf("\n\n");
    printf("First all you see is a bright shining light. Then everything turns dark. \n\nYou can feel your body, but it feels to heavy to move.\n But then, you hear a distant sound, almost like mumbling.\nYou concentrate and try to make out the words \n\n");
    gets(svar);
    printf("\"Hey, are you okey?\" \n\"Can you hear me?\"");
    printf("\n\nYou open your eyes and can faintly make out the face of what looks like a %s,\nstanding next to you.",rase);
    getchar();
    return(0);
}

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC