Personal computing discussed
Moderators: renee, SecretSquirrel, just brew it!
Stranger wrote:what kind of simple games were you thinking of?
oh and one more thing, like random gerble said, I recomend reading alot.
HL2 wrote:oh and one more thing, like random gerble said, I recomend reading alot.
Yeah, I love to read. And I learned a lot about HTML just from reading a couple of books.
random gerbil wrote:First thing you would need a compiler/linker program of some sort. MS Visual C++ for example, though there are free apps available, google around (something called DJGPP comes to mind but im not sure).
Flying Fox wrote:random gerbil wrote:First thing you would need a compiler/linker program of some sort. MS Visual C++ for example, though there are free apps available, google around (something called DJGPP comes to mind but im not sure).
DJGPP is getting really old. I would recommend Dev-C++, it includes an IDE too.
If you are a command-line wiz and don't need/want interactive debugging, then Borland and Microsoft provides their C/C++ compilers for free as well.
Then create a command prompt shortcut with:set path=%path%;insert your path(s) to be added here
Then only those command prompt sessions will contain the longer paths.%comspec% /k "where the batch file is\dcpp-env.bat"
total = 0;
for (i=1; i<=10; ++i)
total += i;
sum [1..10]
What is a "functional programming language"?
Opinions differ, even within the functional programming community, on the precise definition of what constitutes a functional programming language. However, here is a definition that, broadly speaking, represents the kind of languages that are discussed in comp.lang.functional:
Functional programming is a style of programming that emphasizes the evaluation of expressions, rather than execution of commands. The expressions in these language are formed by using functions to combine basic values. A functional language is a language that supports and encourages programming in a functional style.
For example, consider the task of calculating the sum of the integers from 1 to 10. In an imperative language such as C, this might be expressed using a simple loop, repeatedly updating the values held in an accumulator variable total and a counter variable i:
total = 0;
for (i=1; i<=10; ++i)
total += i;
In a functional language, the same program would be expressed without any variable updates. For example, in Haskell, the result can be calculated by evaluating the expression:
sum [1..10]
Here, [1..10] is an expression that represents the list of integers from 1 to 10, while sum is a function that can be used to calculate the sum of an arbitrary list of values.
The same idea could also be used in (strict) functional languages such as SML or Scheme, but it is more common to find such programs written with an explicit loop, often expressed recursively. Nevertheless, there is still no need to update the values of the variables involved:
HL2 wrote:Flying Fox, how would I do that? That sounds good. Then my brother can't mess with my stuff.
I think it won't work, because of the path and it assumes I'm always trying to open a file/folder.