can you destroy a previously called void?
ame gkkou

hi there im making this simple game with just basic functions like if statements and 2d arrays, so i called in a lot of voids for stage 1, i want to create stage 2 with different voids however they would overlap the previous voids, is there a way to destroy/clear/stop the previous voids?

p.s. im super noob at this my teacher gave us this assignment wthout teaching us anything usefull.

Itachihro

I - and I don't think I'm alone with this - have no idea what you just said. Can you please give a (short) code sample of what you're doing, and in pseudo code what you want to do?

Stas B.

Voids? As in void blah() {}?
These are called functions and no, once you have defined one, it stays and you can't reuse its name. However, you shouldn't need to. Describe what you're trying to do and we'll tell you how to do it properly.

jmasterx

If you mean:

void* blah = malloc(sizeof(Something) * 4);

This would allocate an array of 4 elements.

If you call:

free(blah);

It will destroy all the elements.

But really this is a wild guess on my part.

ame gkkou

sorry about that, the codes is too long to post so i didnt post it all at the first place, anyway here's part of the codes,

#SelectExpand
1#include <allegro.h> 2 3//sets bitmap for objects 4BITMAP* box; 5BITMAP* deadpic; 6BITMAP* buffer; 7BITMAP* loader; 8BITMAP* brick; 9BITMAP* floor; 10BITMAP* door; 11BITMAP* character; 12BITMAP* wall; 13BITMAP* gg; 14BITMAP* win; 15BITMAP* menupic; 16 17 18 SAMPLE *sample; 19 SAMPLE *winsound; 20int panning = 128; 21 int pitch = 1000; 22 int volume = 128; 23int positiona; 24int positionb; 25 26 27 28 29 30 31 32 33//These will hold the player's position 34//instead of using pixels, we will use the position within the 2d array 35int x = 27; 36int y = 20; 37 38int tempX = 27; 39int tempY = 20; 40int a = 13; 41int b = 11; 42 43int tempA = 13; 44int tempB = 11; 45 46//This will hold the value of how many boxes are left outside of the holes. 47int boxes; 48 49//This will be our background, 1 = outer design, 2 = base wall, 3 = floor, 4 = hole //for editing eljean and cath 50int map[24][32] = {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, //1 51 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, //2 52 {1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,0,100,0,0,0,0}, 97 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 98 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 99 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; 100//stage2 101 102void setupGame(){ 103 104 buffer = create_bitmap( 640, 480); 105 loader = create_bitmap( 640, 480); 106 107 box = load_bitmap( "mum3.bmp", NULL); //setup box bitmap 108 boxes = 1; //set up box array number 109 brick = load_bitmap ( "brick.bmp", NULL);//for bg 110 floor = load_bitmap ( "floor.bmp", NULL);//for maze floor 111 door = load_bitmap ( "door.bmp", NULL);//for door 112 character = load_bitmap ( "char2.bmp", NULL);//for char 113 wall = load_bitmap ( "wall.bmp", NULL);//for char 114 gg = load_bitmap ( "gg.bmp", NULL);//for char 115 win = load_bitmap ( "win.bmp", NULL);//for char 116 deadpic = load_bitmap ( "dead.bmp", NULL);//for char 117 menupic = load_bitmap ( "menu.bmp", NULL); 118 119 sample = load_sample("stage1.wav"); 120 121 play_sample(sample, volume, panning, pitch, TRUE); 122 123 for (int i = 0; i <= 24; i++){ 124 125 for( int t = 0; t <= 32; t++){ 126 127 128 if( map[i][t] == 1) draw_sprite( buffer, brick, t * 20, i * 20);//warning 129 else if( map[i][t] == 2) draw_sprite( buffer, wall, t * 20, i * 20); 130 else if( map[i][t] == 3) rectfill( buffer, t * 20, i * 20, (t + 1) * 20, (i + 1) * 20, makecol( 7, 7, 7)); 131 else if( map[i][t] == 4) draw_sprite( buffer, door, t * 20, i * 20); 132 133 } 134 135 } 136 137 for (int i = 0; i <= 24; i++){ 138 139 for( int t = 0; t <= 32; t++){ 140 141 if( objMap[i][t] == 100) draw_sprite( buffer, character, t * 20, i * 20); 142 else if( objMap[i][t] == 101) draw_sprite( buffer, box, t * 20, i * 20); 143 144 } 145 146 } 147 148 draw_sprite( screen, buffer, 0, 0); 149 150} 151 152void winstate() { 153 154 clear_to_color(buffer, makecol (0, 0, 0)); 155 clear_bitmap(buffer); 156 157 draw_sprite( buffer, win, 0, 0); 158 159 160 161} 162 163 void dead() { 164 165 clear_to_color(buffer, makecol (0, 0, 0)); 166 clear_bitmap(buffer);

