Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Espi

Calling all programmers!

Recommended Posts

So I've been trying to make this Windows version of swantbls.exe, but right now all progress has halted. There's two things I can't get to work: a display of line number at the status bar, and while the lumps save corretly on some PCs, on some others the lines have garbage at the end. I guess it somehow fails at Edit_GetLine.

It's my first program so it's probably horrible to look at, but I guess I have to take the risk of being laughed at. =P

It be here: http://koti.phnet.fi/repoes/x_x.cpp

Most if not all of the comments are in Finnish since I'm doing it for school, sorry.

If anyone here could take a look at it and point out any noob mistakes, missing/redundant/incorrect/inefficient code and such it'd be highly appreciated. I somewhat understand what is going on but what is the purpose of some of the code is beyond me; I've been building things from example code and stuff.

A .rar with all the files (at least I think that should be all...) and the executable is here if needed.

Edit: Fixed all known bugs, which means it's time for version 1.0. Use it, abuse it, break it (and let me know if you do so I can try fix it).

Get it from here.

Share this post


Link to post

Which compiler are you using? Dev C++ likes it up until the first case statement, probably to do with some header I dont have or something.

Share this post


Link to post

Always comment your code in English unless you are beyond certain that your code won't ever be read by someone who doesn't understand your native language.

Share this post


Link to post

Well like I said it's a school project... have to comment in Finnish.

Share this post


Link to post

That's retarded. I don't see why any school would encourage you not to comment in English; it's on par with telling you not to indent your code, or forcing you to use globals instead of function arguments.

Share this post


Link to post
Fredrik said:

That's retarded. I don't see why any school would encourage you not to comment in English; it's on par with telling you not to indent your code, or forcing you to use globals instead of function arguments.


Or maybe his teacher can't speak English!?

Share this post


Link to post

heh this is a bit off topic but are there multi-lingual(sic) compilers? For example, in English, the "if" statement present in many languages is easy to remember because I know what "if" means in English. But say, theres a French person who doesnt know English (very rare, I know, I'm just using this as an example) could you get a french compiler which would use "Si"?

Share this post


Link to post
insertwackynamehere said:

heh this is a bit off topic but are there multi-lingual(sic) compilers? For example, in English, the "if" statement present in many languages is easy to remember because I know what "if" means in English. But say, theres a French person who doesnt know English (very rare, I know, I'm just using this as an example) could you get a french compiler which would use "Si"?


There are standards for every language and pretty much all of them use the universal set of stuff like if, for, while, do, else etc. If you want to use a foreign language you'll have to invent your own language with its own standard.

Share this post


Link to post
insertwackynamehere said:

[...] I know, I'm just using this as an example) could you get a french compiler which would use "Si"?


Hmm, lets try with Basic in German...

LBS

TUE 
  SCHREIBE "Hallo!"
  EINGABE "Eine Zahl bitte:" ,a
  SCHREIBE "Du hast ";a;" eingegeben"

  WENN a = 0 THEN 
    PRINT "Die Zahl war wirklich 0"
    fertig = 1
  ENDE WENN
ZURÜCK BIS fertig = 1

ENDE
Sorry, but this looks retarded ;)
Programming languages should stay english.

Share this post


Link to post

OnTopic:
When i compile it myself i miss the menubar.
Sorry, i dont do windows gui programming, i do SDL and console :-(

Share this post


Link to post

=(

Well the reasoning for Finnish is that there is less chance that I just copied stuff without trying to understand anything.

Well I still feel like I don't understand much anything, but anyway... help meee! x_x

Share this post


Link to post

i would respon but my pet cat is putting me in extreme pain by biting my arm really hard. &&&{#^$#^$^$$

Share this post


Link to post

Finally the dmn cat let go of me so now i can respond. the most advanced language i remotely know is pascal, but what can you expect from a freshman in highschool?

Share this post


Link to post
Cyb said:

There are standards for every language and pretty much all of them use the universal set of stuff like if, for, while, do, else etc. If you want to use a foreign language you'll have to invent your own language with its own standard.


Or hack an existing one, dehacked style :D

Share this post


Link to post
doom2day said:

Or hack an existing one, dehacked style :D


Yeah.. have fun with that.

Share this post


Link to post

Kleiner Fehler:

Bastet Furry said:

LBS

TUE 
  SCHREIBE "Hallo!"
  EINGABE "Eine Zahl bitte:" ,a
  SCHREIBE "Du hast ";a;" eingegeben"

  WENN a = 0 THEN
    PRINT "Die Zahl war wirklich 0"
    fertig = 1
  ENDE WENN
ZURÜCK BIS fertig = 1

ENDE


:D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×