Espi Posted March 2, 2005 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. 0 Share this post Link to post
Joe Posted March 2, 2005 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. 0 Share this post Link to post
Fredrik Posted March 3, 2005 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. 0 Share this post Link to post
Espi Posted March 3, 2005 Well like I said it's a school project... have to comment in Finnish. 0 Share this post Link to post
Fredrik Posted March 3, 2005 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. 0 Share this post Link to post
Naked Snake Posted March 3, 2005 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!? 0 Share this post Link to post
insertwackynamehere Posted March 3, 2005 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"? 0 Share this post Link to post
Cyb Posted March 3, 2005 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. 0 Share this post Link to post
Bastet Furry Posted March 3, 2005 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. 0 Share this post Link to post
Bastet Furry Posted March 3, 2005 OnTopic: When i compile it myself i miss the menubar. Sorry, i dont do windows gui programming, i do SDL and console :-( 0 Share this post Link to post
Espi Posted March 4, 2005 =( 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 0 Share this post Link to post
doom2day Posted March 4, 2005 i would respon but my pet cat is putting me in extreme pain by biting my arm really hard. &&&{#^$#^$^$$ 0 Share this post Link to post
doom2day Posted March 4, 2005 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? 0 Share this post Link to post
doom2day Posted March 4, 2005 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 0 Share this post Link to post
iori Posted March 4, 2005 doom2day said:Or hack an existing one, dehacked style :D Yeah.. have fun with that. 0 Share this post Link to post
Graf Zahl Posted March 4, 2005 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 0 Share this post Link to post
fraggle Posted March 5, 2005 I rewrote swantbls when I was working on SMMU. Try this. 0 Share this post Link to post
Bastet Furry Posted March 5, 2005 Graf Zahl said:Kleiner Fehler: :D Ups... *pfeifflöt* egal... sieht trotzdem dämlich aus ;) 0 Share this post Link to post
Espi Posted March 17, 2005 I edited the post? And I'd like people to try the utility. 0 Share this post Link to post