so all i want is to "stop" or "destroy" the void setupGame() so that i can call a new setup game for stage 2 or restart the previous setupgame for stage1.

Steve Terry

.... by that I believe all you need is an if statement.

jmasterx

If you want to 'stop' a function as you said you simply write 'return'

void stop(bool someCondition)
{
   doStuff();
   
   if(someCondition)
   return;

   doMoreDtuff();
   
}

Stas B.
ame gkkou said:

so all i want is to "stop" or "destroy" the void setupGame() so that i can call a new setup game for stage 2 or restart the previous setupgame for stage1.

Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name. The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level. However, your code looks like a real mess and doesn't make much sense. Describe what you're trying to do so we could advise you a proper way to do it.

Steve Terry

Technically with execp you can destroy the entire call stack and replace it with a new applicatoin. All you need is stage1.exe, stage2.exe, etc. :P

LennyLen
Stas B. said:

The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level.

That might be easy, but it will scale poorly and is a bad way of doing things. There should only be one function that performs setup for the game itself and it should only ever be called once. If there is also setup required for each level, then a second function should be used that is written in such a way that the same function is called for every level of the game. This will deal with both cases of replaying the current level and starting the next one.

Stas B.
LennyLen said:

Stas B. said:
The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level.

That might be easy, but it will scale poorly and is a bad way of doing things. There should only be one function that performs setup for the game itself and it should only ever be called once. If there is also setup required for each level, then a second function should be used that is written in such a way that the same function is called for every level of the game. This will deal with both cases of replaying the current level and starting the next one.

All I said is that if he needs to do level-specific setup for each level, he needs to write a different setup function for each level and call the appropriate one. I think it's pretty clear that he doesn't need to reload the graphics that don't change.

LennyLen
Stas B. said:

All I said is that if he needs to do level-specific setup for each level, he needs to write a different setup function for each level and call the appropriate one.

That is still the wrong approach. IF there ends up being a twenty different levels, do you expect him to have twenty separate loading functions? And if the game gets extended to a hundred levels, write a hundred loading functions?

Stas B.
LennyLen said:

That is still the wrong approach. IF there ends up being a twenty different levels, do you expect him to have twenty separate loading functions? And if the game gets extended to a hundred levels, write a hundred loading functions?

If there ends up being twenty different levels, he can either learn file I\O and design a general map format, or write twenty different functions that do the LEVEL-SPECIFIC setup. Where does it say in my post "you should also repeat the non-level-specific code every time and under no circumstance put it in a function of its own like LennyLen said". ::)

Don't you have anything better to do than arguing for the sake of argument?

Thomas Fjellstrom
Stas B. said:

Don't you have anything better to do than arguing for the sake of argument?

Pot meet kettle.

bamccaig

Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files. :-X

Stas B.

Pot meet kettle.

Really? I think you're #1 around here when it comes to that, going as far as to show up suddenly in a thread and say something silly and irrelevant just to spite me, without offering any insight or valid points. ::)
You know, like you did in the particle thread? Like you're doing in this one?
At least when I post, I bring up some information or actual points that have to do with the matter at hand.

bamccaig said:

Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files.

My point exactly. That's why I suggested that he just write separate functions to setup each level. And of course, he should do as Lenny says and put the non-level-specific setup code in its own function. I really don't see how these two things are mutually-exclusive and what he's trying to argue with me about.

