Difference between revisions of "Reserved words/pl"

From Free Pascal wiki
Jump to navigationJump to search
(→‎Reserved words in Turbo Pascal: tłumaczenie na j. polski)
Line 13: Line 13:
 
Do zrobienia: utwórz strony dla słów kluczowych, jeśli jeszcze nie istnieją (np. Przetłumacz z wersji niemieckiej) i umieść odnośniki do sekcji podręcznika Free Pascal online na tych stronach.}}
 
Do zrobienia: utwórz strony dla słów kluczowych, jeśli jeszcze nie istnieją (np. Przetłumacz z wersji niemieckiej) i umieść odnośniki do sekcji podręcznika Free Pascal online na tych stronach.}}
  
==Reserved words in Turbo Pascal==
+
==Zarezerwowane słowa w Turbo Pascal==
  
The following keywords occur in Turbo Pascal mode:
+
W trybie Turbo Pascal występują następujące słowa kluczowe:
  
 
{| class = "wikitable"
 
{| class = "wikitable"
 
|-
 
|-
! Keyword !! Description
+
! Słowo kluczowe !! Opis
 
|-
 
|-
| [[And|and]] || Boolean operator requiring both conditions are true for the result to be true
+
| [[And|and]] || Operator logiczny wymagający spełnienia obu warunków, aby wynik był prawdziwy
 
|-
 
|-
| [[Array|array]] || multiple elements with the same name
+
| [[Array|array]] || wiele elementów o tej samej nazwie
 
|-
 
|-
| [[Asm|asm]] || start of code written in assembly language
+
| [[Asm|asm]] || początek kodu napisanego w języku asemblera
 
|-
 
|-
| [[Begin|begin]] || start of a [[Block|block]] of code
+
| [[Begin|begin]] || początek [[Block|bloku]] kodu
 
|-
 
|-
| [[Break|break]] || exit a  [[Case|case]] statemenr
+
| [[Break|break]] || wyjście z instrukcji [[Case|case]]
 
|-
 
|-
| [[Case|case]] || select a particular segement of code to execute based on a value
+
| [[Case|case]] || wybór konkretnego fragment kodu do wykonania na podstawie wartości
 
|-
 
|-
| [[Const|const]] || declare an identifier with a fixed value, or a variable with an initialized value
+
| [[Const|const]] || deklaracja identyfikatora ze stałą wartością lub zmienną z zainicjowaną wartością
 
|-
 
|-
| [[Constructor|constructor]] || routine used to create an object
+
| [[Constructor|constructor]] || procedura używana do tworzenia obiektu
 
|-
 
|-
| [[Continue|continue]] || skips an iteration in a for-loop and restart execution at the beginning of the loop
+
| [[Continue|continue]] || pomija iterację w pętli for i wznawia wykonywanie od początku pętli
 
|-
 
|-
| [[Destructor|destructor]] || routine used to deallocate an object
+
| [[Destructor|destructor]] || procedura używana do zwalniania przydziału obiektu
 
|-
 
|-
| [[Div|div]] || integer divide operator
+
| [[Div|div]] || operator dzielenia liczby całkowitej
 
|-
 
|-
| [[Do|do]] || used to indicate start of a loop
+
| [[Do|do]] || używane do wskazania początku pętli
 
|-
 
|-
| [[Downto|downto]] || used in a [[For|for]] loop to indicate the index variable is decremented
+
| [[Downto|downto]] || używane w pętli [[For|for]] do wskazania, że ​​zmienna indeksu jest zmniejszana
 
|-
 
|-
| [[Else|else]] || used in [[If|if]] statement to provide an execution path when the if test fails
+
| [[Else|else]] || używane w instrukcji [[If|if]] w celu zapewnienia ścieżki wykonania, gdy test if nie powiedzie się
 
|-
 
|-
| [[End|end]] || end of a block of code, a record or certain other constructs]
+
| [[End|end]] || koniec bloku kodu, rekordu lub innych konstrukcji
 
|-
 
|-
| [[False|false]] || boolean value indicating a test failed; opposite of [[True|true]]. '''As of FPC 3.0.0. False is no longer a keyword'''.
+
| [[False|false]] || wartość logiczna wskazująca, że ​​test nie powiódł się; przeciwieństwo [[True|prawdy]]. '''Od FPC 3.0.0. False nie jest już słowem kluczowym'''.
 
|-
 
|-
| [[File|file]] || external data structure, typically stored on disc
+
| [[File|file]] || zewnętrzna struktura danych, zwykle przechowywana na dysku
 
|-
 
|-
| [[For|for]] || loop used to increment or decrement a control variable
+
| [[For|for]] || pętla używana do zwiększania lub zmniejszania zmiennej sterującej
 
|-
 
|-
| [[Function|function]] || define start of a routine that returns a result value
+
| [[Function|function]] || definiuje początek procedury, która zwraca wartość wyniku
 
|-
 
|-
| [[Goto|goto]] || used to exit a segment of code and jump to another point
+
| [[Goto|goto]] || służy do wyjścia z segmentu kodu i przeskoczenia do innego punktu
 
|-
 
|-
| [[If|if]] || test a condition and perform a set of instructions based on the result
+
| [[If|if]] || testuje warunek i wykonuje zestaw instrukcji w oparciu o uzyskany wynik
 
|-
 
|-
| [[Implementation|implementation]] || define the internal routines in [[Unit|unit]]
+
| [[Implementation|implementation]] || definiuje wewnętrzne procedury w [[Unit|module]]
 
|-
 
|-
| [[In|in]] || identifies elements in a collection
+
| [[In|in]] || identyfikuje elementy w kolekcji
 
|-
 
|-
| [[Inline|inline]] || machine code inserted directly into a routine
+
| [[Inline|inline]] || kod maszynowy wstawiany bezpośrednio do procedury
 
|-
 
|-
| [[Interface|interface]] || public declarations of routines in a [[Unit|unit]]
+
| [[Interface|interface]] || publiczna deklaracja procedur w [[Unit|module]]
 
|-
 
|-
| [[Label|label]] || defines the target jump point for a [[Goto|goto]]
+
| [[Label|label]] || definiuje docelowy punkt skoku dla [[Goto|goto]]
 
|-
 
|-
| [[Mod|mod]] || operator used to return the remainder of an integer division
+
| [[Mod|mod]] || operator używany do zwracania reszty z dzielenia liczb całkowitych
 
|-
 
|-
| [[Nil|nil]] || pointer value indicating the pointer does not contain a value
+
| [[Nil|nil]] || wartość wskaźnika wskazująca, że ​​wskaźnik nie zawiera wartości
 
|-
 
|-
| [[Not|not]] || boolean operator that negates the result of a test
+
| [[Not|not]] || operator logiczny, który neguje wynik testu
 
|-
 
|-
| [[Object|object]] || defines an object construct
+
| [[Object|object]] || definiuje konstrukcję obiektu
 
|-
 
|-
| [[Of|of]] || defines the characteristics of a variable
+
| [[Of|of]] || definiuje cechy zmiennej
 
|-
 
|-
| [[On|on]] ||  defines an exception handling statement in the [[Except]] part of a [[Try]] statement
+
| [[On|on]] ||  definiuje instrukcję obsługi wyjątków w części [[Except]] instrukcji [[Try]]
 
|-
 
|-
| [[Operator|operator]] || defines a routine used to implement an operator
+
| [[Operator|operator]] || definiuje procedurę używaną do implementacji operatora
 
|-
 
|-
| [[Or|or]] || boolean operator which allows either of two choices to be used
+
| [[Or|or]] || operator logiczny, który pozwala na użycie jednej z dwóch opcji
 
|-
 
|-
| [[Packed|packed]] || indicates the elements of an array are to use less space (this keyword is primarily for compatibility with older programs as packing of array elements is generally automatic)
+
| [[Packed|packed]] || wskazuje, że elementy tablicy mają zajmować mniej miejsca (to słowo kluczowe służy głównie do zapewnienia zgodności ze starszymi programami, ponieważ pakowanie elementów tablicy jest zwykle automatyczne)
 
|-
 
|-
| [[Procedure|procedure]] || define start of a routine that does not return a result value
+
| [[Procedure|procedure]] || zdefiniuj początek procedury, która nie zwraca wartości wynikowej
 
|-
 
|-
| [[Program|program]] || defines start of an application. This keyword is usually optional.
+
| [[Program|program]] || definiuje początek aplikacji. To słowo kluczowe jest zwykle opcjonalne.
 
|-
 
|-
| [[Record|record]] || group a series of variables under a single name
+
| [[Record|record]] || grupuje serię zmiennych pod jedną nazwą
 
|-
 
|-
| [[Repeat|repeat]] || loop through a section of code through an [[Until|until]] statement as long as the result of the test is true
+
| [[Repeat|repeat]] || zamyka sekcję kodu w pętli aż do wystąpiennia instrukcji [[Until|until]], dopóki wynik testu jest prawdziwy
 
|-
 
|-
| [[Set|set]] || group a collection
+
| [[Set|set]] || pogrupuje kolekcję
 
|-
 
|-
| [[Shl|shl]] || operator to shift a value to the left; equivalent to multiplying by a power of 2
+
| [[Shl|shl]] || operator do przesunięcia wartości w lewo; odpowiednik pomnożenia przez potęgę 2
 
|-
 
|-
| [[Shr|shr]] || operator to shift a value to the right; equivalent to dividing by a power of 2
+
| [[Shr|shr]] || operator do przesunięcia wartości w prawo; odpowiednik podzielenia przez potęgę 2
 
|-
 
|-
| [[String|string]] || declares a variable that contains multiple characters
+
| [[String|string]] || deklaruje zmienną, która zawiera wiele znaków
 
|-
 
|-
| [[Then|then]] || indicates start of code in an [[If|if]] test
+
| [[Then|then]] || wskazuje początek kodu w teście [[If|if]]
 
|-
 
|-
| [[To|to]] || indicates a [[For|for]] variable is to be incremented
+
| [[To|to]] || wskazuje, że zmienna [[For|for]] ma być zwiększana
 
|-
 
|-
| [[True|true]] || boolean value indicating a test succeeded; opposite of [[False]]. '''As of FPC 3.0.0. True is no longer a keyword'''.
+
| [[True|true]] || wartość logiczna wskazująca, że ​​test się powiódł; przeciwieństwo [[False|fałszu]]. '''Od FPC 3.0.0. True nie jest już słowem kluczowym'''.
 
|-
 
|-
| [[Type|type]] || declares kinds of records or new classes of variables
+
| [[Type|type]] || deklaruje rodzaje rekordów lub nowe klasy zmiennych
 
|-
 
|-
| [[Unit|unit]] || separately compiled module
+
| [[Unit|unit]] || oddzielnie kompilowany moduł
 
|-
 
|-
| [[Until|until]] || indicates end test of a  [[Repeat|repeat]] statement
+
| [[Until|until]] || wskazuje na koniec testu instrukcji [[Repeat|repeat]]
 
|-
 
|-
| [[Uses|uses]] || names [[Unit|unit]]s this program or unit refers to
+
| [[Uses|uses]] || wskazuje nazywy [[Unit|modułów]], których używa ten program lub moduł
 
|-
 
|-
| [[Var|var]] ||  declare variables
+
| [[Var|var]] ||  deklaruje zmienne
 
|-
 
|-
| [[While|while]] || test a value and if true, loop through a section of code
+
| [[While|while]] || testuje wartość i dopóki jest prawdziwa, wykonuje sekcję kodu w petli
 
|-
 
|-
| [[With|with]] || reference the internal variables within a record without having to refer to the record itself
+
| [[With|with]] || odwołuje się do zmiennych wewnętrznych w rekordzie bez konieczności odwoływania się do samego rekordu
 
|-
 
|-
| [[Xor|xor]] || boolean operator used to invert and [[Or|or]] test
+
| [[Xor|xor]] || operator logiczny, który zwraca prawdę, jeśli operandy nie mają tych samych wartości logicznych
 
|}
 
