Author Topic: How to start out?  (Read 2885 times)

Which is what crashing means.
Crashing is a complete halt of the game.

Crashing is a complete halt of the game.
And the game completely halts when you input an infinite loop, because it's so busy processing that it becomes non responsive.

And the game completely halts when you input an infinite loop, because it's so busy processing that it becomes non responsive.
No, a crash is when there is an unhandled error, completely halting the program, meaning the program cannot continue running, which means no processing. None. At all.

Ok, I got that done, what do you guys recommend me doing next?
Functions with parameters and return values. You can pass values into functions, like this:
Code: [Select]
function average(%a, %b, %c, %d, %e){
     return((%a + %b + %c + %d + %e) / 5);
}
echo(average(4, 6, 92, 84, 244));

This would echo the average of 4, 6, 92, 84, and 244, which is 86, in the console. Return basically makes a function act like a variable.

This code:
Code: [Select]
function getThree(){
     echo("The number three");
     return 3;
}
echo(getThree());
will echo "The number three" and return 3, which is passed into echo at the end.

Sorry if I didn't explain this well enough, I'm not too good at teaching.
« Last Edit: September 03, 2012, 09:54:25 AM by Scars75 »

No, a crash is when there is an unhandled error, completely halting the program, meaning the program cannot continue running, which means no processing. None. At all.
An infinite loop is by definition an unhandled error, which halts the program from processing anything beside it. This fits the definition of a crash, you are wrong if you say it doesn't.

An infinite loop is by definition an unhandled error, which halts the program from processing anything beside it. This fits the definition of a crash, you are wrong if you say it doesn't.
The OS doesn't halt it nor does the program try to kill itself, it's not really a crash.

This will loop for a very long time but eventually end:
for(%a = 0; %a >= 0; %a++) { }

This will loop forever:
while(true) { }

An infinite loop is by definition an unhandled error, which halts the program from processing anything beside it. This fits the definition of a crash, you are wrong if you say it doesn't.
Infinite loops can only cause a crash if it causes an exception in the program, which is what i meant by unhandled error. You know, like an stack overflow/math overflow, an out of bounds exception (in other languages), etc.

Infinite loops can only cause a crash if it causes an exception in the program, which is what i meant by unhandled error. You know, like an stack overflow/math overflow, an out of bounds exception (in other languages), etc.
A crash doesn't have to be caused by an exception in the program. Those, actually, would be considered a runtime error not a crash.

The OS doesn't halt it nor does the program try to kill itself, it's not really a crash.
The OS rarely halts a program and thus has no relation to a crash, and crashes tend to be unintentional so neither of those supposed crash scenarios are actually crashes. They're a task being forced closed and a program ending itself.

A crash doesn't have to be caused by an exception in the program.
No.
« Last Edit: September 03, 2012, 02:50:42 PM by Ipquarx »

I don't really know what to reply to that, except that by definition that is a run time error. Regardless, my first point still stands. A crash is not mandated by a run time error.
« Last Edit: September 03, 2012, 02:49:24 PM by TripNick »

Sorry, I only meant to quote the first part of your post.

Sorry, I only meant to quote the first part of your post.
Then you quoted the part of my post that you prove nothing about.

Quote
An application typically crashes when it performs an operation which is not allowed by the operating system.

What you just said is the exact technical definition of exception.

What you just said is the exact technical definition of exception.
No, it isn't. Note the word typically. Apparently it's including run-time errors in it's definition of crash. Go open Blockland. Go type in crash(); into console. See how many run time errors pop up. I'll save you the time, zero. Go get a stuffty old xbox and follow some tutorial on youtube to make a game crash. See how many run time errors occur. Zero again. That's not the definition anyone uses for crashing nor is it appropriately broad.

Quote from: wikipedia
A crash (or system crash) in computing is a condition where a computer or a program, either an application or part of the operating system, ceases to function properly, often exiting after encountering errors.

Now that is the correct definition of crash, from the same exact page of Wikipedia.
« Last Edit: September 03, 2012, 03:01:50 PM by TripNick »

Last time I checked, typing crash(); actually makes a crash happen, unlike an infinite loop.