Anyway, enough spamming this thread. :-/

LennyLen
Stas B. said:

Don't you have anything better to do than arguing for the sake of argument?

The reason why I'm disagreeing with you is because you are advocating the case of using poor programming practices to a beginner. The only reason for ever writing specific code for each level of a game would be of the mechanics for each level were so vastly different that a universal loader would end up being larger than individual loaders, and such a case would be extremely rare. A sufficiently experienced programmer should be able to tell when this would actually be the case, but a beginner (such as the OP) should be encouraged to take the correct approach rather than the east approach until they have enough experience to determine for themselves what approach is best in a case by case need.

I actually took care with my previous posts to not discuss how such a function should be implemented as it goes beyond the scope of this thread. Should the IP want to learn how to do it correctly they can start a new thread. For now it is simply enough that they are made aware that there is a better (though admittedly more initially complicated) way of doing this.

bamccaig said:

Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files.

Maybe so. However, a beginner is also not going to know the quality of the advice they have been given, which is why I wanted to make it known to them that the approach Stas B may be initially easier, but is ultimately the wrong way.

Edit: post was typed from my phone, so please forgive typos.

Stas B.
LennyLen said:

The reason why I'm disagreeing with you is because you are advocating the case of using poor programming practices to a beginner.

Have you actually bothered to read the OP at all?

First of all, I'm not advocating poor programming practices. I'm trying to help the guy finish his task with whatever tools he's got at his disposal. Teachers don't give students exercises so they could figure out on their own what's the proper way to do things. They give exercises so the students could practice using whatever tools they've learned about so far. He didn't come here for you to teach him "proper programming practices". He's got a teacher for that.

For example, if a teacher gives you a task of sorting a bunch of numbers so you could practice ifs and fors and you come back with an implementation of quicksort some wiseguy gave you on a forum, you have achieved nothing, even if quicksort is more proper than bubble sort. ::)

Second, there's a lot of things wrong with his code. Either show him how to really do it right, or show him the least evil way to complete the task given his current knowledge. There's no justification for your arbitrary choice of which faults are allowed to a beginner and which aren't.

In short, the reason we're disagreeing is that you're trying to be a smartass.
Unless, of course, you can show us a way to do level-specific setup without file I\O that is significantly better than what I suggested.

LennyLen
Stas B. said:

There's no justification for your arbitrary choice of which faults

are allowed to a beginner and which aren't.

I haven't been arbitrary as I have said a single thing about any of his code. The only fault I have pointed out was yours.

Quote:

In short, the reason we're disagreeing is that you're trying to be a smartass.

And you're taking things far too personally.

Stas B.
LennyLen said:

I haven't been arbitrary as I have said a single thing about any of his code. The only fault I have pointed out was yours.

That's besides the point. If you were worried about teaching beginners proper programming practice, you would have given him some good advice. Instead, you seem far more focused on trying to invalidate my post.

Quote:

And you're taking things far too personally.

I don't take anything personally. I know some people just like to be smart-asses. I will continue to defend what I have said until you properly address my arguments and prove me wrong. (Which is unlikely, seeing as you deliberately and consistently ignore the better ones.)

bamccaig

LennyLen isn't necessarily wrong. Neither is Stas. B. Everybody chill the fuck out! I got this.

Given that the OP is a student, it's likely that he isn't supposed to properly modularize his program yet. That said, given the level of proficiency demonstrated by the OP, I find it hard to believe that he'd be given such a demanding assignment anyway. Something is rotten in Denmark...

It might be best for the class to band together and protest the assignment until they're taught enough to accomplish it. Of course, the OP could be one of those people that doesn't belong in a CS program, doesn't pay attention, doesn't read the assigned chapters from the textbook, or doesn't ask for help during class; and is now struggling to turn in an overdue assignment that he should've learned how to complete. There were many people like this in college.