|}
  

Revision as of 09:35, 27 August 2020

Deutsch (de) English (en) français (fr) polski (pl) русский (ru) 中文(中国大陆)‎ (zh_CN)

Słowa kluczowe poszczególnych trybów kompilatora podsumowano w następujący sposób:

Template:Uwaga

Zarezerwowane słowa w Turbo Pascal

W trybie Turbo Pascal występują następujące słowa kluczowe:

Słowo kluczowe Opis
and Operator logiczny wymagający spełnienia obu warunków, aby wynik był prawdziwy
array wiele elementów o tej samej nazwie
asm początek kodu napisanego w języku asemblera
begin początek bloku kodu
break wyjście z instrukcji case
case wybór konkretnego fragment kodu do wykonania na podstawie wartości
const deklaracja identyfikatora ze stałą wartością lub zmienną z zainicjowaną wartością
constructor procedura używana do tworzenia obiektu
continue pomija iterację w pętli for i wznawia wykonywanie od początku pętli
destructor procedura używana do zwalniania przydziału obiektu
div operator dzielenia liczby całkowitej
do używane do wskazania początku pętli
downto używane w pętli for do wskazania, że ​​zmienna indeksu jest zmniejszana
else używane w instrukcji if w celu zapewnienia ścieżki wykonania, gdy test if nie powiedzie się
end koniec bloku kodu, rekordu lub innych konstrukcji
false wartość logiczna wskazująca, że ​​test nie powiódł się; przeciwieństwo prawdy. Od FPC 3.0.0. False nie jest już słowem kluczowym.
file zewnętrzna struktura danych, zwykle przechowywana na dysku
for pętla używana do zwiększania lub zmniejszania zmiennej sterującej
function definiuje początek procedury, która zwraca wartość wyniku
goto służy do wyjścia z segmentu kodu i przeskoczenia do innego punktu
if testuje warunek i wykonuje zestaw instrukcji w oparciu o uzyskany wynik
implementation definiuje wewnętrzne procedury w module
in identyfikuje elementy w kolekcji
inline kod maszynowy wstawiany bezpośrednio do procedury
interface publiczna deklaracja procedur w module
label definiuje docelowy punkt skoku dla goto
mod operator używany do zwracania reszty z dzielenia liczb całkowitych
nil wartość wskaźnika wskazująca, że ​​wskaźnik nie zawiera wartości
not operator logiczny, który neguje wynik testu
object definiuje konstrukcję obiektu
of definiuje cechy zmiennej
on definiuje instrukcję obsługi wyjątków w części Except instrukcji Try
operator definiuje procedurę używaną do implementacji operatora
or operator logiczny, który pozwala na użycie jednej z dwóch opcji
packed wskazuje, że elementy tablicy mają zajmować mniej miejsca (to słowo kluczowe służy głównie do zapewnienia zgodności ze starszymi programami, ponieważ pakowanie elementów tablicy jest zwykle automatyczne)
procedure zdefiniuj początek procedury, która nie zwraca wartości wynikowej
program definiuje początek aplikacji. To słowo kluczowe jest zwykle opcjonalne.
record grupuje serię zmiennych pod jedną nazwą
repeat zamyka sekcję kodu w pętli aż do wystąpiennia instrukcji until, dopóki wynik testu jest prawdziwy
set pogrupuje kolekcję
shl operator do przesunięcia wartości w lewo; odpowiednik pomnożenia przez potęgę 2
shr operator do przesunięcia wartości w prawo; odpowiednik podzielenia przez potęgę 2
string deklaruje zmienną, która zawiera wiele znaków
then wskazuje początek kodu w teście if
to wskazuje, że zmienna for ma być zwiększana
true wartość logiczna wskazująca, że ​​test się powiódł; przeciwieństwo fałszu. Od FPC 3.0.0. True nie jest już słowem kluczowym.
type deklaruje rodzaje rekordów lub nowe klasy zmiennych
unit oddzielnie kompilowany moduł
until wskazuje na koniec testu instrukcji repeat
uses wskazuje nazywy modułów, których używa ten program lub moduł
var deklaruje zmienne
while testuje wartość i dopóki jest prawdziwa, wykonuje sekcję kodu w petli
with odwołuje się do zmiennych wewnętrznych w rekordzie bez konieczności odwoływania się do samego rekordu
xor operator logiczny, który zwraca prawdę, jeśli operandy nie mają tych samych wartości logicznych

