----------1-----------
Cok satır acıklama satırı yapmak/silmek icin, satır/satırları secin ve
CTRL+/
basın.
----------2-----------
yerine (* *) olduğu gibi; [ ] yerine de (. .) yapabilirsiniz...
----------3-----------
Kod:
uses Windows, Messages, SysUtils, klas in 'C:\kutuphanem\klas.pas', //buraya dikkat! Classes;
----------4-----------
Kod:
compile = CTRL+F9 build = Shift+F9
----------5-----------
Kod:
with obj1 do with obj2 do with objn do statement EŞİTTİR: with obj1, obj2, ..., objn do statement
----------6-----------
dinamik cok boyutlu dizi kullanımı
Kod:
var Ints: array of array of Integer; SetLength(Ints,10); //ilk kolon 10 elemanlı SetLength(Ints[2], 5);//5 sutun da 2. boyut icin var (.NET icin) a: array [,,] of integer; // 3 boyutlu dizi b: array [,] of integer; // 2 boyutlu dizi begin a := New(array[3,5,7] of integer); // boyut belirlemek b := New(array[,] of integer, ((1,2,3), (4,5,6))); // ilk değer ataması
----------7-----------
out var gibidir fakat sadece output olacağından ilk değer yollansa bile gozardı edilir.
Alıntı:
procedure GetInfo(out Info: SomeRecordType);
----------8-----------
Dizi parametre ve boyutlu string parametre olarak kullanamasak da cozumu Kod:
var. procedure Check(S: string[20]);
// syntax error, parametrede boyut belirtilemez!
Cozum
Kod:
type TString20 = string[20]; procedure Check(S: TString20);
----------9-----------
parametrede ilk değer atama
Kod:
function MyFunction(X: Real = 3.5; Y: Real = 3.5): Real; olabilir ama, function MyFunction(X, Y: Real = 3.5): Real; // syntax error
----------10----------
Kod:
var Ch: Char; asm MOV CH, 1 //CH char değil cx'in ust byte'ı end;
Cozum
MOV &Ch, 1 //uzerine bindirme operatoru override operator &
----------11----------
Standard rutinler
Procedure or function Description
Addr= Returns a pointer to a specified object.
AllocMem= Allocates a memory block and initializes each byte to zero.
ArcTan= Calculates the arctangent of the given number.
Assert= Raises an exception if the passed expression does not evaluate to true.
Assigned= Tests for a nil (unassigned) pointer or procedural variable.
Beep= Generates a standard beep.
Break= Causes control to exit a for, while, or repeat statement.
ByteToCharIndex= Returns the position of the character containing a specified byte in a string.
Chr= Returns the character for a specified integer value.
Close= Closes a file.
CompareMem= Performs a binary comparison of two memory images.
CompareStr= Compares strings case sensitively.
CompareText= Compares strings by ordinal value and is not case sensitive.
Continue= Returns control to the next iteration of for, while, or repeat statements.
Copy= Returns a substring of a string or a segment of a dynamic array.
Cos= Calculates the cosine of an angle.
CurrToStr= Converts a currency variable to a string.
Dat=e Returns the current date.
DateTimeToStr= Converts a variable of type TDateTime to a string.
DateToStr= Converts a variable of type TDateTime to a string.
Dec= Decrements an ordinal variable or a typed pointer variable.
Dispose= Releases dynamically allocated variable memory.
ExceptAddr= Returns the address at which the current exception was raised.
Exit= Exits from the current procedure.
Exp= Calculates the exponential of X.
FillChar= Fills contiguous bytes with a specified value.
Finalize= Uninitializes a dynamically allocated variable.
FloatToStr= Converts a floating point value to a string.
FloatToStrF= Converts a floating point value to a string, using specified format.
FmtLoadStr= Returns formatted output using a resourced format string.
FmtStr= Assembles a formatted string from a series of arrays.
Format= Assembles a string from a format string and a series of arrays.
FormatDateTime= Formats a date-and-time value.
FormatFloat= Formats a floating point value.
FreeMem= Releases allocated memory.
GetMem= Allocates dynamic memory and a pointer to the address of the block.
Halt= Initiates abnormal termination of a program.
Hi= Returns the high-order byte of an expression as an unsigned value.
High= Returns the highest value in the range of a type, array, or string.
Inc= Increments an ordinal variable or a typed pointer variable.
Initialize= Initializes a dynamically allocated variable.
Insert= Inserts a substring at a specified point in a string.
Int= Returns the integer part of a real number.
IntToStr= Converts an integer to a string.
Length= Returns the length of a string or array.
Lo =Returns the low-order byte of an expression as an unsigned value.
Low =Returns the lowest value in the range of a type, array, or string.
LowerCase= Converts an ASCII string to lowercase.
MaxIntValue =Returns the largest signed value in an integer array.
MaxValue= Returns the largest signed value in an array.
MinIntValue =Returns the smallest signed value in an integer array.
MinValue= Returns smallest signed value in an array.
New =Creates a dynamic allocated variable memory and references it with a specified pointer.
Now= Returns the current date and time.
Ord =Returns the ordinal integer value of an ordinal-type expression.
Pos =Returns the index of the first single-byte character of a specified substring in a string.
Pred= Returns the predecessor of an ordinal value.
Ptr =Converts a value to a pointer.
Random =Generates random numbers within a specified range.
ReallocMem =Reallocates a dynamically allocatable memory.
Round= Returns the value of a real rounded to the nearest whole number.
SetLength= Sets the dynamic length of a string variable or array.
SetString= Sets the contents and length of the given string.
ShowException= Displays an exception message with its address.
ShowMessage= Displays a message box with an unformatted string and an OK button.
ShowMessageFmt= Displays a message box with a formatted string and an OK button.
Sin Returns= the sine of an angle in radians.
SizeOf =Returns the number of bytes occupied by a variable or type.
Sqr= Returns the square of a number.
Sqrt =Returns the square root of a number.
Str= Converts an integer or real number into a string.
StrToCurr= Converts a string to a currency value.
StrToDate= Converts a string to a date format (TDateTime).
StrToDateTime= Converts a string to a TDateTime.
StrToFloat= Converts a string to a floating-point value.
StrToInt= Converts a string to an integer.
StrToTime= Converts a string to a time format (TDateTime).
StrUpper= Returns an ASCII string in upper case.
Succ= Returns the successor of an ordinal value.
Sum =Returns the sum of the elements from an array.
Time= Returns the current time.
TimeToStr= Converts a variable of type TDateTime to a string.
Trunc =Truncates a real number to an integer.
UniqueString= Ensures that a string has only one reference. (The string may be copied to produce a single reference.)
UpCase= Converts a character to uppercase.
UpperCase= Returns a string in uppercase.
VarArrayCreate= Creates a variant array.
VarArrayDimCount= Returns number of dimensions of a variant array.
VarArrayHighBound= Returns high bound for a dimension in a variant array.
VarArrayLock= Locks a variant array and returns a pointer to the data.
VarArrayLowBound =Returns the low bound of a dimension in a variant array.
VarArrayOf =Creates and fills a one-dimensional variant array.
VarArrayRedim =Resizes a variant array.
VarArrayRef= Returns a reference to the passed variant array.
VarArrayUnlock= Unlocks a variant array.
VarAsType= Converts a variant to specified type.
VarCast= Converts a variant to a specified type, storing the result in a variable.
VarClear =Clears a variant.
VarCopy= Copies a variant.
VarToStr= Converts variant to string.
VarType =Returns type code of specified variant.
__________________
Delphi 2005 İpucları
Delphi0 Mesaj
●35 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Programlama Dilleri
- Delphi
- Delphi 2005 İpucları