Many just didn't get it and expected the instructor to wave a magic wand and make them. No matter how much extra attention the instructors gave them they just didn't get it. I don't think it's something that can really be taught (obviously the language syntax and rules can be, but how to understand the pieces and assemble them into a program is more hard-wired I think). You either have it or you will struggle to do it (and therefore do a bad job and not enjoy it). At least in my experience. You'll note that there doesn't seem to be any sense of order in the formatting of the OP's code, which is an indication to me that this may be the case (I don't think there was ever a time that I wrote poorly formatted code, but maybe that's just part of my OCPD nature; I know that you'd lose marks if you handed in poorly formatted code in college ). If the OP truly isn't trying then the only thing we can responsibly do is troll him. ;D

Of course, sometimes instructors do jump ahead without realizing it... That can happen. It seems strange for any instructor to assign a game assignment at a beginner level so perhaps this is just a matter of the OP over-complicating his assignment. It takes quite a bit of practice and knowledge to build a game, and it would be silly to fail an assignment because you tried to far exceed the requirements. If this is the case then I would suggest doing only what is actually required first and then, with a separate copy, return to your "game" and continue trying to work it out as an extra-curricular. At least then you'll have something to hand in if you can't make the game work.

LennyLen
Stas B. said:

I will continue to defend what I have said until you properly address my arguments and prove me wrong. (Which is unlikely, seeing as you deliberately and consistently ignore the better ones.)

What arguments are you referring to? You've basically only said two things, one which I disagreed with and the second one, which is fix his code, I'm certainly not going to do as 1) I don't believe in doing people's homework for them and 2) trying to write and format good code on a phone is far too time consuming.

If the O P asks specific questions about doing things, I'd gladly try to help. His question from this thread has already been answered however.

Stas B.
LennyLen said:

What arguments are you referring to? You've basically only said two things, one which I disagreed with and the second one, which is fix his code, I'm certainly not going to do as 1) I don't believe in doing people's homework for them and 2) trying to write and format good code on a phone is far too time consuming.

I'm getting tired of this.
Look, if you want to justify your criticism, there's two ways you can do that:

1. Prove that I did something wrong in showing him one possible way to finish his task (which I think we can agree has more to do with basic programming syntax and constructs than with proper level loading) rather than making a futile attempt to teach him proper game programming, or just giving him some ambiguous and pointless piece of advice like yours. (Let's face it - you haven't been very helpful. I'm certainly not a beginner and even I'm not quite sure what you were talking about in your post.)