Reserved words in Object Pascal

Object Pascal extends the (Turbo) Pascal language with both support for dealing more easily with objects (object orientation) as well as other newer/more advanced concepts (threads, etc).

In addition to the reserved words in Turbo Pascal, the following reserved words are available in Delphi mode as well:

Keyword Description
as
class
constref
dispose
except
exit
exports exports symbols which will be publicly available
finalization introduces an optional 'finalization' part of a unit.
finally part of a try - finally - end block
inherited calls function/procedure from ancestor class
initialization introduces an optional 'initialization' part of a unit.
is can be used as an operator or a modifier
library used in a shared library unit instead of the reserved word unit
new
on
out
property
raise causes an exception
self reference to an instance of a class
threadvar declare global variable to be thread local
try part of Try .. Finally or Try .. Exception block

Reserved words in Extended Free Pascal

The reserved words in Extended Free Pascal mode include:

Modifiers (directives)

Modifiers are not strictly reserved words; however they are used in the same way as reserved words.

See the Free Pascal Reference Guide for details.

Modifiers Description
absolute
abstract an abstract class cannot be instantiated, only inherited
alias
assembler pure assembler routine: routine is defined by asm … end
cdecl C declaration modifier
Cppdecl C++ declaration modifier
default For indexed properties to use them without specifying the property name
export
external
forward Allow a subroutine to be used before it is declared
generic class creation modifier
index
local A function/procedure modifier only usable with Linux (for Kylix compatibility)
name
nostackframe compiler hint: omit stack frame if possible
oldfpccall deprecated subroutine calling convention
override overriding of virtual functions
pascal use classic pascal calling convention
private private accessibility modifier, only class members can access data/functions/procedures
protected protected accessibility modifier, accessibility modifier, class members and inherited classes can access data/functions/procedures
public public accessibility modifier, public access to data/functions/procedures
published accessibility modifier, published properties are visible in IDE ar can be written to .lfm
read property read access
register define routine’s calling convention: pass first n parameters via GPRs
reintroduce
safecall subroutine calling convention
softfloat
specialize specialization of generic classes
stdcall subroutine calling convention
virtual describes a virtual method in OO programming
write property write access

