![]() | |||||||
Basic Introduction to Programming - Vocab 1 Attachment(s) This is a tutorial that I wrote about a year ago. I remembered I had it, and figured it might be of some help to members here. I have generated a pdf file of this document, so you can download it, print it, etc... Hope it helps! - David ----------------- Introduction to Programming A Guide to Basic Vocab In the process of teaching myself how to program, the most annoying thing I came across (and still come across) is that in all the tutorials I could find, they all used words and vocab that I didnt understand. This tutorial provides very basic definitions to words used in other tutorials. I hope this helps someone, as I have looked far and wide for something as basic as this. In beginning your programming experience, these are some very basic things you need to know, which are terms used in about every programming language tutorial. Compiled from 3 different sources, and edited a good bit, I have tried to put together an easy way to learn programming vocabulary. To begin with, you need to know how to tell the computer to process the code as a certain language, and how to end the code. Remember that every line of code has to end with a semi-colon. To tell the computer to begin processing commands in PHP, and ending it, for example, you would do this: Code:
Now, on to the vocab! Happy Programming! Arguments information that gives further clarification to a command. Example: go (argument); Commands instructions that tell what to do, or how to do something. Example: Go Example: Sit Comments notes you as a programmer can place within a certain script that helps explain a certain statement, or provides other general information about a script. Example: Code:
Conditional statement statements in programming that allow you to test for conditions and execute commands based on those conditions. Example: if ($A=1); { More commands go inside brackets like this, only if A is equal to 1. Make sure to close the bracket that comes after a conditional statement, like this: }; Constant data that never changes in a script it has a constant value. Example: You put a constant at the beginning of your script to make a definition. Example: $A=1; Expression segment of code that results in a value. Expressions exist within statements. Example: Code:
Function provides information on a particular state or condition. It is a block of code that carries out a specific task. Remember that parentheses occur at the end of a function. Example: $A(1*1); Loops the process of continually repeating a section of code, while a certain condition is true, or for a specified number of times. Example: Code:
1. The computer will first see the statement for. As a result, it will move to the first argument, which tells us that $A is equal to 0. 2. It then looks at the middle statement to check if the condition is true. In other words, it looks to see if $A < 100. 3. Finally, it will move to the 3rd argument, which tells the computer to raise the value of $A by 1. 4. Therefore, the above example will be echoed 100 times. Object-Oriented Programming (OOP) A programming approach that groups together data and procedures into a single unit. PHP can be an OOP language. Statement one executable line of code. Dont forget, statements end with a semi-colon. Symbol user-defined constant. In PHP, it always begins with a dollar sign ($). Example: $A Variable holds data that can change while the program is running. Opposite of constant. - A Boolean Variable is a variable which can have only two possible values. |
this is cool. ^^ can u also explain array? |
| All times are GMT -7. The time now is 09:36 PM. |
Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0