2. Prove that I tried to imply that my suggestion is the proper way to load a level. (My post actually implies that it's a simple but not necessarily correct solution and that the proper way to do it depends on the details and purpose of the task)

You can prove neither, so quit it.
Your arguments are invalid.

LennyLen
Stas B. said:

I'm getting tired of this.

I'm certainly not, and since I'm now sitting at a keyboard, why don't we begin again.?

There is no "proof" for anything, at least not that you will ever accept, but here are some more rebuttals for you.

Quote:

1. Prove that I did something wrong in showing him one possible way to finish his task

All you told him was that it was an easy way. You made no attempt whatsoever to educate him as to why while it might be an easy solution it is not a good one. <i>That<i> is something you did wrong.

Quote:

Let's face it - you haven't been very helpful. I'm certainly not a beginner and even I'm not quite sure what you were talking about in your post.

As I already said (and for someone who has already questioned whether or not I rwad the original post, you seem to be showing a remarkable lack of evidence of reading yourself), I deliberately didn't go into detail, as such detail is beyond the scope of the original query. If ame gkkou would like details of how to write such a function, all (s)he need do is ask in another thread. I've written many a level loading function, so would be happy to make suggestions about how to do so.

Also, I wasn't trying to be useful to ame gkkou, as you had already answered his question. My post was entirely directed at you, not him.

Quote:

Prove that I tried to imply that my suggestion is the proper way to load a level.

Why would I want to prove something I never claimed you did? Again, please show some reading comprehension if you want to start making such statements.

Quote:

(My post actually implies that it's a simple but not necessarily correct solution and that the proper way to do it depends on the details and purpose of the task)

It does? Where? In case you never actually read your own post, I'll quote it again for you: "Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name. The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level. However, your code looks like a real mess and doesn't make much sense. Describe what you're trying to do so we could advise you a proper way to do it."

I emphasized one line as it's the only part that really matters. Everything before that is quite correct and has nothing to do with what we are now discussing. Likewise, your last statements are also quite correct, and again has nothing to do with what we are now discussing.

So, since only the bold sentence is what we are currently talking about, could you please elucidate for us exactly how that implies that it's not necessarily correct? Perhaps you assumed that people would infer that from what you have written, but you in no way whatsoever implied anything of the sort.

p.s. On reflection, if the very last sentence of that post is referring to loading levels, then I'll grant that you were then attempting to imply that what you had suggested was not the proper way. However, that sentence is actually following on from another sentence entirely, it appears you are just trying to tell him that his messy code is not the proper way.

Quote:

You can prove neither, so quit it.

I choose when I quit things, sorry. And I need give no proof, as I'm countering what you originally said. The burden of proof is actually therefore on you.

Quote:

Your arguments are invalid.

So is that claim if you will not justify why you believe it to be so.

Stas B.
LennyLen said:

All you told him was that it was an easy way. You made no attempt whatsoever to educate him as to why while it might be an easy solution it is not a good one. <i>That<i> is something you did wrong.

I made no attempt to educate him as to why it may not be a good solution because for all I know, it may be a good solution. It depends entirely on the context, as I have already explained. I had no reason to believe that anything more complex was appropriate in this case, however, I did ask him to elaborate on the task so we could give more appropriate advice.

Quote:

On reflection, if the very last sentence of that post is referring to loading levels, then I'll grant that you were then attempting to imply that what you had suggested was not the proper way. However, that sentence is actually following on from another sentence entirely, it appears you are just trying to tell him that his messy code is not the proper way.

It does imply that his code is not the proper way (as it was supposed to), but first and foremost, it implies that the proper way depends on what the task is all about. (Which in turn implies that I may suggest something different when I have more details.) It should be clear that this is the primary meaning because the second post is basically a paraphrase of the first one, where I say exactly the same things before even seeing his code.

Quote:

I choose when I quit things, sorry. And I need give no proof, as I'm countering what you originally said. The burden of proof is actually therefore on you.

The burden of proof is on you because I'm not the one making the claim.
If I were to say that X is the proper way to do Y, then the burden of proof would be on me.
What we have instead is that I said X is an easy way to do Y and you claim I shouldn't have said that because it serves to mislead a beginner.
If you don't even realize a simple thing like this, I'm not sure there's a point to keep up this discussion. :-/

LennyLen
Stas B. said:

The burden of proof is on you because I'm not the one making the claim.

Actually, you DID make a claim, (which is that it is easier), without justifying it. For the record, I'm not disputing that it is easier, but only pointing out that if you expect me to justify everything I say, then you must also do so.

Also, since you appear to have missed it completely, I did actually give justification for my claim in my very first post.

Quote:

If you don't even realize a simple thing like this, I'm not sure there's a point to keep up this discussion.

You keep making statements like this that indicate that you don't want to discuss this any more, yet you keep continuing to post. Why? Nobody is forcing you to, and I doubt anyone would care at all whether you post or not.

Stas B.
LennyLen said:

Actually, you DID make a claim, (which is that it is easier), without justifying it. For the record, I'm not disputing that it is easier, but only pointing out that if you expect me to justify everything I say, then you must also do so.

Also, since you appear to have missed it completely, I did actually give justification for my claim in my very first post.

I honestly have no idea what your point is.
There's no need to justify claims we both agree on.
We are discussing your claim that I shouldn't have offered solution X to problem Y because it counts as advocating a bad programming practice to a beginner. It's entirely up to you to prove this claim and that won't happen until you offer a proof that I can't refute. I have refuted your proofs and you have neither addressed my arguments nor offered any new proof, therefore your claim is so far unjustified.

Quote:

You keep making statements like this that indicate that you don't want to discuss this any more, yet you keep continuing to post. Why? Nobody is forcing you to, and I doubt anyone would care at all whether you post or not.

Sometimes you know better than doing something but go ahead and do it anyway. I have a weakness when it comes to unsettled arguments. :-/
All I'm saying is that you're not faring too well so far (showing ignorance of the basic principles of debate), so you should save yourself further embarrassment and save me this waste of time and quit it. I am going to mercilessly destroy any proof you offer untill you give up.

[EDIT]

Look, basically, you lose this one automatically.
What counts as a "proper" solution to a problem depends on the context.
Whether it is acceptable or not to show a beginner a sub-optimal solution also depends on the context.
Whether or not my post gives the misleading impression that the offered solution is THE proper way to load levels is a matter of opinion at best.
The guy is gone, the context isn't clear, whether my statement has served to mislead him isn't clear, so you technically can't prove what you need to prove to win. Go away. :-/

GibbSticks

Wow good job helping out this new programmer guys, if youre going to argue and ramble on about whose right and whose wrong at least do it with private messages instead of completely destroying this guys thread.

Stas B.

@GibbSticks: Yeah, I'm sure your post serves much purpose in this thread. I really don't think he cares much for this thread. His questions had been answered long ago. You're just feeling left out of the fun. Come on, join in. We can debate whether it's acceptable or not to recycle this thread for a debate. ::)

LennyLen
Stas B. said:

Look, basically, you lose this one automatically.

Lose what? Is there some sort of competition going on? Does this have anything to do with the little hissy fit you threw at Tomasu earlier?

Quote:

The guy is gone, the context isn't clear, whether my statement has served to mislead him isn't clear, so you technically can't prove what you need to prove to win. Go away.

You still seem to be failing to understand an extremely important thing here which is that I haven't at any point tried to prove anything. You're the only one who cares about proof. I said ages back that I can't offer any proof you would accept, so I'm not even going to attempt to.

You're actually taking this all quite seriously aren't you? As I already said, don't take things personally, and maybe have a long look at yourself and see if you can figure out why it's important to you to be RIGHT when nobody else cares.

Stas B.
LennyLen said:

Lose what? Is there some sort of competition going on? Does this have anything to do with the little hissy fit you threw at Tomasu earlier?

Lose the argument.
It doesn't matter if you care or not. Just stating a fact.
What does Thomas have to do with anything?
What makes you think I was angry at him?
I simply pointed out that he's clearly in no position to make his remarks if we consider the contents of his own posts.

Quote:

You still seem to be failing to understand an extremely important thing here which is that I haven't at any point tried to prove anything. You're the only one who cares about proof. I said ages back that I can't offer any proof you would accept, so I'm not even going to attempt to.

You're actually taking this all quite seriously aren't you? As I already said, don't take things personally, and maybe have a long look at yourself and see if you can figure out why it's important to you to be RIGHT when nobody else cares.

That's the problem. I thought we were having a discussion but all you do is spew nosense without making any valid points. I thought you just don't have the mental capacity to realize that. Turns out you're just not trying? What is the point of your incoherent babbling then, if it doesn't serve to validate your original claim?

Maybe you should take a look at yourself and see if you can figure out why it's important for you to keep up your irrelevant rethoric when you know how pointless it is. Why is it so important for you that the last word be yours, even if your last word is a load of nonsense?

I don't take things personally and it's not important for me to make you see that I'm right. I just don't like to leave things hanging. Seeing as you have no more valid arguments and resort to silly ad-hominem attacks, this discussion is closed.

LennyLen
Stas B. said:

What does Thomas have to do with anything? I thought you just don't have the mental capacity to realize that. Turns out you're just not trying? What is the point of your incoherent babbling then, if it doesn't serve to validate your original claim?

I'm simply curious. It appeared that you were annoyed with him, so I was wondering if that caused an emotional response for you, which then caused you to act differently than normal. Such thinks interest me as I have HFA and generally find I rarely have emotional responses to anything, so when it appears that others are having them, I like to know what is happening exactly. I wondered if that was why you would continue to post when you no longer felt it was necessary, purely out of emotional reasons.

Mental capacity is quite prickly really. I spent a week going through WAIS testing about a decade ago, and ended up with an estimated IQ score of around 160. However I still have no idea why people do things, even though I can study somebodies reactions for weeks.

As to validating the original claim, I felt no need to continue to do so, as i felty I had already done so. Since I also felt that everything you said after "Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name" was irrelevant in answering the OPs question, since you had already done that with the one sentence, everything you said afterwards was mere conjecture and therefor no longer entirely serious discussion. That's most likely just my take on things however, and I concede that you probably didn't see it that way.

Since this obviously then begs the question "Why do something if it's not important?" I also then ask "What is important?" This entore thread is a single trivial matter in the scope of this site, this site is inconsequential in the scope of the internet. The internet itself is really quite irrelevent when you compare it to the whole gamut of human endeavors. And humanity in turn means nothing on a universal scale. So the answe to the begged question, and the answer to why I do anything really is "I felt like it."

Quote:

Maybe you should take a look at yourself and see if you can figure out why it's important for you to keep up your irrelevant rhetoric when you know how pointless it is. Why is it so important for you that the last word be yours, even if your last word is a load of nonsense?

I could ask the same of you since I consider posting when you don't seem to want to to be nonsensical.

Quote:

I don't take things personally and it's not important for me to make you see that I'm right. I just don't like to leave things hanging. Seeing as you have no more valid arguments and resort to silly ad-hominem attacks, this discussion is closed.

There were no ad-hominem attacks as I made no comments about you personally, and certainly didn't try to use a comment about you to counter anything you said. If you perceived anything I said to be a personal attack, then you were mistaken (and if you let me know what you thought were, I can try to clarify what I actually meant to you).

Stas B.
LennyLen said:

I'm simply curious. It appeared that you were annoyed with him, so I was wondering if that caused an emotional response for you, which then caused you to act differently than normal

It's not different than normal for me. It's what I sound like without that thin veil of politeness. It's not my nature, to be polite. It's a burden and I see no reason to keep it up when dealing with obvious trolls.

Quote:

I wondered if that was why you would continue to post when you no longer felt it was necessary, purely out of emotional reasons.

I don't like to leave things hanging. Call that an emotional reason if you like.

Quote:

Mental capacity is quite prickly really. I spent a week going through WAIS testing about a decade ago, and ended up with an estimated IQ score of around 160. However I still have no idea why people do things, even though I can study somebodies reactions for weeks.

With an IQ like yours, you should be looking for a cure to cancer. Too bad you waste your brilliance trying too hard to sound smart on the internet.

Quote:

As to validating the original claim, I felt no need to continue to do so, as i felty I had already done so.

Well, it's nice that you felt that way, but that's in your head. In the real world, it remains completely arbitrary untill you offer a proof that I can't counter with a valid argument. If you don't care to do that, that's perfectly fine. That discussion is closed and your criticism remains arbitrary.

Quote:

Since I also felt that everything you said after "Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name" was irrelevant in answering the OPs question, since you had already done that with the one sentence, everything you said afterwards was mere conjecture and therefor no longer entirely serious discussion. That's most likely just my take on things however, and I concede that you probably didn't see it that way.

Since this obviously then begs the question "Why do something if it's not important?" I also then ask "What is important?" This entore thread is a single trivial matter in the scope of this site, this site is inconsequential in the scope of the internet. The internet itself is really quite irrelevent when you compare it to the whole gamut of human endeavors. And humanity in turn means nothing on a universal scale. So the answe to the begged question, and the answer to why I do anything really is "I felt like it."

Herp derp. There you go again, babbling nonsense, trying to be a smartass. Good job.

Quote:

I could ask the same of you since I consider posting when you don't seem to want to to be nonsensical.

That didn't make any sense.

Quote:

There were no ad-hominem attacks as I made no comments about you personally, and certainly didn't try to use a comment about you to counter anything you said. If you perceived anything I said to be a personal attack, then you were mistaken (and if you let me know what you thought were, I can try to clarify what I actually meant to you).

Wow, you're actually right this time. Since you weren't even trying to say anything relevant or have an actual discussion, your nonsense about me having a "hissy fit" and being too concerned with proving myself to random internet people can't even be considered ad hominem.

Thread #610133. Printed from Allegro.cc