NTRPG.net Board (https://bbs1.ntrpg.net/index.php)
- 剑与魔法[Sword and Magic] (https://bbs1.ntrpg.net/forumdisplay.php?forumid=6)
-- NWN Script常用术语~~! (https://bbs1.ntrpg.net/showthread.php?threadid=3025)
NWN Script常用术语~~!
这个啊~~不要惊讶~和C差不多的,很自由,不像BG2的If……Then逻辑这么死了~
Argument:
see parameter
Break:
Used to stop a loop in progress
Build Here the program takes the code, links the libraries and creates an .exe for us to run.
Compile:
what you do once you've written your code. You run a Compiler program on your source code to create the working version. The compiler takes your code and creates machine language, which is what the computer can actually Execute.
Compiler:
A program used to turn source code into Executable code. Development systems such as Miracle C include a compiler.
Constant:
a fixed value in a program. Minimum and maximum amounts, dates, prices, headlines and error messages are examples. Declared as a Variable in NWScript.
Continue:
Used to make the control of a loop start at the beginning.
Declaration:
the naming and the indication of the type of a Variable or Function. When a Function is declared other information is provided, such as the type of each Argument.
Decrement:
Decrease by 1. This can be done in code using the --. For Example: x --, decreases the value in x by 1
Execute:
synonymous with "run." An executable is a version of a program that can be run (in machine language). The ".exe" extension is short for "executable."
Expression:
are variables, constants and functions that return values, joined by operators. An expression is always something that computes a value. In its simplest form, it is just a variable or constant. For example : x= y+z So "x" is a variable that will give us the value (aka Return the value) of y+z, and the plus sign is an operator.
For:
A for loop causes your program to loop as long as a condition is true. The first parameter declares and initializes the variable, the second sets the condition for the loop to run, and the last increases or decreases the variable. This is called stepping. The format is :
For (nSteps = 0; nSteps<16; nSteps++);
{
Statements
}
Function:
A block of code set up so it can be used repeatedly. Once a function is declared and defined, it can be called whenever that code is needed. When referring to a function we add two parens "()" at the end. A function can have zero or more Arguments (see also Argument).
Goto:
Jumps to a certain part of your code that was assigned a label.
#Include:
An instruction to the Preprocessor to include the contents of a file right there in the source code.
Increment:
Increase by 1. This can be done in code using the ++. For Example: x ++, increases the value in x by 1
Iteration One repetition through the instructions in the loop. See for, while for more information.
Library:
A set of already-Compiled software routines (functions) for programmers. The routines are linked into the program when it is compiled.
Link:
The process of getting an already-Compiled program ready to run. This includes adding any needed Libraries to the compiled program.
Operators:
Operators are things that help the compiler to does calculations. Mathematical operators are addition (+), subtraction (-), multiplication (*), and division (/), while assignment operators are: Equals (=), Plus Equals (+=), Minus Equals (-=), Division Equals (/=), and Multiplication Equals (*=)
Parameter:
information (a variable or a constant in NWScript) that is passed to subroutines or Functions. You will find these in parentheses. For example: Function (Parameter). So when the program calls Function, it will include what's in the parentheses for Function to use. See Function for more information. Parameter and argument are the same thing.
Preprocessor:
A part of the Compiler program that goes through your source code and replaces #include functions with the full code before the Compiler turns the source into machine language. See #include and Compiler for more information.
Precedence:
The order by which things are calculated. They are : Brackets, Multiplication, Division, Addition, Subtraction
Statement:
It is one of: assignment statement or function call. An assignment statement has a variable name on the left, an "=", then an
expression on the right.
String:
a set of alphanumeric characters. Names, addresses and messages are examples of strings.
Variable:
a structure that holds data and is uniquely named by the programmer. It holds the data assigned to it until a new value is assigned or the program is finished. A local variable is one that is referenced only within the subprogram or Function in which it was defined. An Argument is used just like a local variable within a function. A global variable can be used by the entire program, and must be declared outside of any function.
While:
A while loop causes your program to loop as long as a condition is true. The parameter is an expression which is usually an expression.
while (nSteps < 15)
{
Statements
}
X
Y
Z
全部时间为北京时间. 现在时间是 02:31.
Powered by: vBulletin Version 2.2.5
Translated and hacked by: -=CNVBB=-
.
Copyright © Jelsoft Enterprises Limited 2000, 2001.