Unsupported Turbo Pascal modifiers

Light bulb  Uwaga: These modifiers are supported in the DOS cross compiler present in the FPC development version

The reason why these modifiers are not supported is that these modifiers deal with 16 bit code for DOS. In other words, these modifiers have special meaning for 16 bit programming under DOS and Windows 3.x.

As Free Pascal does not support 16 bit code (only 32 and 64 bit), these modifiers are irrelevant in Free Pascal code.

far access addresses outside of the current 64KB segment
near access addresses in the current 64KB segment

More functionality

Apart from the language features provided by the reserved words/keywords mentioned above, there is a lot of functionality available for the programmer in the various libraries:

  • RTL: Run-Time Library, available for all FPC and Lazarus programs
  • FCL: Free Component Library: a core set of libraries available for Lazarus programs and usually for FPC (FPC can be compiled without it, but that only happens on purpose for low-memory embedded systems etc)
  • FPC Packages: other packages provided by FPC
  • Lazarus components: these are Lazarus components that can be dropped on a form and often based on FCL or FPC packages
  • Lazarus utility functions: e.g. the fileutil unit.

Apart from the libraries provided by FPC and Lazarus, there are more libraries/components available:

  • FPC user-supplied units: see the FPC wiki
  • Lazarus CCR: components
  • User-supplied code on the internet: see open source repositories like SourceForge and GitHub.

See also