diff --git a/fbdocs/manual/cache/AntoniGual.wakka b/fbdocs/manual/cache/AntoniGual.wakka index e869e0c2a5..023609e6e3 100644 --- a/fbdocs/manual/cache/AntoniGual.wakka +++ b/fbdocs/manual/cache/AntoniGual.wakka @@ -1 +1 @@ -antonigual [at] eic [dot] ictnet [dot] es \ No newline at end of file +{{fbdoc item="title" value="Antoni"}}---- \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgArray.wakka b/fbdocs/manual/cache/CatPgArray.wakka index d40d4019a8..09504cb1f3 100644 --- a/fbdocs/manual/cache/CatPgArray.wakka +++ b/fbdocs/manual/cache/CatPgArray.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="Array Functions"}}---- -Statements and procedures for working with arrays. +Les déclarations et procédures de travail avec des tableaux. -**{{anchor name="DEFINE|Defining Arrays"}}** - Statements that create arrays. -**{{anchor name="CLEAR|Clearing Array Data"}}** - Procedures that work with array memory. -**{{anchor name="SIZE|Retrieving Array Size"}}** - Procedures that return bounds of an array's dimension. +**[[#DEFINE">Définition de tableaux]]** + Déclarations de création de tableaux. +**[[#CLEAR">Effacement des données d'un tableau]]** + Procédures de travail avec la mémoire d'un tableau. +**[[#SIZE">Récupération de la taille d'un tableau]]** + Procédures qui retournent les limites des dimensions d'un tableau. -<<{{anchor name="DEFINE"}}{{fbdoc item="section" value="Defining Arrays"}} - =={{fbdoc item="keyword" value="KeyPgOptiondynamic|OPTION DYNAMIC"}}== - Forces arrays to be defined as variable-length arrays. - =={{fbdoc item="keyword" value="KeyPgMetaDynamic|'$DYNAMIC"}}== - Alternate form of the [[KeyPgOptiondynamic OPTION DYNAMIC]] statement. - =={{fbdoc item="keyword" value="KeyPgOptionstatic|OPTION STATIC"}}== - Reverts a previous [[KeyPgOptiondynamic OPTION DYNAMIC]] command. - =={{fbdoc item="keyword" value="KeyPgMetaStatic|'$STATIC"}}== - Alternate form of the [[KeyPgOptionstatic OPTION STATIC]] statement. - =={{fbdoc item="keyword" value="KeyPgRedim|REDIM"}}== - Defines and resizes variable-length arrays. - =={{fbdoc item="keyword" value="KeyPgPreserve|PRESERVE"}}== - Preserves array contents when used with [[KeyPgRedim REDIM]]. +**Définition de tableaux** + **[[KeyPgOptiondynamic Option Dynamic]]** + Force un tableau à être défini comme un tableau de longueur-variable. + **[[KeyPgMetaDynamic '$Dynamic]]** + Autre forme de [[KeyPgOptiondynamic Option Dynamic]]. + **[[KeyPgOptionstatic Option Static]]** + Annule une commande [[KeyPgOptiondynamic Option Dynamic]] précédente. + **[[KeyPgMetaStatic '$Static]]** + Autre forme de [[KeyPgOptionstatic Option Static]]. + **[[KeyPgRedim ReDim]]** + Définit et redimensionne un tableau de longueur-variable. + **[[KeyPgPreserve Preserve]]** + Préserve le contenu du tableau lorsqu'il est utilisé avec [[KeyPgRedim ReDim]]. -<<>>{{anchor name="CLEAR"}}{{fbdoc item="section" value="Clearing Array Data"}} - =={{fbdoc item="keyword" value="KeyPgErase|ERASE"}}== - Destroys variable-length array elements and initializes fixed-length array elements. +;**Effacement des données d'un tableau** + **[[KeyPgErase Erase]]** + Détruit les éléments d'un tableau de longueur-variable et initialise les éléments du tableau de longueur-fixe. -{{anchor name="SIZE"}}{{fbdoc item="section" value="Retrieving Array Size"}} - =={{fbdoc item="keyword" value="KeyPgLbound|LBOUND"}}== - Returns the lower bound of an array's dimension. - =={{fbdoc item="keyword" value="KeyPgUbound|UBOUND"}}== - Returns the upper bound of an array's dimension. +**Récupération de la taille d'un tableau** + **[[KeyPgLbound LBound]]** + Renvoie la limite inférieure d'une dimension d'un tableau. + **[[KeyPgUbound UBound]]** + Renvoie la limite supérieure d'une dimension d'un tableau. - >>::c:: + ;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgBits.wakka b/fbdocs/manual/cache/CatPgBits.wakka index 3f68f0aa1d..058a087c70 100644 --- a/fbdocs/manual/cache/CatPgBits.wakka +++ b/fbdocs/manual/cache/CatPgBits.wakka @@ -1,32 +1,32 @@ {{fbdoc item="title" value="Bit Manipulation"}}---- -Macros that work with the bits and bytes of numbers. +Macros qui travaillent avec les bits et les octets des nombres. {{fbdoc item="desc"}} - The macros documented here provide access to the individual bits, bytes and words of integer values. + Les macros documentées ici donnent accès individuellement aux bits, octets et mots des valeurs entières. -**{{anchor name="BYTEMACROS|Byte Manipulation Macros"}}** - Gets the value of individual bytes or words of ##[[KeyPgUinteger Uinteger]]## values. -**{{anchor name="BITMACROS|Bit Manipulation Macros"}}** - Gets the state of individual bits of numeric values. +**[[#BYTEMACROS">Macros de manipulation des octets]]** + Obtient la valeur d'octets ou des mots des valeurs ##[[KeyPgUinteger UInteger]]##. +**[[#BITMACROS">Macros de manipulation des bits]]** + Obtient l'état individuel des bits de valeurs numériques. -<<{{anchor name="BYTEMACROS"}}{{fbdoc item="section" value="Byte Manipulation Macros"}} - =={{fbdoc item="keyword" value="KeyPgLoByte|LOBYTE"}}== - Gets the least significant byte (LSB, or //lo-byte//) value of an ##[[KeyPgUinteger Uinteger]]## value. - =={{fbdoc item="keyword" value="KeyPgHibyte|HIBYTE"}}== - Gets the most significant byte (MSB, or //hi-byte//) value of the least significant word (LSW, or //lo-word//) of an ##[[KeyPgUinteger Uinteger]]## value. - =={{fbdoc item="keyword" value="KeyPgLoWord|LOWORD"}}== - Gets the least significant word (LSW, or //lo-word//) value of an ##[[KeyPgUinteger Uinteger]]## value. - =={{fbdoc item="keyword" value="KeyPgHiword|HIWORD"}}== - Gets the most significant word (LSW, or //hi-word//) value of an ##[[KeyPgUinteger Uinteger]]## value. +**Macros de manipulation des octets** + **[[KeyPgLoByte LoByte]]** + Obtient la valeur de l'octet le moins significatif (LSB = Least Significant Byte , ou //lo-byte//) d'une valeur ##[[KeyPgUinteger UInteger]]##. + **[[KeyPgHibyte HiByte]]** + Obtient la valeur de l'octet le plus significatif (MSB = Most Significant Byte , ou //hi-byte//) d'une valeur ##[[KeyPgUinteger UInteger]]##. + **[[KeyPgLoWord LoWord]]** + Obtient la valeur du mot le moins significatif (LSW = Least Significant Word , ou //lo-word//) d'une valeur ##[[KeyPgUinteger UInteger]]##. + **[[KeyPgHiword HiWord]]** + Obtient la valeur du mot le plus significatif (MSW = Most Significant Word , ou //hi-word//) d'une valeur ##[[KeyPgUinteger UInteger]]##. -<<>>{{anchor name="BITMACROS"}}{{fbdoc item="section" value="Bit Manipulation Macros"}} - =={{fbdoc item="keyword" value="KeyPgBit|BIT"}}== - Gets the state of an individual bit in an integer value. - =={{fbdoc item="keyword" value="KeyPgBitreset|BITRESET"}}== - Gets the value of an integer with a specified bit cleared. - =={{fbdoc item="keyword" value="KeyPgBitset|BITSET"}}== - Gets the value of an integer with a specified bit set. +;**Macros de manipulation des bits** + **[[KeyPgBit Bit]]** + Obtient l'état individuel d'un bit dans une valeur entière. + **[[KeyPgBitreset BitReset]]** + Obtient la valeur d'un entier dont on a positionné un certain bit à zéro. + **[[KeyPgBitset BitSet]]** + Obtient la valeur d'un entier dont on a positionné un certain bit à 1. ->>::c:: +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgCasting.wakka b/fbdocs/manual/cache/CatPgCasting.wakka index c34ab58e19..45a9a69ec6 100644 --- a/fbdocs/manual/cache/CatPgCasting.wakka +++ b/fbdocs/manual/cache/CatPgCasting.wakka @@ -1,47 +1,47 @@ {{fbdoc item="title" value="Converting Data Types"}}---- -Operators and procedures that convert between different types. +Opérateurs et procédures qui réalisent des conversions entre différents types. -**{{anchor name="GENERIC|Generic conversions"}}** - Operators to convert between arbitrary types. -**{{anchor name="INTEGRAL|Conversions to integral types"}}** - Operators to convert to integral types. -**{{anchor name="FLOATING|Conversions to floating-point types"}}** - Operators to convert to floating-point types. -**{{anchor name="STRING|Conversions to/from string types"}}** - Operators to convert top an from string types. +**[[#GENERIC">Conversions génériques]]** + Opérateurs pour des conversions entre types génériques. +**[[#INTEGRAL">Conversions vers des types nombres entiers]]** + Opérateurs pour des conversions vers des types nombres entiers. +**[[#FLOATING">Conversions vers des types à virgule flottante]]** + Opérateurs pour des conversions vers des types à virgule flottante. +**[[#STRING">Conversions vers/à partir de types chaînes]]** + Opérateurs pour des conversions vers/à partir de types chaînes. -<<{{anchor name="GENERIC"}}{{fbdoc item="section" value="Generic conversions"}} - =={{fbdoc item="keyword" value="KeyPgCast|CAST"}} and {{fbdoc item="keyword" value="KeyPgCptr|CPTR"}}== - Converts expressions between different types. +**Conversions génériques** + **[[KeyPgCast Cast]] et [[KeyPgCptr CPtr]]** + Conversion d'expressions entre différents types. -{{anchor name="INTEGRAL"}}{{fbdoc item="section" value="Conversions to integral types"}} - =={{fbdoc item="keyword" value="KeyPgCbyte|CBYTE"}} and {{fbdoc item="keyword" value="KeyPgCubyte|CUBYTE"}}== - Converts numeric expressions to 8-bit values. - =={{fbdoc item="keyword" value="KeyPgCshort|CSHORT"}} and {{fbdoc item="keyword" value="KeyPgCushort|CUSHORT"}}== - Converts numeric expressions to 16-bit values. - =={{fbdoc item="keyword" value="KeyPgCint|CINT"}} and {{fbdoc item="keyword" value="KeyPgCuint|CUINT"}}== - Converts numeric expressions to 32-bit values. - =={{fbdoc item="keyword" value="KeyPgClng|CLNG"}} and {{fbdoc item="keyword" value="KeyPgCulng|CULNG"}}== - Converts numeric expressions to 32-bit or 64-bit values. - =={{fbdoc item="keyword" value="KeyPgClngint|CLNGINT"}} and {{fbdoc item="keyword" value="KeyPgCulngint|CULNGINT"}}== - Converts numeric expressions to 64-bit values. - =={{fbdoc item="keyword" value="KeyPgCsign|CSIGN"}}== - Converts a numeric expression to a signed-type value. - =={{fbdoc item="keyword" value="KeyPgCunsg|CUNSG"}}== - Converts a numeric expression to an unsigned-type value. -<<>>{{anchor name="FLOATING"}}{{fbdoc item="section" value="Conversions to floating-point types"}} - =={{fbdoc item="keyword" value="KeyPgCsng|CSNG"}} and {{fbdoc item="keyword" value="KeyPgCdbl|CDBL"}}== - Converts a numeric or string expression to floating-point values. +**Conversions vers des types nombres entiers** + **[[KeyPgCbyte CByte]] and [[KeyPgCubyte CUByte]]** + Conversion d'expressions numériques vers des valeurs 8-bit. + **[[KeyPgCshort CShort]] et [[KeyPgCushort CUShort]]** + Conversion d'expressions numériques vers des valeurs 16-bit. + **[[KeyPgCint CInt]] et [[KeyPgCuint CUInt]]** + Conversion d'expressions numériques vers des valeurs 32-bit. + **[[KeyPgClng CLng]] et [[KeyPgCulng CULng]]** + Conversion d'expressions numériques vers des valeurs 32-bit ou 64-bit. + **[[KeyPgClngint CLngInt]] et [[KeyPgCulngint CULngInt]]** + Conversion d'expressions numériques vers des valeurs 64-bit. + **[[KeyPgCsign CSign]]** + Conversion d'une expression numérique vers une valeur signée. + **[[KeyPgCunsg CUnsg]]** + Conversion d'une expression numérique vers une valeur non-signée. +;**Conversions vers des types à virgule flottante** + **[[KeyPgCsng CSng]] et [[KeyPgCdbl CDbl]]** + Conversion d'une expression numérique ou d'une chaîne vers une valeur à virgule flottante. -{{anchor name="STRING"}}{{fbdoc item="section" value="Conversions to/from string types"}} - =={{fbdoc item="keyword" value="KeyPgStr|STR"}} and {{fbdoc item="keyword" value="KeyPgWstr|WSTR"}}== - Converts numeric expressions to a numeric string representation. - =={{fbdoc item="keyword" value="KeyPgVal|VAL"}}== - Converts a numeric string expression to a floating-point value. - =={{fbdoc item="keyword" value="KeyPgValint|VALINT"}} and {{fbdoc item="keyword" value="KeyPgValuint|VALUINT"}}== - Converts numeric string expressions to integer values. - =={{fbdoc item="keyword" value="KeyPgVallng|VALLNG"}} and {{fbdoc item="keyword" value="KeyPgValulng|VALULNG"}}== - Converts numeric string expressions to long values. ->>::c:: +**Conversions vers/à partir de types chaînes** + **[[KeyPgStr Str]] et [[KeyPgWstr WStr]]** + Conversion d'une expression numérique vers une chaîne représentation numérique. + **[[KeyPgVal Val]]** + Conversion d'une chaîne expression numérique vers une valeur à virgule flottante. + **[[KeyPgValint ValInt]] et [[KeyPgValuint ValUInt]]** + Conversion d'une chaîne expression numérique vers une valeur entière. + **[[KeyPgVallng ValLng]] et [[KeyPgValulng ValULng]]** + Conversion d'une chaîne expression numérique vers une valeur "long". +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgCompOpt.wakka b/fbdocs/manual/cache/CatPgCompOpt.wakka index 2f5c5b3aba..2954148be0 100644 --- a/fbdocs/manual/cache/CatPgCompOpt.wakka +++ b/fbdocs/manual/cache/CatPgCompOpt.wakka @@ -1,106 +1,106 @@ {{fbdoc item="title" value="Compiler Options"}}---- -Command line compiler options for the fbc compiler: +Les options de commande en ligne du compilateur pour le compilateur fbc: - {{fbdoc item="keyword" value="CompilerOptoptfile|@< file >"}} - - Read (additional) command-line options from the file - {{fbdoc item="keyword" value="CompilerOpta|-a < name >"}} - - Add an object file to linker's list - {{fbdoc item="keyword" value="CompilerOptarch|-arch < type >"}} - - Set target architecture (default: 486) - {{fbdoc item="keyword" value="CompilerOptb|-b < name >"}} - - Add a source file to compilation - {{fbdoc item="keyword" value="CompilerOptc|-c"}} - - Compile only, do not link - {{fbdoc item="keyword" value="CompilerOptcupp|-C"}} - - Do not delete the object file(s) - {{fbdoc item="keyword" value="CompilerOptd|-d < name=val >"}} - - Add a preprocessor's define - {{fbdoc item="keyword" value="CompilerOptdll|-dll"}} - - Create a DLL, including the import library. (Same as ##-dylib##) - {{fbdoc item="keyword" value="CompilerOptdylib|-dylib"}} - - Create a DLL, including the import library - {{fbdoc item="keyword" value="CompilerOpte|-e"}} - - Add error checking - {{fbdoc item="keyword" value="CompilerOptex|-ex"}} - - Add error checking with RESUME support - {{fbdoc item="keyword" value="CompilerOptexx|-exx"}} - - Same as -ex plus array bounds and null-pointer checking - {{fbdoc item="keyword" value="CompilerOptexport|-export"}} - - Export symbols for dynamic linkage - {{fbdoc item="keyword" value="CompilerOptforcelang|-forcelang "}} - - Select language compatibility, overriding #lang/$lang in code - {{fbdoc item="keyword" value="compileroptfpmode|-fpmode < type >"}} - - Select between fast and accurate floating-point operations (default: PRECISE) - {{fbdoc item="keyword" value="CompilerOptfpu|-fpu < type >"}} - - Set the floating point arithmetics unit (default: FPU) - {{fbdoc item="keyword" value="CompilerOptg|-g"}} - - Add debug info - {{fbdoc item="keyword" value="CompilerOptgen|-gen < backend >"}} - - Sets the compiler backend (default is 'gas') - {{fbdoc item="keyword" value="CompilerOpti|-i < name >"}} - - Add a path to search for include files - {{fbdoc item="keyword" value="CompilerOptinclude|-include < name >"}} - - Include a header file on each source compiled - {{fbdoc item="keyword" value="CompilerOptl|-l < name >"}} - - Add a library file to linker's list - {{fbdoc item="keyword" value="CompilerOptlang|-lang < name >"}} - - Select language compatibility: ##fb##, ##fblite##, ##qb##, ##deprecated## - {{fbdoc item="keyword" value="CompilerOptlib|-lib"}} - - Create a static library - {{fbdoc item="keyword" value="CompilerOptm|-m < name >"}} - - Main file without extension, the entry point (default is the first .bas file on the command line) - {{fbdoc item="keyword" value="CompilerOptmap|-map < name >"}} - - Save the linking map to file name - {{fbdoc item="keyword" value="CompilerOptmaxerr|-maxerr < val >"}} - - Only stop parsing if errors occurred - {{fbdoc item="keyword" value="CompilerOptmt|-mt"}} - - Link with thread-safe runtime library - {{fbdoc item="keyword" value="CompilerOptnodeflibs|-nodeflibs"}} - - Do not include the default libraries - {{fbdoc item="keyword" value="CompilerOptnoerrline|-noerrline"}} - - Do not show source line where error occurred - {{fbdoc item="keyword" value="CompilerOpto|-o < name >"}} - - Set object file path/name (must be passed after the .bas file) - {{fbdoc item="keyword" value="CompilerOptoptimization|-O < level >"}} - - Set the optimization level (-gen gcc) - {{fbdoc item="keyword" value="CompilerOptp|-p < name >"}} - - Add a path to search for libraries - {{fbdoc item="keyword" value="CompilerOptpp|-pp"}} - - Emit the preprocessed input file only, do not compile - {{fbdoc item="keyword" value="CompilerOptprefix|-prefix < path >"}} - - Set the compiler prefix path - {{fbdoc item="keyword" value="CompilerOptprofile|-profile"}} - - Enable function profiling - {{fbdoc item="keyword" value="CompilerOptr|-r"}} - - Write asm file(s) only, do not compile or link - {{fbdoc item="keyword" value="CompilerOptrupp|-R"}} - - Do not delete the asm file(s) - {{fbdoc item="keyword" value="CompilerOpts|-s < name >"}} - - Set subsystem (##gui##, ##console##) - {{fbdoc item="keyword" value="CompilerOpttarget|-target < platform >"}} - - Set the target platform for cross compilation - {{fbdoc item="keyword" value="CompilerOptt|-t < value >"}} - - Set stack size in kbytes (default: 1M) - {{fbdoc item="keyword" value="CompilerOptv|-v"}} - - Be verbose - {{fbdoc item="keyword" value="CompilerOptvec|-vec < level >"}} - - Set level of vector optimizations enabled by the compiler (default: 0) - {{fbdoc item="keyword" value="CompilerOptversion|-version"}} - - Show compiler version - {{fbdoc item="keyword" value="CompilerOptw|-w < value >"}} - - Set min warning level: all, pedantic or a value - {{fbdoc item="keyword" value="CompilerOptWa|-Wa < opt >"}} - - Pass options to GAS (separated by commas) - {{fbdoc item="keyword" value="CompilerOptWc|-Wc < opt >"}} - - Pass options to GCC (separated by commas) - {{fbdoc item="keyword" value="CompilerOptWl|-Wl < opt >"}} - - Pass options to LD (separated by commas) - {{fbdoc item="keyword" value="CompilerOptx|-x < name >"}} - - Set executable/library path/name - {{fbdoc item="keyword" value="CompilerOptz|-z < value >"}} - - Sets miscellaneous or experimental options + [[CompilerOptoptfile @< file >]] + - Lire options de ligne de commande (supplémentaires) à partir du fichier + [[CompilerOpta -a < name >]] + - Ajouter un fichier objet à la liste éditeur de liens + [[CompilerOptarch -arch < type >]] + - Définir l'architecture cible (défaut: 486) + [[CompilerOptb -b < name >]] + - Ajouter un fichier source à la compilation + [[CompilerOptc -c]] + - Compiler seulement, ne pas lier + [[CompilerOptcupp -C]] + - Ne pas supprimer le(s) fichier(s) objet + [[CompilerOptd -d < name=val >]] + - Ajouter un "define" préprocesseur + [[CompilerOptdll -dll]] + - Créer une DLL, y compris la bibliothèque d'importation. (Identique à ##-dylib##) + [[CompilerOptdylib -dylib]] + - Créer une DLL, y compris la bibliothèque d'importation + [[CompilerOpte -e]] + - Ajouter la vérification des erreurs + [[CompilerOptex -ex]] + - Ajouter la vérification des erreurs avec le support de RESUME + [[CompilerOptexx -exx]] + - Identique à -ex plus vérification des limites de tableaux et de pointeurs NULL + [[CompilerOptexport -export]] + - Exporter les symboles pour la liaison dynamique + [[CompilerOptforcelang -forcelang ]] + - Compatibilité de sélection de langage, annule #lang/$lang dans le code + [[compileroptfpmode -fpmode < type >]] + - Choix entre rapide et précise pour les opérations à virgule flottante (défaut: PRECISE) + [[CompilerOptfpu -fpu < type >]] + - Régle l'unité arithmétique virgule flottante (défaut: FPU) + [[CompilerOptg -g]] + - Ajouter les informations de débogage + [[CompilerOptgen -gen < backend >]] + - Définit le compilateur "backend" (défaut est 'gas') + [[CompilerOpti -i < name >]] + - Ajouter un chemin de recherche pour les fichiers include + [[CompilerOptinclude -include < name >]] + - Inclure un fichier en-tête pour chaque source compilé + [[CompilerOptl -l < name >]] + - Ajouter un fichier de bibliothèque à la liste éditeur de liens + [[CompilerOptlang -lang < name >]] + - Sélectionne compatibilité de langage: ##fb##, ##fblite##, ##qb##, ##deprecated## + [[CompilerOptlib -lib]] + - Créer une bibliothèque statique + [[CompilerOptm -m < name >]] + - Fichier principal sans extension, le point d'entrée (par défaut est le premier fichier. bas sur la ligne de commande) + [[CompilerOptmap -map < name >]] + - Enregistrer la carte de l'édition des liens sous un nom de fichier + [[CompilerOptmaxerr -maxerr < val >]] + - Stoppe l'analyse d'erreurs seulement si survient l'erreur + [[CompilerOptmt -mt]] + - Lien avec bibliothèque "thread-safe runtime" + [[CompilerOptnodeflibs -nodeflibs]] + - Ne pas inclure les bibliothèques par défaut + [[CompilerOptnoerrline -noerrline]] + - Ne pas afficher la ligne du source où l'erreur s'est produite + [[CompilerOpto -o < name >]] + - Définir le chemin/nom du fichier objet (doit être passé après le fichier. bas) + [[CompilerOptoptimization -O < level >]] + - Définir le niveau d'optimisation (-gen gcc) + [[CompilerOptp -p < name >]] + - Ajouter un chemin de recherche pour les bibliothèques + [[CompilerOptpp -pp]] + - Produire seulement le fichier d'entrée prétraîté, ne pas compiler + [[CompilerOptprefix -prefix < path >]] + - Définir le préfixe du chemin du compilateur + [[CompilerOptprofile -profile]] + - Activer la fonction de profilage + [[CompilerOptr -r]] + - Ecrire seulement des fichiers asm, ne pas compiler ou lier + [[CompilerOptrupp -R]] + - Ne pas supprimer le(s) fichier(s) asm + [[CompilerOpts -s < name >]] + - Définir le sous-système (##gui##, ##console##) + [[CompilerOpttarget -target < platform >]] + - Définir la plate-forme cible pour la compilation croisée + [[CompilerOptt -t < value >]] + - Définir la taille de la pile en kilo-octets (défaut: 1M) + [[CompilerOptv -v]] + - Mode "bavard" + [[CompilerOptvec -vec < level >]] + - Indiquer le niveau des optimisations permises par le compilateur (défaut: 0) + [[CompilerOptversion -version]] + - Affiche la version du compilateur + [[CompilerOptw -w < value >]] + - Indiquer le niveau d'alerte min: all, pedantic ou une valeur + [[CompilerOptWa -Wa < opt >]] + - Passe les options à GAS (séparées par des virgules) + [[CompilerOptWc -Wc < opt >]] + - Passe les options à GCC (séparées par des virgules) + [[CompilerOptWl -Wl < opt >]] + - Passe les options à LD (séparées par des virgules) + [[CompilerOptx -x < name >]] + - Définir exécutable/bibliothèque chemin/nom + [[CompilerOptz -z < value >]] + - Définit des options diverses ou expérimentales {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgCompilerSwitches.wakka b/fbdocs/manual/cache/CatPgCompilerSwitches.wakka index 40d2af8c78..f60060cdfb 100644 --- a/fbdocs/manual/cache/CatPgCompilerSwitches.wakka +++ b/fbdocs/manual/cache/CatPgCompilerSwitches.wakka @@ -1,48 +1,48 @@ {{fbdoc item="title" value="Compiler Switches"}}---- -Statements that affect how code is compiled. +Déclarations qui affectent la façon dont le code est compilé. {{fbdoc item="desc"}} - These statements affect how the compiler declares variables, arrays and procedures, parses string literals, passes procedure parameters and more. - -<< -{{fbdoc item="section" value="Metacommands"}} - - {{fbdoc item="keyword" value="KeyPgMetaDynamic|'$DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaInclude|'$INCLUDE"}} - - {{fbdoc item="keyword" value="KeyPgMetaStatic|'$STATIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaLang|'$LANG"}} - -{{fbdoc item="section" value="Compiler Options"}} - - {{fbdoc item="keyword" value="KeyPgOptionbase|OPTION BASE"}} - - {{fbdoc item="keyword" value="KeyPgOptionbyval|OPTION BYVAL"}} - - {{fbdoc item="keyword" value="KeyPgOptiondynamic|OPTION DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgOptionescape|OPTION ESCAPE"}} - - {{fbdoc item="keyword" value="KeyPgOptionexplicit|OPTION EXPLICIT"}} - - {{fbdoc item="keyword" value="KeyPgOptiongosub|OPTION GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnogosub|OPTION NOGOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnokeyword|OPTION NOKEYWORD"}} - - {{fbdoc item="keyword" value="KeyPgOptionprivate|OPTION PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgOptionstatic|OPTION STATIC"}} - -<<>> -{{fbdoc item="section" value="Set Default Datatypes"}} - - {{fbdoc item="keyword" value="KeyPgDefbyte|DEFBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefdbl|DEFDBL"}} - - {{fbdoc item="keyword" value="KeyPgDefint|DEFINT"}} - - {{fbdoc item="keyword" value="KeyPgDeflng|DEFLNG"}} - - {{fbdoc item="keyword" value="KeyPgDeflongint|DEFLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefshort|DEFSHORT"}} - - {{fbdoc item="keyword" value="KeyPgDefsng|DEFSNG"}} - - {{fbdoc item="keyword" value="KeyPgDefstr|DEFSTR"}} - - {{fbdoc item="keyword" value="KeyPgDefubyte|DEFUBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefuint|DEFUINT"}} - - {{fbdoc item="keyword" value="KeyPgDefulongint|DEFULONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefushort|DEFUSHORT"}} - - ->> -::c:: -{{fbdoc item="lang"}} - - ##[[KeyPgDeflongint DEFLONGINT]]## and ##[[KeyPgDefulongint DEFULONGINT]]## available only in the //[[CompilerOptlang -lang fblite]]// dialect. + Ces déclarations affectent la façon dont le compilateur déclare les variables, les tableaux et les procédures, analyse les chaînes littérales, passe les paramètres de procédure, etc. + +**Métacommandes** +- [[KeyPgMetaDynamic '$Dynamic]] + - [[KeyPgMetaInclude '$Include]] + - [[KeyPgMetaStatic '$Static]] + - [[KeyPgMetaLang '$Lang]] + **Options du compilateur** + +- [[KeyPgOptionbase Option Base]] + - [[KeyPgOptionbyval Option ByVal]] + - [[KeyPgOptiondynamic Option Dynamic]] + - [[KeyPgOptionescape Option Escape]] + - [[KeyPgOptionexplicit Option Explicit]] + - [[KeyPgOptiongosub Option Gosub]] + - [[KeyPgOptionnogosub Option Nogosub]] + - [[KeyPgOptionnokeyword Option NoKeyword]] + - [[KeyPgOptionprivate Option Private]] + - [[KeyPgOptionstatic Option Static]] + ;**Configuration par défaut des types de données** + +- [[KeyPgDefbyte DefByte]] +- [[KeyPgDefdbl DefDbl]] + - [[KeyPgDefint DefInt]] + - [[KeyPgDeflng DefLng]] + - [[KeyPgDeflongint Deflongint]] + - [[KeyPgDefshort DefShort]] + - [[KeyPgDefsng DefSng]] + - [[KeyPgDefstr DefStr]] + - [[KeyPgDefubyte DefUByte]] + - [[KeyPgDefuint DefUInt]] + - [[KeyPgDefulongint Defulongint]] + - [[KeyPgDefushort DefUShort]] + ;
+ {{fbdoc item="lang"}} + + +- ##[[KeyPgDeflongint Deflongint]]## et ##[[KeyPgDefulongint Defulongint]]## ne sont disponibles qu'avec le dialecte //[[CompilerOptlang -lang fblite]]//. +- Les déclarations ##OPTION## ne sont disponibles que dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. +{{fbdoc item="see"}} + - [[CatPgPreProcess Préprocesseur]] - ##OPTION## statements are available only in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects only. {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/CatPgConsole.wakka b/fbdocs/manual/cache/CatPgConsole.wakka index cdc49b9b3c..9a48e63fab 100644 --- a/fbdocs/manual/cache/CatPgConsole.wakka +++ b/fbdocs/manual/cache/CatPgConsole.wakka @@ -1,46 +1,46 @@ {{fbdoc item="title" value="Console Functions"}}---- -Procedures that work with the console. +Procédures travaillant avec la console. {{fbdoc item="desc"}} - These procedures provide ways to output text to the console, as well as control where and how text is output. + Ces procédures procure des moyens pour sortir du texte sur la console, ainsi que le contrôle de l'emplacement et de la manière dont le texte est sorti. -**{{anchor name="CONFIG|Configuring the Console"}}** - Statements that affect how text is displayed. -**{{anchor name="CURPOS|Cursor Color and Positioning"}}** - Procedures that move the cursor and change its color. -**{{anchor name="WRITING|Writing Text to the Console"}}** - Procedures that output text to the console. +**[[#CONFIG">Configuration de la console]]** + Les déclarations qui affectent la façon dont le texte est affiché. +**[[#CURPOS">Positionnement et couleur du curseur]]** + Les procédures qui déplacent le curseur et modifient sa couleur. +**[[#WRITING">Ecrire du texte sur la console]]** + Les procédures qui sortent du texte sur la console. -<<{{anchor name="CONFIG"}}{{fbdoc item="section" value="Configuring the Console"}} - =={{fbdoc item="keyword" value="KeyPgCls|CLS"}}== - Clears the entire screen or text viewport. - =={{fbdoc item="keyword" value="KeyPgWidth|WIDTH"}}== - Sets or returns the number of rows and columns of the console display. - =={{fbdoc item="keyword" value="KeyPgViewtext|VIEW PRINT"}}== - Sets the printable area of the console screen. +**Configuration de la console** + **[[KeyPgCls Cls]]** + Initialise l'écran entier ou la fenêtre texte. + **[[KeyPgWidth Width]]** + Valide ou retourne le nombre de lignes et colonnes d'affichage de la console. + **[[KeyPgViewtext View Print]]** + Valide la zone utilisable pour l'affichage de la console. -{{anchor name="CURPOS"}}{{fbdoc item="section" value="Cursor Color and Positioning"}} - =={{fbdoc item="keyword" value="KeyPgColor|COLOR"}}== - Changes the foreground and background color of text to be written. - =={{fbdoc item="keyword" value="KeyPgCsrlin|CSRLIN"}}== - Returns the row position of the cursor. - =={{fbdoc item="keyword" value="KeyPgPos|POS"}}== - Returns the column position of the cursor. - =={{fbdoc item="keyword" value="KeyPgLocate|LOCATE"}}== - Sets the row and column position of the cursor and its visibility. - =={{fbdoc item="keyword" value="KeyPgScreenCons|SCREEN (Console)"}}== - Gets the character or color attribute at a given location. -<<>>{{anchor name="WRITING"}}{{fbdoc item="section" value="Writing Text to the Console"}} - =={{fbdoc item="keyword" value="KeyPgPrint|PRINT"}}== - Writes text to the console. - =={{fbdoc item="keyword" value="KeyPgPrintusing|PRINT USING"}}== - Writes formatted text to the console. - =={{fbdoc item="keyword" value="KeyPgWrite|WRITE"}}== - Writes a list of items to the console. - =={{fbdoc item="keyword" value="KeyPgSpc|SPC"}}== - Skips a number of spaces when writing text. - =={{fbdoc item="keyword" value="KeyPgTab|TAB"}}== - Skips to a certain column when writing text. ->>::c:: +**Positionnement et couleur du curseur** + **[[KeyPgColor Color]]** + Change les couleurs de premier-plan et d'arrière-plan du texte à écrire. + **[[KeyPgCsrlin CsrLin]]** + Retourne la position-ligne du curseur. + **[[KeyPgPos Pos]]** + Retourne la position-colonne du curseur. + **[[KeyPgLocate Locate]]** + Valide la position ligne et colonne du cuseur ainsi que sa visibilité. + **[[KeyPgScreenCons Screen (Console)]]** + Récupère le caractère ou les attributs de couleur à la position donnée. +;**Ecrire du texte sur la console** + **[[KeyPgPrint Print]]** + Ecrire du texte sur la console. + **[[KeyPgPrintusing Print Using]]** + Ecrire du texte formaté sur la console. + **[[KeyPgWrite Write]]** + Ecrire une liste d'items sur la console. + **[[KeyPgSpc Spc]]** + Intercale un certain nombre d'espaces lors de l'écriture d'un texte. + **[[KeyPgTab Tab]]** + Intercale un certain nombre de colonnes lors de l'écriture d'un texte. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgControlFlow.wakka b/fbdocs/manual/cache/CatPgControlFlow.wakka index b908e39940..2ba890eafa 100644 --- a/fbdocs/manual/cache/CatPgControlFlow.wakka +++ b/fbdocs/manual/cache/CatPgControlFlow.wakka @@ -1,55 +1,55 @@ {{fbdoc item="title" value="Control Flow Statements"}}---- -Statements that direct the flow of program execution. +Les déclarations qui dirigent le flux d'exécution du programme. -**{{anchor name="TRANSFERRING|Transferring Statements"}}** - Statements that transfer control to another part of a program. -**{{anchor name="BRANCHING|Branching Statements"}}** - Statements that execute one of a number of code branches. -**{{anchor name="LOOPING|Looping Statements"}}** - Statements that execute code repeatedly. +**[[#TRANSFERRING">Déclarations de transfert]]** + Déclarations qui donnent le contrôle à une autre partie du programme. +**[[#BRANCHING">Déclarations de branchement]]** + Déclarations qui exécutent une parmi plusieurs possibilités de branchement. +**[[#LOOPING">Déclarations de boucle]]** + Déclarations qui exécutent du code avec répétition. -<<{{anchor name="TRANSFERRING"}}{{fbdoc item="section" value="Transferring Statements"}} - =={{fbdoc item="keyword" value="KeyPgGoto|GOTO"}}== - Transfers execution to another point in code defined by a text label. - =={{fbdoc item="keyword" value="KeyPgGosub|GOSUB"}}== - Temporarily transfers execution to another point in code, defined by a text label. - =={{fbdoc item="keyword" value="KeyPgOngoto|ON GOTO"}}== - Transfers execution to one of a number of points in code defined by text labels, based on the value of an expression. - =={{fbdoc item="keyword" value="KeyPgOngosub|ON GOSUB"}}== - Temporarily transfers execution to one of a number of points in code defined by text labels, based on the value of an expression. - =={{fbdoc item="keyword" value="KeyPgReturn|RETURN"}}== - Returns from a call using [[KeyPgGosub Gosub]] or from a procedure returning a value. +**Déclarations de transfert** + **[[KeyPgGoto Goto]]** + Transfère l'exécution à un autre point dans le code, défini par une étiquette de texte. + **[[KeyPgGosub GoSub]]** + Transfère temporairement l'exécution à un autre point dans le code, défini par une étiquette de texte. + **[[KeyPgOngoto On Goto]]** + Transfert de l'exécution, basé sur la valeur d'un expression, à un parmi un certain nombre de points du code définis par des étiquettes. + **[[KeyPgOngosub On Gosub]]** + Transfert temporaire de l'exécution, basé sur la valeur d'un expression, à un parmi un certain nombre de points du code définis par des étiquettes. + **[[KeyPgReturn Return]]** + Retourne à partir d'un appel à l'aide de [[KeyPgGosub GoSub]] ou d'une procédure retournant une valeur. -{{anchor name="BRANCHING"}}{{fbdoc item="section" value="Branching Statements"}} - =={{fbdoc item="keyword" value="KeyPgIfthen|IF..END IF"}}== - Executes a block of statements if a condition is met. - =={{fbdoc item="keyword" value="KeyPgElseif|..ELSE IF.."}}== - Executes a block of code if a condition is met and all previous conditions weren't met. - =={{fbdoc item="keyword" value="KeyPgElse|..ELSE.."}}== - Executes a block of code if all previous conditions weren't met. - =={{fbdoc item="keyword" value="KeyPgSelectcase|SELECT..END SELECT"}}== - Executes one of a number of statement blocks using a set of conditions. - =={{fbdoc item="keyword" value="KeyPgCase|..CASE.."}}== - Executes a block of code if a condition is met. - =={{fbdoc item="keyword" value="KeyPgCase|..CASE ELSE.."}}== - Executes a block of code if all previous conditions weren't met. +**Déclarations de branchement** + **[[KeyPgIfthen If..End If]]** + Exécute un bloc d'instructions si une condition est remplie. + **[[KeyPgElseif ..Else If..]]** + Exécute un bloc de code si une condition est remplie et que toutes les conditions précédentes ne sont pas remplies.. + **[[KeyPgElse ..Else..]]** + Exécute un bloc de code si toutes les conditions précédentes ne sont pas remplies. + **[[KeyPgSelectcase Select..End Select]]** + Exécute une parmi un certain nombre d'instructions en utilisant un ensemble de conditions. + **[[KeyPgCase ..Case..]]** + Exécute un bloc de code si une condition est remplie. + **[[KeyPgCase ..Case Else..]]** + Exécute un bloc de code si toutes les conditions précédentes ne sont pas remplies. - {{fbdoc item="subsect" value="Intra-branch control"}} - =={{fbdoc item="keyword" value="KeyPgExit|EXIT SELECT"}}== - Prematurely breaks out of a ##[[KeyPgSelectcase SELECT..END SELECT]]## statement. -<<>>{{anchor name="LOOPING"}}{{fbdoc item="section" value="Looping Statements"}} - =={{fbdoc item="keyword" value="KeyPgWhilewend|WHILE..WEND"}}== - Executes a block of statements while a condition is met. - =={{fbdoc item="keyword" value="KeyPgFornext|FOR..NEXT"}}== - Executes a block of statements while an iterator is less than or greater than an expression. - =={{fbdoc item="keyword" value="KeyPgDoloop|DO..LOOP"}}== - Executes a block of statements while or until a condition is met. + **Contrôle intra-branche** + **[[KeyPgExit Exit Select]]** + Sort prématurément d'une déclaration ##[[KeyPgSelectcase Select..End Select]]##. +;**Déclarations de boucle** + **[[KeyPgWhilewend While..Wend]]** + Exécute un bloc d'instructions tant qu'une condition est remplie. + **[[KeyPgFornext For..Next]]** + Exécute un bloc d'instructions tant qu'un itérateur est inférieur ou supérieur à une expression. + **[[KeyPgDoloop Do..Loop]]** + Exécute un bloc d'instructions tant qu'/jusqu'à ce qu'une condition est/soit remplie. - {{fbdoc item="subsect" value="Intra-loop control"}} - =={{fbdoc item="keyword" value="KeyPgContinue|CONTINUE WHILE"}}, {{fbdoc item="keyword" value="KeyPgContinue|CONTINUE FOR"}} and {{fbdoc item="keyword" value="KeyPgContinue|CONTINUE DO"}}== - Prematurely re-enters a loop. - =={{fbdoc item="keyword" value="KeyPgExit|EXIT WHILE"}}, {{fbdoc item="keyword" value="KeyPgExit|EXIT FOR"}} and {{fbdoc item="keyword" value="KeyPgExit|EXIT DO"}}== - Prematurely breaks out of a loop. ->>::c:: + **Contrôle intra-boucle** + **[[KeyPgContinue Continue While]], [[KeyPgContinue Continue For]] et [[KeyPgContinue Continue Do]]** + Re-rentre prématurément dans une boucle. + **[[KeyPgExit Exit While]], [[KeyPgExit Exit For]] et [[KeyPgExit Exit Do]]** + Sort prématurément d'une boucle. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgDate.wakka b/fbdocs/manual/cache/CatPgDate.wakka index d8653cdc9c..d39bd0e31d 100644 --- a/fbdocs/manual/cache/CatPgDate.wakka +++ b/fbdocs/manual/cache/CatPgDate.wakka @@ -1,70 +1,70 @@ {{fbdoc item="title" value="Date and Time Functions"}}---- -Procedures that work with dates and time. +Procédures qui manipulent date et temps. {{fbdoc item="desc"}} - These procedures provide ways to deal with date and time intervals in a consistent way. Additional procedures are provided to set and get the current system date and time, and to retrieve a time stamp for sensitive timing algorithms. + Ces procédures fournissent des moyens pour manipuler des intervalles de date et de temps d'une manière cohérente. Des procédures additionnelles sont prévues pour définir et obtenir la date et l'heure actuelles du système, et récupérer un horodatage pour les algorithmes sensibles au temps. -**{{anchor name="VBCOMPAT|VisualBasic compatible procedures"}}** - Procedures for working with so-called [[ProPgDates date serials]], similar to those used in Visual Basic(r). -**{{anchor name="DATETIME|Date and time procedures"}}** - Procedures for working with the system date and time. +**[[#VBCOMPAT">Procédures compatibles avec VisualBasic]]** + Procédures pour travailler avec les [[ProPgDates date serials]], similaires à celles utilisées dans Visual Basic (r). +**[[#DATETIME">Procédures de date et temps]]** + Procédures pour manipuler date et temps du système. -<<{{anchor name="VBCOMPAT"}}{{fbdoc item="section" value="VisualBasic compatible procedures"}} - =={{fbdoc item="keyword" value="KeyPgNow|NOW"}}== - Gets a [[ProPgDates date serial]] of the current date and time. +**Procédures compatibles avec VisualBasic** + **[[KeyPgNow Now]]** + Récupère une [[ProPgDates date serial]] de la date et de l'heure du système. - {{fbdoc item="subsect" value="Creating Date serials"}} - =={{fbdoc item="keyword" value="KeyPgDateSerial|DATESERIAL"}}== - Gets the [[ProPgDates date serial]] representation of a date. - =={{fbdoc item="keyword" value="KeyPgTimeserial|TIMESERIAL"}}== - Gets the [[ProPgDates date serial]] representation of a time. - =={{fbdoc item="keyword" value="KeyPgDateValue|DATEVALUE"}}== - Gets the [[ProPgDates date serial]] representation of a date expressed as a ##[[KeyPgString string]]##. - =={{fbdoc item="keyword" value="KeyPgTimeValue|TIMEVALUE"}}== - Gets the [[ProPgDates date serial]] representation of a time expressed as a ##[[KeyPgString string]]##. + **Création de "Date serials"** + **[[KeyPgDateSerial DateSerial]]** + Récupère la représentation [[ProPgDates date serial]] d'une date. + **[[KeyPgTimeserial TimeSerial]]** + Récupère la représentation [[ProPgDates date serial]] d'un temps. + **[[KeyPgDateValue DateValue]]** + Récupère la représentation [[ProPgDates date serial]] d'une date exprimée sous forme de ##[[KeyPgString String (chaîne)]]##. + **[[KeyPgTimeValue TimeValue]]** + Récupère la représentation [[ProPgDates date serial]] d'un temps exprimé sous forme de ##[[KeyPgString String (chaîne)]]##. - {{fbdoc item="subsect" value="Extracting information from Date serials"}} - =={{fbdoc item="keyword" value="KeyPgSecond|SECOND"}}== - Gets the seconds of the hour from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgMinute|MINUTE"}}== - Gets the minutes of the hour from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgHour|HOUR"}}== - Gets the hour of the day from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgDay|DAY"}}== - Gets the day of the month from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgWeekday|WEEKDAY"}}== - Gets the day of the week from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgMonth|MONTH"}}== - Gets the month of the year from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgYear|YEAR"}}== - Gets the year from a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgDatePart|DATEPART"}}== - Gets a time interval from a [[ProPgDates date serial]]. + **Extraction d'informations à partir de "Date serials"** + **[[KeyPgSecond Second]]** + Récupère les secondes de l'heure à partir d'une [[ProPgDates date serial]]. + **[[KeyPgMinute Minute]]** + Récupère les minutes de l'heure à partir d'une [[ProPgDates date serial]]. + **[[KeyPgHour Hour]]** + Récupère l'heure du jour à partir d'une [[ProPgDates date serial]]. + **[[KeyPgDay Day]]** + Récupère le jour du mois à partir d'une [[ProPgDates date serial]]. + **[[KeyPgWeekday Weekday]]** + Récupère le jour de la semaine à partir d'une [[ProPgDates date serial]]. + **[[KeyPgMonth Month]]** + Récupère le mois de l'année à partir d'une [[ProPgDates date serial]]. + **[[KeyPgYear Year]]** + Récupère l'année à partir d'une [[ProPgDates date serial]]. + **[[KeyPgDatePart DatePart]]** + Récupère l'intervalle de temps à partir d'une [[ProPgDates date serial]]. - {{fbdoc item="subsect" value="Extracting information from Date serials"}} - =={{fbdoc item="keyword" value="KeyPgDateAdd|DATEADD"}}== - Gets the result of a time interval added to a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgDateDiff|DATEDIFF"}}== - Gets a time interval between two [[ProPgDates date serial]]s. + **Extraction d'informations à partir de "Date serials"** + **[[KeyPgDateAdd DateAdd]]** + Récupère le résultat d'un intervalle de temps ajouté à une [[ProPgDates date serial]]. + **[[KeyPgDateDiff DateDiff]]** + Récupère l'intervalle de temps entre deux [[ProPgDates date serial]]s. - {{fbdoc item="subsect" value="Miscellaneous"}} - =={{fbdoc item="keyword" value="KeyPgIsDate|ISDATE"}}== - Tests if a ##[[KeyPgString String]]## can be converted to a [[ProPgDates date serial]]. - =={{fbdoc item="keyword" value="KeyPgMonthname|MONTHNAME"}}== - Gets the month name of its integer representation. - =={{fbdoc item="keyword" value="KeyPgWeekdayname|WEEKDAYNAME"}}== - Gets the weekday name of its integer representation. -<<>>{{anchor name="DATETIME"}}{{fbdoc item="section" value="Date and time procedures"}} - =={{fbdoc item="keyword" value="KeyPgDate|DATE"}}== - Gets the ##[[KeyPgString string]]## representation of the current system date. - =={{fbdoc item="keyword" value="KeyPgTime|TIME"}}== - Gets the ##[[KeyPgString string]]## representation of the current system time. - =={{fbdoc item="keyword" value="KeyPgSetdate|SETDATE"}}== - Sets the current system date. - =={{fbdoc item="keyword" value="KeyPgSettime|SETTIME"}}== - Sets the current system time. - =={{fbdoc item="keyword" value="KeyPgTimer|TIMER"}}== - Gets a counter expressed in seconds. ->>::c:: + **Divers** + **[[KeyPgIsDate IsDate]]** + Teste si une ##[[KeyPgString String (chaîne)]]## est convertible en [[ProPgDates date serial]]. + **[[KeyPgMonthname MonthName]]** + Récupère le nom du mois à partir de sa représentation sous forme de nombre entier. + **[[KeyPgWeekdayname WeekdayName]]** + Récupère le nom du jour de la semaine à partir de sa représentation sous forme de nombre entier. +;**Procédures de date et temps** + **[[KeyPgDate Date]]** + Récupère la ##[[KeyPgString String (chaîne)]]## représentation de la date courante du système. + **[[KeyPgTime Time]]** + Récupère la ##[[KeyPgString String (chaîne)]]## representation de l'heure courante du système. + **[[KeyPgSetdate SetDate]]** + Définit la date courante du système. + **[[KeyPgSettime SetTime]]** + Définit l'heure courante du système. + **[[KeyPgTimer Timer]]** + Définit un compteur en secondes. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgDddefines.wakka b/fbdocs/manual/cache/CatPgDddefines.wakka index 0ae4677ad7..45dc81caf9 100644 --- a/fbdocs/manual/cache/CatPgDddefines.wakka +++ b/fbdocs/manual/cache/CatPgDddefines.wakka @@ -1,123 +1,125 @@ {{fbdoc item="title" value="Intrinsic Defines"}}---- -Preprocessor symbols defined by the compiler. +Symboles de préprocesseur définis par le compilateur. {{fbdoc item="desc"}} - Intrinsic defines are set by the compiler and may be used as any other defined symbol. Intrinsic defines often convey information about the state of the compiler, either in general or at a specific point in the compilation process. Most intrinsic defines are associated with a value. + Les définitions intrinsèques sont fixées par le compilateur et peuvent être utilisées comme n'importe quel autre symbole défini. Les définitions intrinsèques souvent transmettre des informations sur l'état du compilateur, soit en général, soit à un moment précis dans le processus de compilation. La plupart des définitions intrinsèques sont associées à une valeur. -**{{anchor name="PLATFORM|Platform Information"}}** - Defines that provide information on the system. -**{{anchor name="VERSION|Version Information"}}** - Defines that provide information on the ##**fbc**## compiler version being used. -**{{anchor name="CMDLINE|Command-line switches"}}** - Defines that provide information with the command-line switches used with ##**fbc**##. -**{{anchor name="ENVIRONMENT|Environment Information"}}** - Defines that provide information about the operating system environment. -**{{anchor name="CONTEXT|Context-specific Information"}}** - Defines that provide context information about the compilation process. +**[[#PLATFORM">Information sur la plate-forme]]** + Définitions qui fournissent des informations sur le système. +**[[#VERSION">Information sur la version]]** + Définitions qui fournissent des informations sur la version du compilateur ##**fbc**## en usage. +**[[#CMDLINE">Commutateurs de ligne de commande]]** + Définitions qui fournissent des informations sur les commutateurs de ligne de commande utilisés avec ##**fbc**##. +**[[#ENVIRONMENT">Information sur l'environnement]]** + Définitions qui fournissent des informations sur l'environnement du système d'exploitation. +**[[#CONTEXT">Information sur le contexte spécifique]]** + Définitions qui fournissent des informations sur le contexte spécifique du processus de compilation. -<<{{anchor name="PLATFORM"}}{{fbdoc item="section" value="Platform Information"}} - =={{fbdoc item="keyword" value="KeyPgDdfbwin32|__FB_WIN32__"}}== - Defined if compiling for Windows. - =={{fbdoc item="keyword" value="KeyPgDdfblinux|__FB_LINUX__"}}== - Defined if compiling for Linux. - =={{fbdoc item="keyword" value="KeyPgDdfbdos|__FB_DOS__"}}== - Defined if compiling for DOS. - =={{fbdoc item="keyword" value="KeyPgDdfbcygwin|__FB_CYGWIN__"}}== - Defined if compiling for Cygwin. - =={{fbdoc item="keyword" value="KeyPgDdfbfreebsd|__FB_FREEBSD__"}}== - Defined if compiling for ""FreeBSD"". - =={{fbdoc item="keyword" value="KeyPgDdfbnetbsd|__FB_NETBSD__"}}== - Defined if compiling for ""NetBSD"". - =={{fbdoc item="keyword" value="KeyPgDdfbopenbsd|__FB_OPENBSD__"}}== - Defined if compiling for ""OpenBSD"". - =={{fbdoc item="keyword" value="KeyPgDdfbdarwin|__FB_DARWIN__"}}== - Defined if compiling for Darwin. - =={{fbdoc item="keyword" value="KeyPgDdfbxbox|__FB_XBOX__"}}== - Defined if compiling for Xbox. - =={{fbdoc item="keyword" value="KeyPgDdFBBigEndian|__FB_BIGENDIAN__"}}== - Defined if compiling on a system using big-endian byte-order. - =={{fbdoc item="keyword" value="KeyPgDdfbpcos|__FB_PCOS__"}}== - Defined if compiling for a common PC OS (e.g. DOS, Windows, OS/2). - =={{fbdoc item="keyword" value="KeyPgDdfbunix|__FB_UNIX__"}}== - Defined if compiling for a Unix-like OS. +**Information sur la plate-forme** + **[[KeyPgDdfbwin32 __FB_WIN32__]]** + Défini si compilation pour Windows. + **[[KeyPgDdfblinux __FB_LINUX__]]** + Défini si compilation pour Linux. + **[[KeyPgDdfbdos __FB_DOS__]]** + Défini si compilation pour DOS. + **[[KeyPgDdfbcygwin __FB_CYGWIN__]]** + Défini si compilation pour Cygwin. + **[[KeyPgDdfbfreebsd __FB_FREEBSD__]]** + Défini si compilation pour FreeBSD. + **[[KeyPgDdfbnetbsd __FB_NETBSD__]]** + Défini si compilation pour NetBSD. + **[[KeyPgDdfbopenbsd __FB_OPENBSD__]]** + Défini si compilation pour OpenBSD. + **[[KeyPgDdfbdarwin __FB_DARWIN__]]** + Défini si compilation pour Darwin. + **[[KeyPgDdfbxbox __FB_XBOX__]]** + Défini si compilation pour Xbox. + **[[KeyPgDdFBBigEndian __FB_BIGENDIAN__]]** + Défini si compilation pour un système utilisant un ordre des octets "big-endian". + **[[KeyPgDdfbpcos __Fb_Pcos__]]** + Défini si compilation pour un OS PC commun (e.g. DOS, Windows, OS/2). + **[[KeyPgDdfbunix __Fb_Unix__]]** + Défini si compilation pour un OS Unix. -{{anchor name="VERSION"}}{{fbdoc item="section" value="Version Information"}} - =={{fbdoc item="keyword" value="KeyPgDdfbversion|__FB_VERSION__"}}== - Defined as a string literal of the compiler version. - =={{fbdoc item="keyword" value="KeyPgDdFBVerMajor|__FB_VER_MAJOR__"}}== - Defined as an integral literal of the compiler major version number. - =={{fbdoc item="keyword" value="KeyPgDdFBVerMinor|__FB_VER_MINOR__"}}== - Defined as an integral literal of the compiler minor version number. - =={{fbdoc item="keyword" value="KeyPgDdFBVerPatch|__FB_VER_PATCH__"}}== - Defined as an integral literal of the compiler patch number. - =={{fbdoc item="keyword" value="KeyPgDdFBMinVersion|__FB_MIN_VERSION__"}}== - Macro to check for a minimum compiler version. - =={{fbdoc item="keyword" value="KeyPgDdFBBuildDate|__FB_BUILD_DATE__"}}== - Defined as a string literal of the compiler build date. - =={{fbdoc item="keyword" value="KeyPgDdfbsignature|__FB_SIGNATURE__"}}== - Defined as a string literal of the compiler signature. +**Information sur la version** + **[[KeyPgDdfbversion __FB_VERSION__]]** + Défini comme une chaîne littérale de la version du compilateur. + **[[KeyPgDdFBVerMajor __FB_VER_MAJOR__]]** + Défini comme le numéro de version majeure du compilateur. + **[[KeyPgDdFBVerMinor __FB_VER_MINOR__]]** + Défini comme le numéro de version mineure du compilateur. + **[[KeyPgDdFBVerPatch __FB_VER_PATCH__]]** + Défini comme le numéro de révision de la version du compilateur. + **[[KeyPgDdFBMinVersion __FB_MIN_VERSION__]]** + Macro pour tester la version minimum du compilateur. + **[[KeyPgDdFBBuildDate __FB_BUILD_DATE__]]** + Défini comme la date de compilation du compilateur. + **[[KeyPgDdfbsignature __FB_SIGNATURE__]]** + Défini comme la signature du compilateur. -{{anchor name="CMDLINE"}}{{fbdoc item="section" value="Command-line switches"}} - =={{fbdoc item="keyword" value="KeyPgDdFBBackend|__FB_BACKEND__"}}== - Defined to either ##"gas"## or ##"gcc"## depending on [[CompilerOptgen -gen]]. - =={{fbdoc item="keyword" value="KeyPgDdfbgcc|__FB_GCC__"}}== - True (##-1##) if -gen gcc is used, false (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdFBMain|__FB_MAIN__"}}== - Defined if compiling a module with an entry point. - =={{fbdoc item="keyword" value="KeyPgDdfbdebug|__FB_DEBUG__"}}== - True (##-1##) if the ##"-g"## switch was used, false (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfberr|__FB_ERR__"}}== - Zero (##0##) if neither the ##"-e"##, ##"-ex"## or ##"-exx"## switches were used. - =={{fbdoc item="keyword" value="KeyPgDdfbfpmode|__FB_FPMODE__"}}== - Defined as ##"fast"## if compiling for fast SSE math, ##"precise"## otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfbfpu|__FB_FPU__"}}== - Defined as ##"sse"## if compiling for SSE floating point unit, or ##"x87"## for normal x87 floating-point unit. - =={{fbdoc item="keyword" value="KeyPgDdfblang|__FB_LANG__"}}== - Defined to a string literal of the ##"-lang"## dialect used. - =={{fbdoc item="keyword" value="KeyPgDdfbmt|__FB_MT__"}}== - True (##-1##) if the ##"-mt"## switch was used, false (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboutdll|__FB_OUT_DLL__"}}== - True (##-1##) in a module being compiled and linked into a shared library, false (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboutexe|__FB_OUT_EXE__"}}== - True (##-1##) in a module being compiled and linked into an executable, false (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboutlib|__FB_OUT_LIB__"}}== - True (##-1##) in a module being compiled and linked into a static library, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboutobj|__FB_OUT_OBJ__"}}== - True (##-1##) in a module being compiled only, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfbsse|__FB_SSE__"}}== - Defined if compiling for SSE floating point unit. - =={{fbdoc item="keyword" value="KeyPgDdfbvectorize|__FB_VECTORIZE__"}}== - Defined as the level of automatic vectorization (##0## to ##2##) -<<>>{{anchor name="ENVIRONMENT"}}{{fbdoc item="section" value="Environment Information"}} - =={{fbdoc item="keyword" value="KeyPgDdfbargc|__FB_ARGC__"}}== - Defined as an integer literal of the number of command-line arguments passed to the program. - =={{fbdoc item="keyword" value="KeyPgDdfbargv|__FB_ARGV__"}}== - Defined as a ##[[KeyPgZstring Zstring]] [[KeyPgPtr Ptr]] [[KeyPgPtr Ptr]]## to the command line arguments passed to the program. - =={{fbdoc item="keyword" value="KeyPgDddate|__DATE__"}}== - Defined as a string literal of the compilation date. - =={{fbdoc item="keyword" value="KeyPgDdtime|__TIME__"}}== - Defined as a string literal of the compilation time. - =={{fbdoc item="keyword" value="KeyPgDdpath|__PATH__"}}== - Defined as a string literal of the absolute path of the module. +**Commutateurs de ligne de commande** + **[[KeyPgDdFBBackend __FB_Backend__]]** + Défini si ##"gas"## ou ##"gcc"## dépendent de [[CompilerOptgen -gen]]. + **[[KeyPgDdfbgcc __Fb_Gcc__]]** + Vrai (True) (##-1##) si -gen gcc est utilisé, sinon faux (false) (##0##). + **[[KeyPgDdFBMain __FB_MAIN__]]** + Défini si compilation d'un module avec un point d'entrée. + **[[KeyPgDdfbdebug __FB_DEBUG__]]** + Vrai (##-1##) si l'option ##"-g"## est utilisée, sinon faux (##0##). + **[[KeyPgDdfberr __FB_ERR__]]** + Zéro (##0##) si aucun des commutateurs ##"-e"##, ##"-ex"## ou ##"-exx"## n'est utilisé. + **[[KeyPgDdfbfpmode __Fb_Fpmode__]]** + Défini comme ##"fast"## si compilation pour les mathématiques SSE rapides, sinon ##"precise"##. + **[[KeyPgDdfbfpu __Fb_Fpu__]]** + Défini comme ##"sse"## si compilation unité SSE à virgule flottante, ou ##"x87"## pour une unité x87 normale à virgule flottante. + **[[KeyPgDdfblang __FB_LANG__]]** + Défini comme une chaîne littérale du dialecte ##"-lang"## utilisé. + **[[KeyPgDdfbmt __FB_MT__]]** + Vrai (##-1##) si le commutateur ##"-mt"## est utilisé, sinon faux (##0##). + **[[KeyPgDdfboutdll __FB_OUT_DLL__]]** + Vrai (##-1##) dans un module qui est compilé et lié dans une bibliothèque partagée, sinon faux (##0##). + **[[KeyPgDdfboutexe __FB_OUT_EXE__]]** + Vrai (##-1##) dans un module qui est compilé et lié dans un fichier exécutable, sinon faux (##0##). + **[[KeyPgDdfboutlib __FB_OUT_LIB__]]** + Vrai (##-1##) dans un module qui est compilé et lié dans une bibliothèque statique, sinon zéro (##0##). + **[[KeyPgDdfboutobj __FB_OUT_OBJ__]]** + Vrai (##-1##) dans un module qui est seulement compilé, sinon zéro (##0##). + **[[KeyPgDdfbsse __FB_SSE__]]** + Défini si compilation pour unité SSE à virgule flottante. + **[[KeyPgDdfbvectorize __Fb_Vectorize__]]** + Défini comme niveau de vectorisation automatique (##0## à ##2##) +;**Information sur l'environnement** + **[[KeyPgDdfbargc __FB_ARGC__]]** + Défini comme un littéral entier représentant le nombre d'arguments passés au programme par la ligne de commande . + **[[KeyPgDdfbargv __FB_ARGV__]]** + Défini comme un ##[[KeyPgZstring ZString]] [[KeyPgPtr Ptr]] [[KeyPgPtr Ptr]]## vers les arguments de la ligne de commande passés au programme. + **[[KeyPgDddate __DATE__]]** + Défini comme une chaîne littérale de la date de compilation. + **[[KeyPgDdtime __TIME__]]** + Défini comme une chaîne littérale de l'heure de la compilation. + **[[KeyPgDdpath __PATH__]]** + Défini comme une chaîne littérale du chemin absolu du module. + **Information sur le contexte spécifique** + **[[KeyPgDdfile __FILE__]] et [[KeyPgDdfilenq __FILE_NQ__]]** -{{anchor name="CONTEXT"}}{{fbdoc item="section" value="Context-specific Information"}} - =={{fbdoc item="keyword" value="KeyPgDdfile|__FILE__"}} and {{fbdoc item="keyword" value="KeyPgDdfilenq|__FILE_NQ__"}}== - Defined as the name of the module. - =={{fbdoc item="keyword" value="KeyPgDdfunction|__FUNCTION__"}} and {{fbdoc item="keyword" value="KeyPgDdfunctionnq|__FUNCTION_NQ__"}}== - Defined as the name of the procedure where it's used. - =={{fbdoc item="keyword" value="KeyPgDdline|__LINE__"}}== - Defined as an integer literal of the line of the module where it's used. - =={{fbdoc item="keyword" value="KeyPgDdfboptionbyval|__FB_OPTION_BYVAL__"}}== - True (##-1##) if parameters are declared by value by default, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboptiondynamic|__FB_OPTION_DYNAMIC__"}}== - True (##-1##) if all arrays are variable-length, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboptionescape|__FB_OPTION_ESCAPE__"}}== - True (##-1##) if string literals are processed for escape sequences, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboptiongosub|__FB_OPTION_GOSUB__"}}== - True (##-1##) if gosub support is enabled, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboptionexplicit|__FB_OPTION_EXPLICIT__"}}== - True (##-1##) if variables and objects need to be explicitly declared, zero (##0##) otherwise. - =={{fbdoc item="keyword" value="KeyPgDdfboptionprivate|__FB_OPTION_PRIVATE__"}}== +Défini comme le nom du module. + **[[KeyPgDdfunction __FUNCTION__]] et [[KeyPgDdfunctionnq __FUNCTION_NQ__]]** + Défini comme le nom de la procédure où il est utilisé. + **[[KeyPgDdline __LINE__]]** + Défini comme un littéral entier de la ligne du module où il est utilisé. + **[[KeyPgDdfboptionbyval __FB_OPTION_BYVAL__]]** + Vrai (##-1##) si les paramètres sont déclarés par la valeur, par défaut, sinon zéro (##0##). + **[[KeyPgDdfboptiondynamic __FB_OPTION_DYNAMIC__]]** + Vrai (##-1##) si tous les tableaux sont de longueur variable, sinon zéro (##0##). + **[[KeyPgDdfboptionescape __FB_OPTION_ESCAPE__]]** + Vrai (##-1##) si les chaînes littérales sont traitées avec des séquences d'échappement, sinon zéro (##0##). + **[[KeyPgDdfboptiongosub __Fb_Option_Gosub__]]** + Vrai (##-1##) si le support de gosub est activé, sinon zéro (##0##). + **[[KeyPgDdfboptionexplicit __FB_OPTION_EXPLICIT__]]** + Vrai (##-1##) si les variables et les objets doivent être explicitement déclarés, sinon zéro (##0##). + **[[KeyPgDdfboptionprivate __FB_OPTION_PRIVATE__]]** + Vrai (##-1##) si toutes les procédures sont privées (private) par défaut, sinon zéro (##0##). + ;
True (##-1##) if all procedures are private by default, zero (##0##) otherwise. >>::c:: diff --git a/fbdocs/manual/cache/CatPgError.wakka b/fbdocs/manual/cache/CatPgError.wakka index 06ae921da6..f651a4cac1 100644 --- a/fbdocs/manual/cache/CatPgError.wakka +++ b/fbdocs/manual/cache/CatPgError.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="Error Handling Functions"}}---- -Statements and procedures that provide runtime error-handling capabilities. +Déclarations et procédures qui donnent des possibilités de prise en charge des erreurs de fonctionnement. {{fbdoc item="desc"}} - These statements and procedures provide ways of dealing with runtime errors. Specific modules, procedures and source code lines can be retrieved, and error handlers can be set up. + Ces déclarations et procédures procurent des moyens de gérer les erreurs de fonctionnement. Des modules spécifiques, des procédures et des lignes de code source peuvent être récupérées, et les gestionnaires d'erreur peuvent être mis en place. -**{{anchor name="DETERMINE|Determining Errors"}}** - Procedures that retrieve information about an error. -**{{anchor name="HANDLE|Handling Errors"}}** - Statements that allow handling of errors. +**[[#DETERMINE">Détermination des erreurs]]** + Procédures pour récupérer des informations sur une erreur. +**[[#HANDLE">Gestion des erreurs]]** + Déclarations qui permettent le traîtement des erreurs. -<<{{anchor name="DETERMINE"}}{{fbdoc item="section" value="Determining Errors"}} - =={{fbdoc item="keyword" value="KeyPgErl|ERL"}}== - Gets the line in source code where the error occurred. - =={{fbdoc item="keyword" value="KeyPgErfn|ERFN"}}== - Gets the name of the function where the error occurred. - =={{fbdoc item="keyword" value="KeyPgErmn|ERMN"}}== - Gets the name of the source file where the error occurred. - =={{fbdoc item="keyword" value="KeyPgErr|ERR"}}== - Gets the error number of the last error that occurred. - =={{fbdoc item="keyword" value="KeyPgError|ERROR"}}== - Generates an error using an error number. -<<>>{{anchor name="HANDLE"}}{{fbdoc item="section" value="Handling Errors"}} - =={{fbdoc item="keyword" value="KeyPgOnerror|ON ERROR"}}== - Sets a global error handler using a label. - =={{fbdoc item="keyword" value="KeyPgLocal|ON LOCAL ERROR"}}== - Sets a local error handler using a label. - =={{fbdoc item="keyword" value="KeyPgResume|RESUME"}}== - Resumes execution at the line where the error occurred. - =={{fbdoc item="keyword" value="KeyPgResumenext|RESUME NEXT"}}== - Resumes execution at the line after where the error occurred. ->>::c:: +**Détermination des erreurs** + **[[KeyPgErl Erl]]** + Détermine la ligne dans le code source où l'erreur s'est produite. + **[[KeyPgErfn Erfn]]** + Détermine le nom de la fonction où l'erreur s'est produite. + **[[KeyPgErmn Ermn]]** + Détermine le nom du fichier source où l'erreur s'est produite. + **[[KeyPgErr Err]]** + Détermine le numéro d'erreur de la dernière erreur qui s'est produite. + **[[KeyPgError Erreur]]** + Génère une erreur en utilisant un numéro d'erreur. +;**Gestion des erreurs** + **[[KeyPgOnerror On Error]]** + Définit un gestionnaire global d'erreurs à l'aide d'une étiquette. + **[[KeyPgLocal On Local Error]]** + Définit un gestionnaire local d'erreurs à l'aide d'une étiquette. + **[[KeyPgResume Resume]]** + L'exécution reprend à la ligne où l'erreur s'est produite. + **[[KeyPgResumenext Resume Next]]** + L'exécution reprend à la ligne après l'endroit où l'erreur s'est produite. +;
{{fbdoc item="see"}} - - [[ProPgErrorHandling Error Handling]] - - [[TblRuntimeErrors Runtime Error Codes]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[TblRuntimeErrors Codes des erreurs de fonctionnement]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgFile.wakka b/fbdocs/manual/cache/CatPgFile.wakka index afe9a88de0..6197450230 100644 --- a/fbdocs/manual/cache/CatPgFile.wakka +++ b/fbdocs/manual/cache/CatPgFile.wakka @@ -1,98 +1,98 @@ {{fbdoc item="title" value="File I/O Functions"}}---- -Statements and procedures for working with files and devices. +Déclarations et les procédures pour travailler avec les fichiers et les périphériques. {{fbdoc item="desc"}} - These statements and procedures provide file and device i/o capabilities. So called //file numbers// can be bound to files or devices, which can be read or written to using formatted (text mode) or unformatted (binary mode) data. In binary mode, files and devices can be read from or written to in arbitrary locations. For multithreaded applications, files and devices can also be locked. + Ces déclarations et procédures fournissent des possibilités d'entrée/sortie fichiers et périphériques. Des //numéros de fichier// peuventt être liés à des fichiers ou des périphériques, qui peuvent être lues ou écrites à l'aide de données formatées (mode texte) ou non-formatée (mode binaire). En mode binaire, les fichiers et périphériques peuvent être lus ou écrits à des emplacements arbitraires. Pour applications "multi-thread", les fichiers et les périphériques peuvent également être verrouillés. -**{{anchor name="FILEOPS|Opening Files or Devices"}}** - Procedures and other keywords that provide read or write access to a file or device. -**{{anchor name="FILEIO|Reading from and Writing to Files or Devices"}}** - Procedures that read and write data to an opened file or device. -**{{anchor name="FILEPOS|File Position and other Info"}}** - Procedures that determine where reading and writing will take place within an opened file. +**[[#FILEOPS">Ouverture de fichiers ou de périphériques]]** + Procédures et autres mots-clés qui permettent l'accès, en lecture ou écriture, à un fichier ou un périphérique. +**[[#FILEIO">Lecture et écriture de fichiers ou de périphériques]]** + Procédures pour lire et écrire des données dans un fichier ouvert ou un périphérique. +**[[#FILEPOS">Position dans un fichier et autres informations]]** + Procédures qui déterminent où la lecture et l'écriture aura lieu au sein d'un fichier ouvert. -<<{{anchor name="FILEOPS"}}{{fbdoc item="section" value="Opening Files or Devices"}} - =={{fbdoc item="keyword" value="KeyPgFreefile|FREEFILE"}}== - Gets an available file number that can be used to read or write from files or devices. - =={{fbdoc item="keyword" value="KeyPgOpen|OPEN"}}== - Binds a file number to a physical file to provide reading and writing capabilities. - =={{fbdoc item="keyword" value="KeyPgOpenCom|OPEN COM"}}== - Binds a file number to a communications port. - =={{fbdoc item="keyword" value="KeyPgOpenCons|OPEN CONS"}}== - Binds a file number to the standard input and output streams. - =={{fbdoc item="keyword" value="KeyPgOpenErr|OPEN ERR"}}== - Binds a file number to the standard input and error streams. - =={{fbdoc item="keyword" value="KeyPgOpenLpt|OPEN LPT"}}== - Binds a file number to a printer device. - =={{fbdoc item="keyword" value="KeyPgOpenPipe|OPEN PIPE"}}== - Binds a file number to the input and output streams of a process. - =={{fbdoc item="keyword" value="KeyPgOpenScrn|OPEN SCRN"}}== - Binds a file number directly to the console. - =={{fbdoc item="keyword" value="KeyPgClose|CLOSE"}}== - Unbinds a file number from a file or device. - =={{fbdoc item="keyword" value="KeyPgReset|RESET"}}== - Unbinds all active file numbers. +**Ouverture de fichiers ou de périphériques** + **[[KeyPgFreefile FreeFile]]** + Obtient un numéro de fichier disponible qui peut être utilisé pour lire ou écrire à partir de fichiers ou de périphériques. + **[[KeyPgOpen Open]]** + Lie un numéro de fichier à un fichier physique pour fournir des capacités de lecture et d'écriture. + **[[KeyPgOpenCom Open Com]]** + Lie un numéro de fichier à un port de communication. + **[[KeyPgOpenCons Open Cons]]** + Lie un numéro de fichier aux flux d'entrée ou de sortie standard. + **[[KeyPgOpenErr Open Err]]** + Lie un numéro de fichier aux flux d'entrée et d'erreur standard. + **[[KeyPgOpenLpt Open Lpt]]** + Lie un numéro de fichier à un périphérique d'impression. + **[[KeyPgOpenPipe Open Pipe]]** + Lie un numéro de fichier aux flux d'entrée ou de sortie d'un processus. + **[[KeyPgOpenScrn Open Scrn]]** + Lie un numéro de fichier directement à la console. + **[[KeyPgClose Close]]** + Déconnecte un numéro de fichier d'un fichier ou d'un périphérique. + **[[KeyPgReset Reset]]** + Déconnecte tous les numéros de fichiers actifs. - {{fbdoc item="subsect" value="File I/O modes"}} - =={{fbdoc item="keyword" value="KeyPgInputfilemode|INPUT (File Mode)"}}== - Text data can be read from the file. - =={{fbdoc item="keyword" value="KeyPgOutput|OUTPUT"}}== - Text data can be written to the file. - =={{fbdoc item="keyword" value="KeyPgAppend|APPEND"}}== - Text data is added to the end of a file when output. - =={{fbdoc item="keyword" value="KeyPgBinary|BINARY"}}== - Arbitrary data can be read from or written to the file. - =={{fbdoc item="keyword" value="KeyPgRandom|RANDOM"}}== - Blocks of data of certain size can be read from and written to the file. + **Modes d'entrée/sortie fichier** + **[[KeyPgInputfilemode Input (Mode fichier)]]** + Les données de texte peuvent être lues à partir du fichier. + **[[KeyPgOutput Output]]** + Les données de texte peuvent être écrites dans le fichier. + **[[KeyPgAppend Append]]** + Les données de texte sont ajoutées à la fin d'un fichier qui est déjà ouvert (Output). + **[[KeyPgBinary Binary]]** + Des données binaires peuvent être lues ou écrites dans le fichier. + **[[KeyPgRandom Random]]** + Des blocs de données d'une certaine taille peuvent être lus et écrits dans le fichier. - {{fbdoc item="subsect" value="File access privileges"}} - =={{fbdoc item="keyword" value="KeyPgAccess|ACCESS"}}== - An overview of file access privileges. - =={{fbdoc item="keyword" value="KeyPgReadFile|READ (File Access)"}}== - Binary data can only be read from the file. - =={{fbdoc item="keyword" value="KeyPgWriteFile|WRITE (File Access)"}}== - Binary data can only be written to the file. - =={{fbdoc item="keyword" value="KeyPgReadWriteFile|READ WRITE(File Access)"}}== - Binary data can be read from and written to the file. + **Privilèges d'accès aux fichiers** + **[[KeyPgAccess Access]]** + Un aperçu des privilèges d'accès aux fichiers. + **[[KeyPgReadFile Read (Accès fichier)]]** + Les données binaires peuvent seulement être lues à partir du fichier. + **[[KeyPgWriteFile Write (Accès fichier)]]** + Les données binaires peuvent seulement être écrites dans le fichier. + **[[KeyPgReadWriteFile Read Write(Accès fichier)]]** + Les données binaires peuvent être lues et écrites dans le fichier.. - {{fbdoc item="subsect" value="Character encoding"}} - =={{fbdoc item="keyword" value="KeyPgEncoding|ENCODING"}}== - Specifies the character encoding of a file. -<<>>{{anchor name="FILEIO"}}{{fbdoc item="section" value="Reading from and Writing to Files or Devices"}} - =={{fbdoc item="keyword" value="KeyPgInputPp|INPUT #"}}== - Reads a list of values from a file or device. - =={{fbdoc item="keyword" value="KeyPgWritePp|WRITE #"}}== - Writes a list of values to a file or device. - =={{fbdoc item="keyword" value="KeyPgInputnum|INPUT()"}}== - Reads a number of characters from a file or device. - =={{fbdoc item="keyword" value="KeyPgWinput|WINPUT()"}}== - Reads a number of wide characters from a file or device. - =={{fbdoc item="keyword" value="KeyPgLineinputPp|LINE INPUT #"}}== - Reads a line of text from a file or device. - =={{fbdoc item="keyword" value="KeyPgPrintPp|PRINT #"}}== - Writes text data to a file or device. - =={{fbdoc item="keyword" value="KeyPgPrintusingPp|PRINT # USING"}}== - Writes formatted text data to a file or device. - =={{fbdoc item="keyword" value="KeyPgPutfileio|PUT #"}}== - Writes arbitrary data to a file or device. - =={{fbdoc item="keyword" value="KeyPgGetfileio|GET #"}}== - Reads arbitrary data from a file or device. + **Encodage des caractères** + **[[KeyPgEncoding Encoding]]** + Spécifie l'encodage des caractères d'un fichier. +;**Lecture et écriture de fichiers ou de périphériques** + **[[KeyPgInputPp Input #]]** + Lit une liste de valeurs à partir d'un fichier ou un périphérique. + **[[KeyPgWritePp Write #]]** + Ecrit une liste de valeurs dans un fichier ou un périphérique. + **[[KeyPgInputnum Input()]]** + Lit un nombre de caractères à partir d'un fichier ou d'un périphérique. + **[[KeyPgWinput Winput()]]** + Lit un nombre de "caractères larges" à partir d'un fichier ou d'un périphérique. + **[[KeyPgLineinputPp Line Input #]]** + Lit une ligne de texte à partir d'un fichier ou d'un périphérique. + **[[KeyPgPrintPp Print #]]** + Écrit des données texte dans un fichier ou un périphérique. + **[[KeyPgPrintusingPp Print # Using]]** + Écrit des données formatées dans un fichier ou un périphérique. + **[[KeyPgPutfileio Put #]]** + Écrit des données binaires vers un fichier ou un périphérique. + **[[KeyPgGetfileio Get #]]** + Lit des données binaires à partir d'un fichier ou d'un périphérique. -{{anchor name="FILEPOS"}}{{fbdoc item="section" value="File Position and other Info"}} - =={{fbdoc item="keyword" value="KeyPgLof|LOF"}}== - Gets the length (in bytes) of a file. - =={{fbdoc item="keyword" value="KeyPgLoc|LOC"}}== - Gets the file position of the last read or write operation. - =={{fbdoc item="keyword" value="KeyPgEof|EOF"}}== - Returns true if all of the data has been read from a file. - =={{fbdoc item="keyword" value="KeyPgSeekset|SEEK (Statement)"}}== - Sets the file position of the next read or write operation. - =={{fbdoc item="keyword" value="KeyPgSeekreturn|SEEK (Function)"}}== - Gets the file position of the next read or write operation. - =={{fbdoc item="keyword" value="KeyPgLock|LOCK"}}== - Restricts read or write access to a file or portion of a file. - =={{fbdoc item="keyword" value="KeyPgUnlock|UNLOCK"}}== - Remove read or write restrictions from a previous [[KeyPgLock Lock]] command. ->>::c:: +**Position dans un fichier et autres informations** + **[[KeyPgLof LOF]]** + Obtient la longueur (en octets) d'un fichier. + **[[KeyPgLoc LOC]]** + Obtient la position dans un fichier de la dernière lecture ou écriture. + **[[KeyPgEof EOF]]** + Renvoie "Vrai" si toutes les données ont été lues à partir d'un fichier. + **[[KeyPgSeekset Seek (Déclaration)]]** + Définit la position dans un fichier de la prochaine opération de lecture ou d'écriture. + **[[KeyPgSeekreturn Seek (Fonction)]]** + Obtient la position dans un fichier de la prochaine opération de lecture ou d'écriture. + **[[KeyPgLock Lock]]** + Limite l'accès en lecture/écriture sur un fichier ou une partie d'un fichier. + **[[KeyPgUnlock Unlock]]** + Supprime une restriction d'accès précédente imposée par la commande [[KeyPgLock Lock]]. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgFullIndex.wakka b/fbdocs/manual/cache/CatPgFullIndex.wakka index 43be275ca8..38764531b1 100644 --- a/fbdocs/manual/cache/CatPgFullIndex.wakka +++ b/fbdocs/manual/cache/CatPgFullIndex.wakka @@ -1,551 +1,552 @@ {{fbdoc item="title" value="Alphabetical Keywords List"}}---- -Alphabetical listing of keywords, macros and procedures. +Classement par ordre alphabétique des mots-clés, des macros et des procédures. -{{fbdoc item="back" value="DocToc|Table of Contents"}} -<< -{{fbdoc item="section" value="Operators"}} - - [[CatPgOperators See Operator List]] -{{fbdoc item="section" value="."}} - - {{fbdoc item="keyword" value="KeyPgDots|..."}} -{{fbdoc item="section" value="_"}} - - {{fbdoc item="keyword" value="KeyPgDddate|__DATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbargc|__FB_ARGC__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbargv|__FB_ARGV__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBBackend|__FB_BACKEND__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBBigEndian|__FB_BIGENDIAN__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBBuildDate|__FB_BUILD_DATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbcygwin|__FB_CYGWIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdarwin|__FB_DARWIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdebug|__FB_DEBUG__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdos|__FB_DOS__"}} - - {{fbdoc item="keyword" value="KeyPgDdfberr|__FB_ERR__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbfpmode|__FB_FPMODE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbfpu|__FB_FPU__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbfreebsd|__FB_FREEBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbgcc|__FB_GCC__"}} - - {{fbdoc item="keyword" value="KeyPgDdfblang|__FB_LANG__"}} - - {{fbdoc item="keyword" value="KeyPgDdfblinux|__FB_LINUX__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBMain|__FB_MAIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBMinVersion|__FB_MIN_VERSION__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbmt|__FB_MT__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbnetbsd|__FB_NETBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbopenbsd|__FB_OPENBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionbyval|__FB_OPTION_BYVAL__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptiondynamic|__FB_OPTION_DYNAMIC__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionescape|__FB_OPTION_ESCAPE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionexplicit|__FB_OPTION_EXPLICIT__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptiongosub|__FB_OPTION_GOSUB__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionprivate|__FB_OPTION_PRIVATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutdll|__FB_OUT_DLL__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutexe|__FB_OUT_EXE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutlib|__FB_OUT_LIB__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutobj|__FB_OUT_OBJ__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbpcos|__FB_PCOS__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbsignature|__FB_SIGNATURE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbsse|__FB_SSE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbunix|__FB_UNIX__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbvectorize|__FB_VECTORIZE__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerMajor|__FB_VER_MAJOR__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerMinor|__FB_VER_MINOR__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerPatch|__FB_VER_PATCH__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbversion|__FB_VERSION__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbwin32|__FB_WIN32__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbxbox|__FB_XBOX__"}} - - {{fbdoc item="keyword" value="KeyPgDdfile|__FILE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfilenq|__FILE_NQ__"}} - - {{fbdoc item="keyword" value="KeyPgDdfunction|__FUNCTION__"}} - - {{fbdoc item="keyword" value="KeyPgDdfunctionnq|__FUNCTION_NQ__"}} - - {{fbdoc item="keyword" value="KeyPgDdline|__LINE__"}} - - {{fbdoc item="keyword" value="KeyPgDdpath|__PATH__"}} - - {{fbdoc item="keyword" value="KeyPgDdtime|__TIME__"}} -{{fbdoc item="section" value="#"}} - - {{fbdoc item="keyword" value="KeyPgPpdefine|#DEFINE"}} - - {{fbdoc item="keyword" value="KeyPgPpelse|#ELSE"}} - - {{fbdoc item="keyword" value="KeyPgPpelseif|#ELSEIF"}} - - {{fbdoc item="keyword" value="KeyPgPpendif|#ENDIF"}} - - {{fbdoc item="keyword" value="KeyPgPpmacro|#ENDMACRO"}} - - {{fbdoc item="keyword" value="KeyPgPperror|#ERROR"}} - - {{fbdoc item="keyword" value="KeyPgPpif|#IF"}} - - {{fbdoc item="keyword" value="KeyPgPpifdef|#IFDEF"}} - - {{fbdoc item="keyword" value="KeyPgPpifndef|#IFNDEF"}} - - {{fbdoc item="keyword" value="KeyPgInclib|#INCLIB"}} - - {{fbdoc item="keyword" value="KeyPgInclude|#INCLUDE"}} - - {{fbdoc item="keyword" value="KeyPgPplang|#LANG"}} - - {{fbdoc item="keyword" value="KeyPgPplibpath|#LIBPATH"}} - - {{fbdoc item="keyword" value="KeyPgPpline|#LINE"}} - - {{fbdoc item="keyword" value="KeyPgPpmacro|#MACRO"}} - - {{fbdoc item="keyword" value="KeyPgPragma|#PRAGMA"}} - - {{fbdoc item="keyword" value="KeyPgPpprint|#PRINT"}} - - {{fbdoc item="keyword" value="KeyPgPpundef|#UNDEF"}} -{{fbdoc item="section" value="$"}} - - {{fbdoc item="keyword" value="KeyPgMetaDynamic|$DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaInclude|$INCLUDE"}} - - {{fbdoc item="keyword" value="KeyPgMetaStatic|$STATIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaLang|$LANG"}} -{{fbdoc item="section" value="A"}} - - {{fbdoc item="keyword" value="KeyPgAbs|ABS"}} - - {{fbdoc item="keyword" value="KeyPgAccess|ACCESS"}} - - {{fbdoc item="keyword" value="KeyPgAcos|ACOS"}} - - {{fbdoc item="keyword" value="KeyPgAddGfx|ADD (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgAlias|ALIAS"}} - - {{fbdoc item="keyword" value="KeyPgAllocate|ALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgAlphaGfx|ALPHA (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgOpAnd|AND"}} - - {{fbdoc item="keyword" value="KeyPgOpAndAlso|ANDALSO"}} - - {{fbdoc item="keyword" value="KeyPgAndGfx|AND (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgAny|ANY"}} - - {{fbdoc item="keyword" value="KeyPgAppend|APPEND"}} - - {{fbdoc item="keyword" value="KeyPgAs|AS"}} - - {{fbdoc item="keyword" value="KeyPgAssert|ASSERT"}} - - {{fbdoc item="keyword" value="KeyPgAssertwarn|ASSERTWARN"}} - - {{fbdoc item="keyword" value="KeyPgAsc|ASC"}} - - {{fbdoc item="keyword" value="KeyPgAsin|ASIN"}} - - {{fbdoc item="keyword" value="KeyPgAsm|ASM"}} - - {{fbdoc item="keyword" value="KeyPgAtan2|ATAN2"}} - - {{fbdoc item="keyword" value="KeyPgAtn|ATN"}} -{{fbdoc item="section" value="B"}} - - {{fbdoc item="keyword" value="KeyPgBeep|BEEP"}} - - {{fbdoc item="keyword" value="KeyPgBin|BIN"}} - - {{fbdoc item="keyword" value="KeyPgBinary|BINARY"}} - - {{fbdoc item="keyword" value="KeyPgBit|BIT"}} - - {{fbdoc item="keyword" value="KeyPgBitreset|BITRESET"}} - - {{fbdoc item="keyword" value="KeyPgBitset|BITSET"}} - - {{fbdoc item="keyword" value="KeyPgBload|BLOAD"}} - - {{fbdoc item="keyword" value="KeyPgBsave|BSAVE"}} - - {{fbdoc item="keyword" value="KeyPgByref|BYREF"}} - - {{fbdoc item="keyword" value="KeyPgByte|BYTE"}} - - {{fbdoc item="keyword" value="KeyPgByval|BYVAL"}} -{{fbdoc item="section" value="C"}} - - {{fbdoc item="keyword" value="KeyPgCall|CALL"}} - - {{fbdoc item="keyword" value="KeyPgCallocate|CALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgCase|CASE"}} - - {{fbdoc item="keyword" value="KeyPgCast|CAST"}} - - {{fbdoc item="keyword" value="KeyPgCbyte|CBYTE"}} - - {{fbdoc item="keyword" value="KeyPgCdbl|CDBL"}} - - {{fbdoc item="keyword" value="KeyPgCdecl|CDECL"}} - - {{fbdoc item="keyword" value="KeyPgChain|CHAIN"}} - - {{fbdoc item="keyword" value="KeyPgChdir|CHDIR"}} - - {{fbdoc item="keyword" value="KeyPgChr|CHR"}} - - {{fbdoc item="keyword" value="KeyPgCint|CINT"}} - - {{fbdoc item="keyword" value="KeyPgCircle|CIRCLE"}} - - {{fbdoc item="keyword" value="KeyPgClass|CLASS"}} - - {{fbdoc item="keyword" value="KeyPgClear|CLEAR"}} - - {{fbdoc item="keyword" value="KeyPgClng|CLNG"}} - - {{fbdoc item="keyword" value="KeyPgClngint|CLNGINT"}} - - {{fbdoc item="keyword" value="KeyPgClose|CLOSE"}} - - {{fbdoc item="keyword" value="KeyPgCls|CLS"}} - - {{fbdoc item="keyword" value="KeyPgColor|COLOR"}} - - {{fbdoc item="keyword" value="KeyPgCommand|COMMAND"}} - - {{fbdoc item="keyword" value="KeyPgCommon|COMMON"}} - - {{fbdoc item="keyword" value="KeyPgCondBroadcast|CONDBROADCAST"}} - - {{fbdoc item="keyword" value="KeyPgCondCreate|CONDCREATE"}} - - {{fbdoc item="keyword" value="KeyPgCondDestroy|CONDDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgCondSignal|CONDSIGNAL"}} - - {{fbdoc item="keyword" value="KeyPgCondWait|CONDWAIT"}} - - {{fbdoc item="keyword" value="KeyPgConst|CONST"}} - - {{fbdoc item="keyword" value="KeyPgConstMember|CONST (Member)"}} - - {{fbdoc item="keyword" value="KeyPgConstQualifier|CONST (Qualifier)"}} - - {{fbdoc item="keyword" value="KeyPgConstructor|CONSTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgModuleConstructor|CONSTRUCTOR (Module)"}} - - {{fbdoc item="keyword" value="KeyPgContinue|CONTINUE"}} - - {{fbdoc item="keyword" value="KeyPgCos|COS"}} - - {{fbdoc item="keyword" value="KeyPgCptr|CPTR"}} - - {{fbdoc item="keyword" value="KeyPgCshort|CSHORT"}} - - {{fbdoc item="keyword" value="KeyPgCsign|CSIGN"}} - - {{fbdoc item="keyword" value="KeyPgCsng|CSNG"}} - - {{fbdoc item="keyword" value="KeyPgCsrlin|CSRLIN"}} - - {{fbdoc item="keyword" value="KeyPgCubyte|CUBYTE"}} - - {{fbdoc item="keyword" value="KeyPgCuint|CUINT"}} - - {{fbdoc item="keyword" value="KeyPgCulng|CULNG"}} - - {{fbdoc item="keyword" value="KeyPgCulngint|CULNGINT"}} - - {{fbdoc item="keyword" value="KeyPgCunsg|CUNSG"}} - - {{fbdoc item="keyword" value="KeyPgCurdir|CURDIR"}} - - {{fbdoc item="keyword" value="KeyPgCushort|CUSHORT"}} - - {{fbdoc item="keyword" value="KeyPgCustomgfx|CUSTOM (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgCvd|CVD"}} - - {{fbdoc item="keyword" value="KeyPgCvi|CVI"}} - - {{fbdoc item="keyword" value="KeyPgCvl|CVL"}} - - {{fbdoc item="keyword" value="KeyPgCvlongint|CVLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgCvs|CVS"}} - - {{fbdoc item="keyword" value="KeyPgCvshort|CVSHORT"}} -{{fbdoc item="section" value="D"}} - - {{fbdoc item="keyword" value="KeyPgData|DATA"}} - - {{fbdoc item="keyword" value="KeyPgDate|DATE"}} - - {{fbdoc item="keyword" value="KeyPgDateAdd|DATEADD"}} - - {{fbdoc item="keyword" value="KeyPgDateDiff|DATEDIFF"}} - - {{fbdoc item="keyword" value="KeyPgDatePart|DATEPART"}} - - {{fbdoc item="keyword" value="KeyPgDateSerial|DATESERIAL"}} - - {{fbdoc item="keyword" value="KeyPgDateValue|DATEVALUE"}} - - {{fbdoc item="keyword" value="KeyPgDay|DAY"}} - - {{fbdoc item="keyword" value="KeyPgDeallocate|DEALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgDeclare|DECLARE"}} - - {{fbdoc item="keyword" value="KeyPgDefbyte|DEFBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefdbl|DEFDBL"}} - - {{fbdoc item="keyword" value="KeyPgDefined|DEFINED"}} - - {{fbdoc item="keyword" value="KeyPgDefint|DEFINT"}} - - {{fbdoc item="keyword" value="KeyPgDeflng|DEFLNG"}} - - {{fbdoc item="keyword" value="KeyPgDeflongint|DEFLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefshort|DEFSHORT"}} - - {{fbdoc item="keyword" value="KeyPgDefsng|DEFSNG"}} - - {{fbdoc item="keyword" value="KeyPgDefstr|DEFSTR"}} - - {{fbdoc item="keyword" value="KeyPgDefubyte|DEFUBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefuint|DEFUINT"}} - - {{fbdoc item="keyword" value="KeyPgDefulongint|DEFULONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefushort|DEFUSHORT"}} - - {{fbdoc item="keyword" value="KeyPgOpDelete|DELETE"}} - - {{fbdoc item="keyword" value="KeyPgDestructor|DESTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgModuleDestructor|DESTRUCTOR (Module)"}} - - {{fbdoc item="keyword" value="KeyPgDim|DIM"}} - - {{fbdoc item="keyword" value="KeyPgDir|DIR"}} - - {{fbdoc item="keyword" value="KeyPgDo|DO"}} - - {{fbdoc item="keyword" value="KeyPgDoloop|DO...LOOP"}} - - {{fbdoc item="keyword" value="KeyPgDouble|DOUBLE"}} - - {{fbdoc item="keyword" value="KeyPgDraw|DRAW"}} - - {{fbdoc item="keyword" value="KeyPgDrawString|DRAW STRING"}} - - {{fbdoc item="keyword" value="KeyPgDylibfree|DYLIBFREE"}} - - {{fbdoc item="keyword" value="KeyPgDylibload|DYLIBLOAD"}} - - {{fbdoc item="keyword" value="KeyPgDylibsymbol|DYLIBSYMBOL"}} -{{fbdoc item="section" value="E"}} - - {{fbdoc item="keyword" value="KeyPgElse|ELSE"}} - - {{fbdoc item="keyword" value="KeyPgElseif|ELSEIF"}} - - {{fbdoc item="keyword" value="KeyPgEncoding|ENCODING"}} - - {{fbdoc item="keyword" value="KeyPgEndblock|END (Block)"}} - - {{fbdoc item="keyword" value="KeyPgEnd|END (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgEndif|END IF"}} - - {{fbdoc item="keyword" value="KeyPgEnum|ENUM"}} - - {{fbdoc item="keyword" value="KeyPgSetenviron|ENVIRON statement"}} - - {{fbdoc item="keyword" value="KeyPgEnviron|ENVIRON"}} - - {{fbdoc item="keyword" value="KeyPgEof|EOF"}} - - {{fbdoc item="keyword" value="KeyPgOpEqv|EQV"}} - - {{fbdoc item="keyword" value="KeyPgErase|ERASE"}} - - {{fbdoc item="keyword" value="KeyPgErfn|ERFN"}} - - {{fbdoc item="keyword" value="KeyPgErl|ERL"}} - - {{fbdoc item="keyword" value="KeyPgErmn|ERMN"}} - - {{fbdoc item="keyword" value="KeyPgErr|ERR"}} - - {{fbdoc item="keyword" value="KeyPgError|ERROR"}} - - {{fbdoc item="keyword" value="KeyPgExec|EXEC"}} - - {{fbdoc item="keyword" value="KeyPgExepath|EXEPATH"}} - - {{fbdoc item="keyword" value="KeyPgExit|EXIT"}} - - {{fbdoc item="keyword" value="KeyPgExp|EXP"}} - - {{fbdoc item="keyword" value="KeyPgExport|EXPORT"}} - - {{fbdoc item="keyword" value="KeyPgExtern|EXTERN"}} - - {{fbdoc item="keyword" value="KeyPgExternBlock|EXTERN...END EXTERN"}} -{{fbdoc item="section" value="F"}} - - {{fbdoc item="keyword" value="KeyPgField|FIELD"}} - - {{fbdoc item="keyword" value="KeyPgFileattr|FILEATTR"}} - - {{fbdoc item="keyword" value="KeyPgFilecopy|FILECOPY"}} - - {{fbdoc item="keyword" value="KeyPgFiledatetime|FILEDATETIME"}} - - {{fbdoc item="keyword" value="KeyPgFileexists|FILEEXISTS"}} - - {{fbdoc item="keyword" value="KeyPgFilelen|FILELEN"}} - - {{fbdoc item="keyword" value="KeyPgFix|FIX"}} - - {{fbdoc item="keyword" value="KeyPgFlip|FLIP"}} - - {{fbdoc item="keyword" value="KeyPgFor|FOR"}} - - {{fbdoc item="keyword" value="KeyPgFornext|FOR...NEXT"}} - - {{fbdoc item="keyword" value="KeyPgFormat|FORMAT"}} - - {{fbdoc item="keyword" value="KeyPgFrac|FRAC"}} - - {{fbdoc item="keyword" value="KeyPgFre|FRE"}} - - {{fbdoc item="keyword" value="KeyPgFreefile|FREEFILE"}} - - {{fbdoc item="keyword" value="KeyPgFunction|FUNCTION"}} - - {{fbdoc item="keyword" value="KeyPgMemberFunction|FUNCTION (Member)"}} -{{fbdoc item="section" value="G"}} - - {{fbdoc item="keyword" value="KeyPgGetgraphics|GET (Graphics)"}} - - {{fbdoc item="keyword" value="KeyPgGetfileio|GET # (File I/O)"}} - - {{fbdoc item="keyword" value="KeyPgGetjoystick|GETJOYSTICK"}} - - {{fbdoc item="keyword" value="KeyPgGetkey|GETKEY"}} - - {{fbdoc item="keyword" value="KeyPgGetmouse|GETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgGosub|GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgGoto|GOTO"}} -{{fbdoc item="section" value="H"}} - - {{fbdoc item="keyword" value="KeyPgHex|HEX"}} - - {{fbdoc item="keyword" value="KeyPgHibyte|HIBYTE"}} - - {{fbdoc item="keyword" value="KeyPgHiword|HIWORD"}} - - {{fbdoc item="keyword" value="KeyPgHour|HOUR"}} -{{fbdoc item="section" value="I"}} - - {{fbdoc item="keyword" value="KeyPgIfthen|IF...THEN"}} - - {{fbdoc item="keyword" value="KeyPgIif|IIF"}} - - {{fbdoc item="keyword" value="KeyPgImageConvertRow|IMAGECONVERTROW"}} - - {{fbdoc item="keyword" value="KeyPgImagecreate|IMAGECREATE"}} - - {{fbdoc item="keyword" value="KeyPgImageDestroy|IMAGEDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgImageInfo|IMAGEINFO"}} - - {{fbdoc item="keyword" value="KeyPgOpImp|IMP"}} - - {{fbdoc item="keyword" value="KeyPgImport|IMPORT"}} - - {{fbdoc item="keyword" value="KeyPgInkey|INKEY"}} - - {{fbdoc item="keyword" value="KeyPgInp|INP"}} - - {{fbdoc item="keyword" value="KeyPgInput|INPUT (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgInputfilemode|INPUT (File I/O)"}} - - {{fbdoc item="keyword" value="KeyPgInputPp|INPUT #"}} - - {{fbdoc item="keyword" value="KeyPgInputnum|INPUT$"}} - - {{fbdoc item="keyword" value="KeyPgInstr|INSTR"}} - - {{fbdoc item="keyword" value="KeyPgInstrrev|INSTRREV"}} - - {{fbdoc item="keyword" value="KeyPgInt|INT"}} - - {{fbdoc item="keyword" value="KeyPgInteger|INTEGER"}} - - {{fbdoc item="keyword" value="KeyPgIs|IS"}} - - {{fbdoc item="keyword" value="KeyPgIsDate|ISDATE"}} -<<>> -{{fbdoc item="section" value="K"}} - - {{fbdoc item="keyword" value="KeyPgKill|KILL"}} -{{fbdoc item="section" value="L"}} - - {{fbdoc item="keyword" value="KeyPgLbound|LBOUND"}} - - {{fbdoc item="keyword" value="KeyPgLcase|LCASE"}} - - {{fbdoc item="keyword" value="KeyPgLeft|LEFT"}} - - {{fbdoc item="keyword" value="KeyPgLen|LEN"}} - - {{fbdoc item="keyword" value="KeyPgLet|LET"}} - - {{fbdoc item="keyword" value="KeyPgLib|LIB"}} - - {{fbdoc item="keyword" value="KeyPgLinegraphics|LINE"}} - - {{fbdoc item="keyword" value="KeyPgLineinput|LINE INPUT"}} - - {{fbdoc item="keyword" value="KeyPgLineinputPp|LINE INPUT #"}} - - {{fbdoc item="keyword" value="KeyPgLoByte|LOBYTE"}} - - {{fbdoc item="keyword" value="KeyPgLoc|LOC"}} - - {{fbdoc item="keyword" value="KeyPgLocal|LOCAL"}} - - {{fbdoc item="keyword" value="KeyPgLocate|LOCATE"}} - - {{fbdoc item="keyword" value="KeyPgLock|LOCK"}} - - {{fbdoc item="keyword" value="KeyPgLof|LOF"}} - - {{fbdoc item="keyword" value="KeyPgLog|LOG"}} - - {{fbdoc item="keyword" value="KeyPgLong|LONG"}} - - {{fbdoc item="keyword" value="KeyPgLongint|LONGINT"}} - - {{fbdoc item="keyword" value="KeyPgLoop|LOOP"}} - - {{fbdoc item="keyword" value="KeyPgLoWord|LOWORD"}} - - {{fbdoc item="keyword" value="KeyPgLpos|LPOS"}} - - {{fbdoc item="keyword" value="KeyPgLprint|LPRINT"}} - - {{fbdoc item="keyword" value="KeyPgLset|LSET"}} - - {{fbdoc item="keyword" value="KeyPgLtrim|LTRIM"}} -{{fbdoc item="section" value="M"}} - - {{fbdoc item="keyword" value="KeyPgMidstatement|MID (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgMidfunction|MID (Function)"}} - - {{fbdoc item="keyword" value="KeyPgMinute|MINUTE"}} - - {{fbdoc item="keyword" value="KeyPgMkd|MKD"}} - - {{fbdoc item="keyword" value="KeyPgMkdir|MKDIR"}} - - {{fbdoc item="keyword" value="KeyPgMki|MKI"}} - - {{fbdoc item="keyword" value="KeyPgMkl|MKL"}} - - {{fbdoc item="keyword" value="KeyPgMklongint|MKLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgMks|MKS"}} - - {{fbdoc item="keyword" value="KeyPgMkshort|MKSHORT"}} - - {{fbdoc item="keyword" value="KeyPgOpModulus|MOD"}} - - {{fbdoc item="keyword" value="KeyPgMonth|MONTH"}} - - {{fbdoc item="keyword" value="KeyPgMonthname|MONTHNAME"}} - - {{fbdoc item="keyword" value="KeyPgMultikey|MULTIKEY"}} - - {{fbdoc item="keyword" value="KeyPgMutexCreate|MUTEXCREATE"}} - - {{fbdoc item="keyword" value="KeyPgMutexDestroy|MUTEXDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgMutexLock|MUTEXLOCK"}} - - {{fbdoc item="keyword" value="KeyPgMutexUnlock|MUTEXUNLOCK"}} -{{fbdoc item="section" value="N"}} - - {{fbdoc item="keyword" value="KeyPgNaked|NAKED"}} - - {{fbdoc item="keyword" value="KeyPgName|NAME"}} - - {{fbdoc item="keyword" value="KeyPgNamespace|NAMESPACE"}} - - {{fbdoc item="keyword" value="KeyPgNext|NEXT"}} - - {{fbdoc item="keyword" value="KeyPgOpNew|NEW"}} - - {{fbdoc item="keyword" value="KeyPgOpPlacementNew|NEW (Placement)"}} - - {{fbdoc item="keyword" value="KeyPgResumenext|NEXT (RESUME)"}} - - {{fbdoc item="keyword" value="KeyPgOpNot|NOT"}} - - {{fbdoc item="keyword" value="KeyPgNow|NOW"}} -{{fbdoc item="section" value="O"}} - - {{fbdoc item="keyword" value="KeyPgOct|OCT"}} - - {{fbdoc item="keyword" value="KeyPgOffsetof|OFFSETOF"}} - - {{fbdoc item="keyword" value="KeyPgOnerror|ON ERROR"}} - - {{fbdoc item="keyword" value="KeyPgOngosub|ON...GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOngoto|ON...GOTO"}} - - {{fbdoc item="keyword" value="KeyPgInclude|ONCE"}} - - {{fbdoc item="keyword" value="KeyPgOpen|OPEN"}} - - {{fbdoc item="keyword" value="KeyPgOpenCom|OPEN COM"}} - - {{fbdoc item="keyword" value="KeyPgOpenCons|OPEN CONS"}} - - {{fbdoc item="keyword" value="KeyPgOpenErr|OPEN ERR"}} - - {{fbdoc item="keyword" value="KeyPgOpenLpt|OPEN LPT"}} - - {{fbdoc item="keyword" value="KeyPgOpenPipe|OPEN PIPE"}} - - {{fbdoc item="keyword" value="KeyPgOpenScrn|OPEN SCRN"}} - - {{fbdoc item="keyword" value="KeyPgOperator|OPERATOR"}} - - {{fbdoc item="keyword" value="KeyPgOption|OPTION()"}} - - {{fbdoc item="keyword" value="KeyPgOptionbase|OPTION BASE"}} - - {{fbdoc item="keyword" value="KeyPgOptionbyval|OPTION BYVAL"}} - - {{fbdoc item="keyword" value="KeyPgOptiondynamic|OPTION DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgOptionescape|OPTION ESCAPE"}} - - {{fbdoc item="keyword" value="KeyPgOptionexplicit|OPTION EXPLICIT"}} - - {{fbdoc item="keyword" value="KeyPgOptiongosub|OPTION GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnogosub|OPTION NOGOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnokeyword|OPTION NOKEYWORD"}} - - {{fbdoc item="keyword" value="KeyPgOptionprivate|OPTION PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgOptionstatic|OPTION STATIC"}} - - {{fbdoc item="keyword" value="KeyPgOpOr|OR"}} - - {{fbdoc item="keyword" value="KeyPgOrGfx|OR (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgOpOrElse|ORELSE"}} - - {{fbdoc item="keyword" value="KeyPgOut|OUT"}} - - {{fbdoc item="keyword" value="KeyPgOutput|OUTPUT"}} - - {{fbdoc item="keyword" value="KeyPgOverload|OVERLOAD"}} -{{fbdoc item="section" value="P"}} - - {{fbdoc item="keyword" value="KeyPgPaint|PAINT"}} - - {{fbdoc item="keyword" value="KeyPgPalette|PALETTE"}} - - {{fbdoc item="keyword" value="KeyPgPascal|PASCAL"}} - - {{fbdoc item="keyword" value="KeyPgPcopy|PCOPY"}} - - {{fbdoc item="keyword" value="KeyPgPeek|PEEK"}} - - {{fbdoc item="keyword" value="KeyPgPmap|PMAP"}} - - {{fbdoc item="keyword" value="KeyPgPoint|POINT"}} - - {{fbdoc item="keyword" value="KeyPgPointer|POINTER"}} - - {{fbdoc item="keyword" value="KeyPgPoke|POKE"}} - - {{fbdoc item="keyword" value="KeyPgPos|POS"}} - - {{fbdoc item="keyword" value="KeyPgPreserve|PRESERVE"}} - - {{fbdoc item="keyword" value="KeyPgPreset|PRESET"}} - - {{fbdoc item="keyword" value="KeyPgPrint|PRINT"}} - - {{fbdoc item="keyword" value="KeyPgPrintPp|PRINT #"}} - - {{fbdoc item="keyword" value="KeyPgPrintusing|PRINT USING"}} - - {{fbdoc item="keyword" value="KeyPgPrintusingPp|PRINT USING #"}} - - {{fbdoc item="keyword" value="KeyPgPrivate|PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgVisPrivate|PRIVATE: (Access Control)"}} - - {{fbdoc item="keyword" value="KeyPgOpProcptr|PROCPTR"}} - - {{fbdoc item="keyword" value="KeyPgProperty|PROPERTY"}} - - {{fbdoc item="keyword" value="KeyPgVisProtected|PROTECTED: (Access Control)"}} - - {{fbdoc item="keyword" value="KeyPgPset|PSET (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgPsetGfx|PSET (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgPtr|PTR"}} - - {{fbdoc item="keyword" value="KeyPgPublic|PUBLIC"}} - - {{fbdoc item="keyword" value="KeyPgVisPublic|PUBLIC: (Access Control)"}} - - {{fbdoc item="keyword" value="KeyPgPutgraphics|PUT (Graphics)"}} - - {{fbdoc item="keyword" value="KeyPgPutfileio|PUT # (File I/O)"}} -{{fbdoc item="section" value="R"}} - - {{fbdoc item="keyword" value="KeyPgRandom|RANDOM"}} - - {{fbdoc item="keyword" value="KeyPgRandomize|RANDOMIZE"}} - - {{fbdoc item="keyword" value="KeyPgRead|READ"}} - - {{fbdoc item="keyword" value="KeyPgReadFile|READ (File Access)"}} - - {{fbdoc item="keyword" value="KeyPgReadWriteFile|READ WRITE (File Access)"}} - - {{fbdoc item="keyword" value="KeyPgReallocate|REALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgRedim|REDIM"}} - - {{fbdoc item="keyword" value="KeyPgRem|REM"}} - - {{fbdoc item="keyword" value="KeyPgReset|RESET"}} - - {{fbdoc item="keyword" value="KeyPgRestore|RESTORE"}} - - {{fbdoc item="keyword" value="KeyPgResume|RESUME"}} - - {{fbdoc item="keyword" value="KeyPgResumenext|RESUME NEXT"}} - - {{fbdoc item="keyword" value="KeyPgReturn|RETURN"}} - - {{fbdoc item="keyword" value="KeyPgRgb|RGB"}} - - {{fbdoc item="keyword" value="KeyPgRgba|RGBA"}} - - {{fbdoc item="keyword" value="KeyPgRight|RIGHT"}} - - {{fbdoc item="keyword" value="KeyPgRmdir|RMDIR"}} - - {{fbdoc item="keyword" value="KeyPgRnd|RND"}} - - {{fbdoc item="keyword" value="KeyPgRset|RSET"}} - - {{fbdoc item="keyword" value="KeyPgRtrim|RTRIM"}} - - {{fbdoc item="keyword" value="KeyPgRun|RUN"}} -{{fbdoc item="section" value="S"}} - - {{fbdoc item="keyword" value="KeyPgSadd|SADD"}} - - {{fbdoc item="keyword" value="KeyPgScope|SCOPE"}} - - {{fbdoc item="keyword" value="KeyPgScreengraphics|SCREEN"}} - - {{fbdoc item="keyword" value="KeyPgScreenCons|SCREEN (Console)"}} - - {{fbdoc item="keyword" value="KeyPgScreencopy|SCREENCOPY"}} - - {{fbdoc item="keyword" value="KeyPgScreencontrol|SCREENCONTROL"}} - - {{fbdoc item="keyword" value="KeyPgScreenevent|SCREENEVENT"}} - - {{fbdoc item="keyword" value="KeyPgScreeninfo|SCREENINFO"}} - - {{fbdoc item="keyword" value="KeyPgScreenglproc|SCREENGLPROC"}} - - {{fbdoc item="keyword" value="KeyPgScreenlist|SCREENLIST"}} - - {{fbdoc item="keyword" value="KeyPgScreenlock|SCREENLOCK"}} - - {{fbdoc item="keyword" value="KeyPgScreenptr|SCREENPTR"}} - - {{fbdoc item="keyword" value="KeyPgScreenres|SCREENRES"}} - - {{fbdoc item="keyword" value="KeyPgScreenset|SCREENSET"}} - - {{fbdoc item="keyword" value="KeyPgScreensync|SCREENSYNC"}} - - {{fbdoc item="keyword" value="KeyPgScreenunlock|SCREENUNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgSecond|SECOND"}} - - {{fbdoc item="keyword" value="KeyPgSeekset|SEEK (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgSeekreturn|SEEK (Function)"}} - - {{fbdoc item="keyword" value="KeyPgSelectcase|SELECT CASE"}} - - {{fbdoc item="keyword" value="KeyPgSetdate|SETDATE"}} - - {{fbdoc item="keyword" value="KeyPgSetenviron|SETENVIRON"}} - - {{fbdoc item="keyword" value="KeyPgSetmouse|SETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgSettime|SETTIME"}} - - {{fbdoc item="keyword" value="KeyPgSgn|SGN"}} - - {{fbdoc item="keyword" value="KeyPgShared|SHARED"}} - - {{fbdoc item="keyword" value="KeyPgShell|SHELL"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftLeft|SHL"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftRight|SHR"}} - - {{fbdoc item="keyword" value="KeyPgShort|SHORT"}} - - {{fbdoc item="keyword" value="KeyPgSin|SIN"}} - - {{fbdoc item="keyword" value="KeyPgSingle|SINGLE"}} - - {{fbdoc item="keyword" value="KeyPgSizeof|SIZEOF"}} - - {{fbdoc item="keyword" value="KeyPgSleep|SLEEP"}} - - {{fbdoc item="keyword" value="KeyPgSpace|SPACE"}} - - {{fbdoc item="keyword" value="KeyPgSpc|SPC"}} - - {{fbdoc item="keyword" value="KeyPgSqr|SQR"}} - - {{fbdoc item="keyword" value="KeyPgStatic|STATIC"}} - - {{fbdoc item="keyword" value="KeyPgStaticMember|STATIC (Member)"}} - - {{fbdoc item="keyword" value="KeyPgStdcall|STDCALL"}} - - {{fbdoc item="keyword" value="KeyPgStep|STEP"}} - - {{fbdoc item="keyword" value="KeyPgStick|STICK"}} - - {{fbdoc item="keyword" value="KeyPgStop|STOP"}} - - {{fbdoc item="keyword" value="KeyPgStr|STR"}} - - {{fbdoc item="keyword" value="KeyPgStrig|STRIG"}} - - {{fbdoc item="keyword" value="KeyPgStringFunction|STRING (Function)"}} - - {{fbdoc item="keyword" value="KeyPgString|STRING"}} - - {{fbdoc item="keyword" value="KeyPgOpStrptr|STRPTR"}} - - {{fbdoc item="keyword" value="KeyPgSub|SUB"}} - - {{fbdoc item="keyword" value="KeyPgMemberSub|SUB (Member)"}} - - {{fbdoc item="keyword" value="KeyPgSwap|SWAP"}} - - {{fbdoc item="keyword" value="KeyPgSystem|SYSTEM"}} -{{fbdoc item="section" value="T"}} - - {{fbdoc item="keyword" value="KeyPgTab|TAB"}} - - {{fbdoc item="keyword" value="KeyPgTan|TAN"}} - - {{fbdoc item="keyword" value="KeyPgThen|THEN"}} - - {{fbdoc item="keyword" value="KeyPgThis|THIS"}} - - {{fbdoc item="keyword" value="KeyPgThreadCreate|THREADCREATE"}} - - {{fbdoc item="keyword" value="KeyPgThreadWait|THREADWAIT"}} - - {{fbdoc item="keyword" value="KeyPgTime|TIME"}} - - {{fbdoc item="keyword" value="KeyPgTimeserial|TIMESERIAL"}} - - {{fbdoc item="keyword" value="KeyPgTimeValue|TIMEVALUE"}} - - {{fbdoc item="keyword" value="KeyPgTimer|TIMER"}} - - {{fbdoc item="keyword" value="KeyPgTo|TO"}} - - {{fbdoc item="keyword" value="KeyPgTransGfx|TRANS (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgTrim|TRIM"}} - - {{fbdoc item="keyword" value="KeyPgTypeAlias|TYPE (Alias)"}} - - {{fbdoc item="keyword" value="KeyPgTypeTemp|TYPE (Temporary)"}} - - {{fbdoc item="keyword" value="KeyPgType|TYPE (UDT)"}} - - {{fbdoc item="keyword" value="KeyPgTypeof|TYPEOF"}} -{{fbdoc item="section" value="U"}} - - {{fbdoc item="keyword" value="KeyPgUbound|UBOUND"}} - - {{fbdoc item="keyword" value="KeyPgUbyte|UBYTE"}} - - {{fbdoc item="keyword" value="KeyPgUcase|UCASE"}} - - {{fbdoc item="keyword" value="KeyPgUinteger|UINTEGER"}} - - {{fbdoc item="keyword" value="KeyPgUlong|ULONG"}} - - {{fbdoc item="keyword" value="KeyPgUlongint|ULONGINT"}} - - {{fbdoc item="keyword" value="KeyPgUnion|UNION"}} - - {{fbdoc item="keyword" value="KeyPgUnlock|UNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgUnsigned|UNSIGNED"}} - - {{fbdoc item="keyword" value="KeyPgUntil|UNTIL"}} - - {{fbdoc item="keyword" value="KeyPgUshort|USHORT"}} - - {{fbdoc item="keyword" value="KeyPgPrintusing|USING (PRINT)"}} - - {{fbdoc item="keyword" value="KeyPgUsing|USING (Namespaces)"}} -{{fbdoc item="section" value="V"}} - - {{fbdoc item="keyword" value="KeyPgVaArg|VA_ARG"}} - - {{fbdoc item="keyword" value="KeyPgVaFirst|VA_FIRST"}} - - {{fbdoc item="keyword" value="KeyPgVaNext|VA_NEXT"}} - - {{fbdoc item="keyword" value="KeyPgVal|VAL"}} - - {{fbdoc item="keyword" value="KeyPgVallng|VALLNG"}} - - {{fbdoc item="keyword" value="KeyPgValint|VALINT"}} - - {{fbdoc item="keyword" value="KeyPgValuint|VALUINT"}} - - {{fbdoc item="keyword" value="KeyPgValulng|VALULNG"}} - - {{fbdoc item="keyword" value="KeyPgVar|VAR"}} - - {{fbdoc item="keyword" value="KeyPgOpVarptr|VARPTR"}} - - {{fbdoc item="keyword" value="KeyPgViewtext|VIEW PRINT"}} - - {{fbdoc item="keyword" value="KeyPgViewgraphics|VIEW (Graphics)"}} -{{fbdoc item="section" value="W"}} - - {{fbdoc item="keyword" value="KeyPgWait|WAIT"}} - - {{fbdoc item="keyword" value="KeyPgWbin|WBIN"}} - - {{fbdoc item="keyword" value="KeyPgWchr|WCHR"}} - - {{fbdoc item="keyword" value="KeyPgWeekday|WEEKDAY"}} - - {{fbdoc item="keyword" value="KeyPgWeekdayname|WEEKDAYNAME"}} - - {{fbdoc item="keyword" value="KeyPgWend|WEND"}} - - {{fbdoc item="keyword" value="KeyPgWhile|WHILE"}} - - {{fbdoc item="keyword" value="KeyPgWhilewend|WHILE...WEND"}} - - {{fbdoc item="keyword" value="KeyPgWhex|WHEX"}} - - {{fbdoc item="keyword" value="KeyPgWidth|WIDTH"}} - - {{fbdoc item="keyword" value="KeyPgWindow|WINDOW"}} - - {{fbdoc item="keyword" value="KeyPgWindowtitle|WINDOWTITLE"}} - - {{fbdoc item="keyword" value="KeyPgWinput|WINPUT"}} - - {{fbdoc item="keyword" value="KeyPgWith|WITH"}} - - {{fbdoc item="keyword" value="KeyPgWoct|WOCT"}} - - {{fbdoc item="keyword" value="KeyPgWrite|WRITE"}} - - {{fbdoc item="keyword" value="KeyPgWritePp|WRITE #"}} - - {{fbdoc item="keyword" value="KeyPgWriteFile|WRITE (File Access)"}} - - {{fbdoc item="keyword" value="KeyPgWspace|WSPACE"}} - - {{fbdoc item="keyword" value="KeyPgWstr|WSTR"}} - - {{fbdoc item="keyword" value="KeyPgWstring|WSTRING (Data Type)"}} - - {{fbdoc item="keyword" value="KeyPgWstringFunction|WSTRING (Function)"}} -{{fbdoc item="section" value="X"}} - - {{fbdoc item="keyword" value="KeyPgOpXor|XOR"}} - - {{fbdoc item="keyword" value="KeyPgXorGfx|XOR (GRAPHICS PUT)"}} -{{fbdoc item="section" value="Y"}} +**Opérateurs** +- [[CatPgOperators Voir la liste des opérateurs]] +**.** + - [[KeyPgDots ...]] +**_** + - [[KeyPgDddate __DATE__]] +- [[KeyPgDdfbargc __FB_ARGC__]] + - [[KeyPgDdfbargv __FB_ARGV__]] + - [[KeyPgDdFBBackend __Fb_Backend__]] + - [[KeyPgDdFBBigEndian __FB_BIGENDIAN__]] + - [[KeyPgDdFBBuildDate __FB_BUILD_DATE__]] + - [[KeyPgDdfbcygwin __FB_CYGWIN__]] + - [[KeyPgDdfbdarwin __FB_DARWIN__]] + - [[KeyPgDdfbdebug __FB_DEBUG__]] + - [[KeyPgDdfbdos __FB_DOS__]] + - [[KeyPgDdfberr __FB_ERR__]] + - [[KeyPgDdfbfpmode __Fb_Fpmode__]] + - [[KeyPgDdfbfpu __Fb_Fpu__]] + - [[KeyPgDdfbfreebsd __FB_FREEBSD__]] + - [[KeyPgDdfbgcc __Fb_Gcc__]] + - [[KeyPgDdfblang __FB_LANG__]] + - [[KeyPgDdfblinux __FB_LINUX__]] + - [[KeyPgDdFBMain __FB_MAIN__]] + - [[KeyPgDdFBMinVersion __FB_MIN_VERSION__]] + - [[KeyPgDdfbmt __FB_MT__]] + - [[KeyPgDdfbnetbsd __FB_NETBSD__]] + - [[KeyPgDdfbopenbsd __FB_OPENBSD__]] + - [[KeyPgDdfboptionbyval __FB_OPTION_BYVAL__]] + - [[KeyPgDdfboptiondynamic __FB_OPTION_DYNAMIC__]] + - [[KeyPgDdfboptionescape __FB_OPTION_ESCAPE__]] + - [[KeyPgDdfboptionexplicit __FB_OPTION_EXPLICIT__]] + - [[KeyPgDdfboptiongosub __Fb_Option_Gosub__]] + - [[KeyPgDdfboptionprivate __FB_OPTION_PRIVATE__]] + - [[KeyPgDdfboutdll __FB_OUT_DLL__]] + - [[KeyPgDdfboutexe __FB_OUT_EXE__]] + - [[KeyPgDdfboutlib __FB_OUT_LIB__]] + - [[KeyPgDdfboutobj __FB_OUT_OBJ__]] + - [[KeyPgDdfbpcos __Fb_Pcos__]] + - [[KeyPgDdfbsignature __FB_SIGNATURE__]] + - [[KeyPgDdfbsse __FB_SSE__]] + - [[KeyPgDdfbunix __Fb_Unix__]] + - [[KeyPgDdfbvectorize __Fb_Vectorize__]] + - [[KeyPgDdFBVerMajor __FB_VER_MAJOR__]] + - [[KeyPgDdFBVerMinor __FB_VER_MINOR__]] + - [[KeyPgDdFBVerPatch __FB_VER_PATCH__]] + - [[KeyPgDdfbversion __FB_VERSION__]] + - [[KeyPgDdfbwin32 __FB_WIN32__]] + - [[KeyPgDdfbxbox __FB_XBOX__]] + - [[KeyPgDdfile __FILE__]] + - [[KeyPgDdfilenq __FILE_NQ__]] + - [[KeyPgDdfunction __FUNCTION__]] + - [[KeyPgDdfunctionnq __FUNCTION_NQ__]] + - [[KeyPgDdline __LINE__]] + - [[KeyPgDdpath __PATH__]] + - [[KeyPgDdtime __TIME__]] + **#** + - [[KeyPgPpdefine #define]] + - [[KeyPgPpelse #else]] +- [[KeyPgPpelseif #elseif]] + - [[KeyPgPpendif #endif]] + - [[KeyPgPpmacro #endmacro]] + - [[KeyPgPperror #error]] + - [[KeyPgPpif #if]] + - [[KeyPgPpifdef #ifdef]] + - [[KeyPgPpifndef #ifndef]] + - [[KeyPgInclib #inclib]] + - [[KeyPgInclude #include]] + - [[KeyPgPplang #lang]] + - [[KeyPgPplibpath #libpath]] + - [[KeyPgPpline #line]] + - [[KeyPgPpmacro #macro]] + - [[KeyPgPragma #pragma]] + - [[KeyPgPpprint #print]] + - [[KeyPgPpundef #undef]] + **$** + - [[KeyPgMetaDynamic $Dynamic]] + - [[KeyPgMetaInclude $Include]] +- [[KeyPgMetaStatic $Static]] + - [[KeyPgMetaLang $Lang]] + **A** + - [[KeyPgAbs Abs]] + - [[KeyPgAccess Access]] +- [[KeyPgAcos Acos]] + - [[KeyPgAddGfx Add (Paramètre Put graphique)]] + - [[KeyPgAlias Alias]] + - [[KeyPgAllocate Allocate]] + - [[KeyPgAlphaGfx Alpha (Paramètre Put graphique)]] + - [[KeyPgOpAnd And]] + - [[KeyPgOpAndAlso AndAlso]] + - [[KeyPgAndGfx And (Paramètre Put graphique)]] + - [[KeyPgAny Any]] + - [[KeyPgAppend Append]] + - [[KeyPgAs As]] + - [[KeyPgAssert Assert]] + - [[KeyPgAssertwarn AssertWarn]] + - [[KeyPgAsc Asc]] + - [[KeyPgAsin Asin]] + - [[KeyPgAsm Asm]] + - [[KeyPgAtan2 Atan2]] + - [[KeyPgAtn Atn]] + **B** + - [[KeyPgBeep Beep]] + - [[KeyPgBin Bin]] +- [[KeyPgBinary Binary]] + - [[KeyPgBit Bit]] + - [[KeyPgBitreset BitReset]] + - [[KeyPgBitset BitSet]] + - [[KeyPgBload BLoad]] + - [[KeyPgBsave BSave]] + - [[KeyPgByref ByRef]] + - [[KeyPgByte Byte]] + - [[KeyPgByval ByVal]] + **C** + - [[KeyPgCall Call]] + - [[KeyPgCallocate CAllocate]] +- [[KeyPgCase Case]] + - [[KeyPgCast Cast]] + - [[KeyPgCbyte CByte]] + - [[KeyPgCdbl CDbl]] + - [[KeyPgCdecl cdecl]] + - [[KeyPgChain Chain]] + - [[KeyPgChdir ChDir]] + - [[KeyPgChr Chr]] + - [[KeyPgCint CInt]] + - [[KeyPgCircle Circle]] + - [[KeyPgClass Class]] + - [[KeyPgClear Clear]] + - [[KeyPgClng CLng]] + - [[KeyPgClngint CLngInt]] + - [[KeyPgClose Close]] + - [[KeyPgCls Cls]] + - [[KeyPgColor Color]] + - [[KeyPgCommand Command]] + - [[KeyPgCommon Common]] + - [[KeyPgCondBroadcast CondBroadcast]] + - [[KeyPgCondCreate CondCreate]] + - [[KeyPgCondDestroy CondDestroy]] + - [[KeyPgCondSignal CondSignal]] + - [[KeyPgCondWait CondWait]] + - [[KeyPgConst Const]] + - [[KeyPgConstMember Const (Membre)]] + - [[KeyPgConstQualifier Const (Qualification)]] + - [[KeyPgConstructor Constructor]] + - [[KeyPgModuleConstructor Constructor (Module)]] + - [[KeyPgContinue Continue]] + - [[KeyPgCos Cos]] + - [[KeyPgCptr CPtr]] + - [[KeyPgCshort CShort]] + - [[KeyPgCsign CSign]] + - [[KeyPgCsng CSng]] + - [[KeyPgCsrlin CsrLin]] + - [[KeyPgCubyte CUByte]] + - [[KeyPgCuint CUInt]] + - [[KeyPgCulng CULng]] + - [[KeyPgCulngint CULngInt]] + - [[KeyPgCunsg CUnsg]] + - [[KeyPgCurdir CurDir]] + - [[KeyPgCushort CUShort]] + - [[KeyPgCustomgfx Custom (Paramètre Put graphique)]] + - [[KeyPgCvd CVD]] + - [[KeyPgCvi CVI]] + - [[KeyPgCvl CVL]] + - [[KeyPgCvlongint CVLongInt]] + - [[KeyPgCvs CVS]] + - [[KeyPgCvshort CVShort]] + **D** + - [[KeyPgData Data]] + - [[KeyPgDate Date]] +- [[KeyPgDateAdd DateAdd]] + - [[KeyPgDateDiff DateDiff]] + - [[KeyPgDatePart DatePart]] + - [[KeyPgDateSerial DateSerial]] + - [[KeyPgDateValue DateValue]] + - [[KeyPgDay Day]] + - [[KeyPgDeallocate Deallocate]] + - [[KeyPgDeclare Declare]] + - [[KeyPgDefbyte DefByte]] + - [[KeyPgDefdbl DefDbl]] + - [[KeyPgDefined defined]] + - [[KeyPgDefint DefInt]] + - [[KeyPgDeflng DefLng]] + - [[KeyPgDeflongint Deflongint]] + - [[KeyPgDefshort DefShort]] + - [[KeyPgDefsng DefSng]] + - [[KeyPgDefstr DefStr]] + - [[KeyPgDefubyte DefUByte]] + - [[KeyPgDefuint DefUInt]] + - [[KeyPgDefulongint Defulongint]] + - [[KeyPgDefushort DefUShort]] + - [[KeyPgOpDelete Delete]] + - [[KeyPgDestructor Destructor]] + - [[KeyPgModuleDestructor Destructor (Module)]] + - [[KeyPgDim Dim]] + - [[KeyPgDir Dir]] + - [[KeyPgDo Do]] + - [[KeyPgDoloop Do...Loop]] + - [[KeyPgDouble Double]] + - [[KeyPgDraw Draw]] + - [[KeyPgDrawString Draw String]] + - [[KeyPgDylibfree DyLibFree]] + - [[KeyPgDylibload DyLibLoad]] + - [[KeyPgDylibsymbol DyLibSymbol]] + **E** + - [[KeyPgElse Else]] + - [[KeyPgElseif ElseIf]] +- [[KeyPgEncoding Encoding]] + - [[KeyPgEndblock End (Bloc)]] + - [[KeyPgEnd End (Déclaration)]] + - [[KeyPgEndif End If]] + - [[KeyPgEnum Enum]] + - [[KeyPgSetenviron Environ Statement]] + - [[KeyPgEnviron Environ]] + - [[KeyPgEof EOF]] + - [[KeyPgOpEqv Eqv]] + - [[KeyPgErase Erase]] + - [[KeyPgErfn Erfn]] + - [[KeyPgErl Erl]] + - [[KeyPgErmn Ermn]] + - [[KeyPgErr Err]] + - [[KeyPgError Error]] + - [[KeyPgExec Exec]] + - [[KeyPgExepath ExePath]] + - [[KeyPgExit Exit]] + - [[KeyPgExp Exp]] + - [[KeyPgExport Export]] + - [[KeyPgExtern Extern]] + - [[KeyPgExternBlock Extern...End Extern]] + **F** + - [[KeyPgField Field]] + - [[KeyPgFileattr FileAttr]] +- [[KeyPgFilecopy FileCopy]] + - [[KeyPgFiledatetime FileDateTime]] + - [[KeyPgFileexists FileExists]] + - [[KeyPgFilelen FileLen]] + - [[KeyPgFix Fix]] + - [[KeyPgFlip Flip]] + - [[KeyPgFor For]] + - [[KeyPgFornext For...Next]] + - [[KeyPgFormat Format]] + - [[KeyPgFrac Frac]] + - [[KeyPgFre Fre]] + - [[KeyPgFreefile FreeFile]] + - [[KeyPgFunction Function]] + - [[KeyPgMemberFunction Function (Membre)]] + **G** + - [[KeyPgGetgraphics Get (Graphique)]] + - [[KeyPgGetfileio Get # (Fichier Entrée/Sortie)]] +- [[KeyPgGetjoystick GetJoystick]] + - [[KeyPgGetkey GetKey]] + - [[KeyPgGetmouse GetMouse]] + - [[KeyPgGosub GoSub]] + - [[KeyPgGoto Goto]] + **H** + - [[KeyPgHex Hex]] + - [[KeyPgHibyte HiByte]] +- [[KeyPgHiword HiWord]] + - [[KeyPgHour Hour]] + **I** + - [[KeyPgIfthen If...Then]] + - [[KeyPgIif IIf]] +- [[KeyPgImageConvertRow ImageConvertRow]] + - [[KeyPgImagecreate ImageCreate]] + - [[KeyPgImageDestroy ImageDestroy]] + - [[KeyPgImageInfo ImageInfo]] + - [[KeyPgOpImp Imp]] + - [[KeyPgImport Import]] + - [[KeyPgInkey Inkey]] + - [[KeyPgInp Inp]] + - [[KeyPgInput Input (Déclaration)]] + - [[KeyPgInputfilemode Input (Fichier Entrée/Sortie)]] + - [[KeyPgInputPp Input #]] + - [[KeyPgInputnum Input$]] + - [[KeyPgInstr InStr]] + - [[KeyPgInstrrev InStrRev]] + - [[KeyPgInt Int]] + - [[KeyPgInteger Integer]] + - [[KeyPgIs Is]] + - [[KeyPgIsDate IsDate]] + ;**K** + - [[KeyPgKill Kill]] + **L** +- [[KeyPgLbound LBound]] +- [[KeyPgLcase LCase]] + - [[KeyPgLeft Left]] +- [[KeyPgLen Len]] + - [[KeyPgLet Let]] + - [[KeyPgLib Lib]] + - [[KeyPgLinegraphics Line]] + - [[KeyPgLineinput Line Input]] + - [[KeyPgLineinputPp Line Input #]] + - [[KeyPgLoByte LoByte]] + - [[KeyPgLoc LOC]] + - [[KeyPgLocal Local]] + - [[KeyPgLocate Locate]] + - [[KeyPgLock Lock]] + - [[KeyPgLof LOF]] + - [[KeyPgLog Log]] + - [[KeyPgLong Long]] + - [[KeyPgLongint LongInt]] + - [[KeyPgLoop Loop]] + - [[KeyPgLoWord LoWord]] + - [[KeyPgLpos Lpos]] + - [[KeyPgLprint LPrint]] + - [[KeyPgLset LSet]] + - [[KeyPgLtrim LTrim]] + **M** + - [[KeyPgMidstatement Mid (Déclaration)]] + - [[KeyPgMidfunction Mid (Fonction)]] + - [[KeyPgMinute Minute]] +- [[KeyPgMkd MKD]] + - [[KeyPgMkdir MkDir]] + - [[KeyPgMki MKI]] + - [[KeyPgMkl MKL]] + - [[KeyPgMklongint MKLongInt]] + - [[KeyPgMks MKS]] + - [[KeyPgMkshort MKShort]] + - [[KeyPgOpModulus Mod]] + - [[KeyPgMonth Month]] + - [[KeyPgMonthname MonthName]] + - [[KeyPgMultikey MultiKey]] + - [[KeyPgMutexCreate MutexCreate]] + - [[KeyPgMutexDestroy MutexDestroy]] + - [[KeyPgMutexLock MutexLock]] + - [[KeyPgMutexUnlock MutexUnlock]] + **N** + - [[KeyPgNaked Naked]] + - [[KeyPgName Name]] + - [[KeyPgNamespace Namespace]] +- [[KeyPgNext Next]] + - [[KeyPgOpNew New]] + - [[KeyPgOpPlacementNew New (Emplacement mémoire)]] + - [[KeyPgResumenext Next (Resume)]] + - [[KeyPgOpNot Not]] + - [[KeyPgNow Now]] + **O** + - [[KeyPgOct Oct]] + - [[KeyPgOffsetof OffsetOf]] + - [[KeyPgOnerror On Error]] +- [[KeyPgOngosub On...Gosub]] + - [[KeyPgOngoto On...Goto]] + - [[KeyPgInclude Once]] + - [[KeyPgOpen Open]] + - [[KeyPgOpenCom Open Com]] + - [[KeyPgOpenCons Open Cons]] + - [[KeyPgOpenErr Open Err]] + - [[KeyPgOpenLpt Open Lpt]] + - [[KeyPgOpenPipe Open Pipe]] + - [[KeyPgOpenScrn Open Scrn]] + - [[KeyPgOperator Operator]] + - [[KeyPgOption Option()]] + - [[KeyPgOptionbase Option Base]] + - [[KeyPgOptionbyval Option ByVal]] + - [[KeyPgOptiondynamic Option Dynamic]] + - [[KeyPgOptionescape Option Escape]] + - [[KeyPgOptionexplicit Option Explicit]] + - [[KeyPgOptiongosub Option Gosub]] + - [[KeyPgOptionnogosub Option Nogosub]] + - [[KeyPgOptionnokeyword Option NoKeyword]] + - [[KeyPgOptionprivate Option Private]] + - [[KeyPgOptionstatic Option Static]] + - [[KeyPgOpOr Or]] + - [[KeyPgOrGfx Or (Paramètre Put graphique)]] + - [[KeyPgOpOrElse OrElse]] + - [[KeyPgOut Out]] + - [[KeyPgOutput Output]] + - [[KeyPgOverload Overload]] + **P** + - [[KeyPgPaint Paint]] + - [[KeyPgPalette Palette]] + - [[KeyPgPascal pascal]] +- [[KeyPgPcopy PCopy]] + - [[KeyPgPeek Peek]] + - [[KeyPgPmap PMap]] + - [[KeyPgPoint Point]] + - [[KeyPgPointer Pointer]] + - [[KeyPgPoke Poke]] + - [[KeyPgPos Pos]] + - [[KeyPgPreserve Preserve]] + - [[KeyPgPreset PReset]] + - [[KeyPgPrint Print]] + - [[KeyPgPrintPp Print #]] + - [[KeyPgPrintusing Print Using]] + - [[KeyPgPrintusingPp Print Using #]] + - [[KeyPgPrivate Private]] + - [[KeyPgVisPrivate Private: (Contrôle d'accès)]] + - [[KeyPgOpProcptr ProcPtr]] + - [[KeyPgProperty Property]] + - [[KeyPgVisProtected Protected: (Contrôle d'accès)]] + - [[KeyPgPset Pset (Déclaration)]] + - [[KeyPgPsetGfx Pset (Paramètre Put graphique)]] + - [[KeyPgPtr Ptr]] + - [[KeyPgPublic Public]] + - [[KeyPgVisPublic Public: (Contrôle d'accès)]] + - [[KeyPgPutgraphics Put (Graphique)]] + - [[KeyPgPutfileio Put # (Fichier Entrée/Sortie)]] + **R** + - [[KeyPgRandom Random]] + - [[KeyPgRandomize Randomize]] + - [[KeyPgRead Read]] +- [[KeyPgReadFile Read (Accès fichier)]] + - [[KeyPgReadWriteFile Read Write (Accès fichier)]] + - [[KeyPgReallocate Reallocate]] + - [[KeyPgRedim ReDim]] + - [[KeyPgRem Rem]] + - [[KeyPgReset Reset]] + - [[KeyPgRestore Restore]] + - [[KeyPgResume Resume]] + - [[KeyPgResumenext Resume Next]] + - [[KeyPgReturn Return]] + - [[KeyPgRgb RGB]] + - [[KeyPgRgba RGBA]] + - [[KeyPgRight Right]] + - [[KeyPgRmdir RmDir]] + - [[KeyPgRnd Rnd]] + - [[KeyPgRset RSet]] + - [[KeyPgRtrim RTrim]] + - [[KeyPgRun Run]] + **S** + - [[KeyPgSadd SAdd]] + - [[KeyPgScope Scope]] + - [[KeyPgScreengraphics Screen]] +- [[KeyPgScreenCons Screen (Console)]] + - [[KeyPgScreencopy ScreenCopy]] + - [[KeyPgScreencontrol ScreenControl]] + - [[KeyPgScreenevent ScreenEvent]] + - [[KeyPgScreeninfo ScreenInfo]] + - [[KeyPgScreenglproc ScreenGLProc]] + - [[KeyPgScreenlist ScreenList]] + - [[KeyPgScreenlock ScreenLock]] + - [[KeyPgScreenptr ScreenPtr]] + - [[KeyPgScreenres ScreenRes]] + - [[KeyPgScreenset ScreenSet]] + - [[KeyPgScreensync ScreenSync]] + - [[KeyPgScreenunlock ScreenUnlock]] + - [[KeyPgSecond Second]] + - [[KeyPgSeekset Seek (Déclaration)]] + - [[KeyPgSeekreturn Seek (Fonction)]] + - [[KeyPgSelectcase Select Case]] + - [[KeyPgSetdate SetDate]] + - [[KeyPgSetenviron SetEnviron]] + - [[KeyPgSetmouse SetMouse]] + - [[KeyPgSettime SetTime]] + - [[KeyPgSgn Sgn]] + - [[KeyPgShared Shared]] + - [[KeyPgShell Shell]] + - [[KeyPgOpShiftLeft Shl]] + - [[KeyPgOpShiftRight Shr]] + - [[KeyPgShort Short]] + - [[KeyPgSin Sin]] + - [[KeyPgSingle Single]] + - [[KeyPgSizeof SizeOf]] + - [[KeyPgSleep Sleep]] + - [[KeyPgSpace Space]] + - [[KeyPgSpc Spc]] + - [[KeyPgSqr Sqr]] + - [[KeyPgStatic Static]] + - [[KeyPgStaticMember Static (Membre)]] + - [[KeyPgStdcall stdcall]] + - [[KeyPgStep Step]] + - [[KeyPgStick Stick]] + - [[KeyPgStop Stop]] + - [[KeyPgStr Str]] + - [[KeyPgStrig Strig]] + - [[KeyPgStringFunction String (Fonction)]] + - [[KeyPgString String]] + - [[KeyPgOpStrptr StrPtr]] + - [[KeyPgSub Sub]] + - [[KeyPgMemberSub Sub (Membre)]] + - [[KeyPgSwap Swap]] + - [[KeyPgSystem System]] + **T** + - [[KeyPgTab Tab]] + - [[KeyPgTan Tan]] + - [[KeyPgThen Then]] +- [[KeyPgThis This]] + - [[KeyPgThreadCreate ThreadCreate]] + - [[KeyPgThreadWait ThreadWait]] + - [[KeyPgTime Time]] + - [[KeyPgTimeserial TimeSerial]] + - [[KeyPgTimeValue TimeValue]] + - [[KeyPgTimer Timer]] + - [[KeyPgTo To]] + - [[KeyPgTransGfx Trans (Paramètre Put graphique)]] + - [[KeyPgTrim Trim]] + - [[KeyPgTypeAlias Type (Alias)]] + - [[KeyPgTypeTemp Type (Temporaire)]] + - [[KeyPgType Type (Défini par l'utilisateur)]] + - [[KeyPgTypeof TypeOf]] + **U** + - [[KeyPgUbound UBound]] + - [[KeyPgUbyte UByte]] + - [[KeyPgUcase UCase]] +- [[KeyPgUinteger UInteger]] + - [[KeyPgUlong Ulong]] + - [[KeyPgUlongint ULongInt]] + - [[KeyPgUnion Union]] + - [[KeyPgUnlock Unlock]] + - [[KeyPgUnsigned Unsigned]] + - [[KeyPgUntil Until]] + - [[KeyPgUshort UShort]] + - [[KeyPgPrintusing Using (Print)]] + - [[KeyPgUsing Using (Namespaces)]] + **V** + - [[KeyPgVaArg va_arg]] + - [[KeyPgVaFirst va_first]] + - [[KeyPgVaNext va_next]] +- [[KeyPgVal Val]] + - [[KeyPgVallng ValLng]] + - [[KeyPgValint ValInt]] + - [[KeyPgValuint ValUInt]] + - [[KeyPgValulng ValULng]] + - [[KeyPgVar Var]] + - [[KeyPgOpVarptr VarPtr]] + - [[KeyPgViewtext View Print]] + - [[KeyPgViewgraphics View (Graphique)]] + **W** + - [[KeyPgWait Wait]] + - [[KeyPgWbin WBin]] + - [[KeyPgWchr WChr]] +- [[KeyPgWeekday Weekday]] + - [[KeyPgWeekdayname WeekdayName]] + - [[KeyPgWend Wend]] + - [[KeyPgWhile While]] + - [[KeyPgWhilewend While...Wend]] + - [[KeyPgWhex WHex]] + - [[KeyPgWidth Width]] + - [[KeyPgWindow Window]] + - [[KeyPgWindowtitle WindowTitle]] + - [[KeyPgWinput WInput]] + - [[KeyPgWith With]] + - [[KeyPgWoct WOct]] + - [[KeyPgWrite Write]] + - [[KeyPgWritePp Write #]] + - [[KeyPgWriteFile Write (Accès fichier)]] + - [[KeyPgWspace WSpace]] + - [[KeyPgWstr WStr]] + - [[KeyPgWstring Wstring (Type de données)]] + - [[KeyPgWstringFunction Wstring (Fonction)]] + **X** + - [[KeyPgOpXor Xor]] + - [[KeyPgXorGfx Xor (Paramètre Put graphique)]] + **Y** +- [[KeyPgYear Year]] + **Z** + - [[KeyPgZstring ZString]] +;
- {{fbdoc item="keyword" value="KeyPgYear|YEAR"}} {{fbdoc item="section" value="Z"}} - {{fbdoc item="keyword" value="KeyPgZstring|ZSTRING"}} diff --git a/fbdocs/manual/cache/CatPgFunctIndex.wakka b/fbdocs/manual/cache/CatPgFunctIndex.wakka index 30c2aefdf5..ffec2890c0 100644 --- a/fbdocs/manual/cache/CatPgFunctIndex.wakka +++ b/fbdocs/manual/cache/CatPgFunctIndex.wakka @@ -1,595 +1,596 @@ -{{fbdoc item="title" value="Functional Keyword List"}}---- -List of ""FreeBASIC"" keywords sorted by the function they perform. +{{fbdoc item="title" value="Fonctional Keyword List"}}---- +Liste des mots-clefs FreeBASIC triés par catégories de fonctions. -<< -{{fbdoc item="section" value="Arrays"}} - - {{fbdoc item="keyword" value="KeyPgErase|ERASE"}} - - {{fbdoc item="keyword" value="KeyPgLbound|LBOUND"}} - - {{fbdoc item="keyword" value="KeyPgRedim|REDIM"}} - - {{fbdoc item="keyword" value="KeyPgPreserve|PRESERVE"}} - - {{fbdoc item="keyword" value="KeyPgUbound|UBOUND"}} +**Tableaux** +- [[KeyPgErase Erase]] + - [[KeyPgLbound LBound]] + - [[KeyPgRedim ReDim]] + - [[KeyPgPreserve Preserve]] + - [[KeyPgUbound UBound]] + **Manipulation de bits** -{{fbdoc item="section" value="Bit manipulation"}} - - {{fbdoc item="keyword" value="KeyPgBit|BIT"}} - - {{fbdoc item="keyword" value="KeyPgBitreset|BITRESET"}} - - {{fbdoc item="keyword" value="KeyPgBitset|BITSET"}} - - {{fbdoc item="keyword" value="KeyPgHibyte|HIBYTE"}} - - {{fbdoc item="keyword" value="KeyPgHiword|HIWORD"}} - - {{fbdoc item="keyword" value="KeyPgLoByte|LOBYTE"}} - - {{fbdoc item="keyword" value="KeyPgLoWord|LOWORD"}} +- [[KeyPgBit Bit]] + - [[KeyPgBitreset BitReset]] + - [[KeyPgBitset BitSet]] + - [[KeyPgHibyte HiByte]] + - [[KeyPgHiword HiWord]] + - [[KeyPgLoByte LoByte]] + - [[KeyPgLoWord LoWord]] + **Commutateurs du compilateur** -{{fbdoc item="section" value="Compiler switches"}} - - {{fbdoc item="keyword" value="KeyPgDefbyte|DEFBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefdbl|DEFDBL"}} - - {{fbdoc item="keyword" value="KeyPgDefint|DEFINT"}} - - {{fbdoc item="keyword" value="KeyPgDeflng|DEFLNG"}} - - {{fbdoc item="keyword" value="KeyPgDeflongint|DEFLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefshort|DEFSHORT"}} - - {{fbdoc item="keyword" value="KeyPgDefsng|DEFSNG"}} - - {{fbdoc item="keyword" value="KeyPgDefstr|DEFSTR"}} - - {{fbdoc item="keyword" value="KeyPgDefubyte|DEFUBYTE"}} - - {{fbdoc item="keyword" value="KeyPgDefuint|DEFUINT"}} - - {{fbdoc item="keyword" value="KeyPgDefulongint|DEFULONGINT"}} - - {{fbdoc item="keyword" value="KeyPgDefushort|DEFUSHORT"}} - - {{fbdoc item="keyword" value="KeyPgOptionbase|OPTION BASE"}} - - {{fbdoc item="keyword" value="KeyPgOptionbyval|OPTION BYVAL"}} - - {{fbdoc item="keyword" value="KeyPgOptiondynamic|OPTION DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgOptionescape|OPTION ESCAPE"}} - - {{fbdoc item="keyword" value="KeyPgOptionexplicit|OPTION EXPLICIT"}} - - {{fbdoc item="keyword" value="KeyPgOptiongosub|OPTION GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnogosub|OPTION NOGOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOptionnokeyword|OPTION NOKEYWORD"}} - - {{fbdoc item="keyword" value="KeyPgOptionprivate|OPTION PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgOptionstatic|OPTION STATIC"}} +- [[KeyPgDefbyte DefByte]] + - [[KeyPgDefdbl DefDbl]] + - [[KeyPgDefint DefInt]] + - [[KeyPgDeflng DefLng]] + - [[KeyPgDeflongint Deflongint]] + - [[KeyPgDefshort DefShort]] + - [[KeyPgDefsng DefSng]] + - [[KeyPgDefstr DefStr]] + - [[KeyPgDefubyte DefUByte]] + - [[KeyPgDefuint DefUInt]] + - [[KeyPgDefulongint Defulongint]] + - [[KeyPgDefushort DefUShort]] + - [[KeyPgOptionbase Option Base]] + - [[KeyPgOptionbyval Option ByVal]] + - [[KeyPgOptiondynamic Option Dynamic]] + - [[KeyPgOptionescape Option Escape]] + - [[KeyPgOptionexplicit Option Explicit]] + - [[KeyPgOptiongosub Option Gosub]] + - [[KeyPgOptionnogosub Option Nogosub]] + - [[KeyPgOptionnokeyword Option NoKeyword]] + - [[KeyPgOptionprivate Option Private]] + - [[KeyPgOptionstatic Option Static]] + **Console** -{{fbdoc item="section" value="Console"}} - - {{fbdoc item="keyword" value="KeyPgBeep|BEEP"}} - - {{fbdoc item="keyword" value="KeyPgCls|CLS"}} - - {{fbdoc item="keyword" value="KeyPgColor|COLOR"}} - - {{fbdoc item="keyword" value="KeyPgCsrlin|CSRLIN"}} - - {{fbdoc item="keyword" value="KeyPgLocate|LOCATE"}} - - {{fbdoc item="keyword" value="KeyPgOpenCons|OPEN CONS"}} - - {{fbdoc item="keyword" value="KeyPgOpenErr|OPEN ERR"}} - - {{fbdoc item="keyword" value="KeyPgOpenPipe|OPEN PIPE"}} - - {{fbdoc item="keyword" value="KeyPgOpenScrn|OPEN SCRN"}} - - {{fbdoc item="keyword" value="KeyPgPos|POS"}} - - {{fbdoc item="keyword" value="KeyPgPrint|PRINT"}} - - {{fbdoc item="keyword" value="KeyPgPrintusing|PRINT USING"}} - - {{fbdoc item="keyword" value="KeyPgScreenCons|SCREEN (Console)"}} - - {{fbdoc item="keyword" value="KeyPgSpc|SPC"}} - - {{fbdoc item="keyword" value="KeyPgTab|TAB"}} - - {{fbdoc item="keyword" value="KeyPgViewtext|VIEW (Console)"}} - - {{fbdoc item="keyword" value="KeyPgWidth|WIDTH"}} - - {{fbdoc item="keyword" value="KeyPgWrite|WRITE"}} +- [[KeyPgBeep Beep]] + - [[KeyPgCls Cls]] + - [[KeyPgColor Color]] + - [[KeyPgCsrlin CsrLin]] + - [[KeyPgLocate Locate]] + - [[KeyPgOpenCons Open Cons]] + - [[KeyPgOpenErr Open Err]] + - [[KeyPgOpenPipe Open Pipe]] + - [[KeyPgOpenScrn Open Scrn]] + - [[KeyPgPos Pos]] + - [[KeyPgPrint Print]] + - [[KeyPgPrintusing Print Using]] + - [[KeyPgScreenCons Screen (Console)]] + - [[KeyPgSpc Spc]] + - [[KeyPgTab Tab]] + - [[KeyPgViewtext View (Console)]] + - [[KeyPgWidth Width]] + - [[KeyPgWrite Write]] + **Types de données et déclarations** -{{fbdoc item="section" value="Data types and declarations"}} - - {{fbdoc item="keyword" value="KeyPgByte|BYTE"}} - - {{fbdoc item="keyword" value="KeyPgAs|AS"}} - - {{fbdoc item="keyword" value="KeyPgDim|DIM"}} - - {{fbdoc item="keyword" value="KeyPgConst|CONST"}} - - {{fbdoc item="keyword" value="KeyPgConstQualifier|CONST (Qualifier)"}} - - {{fbdoc item="keyword" value="KeyPgDouble|DOUBLE"}} - - {{fbdoc item="keyword" value="KeyPgEnum|ENUM"}} - - {{fbdoc item="keyword" value="KeyPgInteger|INTEGER"}} - - {{fbdoc item="keyword" value="KeyPgLong|LONG"}} - - {{fbdoc item="keyword" value="KeyPgLongint|LONGINT"}} - - {{fbdoc item="keyword" value="KeyPgScope|SCOPE"}} - - {{fbdoc item="keyword" value="KeyPgShared|SHARED"}} - - {{fbdoc item="keyword" value="KeyPgShort|SHORT"}} - - {{fbdoc item="keyword" value="KeyPgString|STRING"}} - - {{fbdoc item="keyword" value="KeyPgSingle|SINGLE"}} - - {{fbdoc item="keyword" value="KeyPgStatic|STATIC"}} - - {{fbdoc item="keyword" value="KeyPgType|TYPE"}} - - {{fbdoc item="keyword" value="KeyPgTypeAlias|TYPE (Alias)"}} - - {{fbdoc item="keyword" value="KeyPgTypeTemp|TYPE (Temporary)"}} - - {{fbdoc item="keyword" value="KeyPgUbyte|UBYTE"}} - - {{fbdoc item="keyword" value="KeyPgUinteger|UINTEGER"}} - - {{fbdoc item="keyword" value="KeyPgUlong|ULONG"}} - - {{fbdoc item="keyword" value="KeyPgUlongint|ULONGINT"}} - - {{fbdoc item="keyword" value="KeyPgUnion|UNION"}} - - {{fbdoc item="keyword" value="KeyPgUnsigned|UNSIGNED"}} - - {{fbdoc item="keyword" value="KeyPgUshort|USHORT"}} - - {{fbdoc item="keyword" value="KeyPgVar|VAR"}} - - {{fbdoc item="keyword" value="KeyPgWith|WITH"}} - - {{fbdoc item="keyword" value="KeyPgWstring|WSTRING"}} - - {{fbdoc item="keyword" value="KeyPgZstring|ZSTRING"}} +- [[KeyPgByte Byte]] + - [[KeyPgAs As]] + - [[KeyPgDim Dim]] + - [[KeyPgConst Const]] + - [[KeyPgConstQualifier Const (Qualificateur)]] + - [[KeyPgDouble Double]] + - [[KeyPgEnum Enum]] + - [[KeyPgInteger Integer]] + - [[KeyPgLong Long]] + - [[KeyPgLongint LongInt]] + - [[KeyPgScope Scope]] + - [[KeyPgShared Shared]] + - [[KeyPgShort Short]] + - [[KeyPgString String]] + - [[KeyPgSingle Single]] + - [[KeyPgStatic Static]] + - [[KeyPgType Type]] + - [[KeyPgTypeAlias Type (Alias)]] + - [[KeyPgTypeTemp Type (Temporaire)]] + - [[KeyPgUbyte UByte]] + - [[KeyPgUinteger UInteger]] + - [[KeyPgUlong Ulong]] + - [[KeyPgUlongint ULongInt]] + - [[KeyPgUnion Union]] + - [[KeyPgUnsigned Unsigned]] + - [[KeyPgUshort UShort]] + - [[KeyPgVar Var]] + - [[KeyPgWith With]] + - [[KeyPgWstring WString]] + - [[KeyPgZstring ZString]] + **Date et time** -{{fbdoc item="section" value="Date and time"}} - - {{fbdoc item="keyword" value="KeyPgDate|DATE"}} - - {{fbdoc item="keyword" value="KeyPgDateAdd|DATEADD"}} - - {{fbdoc item="keyword" value="KeyPgDateDiff|DATEDIFF"}} - - {{fbdoc item="keyword" value="KeyPgDatePart|DATEPART"}} - - {{fbdoc item="keyword" value="KeyPgDateSerial|DATESERIAL"}} - - {{fbdoc item="keyword" value="KeyPgDateValue|DATEVALUE"}} - - {{fbdoc item="keyword" value="KeyPgDay|DAY"}} - - {{fbdoc item="keyword" value="KeyPgHour|HOUR"}} - - {{fbdoc item="keyword" value="KeyPgIsDate|ISDATE"}} - - {{fbdoc item="keyword" value="KeyPgMinute|MINUTE"}} - - {{fbdoc item="keyword" value="KeyPgMonth|MONTH"}} - - {{fbdoc item="keyword" value="KeyPgMonthname|MONTHNAME"}} - - {{fbdoc item="keyword" value="KeyPgNow|NOW"}} - - {{fbdoc item="keyword" value="KeyPgSecond|SECOND"}} - - {{fbdoc item="keyword" value="KeyPgSetdate|SETDATE"}} - - {{fbdoc item="keyword" value="KeyPgSettime|SETTIME"}} - - {{fbdoc item="keyword" value="KeyPgTime|TIME"}} - - {{fbdoc item="keyword" value="KeyPgTimeserial|TIMESERIAL"}} - - {{fbdoc item="keyword" value="KeyPgTimeValue|TIMEVALUE"}} - - {{fbdoc item="keyword" value="KeyPgTimer|TIMER"}} - - {{fbdoc item="keyword" value="KeyPgYear|YEAR"}} - - {{fbdoc item="keyword" value="KeyPgWeekday|WEEKDAY"}} - - {{fbdoc item="keyword" value="KeyPgWeekdayname|WEEKDAYNAME"}} +- [[KeyPgDate Date]] + - [[KeyPgDateAdd DateAdd]] + - [[KeyPgDateDiff DateDiff]] + - [[KeyPgDatePart DatePart]] + - [[KeyPgDateSerial DateSerial]] + - [[KeyPgDateValue DateValue]] + - [[KeyPgDay Day]] + - [[KeyPgHour Hour]] + - [[KeyPgIsDate IsDate]] + - [[KeyPgMinute Minute]] + - [[KeyPgMonth Month]] + - [[KeyPgMonthname MonthName]] + - [[KeyPgNow Now]] + - [[KeyPgSecond Second]] + - [[KeyPgSetdate SetDate]] + - [[KeyPgSettime SetTime]] + - [[KeyPgTime Time]] + - [[KeyPgTimeserial TimeSerial]] + - [[KeyPgTimeValue TimeValue]] + - [[KeyPgTimer Timer]] + - [[KeyPgYear Year]] + - [[KeyPgWeekday Weekday]] + - [[KeyPgWeekdayname WeekdayName]] + **Débogage** -{{fbdoc item="section" value="Debug support"}} - - {{fbdoc item="keyword" value="KeyPgAssert|ASSERT"}} - - {{fbdoc item="keyword" value="KeyPgAssertwarn|ASSERTWARN"}} - - {{fbdoc item="keyword" value="KeyPgStop|STOP"}} +- [[KeyPgAssert Assert]] + - [[KeyPgAssertwarn AssertWarn]] + - [[KeyPgStop Stop]] + **Gestion des erreurs** -{{fbdoc item="section" value="Error handling"}} - - {{fbdoc item="keyword" value="KeyPgErfn|ERFN"}} - - {{fbdoc item="keyword" value="KeyPgErl|ERL"}} - - {{fbdoc item="keyword" value="KeyPgErmn|ERMN"}} - - {{fbdoc item="keyword" value="KeyPgErr|ERR"}} - - {{fbdoc item="keyword" value="KeyPgError|ERROR"}} - - {{fbdoc item="keyword" value="KeyPgLocal|LOCAL"}} - - {{fbdoc item="keyword" value="KeyPgOnerror|ON ERROR"}} - - {{fbdoc item="keyword" value="KeyPgResume|RESUME"}} - - {{fbdoc item="keyword" value="KeyPgResumenext|RESUME NEXT"}} +- [[KeyPgErfn Erfn]] + - [[KeyPgErl Erl]] + - [[KeyPgErmn Ermn]] + - [[KeyPgErr Err]] + - [[KeyPgError Error]] + - [[KeyPgLocal Local]] + - [[KeyPgOnerror On Error]] + - [[KeyPgResume Resume]] + - [[KeyPgResumenext Resume Next]] + **Fichiers** -{{fbdoc item="section" value="Files"}} - - {{fbdoc item="keyword" value="KeyPgAccess|ACCESS"}} - - {{fbdoc item="keyword" value="KeyPgAppend|APPEND"}} - - {{fbdoc item="keyword" value="KeyPgBinary|BINARY"}} - - {{fbdoc item="keyword" value="KeyPgBload|BLOAD"}} - - {{fbdoc item="keyword" value="KeyPgBsave|BSAVE"}} - - {{fbdoc item="keyword" value="KeyPgClose|CLOSE"}} - - {{fbdoc item="keyword" value="KeyPgEncoding|ENCODING"}} - - {{fbdoc item="keyword" value="KeyPgEof|EOF"}} - - {{fbdoc item="keyword" value="KeyPgFreefile|FREEFILE"}} - - {{fbdoc item="keyword" value="KeyPgGetfileio|GET # (File I/O)"}} - - {{fbdoc item="keyword" value="KeyPgInputfilemode|INPUT (File I/O)"}} - - {{fbdoc item="keyword" value="KeyPgInputPp|INPUT #"}} - - {{fbdoc item="keyword" value="KeyPgLineinputPp|LINE INPUT #"}} - - {{fbdoc item="keyword" value="KeyPgLoc|LOC"}} - - {{fbdoc item="keyword" value="KeyPgLock|LOCK"}} - - {{fbdoc item="keyword" value="KeyPgLof|LOF"}} - - {{fbdoc item="keyword" value="KeyPgOpen|OPEN"}} - - {{fbdoc item="keyword" value="KeyPgOutput|OUTPUT"}} - - {{fbdoc item="keyword" value="KeyPgPrintPp|PRINT #"}} - - {{fbdoc item="keyword" value="KeyPgPrintusingPp|PRINT USING #"}} - - {{fbdoc item="keyword" value="KeyPgPutfileio|PUT # (File I/O)"}} - - {{fbdoc item="keyword" value="KeyPgRandom|RANDOM"}} - - {{fbdoc item="keyword" value="KeyPgReadFile|READ (File Access)"}} - - {{fbdoc item="keyword" value="KeyPgReadWriteFile|READ WRITE (File Access)"}} - - {{fbdoc item="keyword" value="KeyPgReset|RESET"}} - - {{fbdoc item="keyword" value="KeyPgSeekset|SEEK (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgSeekreturn|SEEK (Function)"}} - - {{fbdoc item="keyword" value="KeyPgUnlock|UNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgWritePp|WRITE #"}} - - {{fbdoc item="keyword" value="KeyPgWriteFile|WRITE (File Access)"}} +- [[KeyPgAccess Access]] + - [[KeyPgAppend Append]] + - [[KeyPgBinary Binary]] + - [[KeyPgBload BLoad]] + - [[KeyPgBsave BSave]] + - [[KeyPgClose Close]] + - [[KeyPgEncoding Encoding]] + - [[KeyPgEof EOF]] + - [[KeyPgFreefile FreeFile]] + - [[KeyPgGetfileio Get # (Entrée/Sortie fichiers)]] + - [[KeyPgInputfilemode Input (Entrée/Sortie fichiers)]] + - [[KeyPgInputPp Input #]] + - [[KeyPgLineinputPp Line Input #]] + - [[KeyPgLoc LOC]] + - [[KeyPgLock Lock]] + - [[KeyPgLof LOF]] + - [[KeyPgOpen Open]] + - [[KeyPgOutput Output]] + - [[KeyPgPrintPp Print #]] + - [[KeyPgPrintusingPp Print # Using]] + - [[KeyPgPutfileio Put # (Entrée/Sortie fichiers)]] + - [[KeyPgRandom Random]] + - [[KeyPgReadFile Read (Accès fichiers)]] + - [[KeyPgReadWriteFile Read Write (Accès fichiers)]] + - [[KeyPgReset Reset]] + - [[KeyPgSeekset Seek (Déclaration)]] + - [[KeyPgSeekreturn Seek (Fonction)]] + - [[KeyPgUnlock Unlock]] + - [[KeyPgWritePp Write #]] + - [[KeyPgWriteFile Write (Accès fichiers)]] + **Graphiques** -{{fbdoc item="section" value="Graphics"}} - - {{fbdoc item="keyword" value="KeyPgAddGfx|ADD (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgAlphaGfx|ALPHA (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgAndGfx|AND (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgCircle|CIRCLE"}} - - {{fbdoc item="keyword" value="KeyPgCls|CLS"}} - - {{fbdoc item="keyword" value="KeyPgColor|COLOR"}} - - {{fbdoc item="keyword" value="KeyPgCustomgfx|CUSTOM (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgDraw|DRAW"}} - - {{fbdoc item="keyword" value="KeyPgDrawString|DRAW STRING"}} - - {{fbdoc item="keyword" value="KeyPgFlip|FLIP"}} - - {{fbdoc item="keyword" value="KeyPgGetgraphics|GET (Graphics)"}} - - {{fbdoc item="keyword" value="KeyPgImageConvertRow|IMAGECONVERTROW"}} - - {{fbdoc item="keyword" value="KeyPgImagecreate|IMAGECREATE"}} - - {{fbdoc item="keyword" value="KeyPgImageDestroy|IMAGEDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgImageInfo|IMAGEINFO"}} - - {{fbdoc item="keyword" value="KeyPgLinegraphics|LINE"}} - - {{fbdoc item="keyword" value="KeyPgOrGfx|OR (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgPaint|PAINT"}} - - {{fbdoc item="keyword" value="KeyPgPalette|PALETTE"}} - - {{fbdoc item="keyword" value="KeyPgPcopy|PCOPY"}} - - {{fbdoc item="keyword" value="KeyPgPmap|PMAP"}} - - {{fbdoc item="keyword" value="KeyPgPoint|POINT"}} - - {{fbdoc item="keyword" value="KeyPgPreset|PRESET"}} - - {{fbdoc item="keyword" value="KeyPgPset|PSET"}} - - {{fbdoc item="keyword" value="KeyPgPsetGfx|PSET (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgPutgraphics|PUT (Graphics)"}} - - {{fbdoc item="keyword" value="KeyPgRgb|RGB"}} - - {{fbdoc item="keyword" value="KeyPgRgba|RGBA"}} - - {{fbdoc item="keyword" value="KeyPgScreengraphics|SCREEN"}} - - {{fbdoc item="keyword" value="KeyPgScreencontrol|SCREENCONTROL"}} - - {{fbdoc item="keyword" value="KeyPgScreencopy|SCREENCOPY"}} - - {{fbdoc item="keyword" value="KeyPgScreenevent|SCREENEVENT"}} - - {{fbdoc item="keyword" value="KeyPgScreeninfo|SCREENINFO"}} - - {{fbdoc item="keyword" value="KeyPgScreenglproc|SCREENGLPROC"}} - - {{fbdoc item="keyword" value="KeyPgScreenlist|SCREENLIST"}} - - {{fbdoc item="keyword" value="KeyPgScreenlock|SCREENLOCK"}} - - {{fbdoc item="keyword" value="KeyPgScreenptr|SCREENPTR"}} - - {{fbdoc item="keyword" value="KeyPgScreenres|SCREENRES"}} - - {{fbdoc item="keyword" value="KeyPgScreenset|SCREENSET"}} - - {{fbdoc item="keyword" value="KeyPgScreensync|SCREENSYNC"}} - - {{fbdoc item="keyword" value="KeyPgScreenunlock|SCREENUNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgTransGfx|TRANS (Graphics PUT)"}} - - {{fbdoc item="keyword" value="KeyPgViewgraphics|VIEW (Graphics)"}} - - {{fbdoc item="keyword" value="KeyPgWindow|WINDOW"}} - - {{fbdoc item="keyword" value="KeyPgXorGfx|XOR (GRAPHICS PUT)"}} +- [[KeyPgAddGfx Add (Put Graphique)]] + - [[KeyPgAlphaGfx Alpha (Put Graphique)]] + - [[KeyPgAndGfx And (Put Graphique)]] + - [[KeyPgCircle Circle]] + - [[KeyPgCls Cls]] + - [[KeyPgColor Color]] + - [[KeyPgCustomgfx Custom (Put Graphique)]] + - [[KeyPgDraw Draw]] + - [[KeyPgDrawString Draw String]] + - [[KeyPgFlip Flip]] + - [[KeyPgGetgraphics Get (Put Graphique)]] + - [[KeyPgImageConvertRow ImageConvertRow]] + - [[KeyPgImagecreate ImageCreate]] + - [[KeyPgImageDestroy ImageDestroy]] + - [[KeyPgImageInfo ImageInfo]] + - [[KeyPgLinegraphics Line]] + - [[KeyPgOrGfx Or (Put Graphique)]] + - [[KeyPgPaint Paint]] + - [[KeyPgPalette Palette]] + - [[KeyPgPcopy PCopy]] + - [[KeyPgPmap PMap]] + - [[KeyPgPoint Point]] + - [[KeyPgPreset PReset]] + - [[KeyPgPset PSet]] + - [[KeyPgPsetGfx Pset (Put Graphique)]] + - [[KeyPgPutgraphics Put (Put Graphique)]] + - [[KeyPgRgb RGB]] + - [[KeyPgRgba RGBA]] + - [[KeyPgScreengraphics Screen]] + - [[KeyPgScreencontrol ScreenControl]] + - [[KeyPgScreencopy ScreenCopy]] + - [[KeyPgScreenevent ScreenEvent]] + - [[KeyPgScreeninfo ScreenInfo]] + - [[KeyPgScreenglproc ScreenGLProc]] + - [[KeyPgScreenlist ScreenList]] + - [[KeyPgScreenlock ScreenLock]] + - [[KeyPgScreenptr ScreenPtr]] + - [[KeyPgScreenres ScreenRes]] + - [[KeyPgScreenset ScreenSet]] + - [[KeyPgScreensync ScreenSync]] + - [[KeyPgScreenunlock ScreenUnlock]] + - [[KeyPgTransGfx Trans (Put Graphique)]] + - [[KeyPgViewgraphics View (Graphique)]] + - [[KeyPgWindow Window]] + - [[KeyPgXorGfx Xor (Put Graphique)]] + **Accès au hard** -{{fbdoc item="section" value="Hardware access"}} - - {{fbdoc item="keyword" value="KeyPgInp|INP"}} - - {{fbdoc item="keyword" value="KeyPgOut|OUT"}} - - {{fbdoc item="keyword" value="KeyPgWait|WAIT"}} - - {{fbdoc item="keyword" value="KeyPgOpenCom|OPEN COM"}} - - {{fbdoc item="keyword" value="KeyPgOpenLpt|OPEN LPT"}} - - {{fbdoc item="keyword" value="KeyPgOpenLpt|LPT"}} - - {{fbdoc item="keyword" value="KeyPgLpos|LPOS"}} - - {{fbdoc item="keyword" value="KeyPgLprint|LPRINT"}} +- [[KeyPgInp Inp]] + - [[KeyPgOut Out]] + - [[KeyPgWait Wait]] + - [[KeyPgOpenCom Open Com]] + - [[KeyPgOpenLpt Open Lpt]] + - [[KeyPgOpenLpt Lpt]] + - [[KeyPgLpos Lpos]] + - [[KeyPgLprint LPrint]] + **Opérateurs d'affectation** -{{fbdoc item="section" value="Assignment Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAssignment|= (Assignment)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineConcat|&= (Concatenate and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineAdd|+= (Add and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineSub|-= (Subtract and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineMultiply|*= (Multiply and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineDivide|/= (Divide and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineIntegerDivide|\= (Integer Divide and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineExponentiate|^= (Exponentiate and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineModulus|MOD= (Modulus and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineAnd|AND= (Conjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineEqv|EQV= (Equivalence and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineImp|IMP= (Implication and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineOr|OR= (Inclusive Disjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineXor|XOR= (Exclusive Disjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineShiftLeft|SHL= (Shift Left and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineShiftRight|SHR= (Shift Right and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpLet|LET (Assignment)"}} - - {{fbdoc item="keyword" value="KeyPgOpLetlist|LET() (Assignment)"}} +- [[KeyPgOpAssignment = (Affectation)]] + - [[KeyPgOpCombineConcat &= (Concaténation et Affectation)]] + - [[KeyPgOpCombineAdd += (Addition et Affectation)]] + - [[KeyPgOpCombineSub -= (Soustraction et Affectation)]] + - [[KeyPgOpCombineMultiply *= (Multiplication et Affectation)]] + - [[KeyPgOpCombineDivide /= (Division et Affectation)]] + - [[KeyPgOpCombineIntegerDivide \= (Division entière et Affectation)]] + - [[KeyPgOpCombineExponentiate ^= (Puissance et Affectation)]] + - [[KeyPgOpCombineModulus Mod= (Modulo et Affectation)]] + - [[KeyPgOpCombineAnd And= (Conjonction et Affectation)]] + - [[KeyPgOpCombineEqv Eqv= (Equivalence et Affectation)]] + - [[KeyPgOpCombineImp Imp= (Implication et Affectation)]] + - [[KeyPgOpCombineOr Or= (OU inclusif et Affectatio)]] + - [[KeyPgOpCombineXor Xor= (OU exclusif et Affectation)]] + - [[KeyPgOpCombineShiftLeft Shl= (Décalage vers la gauche et Affectation)]] + - [[KeyPgOpCombineShiftRight Shr= (Décalage vers la droite et Affectation)]] + - [[KeyPgOpLet Let (Affectation)]] + - [[KeyPgOpLetlist Let() (Affectation)]] + **Opérateurs arithmétiques** -{{fbdoc item="section" value="Arithmetic Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAdd|+ (Add)"}} - - {{fbdoc item="keyword" value="KeyPgOpSubtract|- (Subtract)"}} - - {{fbdoc item="keyword" value="KeyPgOpMultiply|* (Multiply)"}} - - {{fbdoc item="keyword" value="KeyPgOpDivide|/ (Divide)"}} - - {{fbdoc item="keyword" value="KeyPgOpIntegerDivide|\ (Integer divide)"}} - - {{fbdoc item="keyword" value="KeyPgOpExponentiate|^ (Exponentiate)"}} - - {{fbdoc item="keyword" value="KeyPgOpModulus|MOD (Modulus)"}} - - {{fbdoc item="keyword" value="KeyPgOpNegate|- (Negate)"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftLeft|SHL (Shift left)"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftRight|SHR (Shift right)"}} +- [[KeyPgOpAdd + (Addition)]] + - [[KeyPgOpSubtract - (Soustraction)]] + - [[KeyPgOpMultiply * (Multiplication)]] + - [[KeyPgOpDivide / (Division)]] + - [[KeyPgOpIntegerDivide \ (Division entière)]] + - [[KeyPgOpExponentiate ^ (Puissance)]] + - [[KeyPgOpModulus Mod (Modulo)]] + - [[KeyPgOpNegate - (Négation)]] + - [[KeyPgOpShiftLeft Shl (Décalage vers la gauche)]] + - [[KeyPgOpShiftRight Shr (Décalage vers la droite)]] + **Opérateurs bit-à-bit** -{{fbdoc item="section" value="Bitwise operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAnd|AND"}} - - {{fbdoc item="keyword" value="KeyPgOpEqv|EQV"}} - - {{fbdoc item="keyword" value="KeyPgOpImp|IMP"}} - - {{fbdoc item="keyword" value="KeyPgOpOr|OR"}} - - {{fbdoc item="keyword" value="KeyPgOpNot|NOT"}} - - {{fbdoc item="keyword" value="KeyPgOpXor|XOR"}} +- [[KeyPgOpAnd And]] + - [[KeyPgOpEqv Eqv]] + - [[KeyPgOpImp Imp]] + - [[KeyPgOpOr Or]] + - [[KeyPgOpNot Not]] + - [[KeyPgOpXor Xor]] + **Opérateurs Circuit court** -{{fbdoc item="section" value="Short Circuit operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAndAlso|ANDALSO"}} - - {{fbdoc item="keyword" value="KeyPgOpOrElse|ORELSE"}} +- [[KeyPgOpAndAlso AndAlso]] + - [[KeyPgOpOrElse OrElse]] + **Math** -{{fbdoc item="section" value="Math"}} - - {{fbdoc item="keyword" value="KeyPgAbs|ABS"}} - - {{fbdoc item="keyword" value="KeyPgAcos|ACOS"}} - - {{fbdoc item="keyword" value="KeyPgAsin|ASIN"}} - - {{fbdoc item="keyword" value="KeyPgAtan2|ATAN2"}} - - {{fbdoc item="keyword" value="KeyPgAtn|ATN"}} - - {{fbdoc item="keyword" value="KeyPgCos|COS"}} - - {{fbdoc item="keyword" value="KeyPgExp|EXP"}} - - {{fbdoc item="keyword" value="KeyPgFix|FIX"}} - - {{fbdoc item="keyword" value="KeyPgFrac|FRAC"}} - - {{fbdoc item="keyword" value="KeyPgInt|INT"}} - - {{fbdoc item="keyword" value="KeyPgLog|LOG"}} - - {{fbdoc item="keyword" value="KeyPgRandomize|RANDOMIZE"}} - - {{fbdoc item="keyword" value="KeyPgRnd|RND"}} - - {{fbdoc item="keyword" value="KeyPgSgn|SGN"}} - - {{fbdoc item="keyword" value="KeyPgSin|SIN"}} - - {{fbdoc item="keyword" value="KeyPgSqr|SQR"}} - - {{fbdoc item="keyword" value="KeyPgTan|TAN"}} +- [[KeyPgAbs Abs]] + - [[KeyPgAcos Acos]] + - [[KeyPgAsin Asin]] + - [[KeyPgAtan2 Atan2]] + - [[KeyPgAtn Atn]] + - [[KeyPgCos Cos]] + - [[KeyPgExp Exp]] + - [[KeyPgFix Fix]] + - [[KeyPgFrac Frac]] + - [[KeyPgInt Int]] + - [[KeyPgLog Log]] + - [[KeyPgRandomize Randomize]] + - [[KeyPgRnd Rnd]] + - [[KeyPgSgn Sgn]] + - [[KeyPgSin Sin]] + - [[KeyPgSqr Sqr]] + - [[KeyPgTan Tan]] + **Mémoire** -{{fbdoc item="section" value="Memory"}} - - {{fbdoc item="keyword" value="KeyPgAllocate|ALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgCallocate|CALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgClear|CLEAR"}} - - {{fbdoc item="keyword" value="KeyPgDeallocate|DEALLOCATE"}} - - {{fbdoc item="keyword" value="KeyPgField|FIELD"}} - - {{fbdoc item="keyword" value="KeyPgFre|FRE"}} - - {{fbdoc item="keyword" value="KeyPgPeek|PEEK"}} - - {{fbdoc item="keyword" value="KeyPgPoke|POKE"}} - - {{fbdoc item="keyword" value="KeyPgReallocate|REALLOCATE"}} -<<>> -{{fbdoc item="section" value="Meta Commands"}} - - {{fbdoc item="keyword" value="KeyPgMetaDynamic|$DYNAMIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaStatic|$STATIC"}} - - {{fbdoc item="keyword" value="KeyPgMetaInclude|$INCLUDE"}} - - {{fbdoc item="keyword" value="KeyPgMetaLang|$LANG"}} +- [[KeyPgAllocate Allocate]] + - [[KeyPgCallocate CAllocate]] + - [[KeyPgClear Clear]] + - [[KeyPgDeallocate Deallocate]] + - [[KeyPgField Field]] + - [[KeyPgFre Fre]] + - [[KeyPgPeek Peek]] + - [[KeyPgPoke Poke]] + - [[KeyPgReallocate Reallocate]] + ;**Méta Commandes** +- [[KeyPgMetaDynamic $Dynamic]] +- [[KeyPgMetaStatic $Static]] + - [[KeyPgMetaInclude $Include]] + - [[KeyPgMetaLang $Lang]] + **Divers** + - [[KeyPgAsm Asm]] -{{fbdoc item="section" value="Miscellaneous"}} - - {{fbdoc item="keyword" value="KeyPgAsm|ASM"}} - - {{fbdoc item="keyword" value="KeyPgData|DATA"}} - - {{fbdoc item="keyword" value="KeyPgEndblock|END (Block)"}} - - {{fbdoc item="keyword" value="KeyPgLet|LET"}} - - {{fbdoc item="keyword" value="KeyPgOffsetof|OFFSETOF"}} - - {{fbdoc item="keyword" value="KeyPgOption|OPTION()"}} - - {{fbdoc item="keyword" value="KeyPgTo|TO"}} - - {{fbdoc item="keyword" value="KeyPgRead|READ"}} - - {{fbdoc item="keyword" value="KeyPgRem|REM"}} - - {{fbdoc item="keyword" value="KeyPgRestore|RESTORE"}} - - {{fbdoc item="keyword" value="KeyPgSizeof|SIZEOF"}} - - {{fbdoc item="keyword" value="KeyPgSwap|SWAP"}} - - {{fbdoc item="keyword" value="KeyPgTypeof|TYPEOF"}} +- [[KeyPgData Data]] + - [[KeyPgEndblock End (Bloc)]] + - [[KeyPgLet Let]] + - [[KeyPgOffsetof OffsetOf]] + - [[KeyPgOption Option()]] + - [[KeyPgTo To]] + - [[KeyPgRead Read]] + - [[KeyPgRem Rem]] + - [[KeyPgRestore Restore]] + - [[KeyPgSizeof SizeOf]] + - [[KeyPgSwap Swap]] + - [[KeyPgTypeof TypeOf]] + **Modularisation** + - [[KeyPgCommon Common]] -{{fbdoc item="section" value="Modularizing"}} - - {{fbdoc item="keyword" value="KeyPgCommon|COMMON"}} - - {{fbdoc item="keyword" value="KeyPgDylibfree|DYLIBFREE"}} - - {{fbdoc item="keyword" value="KeyPgDylibload|DYLIBLOAD"}} - - {{fbdoc item="keyword" value="KeyPgDylibsymbol|DYLIBSYMBOL"}} - - {{fbdoc item="keyword" value="KeyPgExport|EXPORT"}} - - {{fbdoc item="keyword" value="KeyPgExtern|EXTERN"}} - - {{fbdoc item="keyword" value="KeyPgExternBlock|EXTERN...END EXTERN"}} - - {{fbdoc item="keyword" value="KeyPgImport|IMPORT"}} - - {{fbdoc item="keyword" value="KeyPgNamespace|NAMESPACE"}} - - {{fbdoc item="keyword" value="KeyPgPrivate|PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgPublic|PUBLIC"}} - - {{fbdoc item="keyword" value="KeyPgUsing|USING (Namespaces)"}} +- [[KeyPgDylibfree DyLibFree]] + - [[KeyPgDylibload DyLibLoad]] + - [[KeyPgDylibsymbol DyLibSymbol]] + - [[KeyPgExport Export]] + - [[KeyPgExtern Extern]] + - [[KeyPgExternBlock Extern...End Extern]] + - [[KeyPgImport Import]] + - [[KeyPgNamespace Namespace]] + - [[KeyPgPrivate Private]] + - [[KeyPgPublic Public]] + - [[KeyPgUsing Using (Espace de noms)]] + **Multithreading** + - [[KeyPgCondBroadcast CondBroadcast]] -{{fbdoc item="section" value="Multithreading"}} - - {{fbdoc item="keyword" value="KeyPgCondBroadcast|CONDBROADCAST"}} - - {{fbdoc item="keyword" value="KeyPgCondCreate|CONDCREATE"}} - - {{fbdoc item="keyword" value="KeyPgCondDestroy|CONDDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgCondSignal|CONDSIGNAL"}} - - {{fbdoc item="keyword" value="KeyPgCondWait|CONDWAIT"}} - - {{fbdoc item="keyword" value="KeyPgMutexCreate|MUTEXCREATE"}} - - {{fbdoc item="keyword" value="KeyPgMutexDestroy|MUTEXDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgMutexLock|MUTEXLOCK"}} - - {{fbdoc item="keyword" value="KeyPgMutexUnlock|MUTEXUNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgThreadCreate|THREADCREATE"}} - - {{fbdoc item="keyword" value="KeyPgThreadWait|THREADWAIT"}} +- [[KeyPgCondCreate CondCreate]] + - [[KeyPgCondDestroy CondDestroy]] + - [[KeyPgCondSignal CondSignal]] + - [[KeyPgCondWait CondWait]] + - [[KeyPgMutexCreate MutexCreate]] + - [[KeyPgMutexDestroy MutexDestroy]] + - [[KeyPgMutexLock MutexLock]] + - [[KeyPgMutexUnlock MutexUnlock]] + - [[KeyPgThreadCreate ThreadCreate]] + - [[KeyPgThreadWait ThreadWait]] + **OS / shell** + - [[KeyPgChain Chain]] -{{fbdoc item="section" value="OS / shell"}} - - {{fbdoc item="keyword" value="KeyPgChain|CHAIN"}} - - {{fbdoc item="keyword" value="KeyPgChdir|CHDIR"}} - - {{fbdoc item="keyword" value="KeyPgCommand|COMMAND"}} - - {{fbdoc item="keyword" value="KeyPgCurdir|CURDIR"}} - - {{fbdoc item="keyword" value="KeyPgDir|DIR"}} - - {{fbdoc item="keyword" value="KeyPgEnd|END (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgEnviron|ENVIRON"}} - - {{fbdoc item="keyword" value="KeyPgExec|EXEC"}} - - {{fbdoc item="keyword" value="KeyPgExepath|EXEPATH"}} - - {{fbdoc item="keyword" value="KeyPgFileattr|FILEATTR"}} - - {{fbdoc item="keyword" value="KeyPgFilecopy|FILECOPY"}} - - {{fbdoc item="keyword" value="KeyPgFiledatetime|FILEDATETIME"}} - - {{fbdoc item="keyword" value="KeyPgFileexists|FILEEXISTS"}} - - {{fbdoc item="keyword" value="KeyPgFilelen|FILELEN"}} - - {{fbdoc item="keyword" value="KeyPgKill|KILL"}} - - {{fbdoc item="keyword" value="KeyPgMkdir|MKDIR"}} - - {{fbdoc item="keyword" value="KeyPgName|NAME"}} - - {{fbdoc item="keyword" value="KeyPgRmdir|RMDIR"}} - - {{fbdoc item="keyword" value="KeyPgRun|RUN"}} - - {{fbdoc item="keyword" value="KeyPgSetenviron|SETENVIRON"}} - - {{fbdoc item="keyword" value="KeyPgShell|SHELL"}} - - {{fbdoc item="keyword" value="KeyPgSystem|SYSTEM"}} - - {{fbdoc item="keyword" value="KeyPgWindowtitle|WINDOWTITLE"}} +- [[KeyPgChdir ChDir]] + - [[KeyPgCommand Command]] + - [[KeyPgCurdir CurDir]] + - [[KeyPgDir Dir]] + - [[KeyPgEnd End (Déclaration)]] + - [[KeyPgEnviron Environ]] + - [[KeyPgExec Exec]] + - [[KeyPgExepath ExePath]] + - [[KeyPgFileattr FileAttr]] + - [[KeyPgFilecopy FileCopy]] + - [[KeyPgFiledatetime FileDateTime]] + - [[KeyPgFileexists FileExists]] + - [[KeyPgFilelen FileLen]] + - [[KeyPgKill Kill]] + - [[KeyPgMkdir MkDir]] + - [[KeyPgName Name]] + - [[KeyPgRmdir RmDir]] + - [[KeyPgRun Run]] + - [[KeyPgSetenviron SetEnviron]] + - [[KeyPgShell Shell]] + - [[KeyPgSystem System]] + - [[KeyPgWindowtitle WindowTitle]] + **Pointeurs** + - [[KeyPgPointer Pointer]] -{{fbdoc item="section" value="Pointers"}} - - {{fbdoc item="keyword" value="KeyPgPointer|POINTER"}} - - {{fbdoc item="keyword" value="KeyPgOpProcptr|PROCPTR"}} - - {{fbdoc item="keyword" value="KeyPgPtr|PTR"}} - - {{fbdoc item="keyword" value="KeyPgSadd|SADD"}} - - {{fbdoc item="keyword" value="KeyPgOpStrptr|STRPTR"}} - - {{fbdoc item="keyword" value="KeyPgOpVarptr|VARPTR"}} +- [[KeyPgOpProcptr ProcPtr]] + - [[KeyPgPtr Ptr]] + - [[KeyPgSadd SAdd]] + - [[KeyPgOpStrptr StrPtr]] + - [[KeyPgOpVarptr VarPtr]] + **Symboles prédéfinis** + - [[KeyPgDddate __DATE__]] -{{fbdoc item="section" value="Predefined symbols"}} - - {{fbdoc item="keyword" value="KeyPgDddate|__DATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbargc|__FB_ARGC__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbargv|__FB_ARGV__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBBigEndian|__FB_BIGENDIAN__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBBuildDate|__FB_BUILD_DATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbcygwin|__FB_CYGWIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdarwin|__FB_DARWIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdebug|__FB_DEBUG__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbdos|__FB_DOS__"}} - - {{fbdoc item="keyword" value="KeyPgDdfberr|__FB_ERR__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbfreebsd|__FB_FREEBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfblang|__FB_LANG__"}} - - {{fbdoc item="keyword" value="KeyPgDdfblinux|__FB_LINUX__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBMain|__FB_MAIN__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBMinVersion|__FB_MIN_VERSION__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbnetbsd|__FB_NETBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbopenbsd|__FB_OPENBSD__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionbyval|__FB_OPTION_BYVAL__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptiondynamic|__FB_OPTION_DYNAMIC__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionescape|__FB_OPTION_ESCAPE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionexplicit|__FB_OPTION_EXPLICIT__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptiongosub|__FB_OPTION_GOSUB__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboptionprivate|__FB_OPTION_PRIVATE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutdll|__FB_OUT_DLL__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutexe|__FB_OUT_EXE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutlib|__FB_OUT_LIB__"}} - - {{fbdoc item="keyword" value="KeyPgDdfboutobj|__FB_OUT_OBJ__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbsignature|__FB_SIGNATURE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbsse|__FB_SSE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbversion|__FB_VERSION__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerMajor|__FB_VER_MAJOR__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerMinor|__FB_VER_MINOR__"}} - - {{fbdoc item="keyword" value="KeyPgDdFBVerPatch|__FB_VER_PATCH__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbwin32|__FB_WIN32__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbxbox|__FB_XBOX__"}} - - {{fbdoc item="keyword" value="KeyPgDdfile|__FILE__"}} - - {{fbdoc item="keyword" value="KeyPgDdfilenq|__FILE_NQ__"}} - - {{fbdoc item="keyword" value="KeyPgDdfunction|__FUNCTION__"}} - - {{fbdoc item="keyword" value="KeyPgDdfunctionnq|__FUNCTION_NQ__"}} - - {{fbdoc item="keyword" value="KeyPgDdfbmt|__FB_MT__"}} - - {{fbdoc item="keyword" value="KeyPgDdline|__LINE__"}} - - {{fbdoc item="keyword" value="KeyPgDdpath|__PATH__"}} - - {{fbdoc item="keyword" value="KeyPgDdtime|__TIME__"}} +- [[KeyPgDdfbargc __FB_ARGC__]] + - [[KeyPgDdfbargv __FB_ARGV__]] + - [[KeyPgDdFBBigEndian __FB_BIGENDIAN__]] + - [[KeyPgDdFBBuildDate __FB_BUILD_DATE__]] + - [[KeyPgDdfbcygwin __FB_CYGWIN__]] + - [[KeyPgDdfbdarwin __FB_DARWIN__]] + - [[KeyPgDdfbdebug __FB_DEBUG__]] + - [[KeyPgDdfbdos __FB_DOS__]] + - [[KeyPgDdfberr __FB_ERR__]] + - [[KeyPgDdfbfreebsd __FB_FREEBSD__]] + - [[KeyPgDdfblang __FB_LANG__]] + - [[KeyPgDdfblinux __FB_LINUX__]] + - [[KeyPgDdFBMain __FB_MAIN__]] + - [[KeyPgDdFBMinVersion __FB_MIN_VERSION__]] + - [[KeyPgDdfbnetbsd __FB_NETBSD__]] + - [[KeyPgDdfbopenbsd __FB_OPENBSD__]] + - [[KeyPgDdfboptionbyval __FB_OPTION_BYVAL__]] + - [[KeyPgDdfboptiondynamic __FB_OPTION_DYNAMIC__]] + - [[KeyPgDdfboptionescape __FB_OPTION_ESCAPE__]] + - [[KeyPgDdfboptionexplicit __FB_OPTION_EXPLICIT__]] + - [[KeyPgDdfboptiongosub __Fb_Option_Gosub__]] + - [[KeyPgDdfboptionprivate __FB_OPTION_PRIVATE__]] + - [[KeyPgDdfboutdll __FB_OUT_DLL__]] + - [[KeyPgDdfboutexe __FB_OUT_EXE__]] + - [[KeyPgDdfboutlib __FB_OUT_LIB__]] + - [[KeyPgDdfboutobj __FB_OUT_OBJ__]] + - [[KeyPgDdfbsignature __FB_SIGNATURE__]] + - [[KeyPgDdfbsse __FB_SSE__]] + - [[KeyPgDdfbversion __FB_VERSION__]] + - [[KeyPgDdFBVerMajor __FB_VER_MAJOR__]] + - [[KeyPgDdFBVerMinor __FB_VER_MINOR__]] + - [[KeyPgDdFBVerPatch __FB_VER_PATCH__]] + - [[KeyPgDdfbwin32 __FB_WIN32__]] + - [[KeyPgDdfbxbox __FB_XBOX__]] + - [[KeyPgDdfile __FILE__]] + - [[KeyPgDdfilenq __FILE_NQ__]] + - [[KeyPgDdfunction __FUNCTION__]] + - [[KeyPgDdfunctionnq __FUNCTION_NQ__]] + - [[KeyPgDdfbmt __FB_MT__]] + - [[KeyPgDdline __LINE__]] + - [[KeyPgDdpath __PATH__]] + - [[KeyPgDdtime __TIME__]] + **Préprocesseur** + - [[KeyPgPpdefine #define]] + - [[KeyPgPpelse #else]] -{{fbdoc item="section" value="Preprocessor"}} - - {{fbdoc item="keyword" value="KeyPgPpdefine|#DEFINE"}} - - {{fbdoc item="keyword" value="KeyPgPpelse|#ELSE"}} - - {{fbdoc item="keyword" value="KeyPgPpelseif|#ELSEIF"}} - - {{fbdoc item="keyword" value="KeyPgPpendif|#ENDIF"}} - - {{fbdoc item="keyword" value="KeyPgPpmacro|#ENDMACRO"}} - - {{fbdoc item="keyword" value="KeyPgPperror|#ERROR"}} - - {{fbdoc item="keyword" value="KeyPgPpif|#IF"}} - - {{fbdoc item="keyword" value="KeyPgPpifdef|#IFDEF"}} - - {{fbdoc item="keyword" value="KeyPgPpifndef|#IFNDEF"}} - - {{fbdoc item="keyword" value="KeyPgInclib|#INCLIB"}} - - {{fbdoc item="keyword" value="KeyPgInclude|#INCLUDE"}} - - {{fbdoc item="keyword" value="KeyPgPplibpath|#LIBPATH"}} - - {{fbdoc item="keyword" value="KeyPgPplang|#LANG"}} - - {{fbdoc item="keyword" value="KeyPgPpline|#LINE"}} - - {{fbdoc item="keyword" value="KeyPgPpmacro|#MACRO"}} - - {{fbdoc item="keyword" value="KeyPgPragma|#PRAGMA"}} - - {{fbdoc item="keyword" value="KeyPgPpprint|#PRINT"}} - - {{fbdoc item="keyword" value="KeyPgPpundef|#UNDEF"}} - - {{fbdoc item="keyword" value="KeyPgDefined|DEFINED"}} - - {{fbdoc item="keyword" value="KeyPgInclude|ONCE"}} +- [[KeyPgPpelseif #elseif]] + - [[KeyPgPpendif #endif]] + - [[KeyPgPpmacro #endmacro]] + - [[KeyPgPperror #error]] + - [[KeyPgPpif #if]] + - [[KeyPgPpifdef #ifdef]] + - [[KeyPgPpifndef #ifndef]] + - [[KeyPgInclib #inclib]] + - [[KeyPgInclude #include]] + - [[KeyPgPplibpath #libpath]] + - [[KeyPgPplang #lang]] + - [[KeyPgPpline #line]] + - [[KeyPgPpmacro #macro]] + - [[KeyPgPragma #pragma]] + - [[KeyPgPpprint #print]] + - [[KeyPgPpundef #undef]] + - [[KeyPgDefined defined]] + - [[KeyPgInclude Once]] + **Procédures** + - [[KeyPgDots ...]] + - [[KeyPgAlias Alias]] -{{fbdoc item="section" value="Procedures"}} - - {{fbdoc item="keyword" value="KeyPgDots|..."}} - - {{fbdoc item="keyword" value="KeyPgAlias|ALIAS"}} - - {{fbdoc item="keyword" value="KeyPgAny|ANY"}} - - {{fbdoc item="keyword" value="KeyPgByref|BYREF"}} - - {{fbdoc item="keyword" value="KeyPgByval|BYVAL"}} - - {{fbdoc item="keyword" value="KeyPgCall|CALL"}} - - {{fbdoc item="keyword" value="KeyPgCdecl|CDECL"}} - - {{fbdoc item="keyword" value="KeyPgConstMember|CONST (Member)"}} - - {{fbdoc item="keyword" value="KeyPgConstructor|CONSTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgModuleConstructor|CONSTRUCTOR (Module)"}} - - {{fbdoc item="keyword" value="KeyPgDestructor|DESTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgModuleDestructor|DESTRUCTOR (Module)"}} - - {{fbdoc item="keyword" value="KeyPgDeclare|DECLARE"}} - - {{fbdoc item="keyword" value="KeyPgFunction|FUNCTION"}} - - {{fbdoc item="keyword" value="KeyPgMemberFunction|FUNCTION (Member)"}} - - {{fbdoc item="keyword" value="KeyPgLib|LIB"}} - - {{fbdoc item="keyword" value="KeyPgNaked|NAKED"}} - - {{fbdoc item="keyword" value="KeyPgOperator|OPERATOR"}} - - {{fbdoc item="keyword" value="KeyPgOverload|OVERLOAD"}} - - {{fbdoc item="keyword" value="KeyPgPascal|PASCAL"}} - - {{fbdoc item="keyword" value="KeyPgVisPrivate|PRIVATE (Member)"}} - - {{fbdoc item="keyword" value="KeyPgVisProtected|PROTECTED (Member)"}} - - {{fbdoc item="keyword" value="KeyPgProperty|PROPERTY"}} - - {{fbdoc item="keyword" value="KeyPgVisPublic|PUBLIC (Member)"}} - - {{fbdoc item="keyword" value="KeyPgStaticMember|STATIC (Member)"}} - - {{fbdoc item="keyword" value="KeyPgSub|SUB"}} - - {{fbdoc item="keyword" value="KeyPgMemberSub|SUB (Member)"}} - - {{fbdoc item="keyword" value="KeyPgStdcall|STDCALL"}} - - {{fbdoc item="keyword" value="KeyPgThis|THIS"}} - - {{fbdoc item="keyword" value="KeyPgVaArg|VA_ARG"}} - - {{fbdoc item="keyword" value="KeyPgVaFirst|VA_FIRST"}} - - {{fbdoc item="keyword" value="KeyPgVaNext|VA_NEXT"}} +- [[KeyPgAny Any]] + - [[KeyPgByref ByRef]] + - [[KeyPgByval ByVal]] + - [[KeyPgCall Call]] + - [[KeyPgCdecl cdecl]] + - [[KeyPgConstMember Const (Membre)]] + - [[KeyPgConstructor Constructor]] + - [[KeyPgModuleConstructor Constructor (Module)]] + - [[KeyPgDestructor Destructor]] + - [[KeyPgModuleDestructor Destructor (Module)]] + - [[KeyPgDeclare Declare]] + - [[KeyPgFunction Function]] + - [[KeyPgMemberFunction Function (Membre)]] + - [[KeyPgLib Lib]] + - [[KeyPgNaked Naked]] + - [[KeyPgOperator Operator]] + - [[KeyPgOverload Overload]] + - [[KeyPgPascal pascal]] + - [[KeyPgVisPrivate Private (Membre)]] + - [[KeyPgVisProtected Protected (Membre)]] + - [[KeyPgProperty Property]] + - [[KeyPgVisPublic Public (Membre)]] + - [[KeyPgStaticMember Static (Membre)]] + - [[KeyPgSub Sub]] + - [[KeyPgMemberSub Sub (Membre)]] + - [[KeyPgStdcall stdcall]] + - [[KeyPgThis This]] + - [[KeyPgVaArg va_arg]] + - [[KeyPgVaFirst va_first]] + - [[KeyPgVaNext va_next]] + **Déroulement programme** + - [[KeyPgContinue Continue]] + - [[KeyPgCase Case]] -{{fbdoc item="section" value="Program flow"}} - - {{fbdoc item="keyword" value="KeyPgContinue|CONTINUE"}} - - {{fbdoc item="keyword" value="KeyPgCase|CASE"}} - - {{fbdoc item="keyword" value="KeyPgDo|DO"}} - - {{fbdoc item="keyword" value="KeyPgDoloop|DO...LOOP"}} - - {{fbdoc item="keyword" value="KeyPgElse|ELSE"}} - - {{fbdoc item="keyword" value="KeyPgElseif|ELSEIF"}} - - {{fbdoc item="keyword" value="KeyPgEndif|END IF"}} - - {{fbdoc item="keyword" value="KeyPgExit|EXIT"}} - - {{fbdoc item="keyword" value="KeyPgGosub|GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgGoto|GOTO"}} - - {{fbdoc item="keyword" value="KeyPgIfthen|IF...THEN"}} - - {{fbdoc item="keyword" value="KeyPgIif|IIF"}} - - {{fbdoc item="keyword" value="KeyPgIs|IS"}} - - {{fbdoc item="keyword" value="KeyPgFor|FOR"}} - - {{fbdoc item="keyword" value="KeyPgFornext|FOR...NEXT"}} - - {{fbdoc item="keyword" value="KeyPgLoop|LOOP"}} - - {{fbdoc item="keyword" value="KeyPgNext|NEXT"}} - - {{fbdoc item="keyword" value="KeyPgOngosub|ON...GOSUB"}} - - {{fbdoc item="keyword" value="KeyPgOngoto|ON...GOTO"}} - - {{fbdoc item="keyword" value="KeyPgReturn|RETURN"}} - - {{fbdoc item="keyword" value="KeyPgSelectcase|SELECT CASE"}} - - {{fbdoc item="keyword" value="KeyPgSleep|SLEEP"}} - - {{fbdoc item="keyword" value="KeyPgStep|STEP"}} - - {{fbdoc item="keyword" value="KeyPgThen|THEN"}} - - {{fbdoc item="keyword" value="KeyPgUntil|UNTIL"}} - - {{fbdoc item="keyword" value="KeyPgWend|WEND"}} - - {{fbdoc item="keyword" value="KeyPgWhile|WHILE"}} - - {{fbdoc item="keyword" value="KeyPgWhilewend|WHILE...WEND"}} +- [[KeyPgDo Do]] + - [[KeyPgDoloop Do...Loop]] + - [[KeyPgElse Else]] + - [[KeyPgElseif ElseIf]] + - [[KeyPgEndif End If]] + - [[KeyPgExit Exit]] + - [[KeyPgGosub GoSub]] + - [[KeyPgGoto Goto]] + - [[KeyPgIfthen If...Then]] + - [[KeyPgIif IIf]] + - [[KeyPgIs Is]] + - [[KeyPgFor For]] + - [[KeyPgFornext For...Next]] + - [[KeyPgLoop Loop]] + - [[KeyPgNext Next]] + - [[KeyPgOngosub On...Gosub]] + - [[KeyPgOngoto On...Goto]] + - [[KeyPgReturn Return]] + - [[KeyPgSelectcase Select Case]] + - [[KeyPgSleep Sleep]] + - [[KeyPgStep Step]] + - [[KeyPgThen Then]] + - [[KeyPgUntil Until]] + - [[KeyPgWend Wend]] + - [[KeyPgWhile While]] + - [[KeyPgWhilewend While...Wend]] + **Fonctions chaînes** + - [[KeyPgInstr InStr]] + - [[KeyPgInstrrev InStrRev]] -{{fbdoc item="section" value="String functions"}} - - {{fbdoc item="keyword" value="KeyPgInstr|INSTR"}} - - {{fbdoc item="keyword" value="KeyPgInstrrev|INSTRREV"}} - - {{fbdoc item="keyword" value="KeyPgLcase|LCASE"}} - - {{fbdoc item="keyword" value="KeyPgLeft|LEFT"}} - - {{fbdoc item="keyword" value="KeyPgLen|LEN"}} - - {{fbdoc item="keyword" value="KeyPgLset|LSET"}} - - {{fbdoc item="keyword" value="KeyPgLtrim|LTRIM"}} - - {{fbdoc item="keyword" value="KeyPgMidstatement|MID (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgMidfunction|MID (Function)"}} - - {{fbdoc item="keyword" value="KeyPgRight|RIGHT"}} - - {{fbdoc item="keyword" value="KeyPgRset|RSET"}} - - {{fbdoc item="keyword" value="KeyPgRtrim|RTRIM"}} - - {{fbdoc item="keyword" value="KeyPgSpace|SPACE"}} - - {{fbdoc item="keyword" value="KeyPgStringFunction|STRING (Function)"}} - - {{fbdoc item="keyword" value="KeyPgTrim|TRIM"}} - - {{fbdoc item="keyword" value="KeyPgUcase|UCASE"}} - - {{fbdoc item="keyword" value="KeyPgWspace|WSPACE"}} - - {{fbdoc item="keyword" value="KeyPgWstringFunction|WSTRING(Function)"}} +- [[KeyPgLcase LCase]] + - [[KeyPgLeft Left]] + - [[KeyPgLen Len]] + - [[KeyPgLset LSet]] + - [[KeyPgLtrim LTrim]] + - [[KeyPgMidstatement Mid (Statement)]] + - [[KeyPgMidfunction Mid (Fonction)]] + - [[KeyPgRight Right]] + - [[KeyPgRset RSet]] + - [[KeyPgRtrim RTrim]] + - [[KeyPgSpace Space]] + - [[KeyPgStringFunction String (Fonction)]] + - [[KeyPgTrim Trim]] + - [[KeyPgUcase UCase]] + - [[KeyPgWspace WSpace]] + - [[KeyPgWstringFunction Wstring(Fonction)]] + **Conversion de chaînes et de nombres** + - [[KeyPgAsc Asc]] + - [[KeyPgBin Bin]] -{{fbdoc item="section" value="String and number conversion"}} - - {{fbdoc item="keyword" value="KeyPgAsc|ASC"}} - - {{fbdoc item="keyword" value="KeyPgBin|BIN"}} - - {{fbdoc item="keyword" value="KeyPgChr|CHR"}} - - {{fbdoc item="keyword" value="KeyPgCvd|CVD"}} - - {{fbdoc item="keyword" value="KeyPgCvi|CVI"}} - - {{fbdoc item="keyword" value="KeyPgCvl|CVL"}} - - {{fbdoc item="keyword" value="KeyPgCvlongint|CVLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgCvs|CVS"}} - - {{fbdoc item="keyword" value="KeyPgCvshort|CVSHORT"}} - - {{fbdoc item="keyword" value="KeyPgFormat|FORMAT"}} - - {{fbdoc item="keyword" value="KeyPgHex|HEX"}} - - {{fbdoc item="keyword" value="KeyPgMkd|MKD"}} - - {{fbdoc item="keyword" value="KeyPgMki|MKI"}} - - {{fbdoc item="keyword" value="KeyPgMkl|MKL"}} - - {{fbdoc item="keyword" value="KeyPgMklongint|MKLONGINT"}} - - {{fbdoc item="keyword" value="KeyPgMks|MKS"}} - - {{fbdoc item="keyword" value="KeyPgMkshort|MKSHORT"}} - - {{fbdoc item="keyword" value="KeyPgOct|OCT"}} - - {{fbdoc item="keyword" value="KeyPgStr|STR"}} - - {{fbdoc item="keyword" value="KeyPgVal|VAL"}} - - {{fbdoc item="keyword" value="KeyPgVallng|VALLNG"}} - - {{fbdoc item="keyword" value="KeyPgValint|VALINT"}} - - {{fbdoc item="keyword" value="KeyPgValuint|VALUINT"}} - - {{fbdoc item="keyword" value="KeyPgValulng|VALULNG"}} - - {{fbdoc item="keyword" value="KeyPgWbin|WBIN"}} - - {{fbdoc item="keyword" value="KeyPgWchr|WCHR"}} - - {{fbdoc item="keyword" value="KeyPgWhex|WHEX"}} - - {{fbdoc item="keyword" value="KeyPgWoct|WOCT"}} - - {{fbdoc item="keyword" value="KeyPgWstr|WSTR"}} +- [[KeyPgChr Chr]] + - [[KeyPgCvd CVD]] + - [[KeyPgCvi CVI]] + - [[KeyPgCvl CVL]] + - [[KeyPgCvlongint CVLongInt]] + - [[KeyPgCvs CVS]] + - [[KeyPgCvshort CVShort]] + - [[KeyPgFormat Format]] + - [[KeyPgHex Hex]] + - [[KeyPgMkd MKD]] + - [[KeyPgMki MKI]] + - [[KeyPgMkl MKL]] + - [[KeyPgMklongint MKLongInt]] + - [[KeyPgMks MKS]] + - [[KeyPgMkshort MKShort]] + - [[KeyPgOct Oct]] + - [[KeyPgStr Str]] + - [[KeyPgVal Val]] + - [[KeyPgVallng ValLng]] + - [[KeyPgValint ValInt]] + - [[KeyPgValuint ValUInt]] + - [[KeyPgValulng ValULng]] + - [[KeyPgWbin WBin]] + - [[KeyPgWchr WChr]] + - [[KeyPgWhex WHex]] + - [[KeyPgWoct WOct]] + - [[KeyPgWstr WStr]] + **Type casting/conversion** + - [[KeyPgCast Cast]] + - [[KeyPgCbyte CByte]] -{{fbdoc item="section" value="Type casting/conversion"}} - - {{fbdoc item="keyword" value="KeyPgCast|CAST"}} - - {{fbdoc item="keyword" value="KeyPgCbyte|CBYTE"}} - - {{fbdoc item="keyword" value="KeyPgCdbl|CDBL"}} - - {{fbdoc item="keyword" value="KeyPgCint|CINT"}} - - {{fbdoc item="keyword" value="KeyPgClng|CLNG"}} - - {{fbdoc item="keyword" value="KeyPgClngint|CLNGINT"}} - - {{fbdoc item="keyword" value="KeyPgCptr|CPTR"}} - - {{fbdoc item="keyword" value="KeyPgCshort|CSHORT"}} - - {{fbdoc item="keyword" value="KeyPgCsign|CSIGN"}} - - {{fbdoc item="keyword" value="KeyPgCsng|CSNG"}} - - {{fbdoc item="keyword" value="KeyPgCubyte|CUBYTE"}} - - {{fbdoc item="keyword" value="KeyPgCuint|CUINT"}} - - {{fbdoc item="keyword" value="KeyPgCulng|CULNG"}} - - {{fbdoc item="keyword" value="KeyPgCulngint|CULNGINT"}} - - {{fbdoc item="keyword" value="KeyPgCunsg|CUNSG"}} - - {{fbdoc item="keyword" value="KeyPgCushort|CUSHORT"}} +- [[KeyPgCdbl CDbl]] + - [[KeyPgCint CInt]] + - [[KeyPgClng CLng]] + - [[KeyPgClngint CLngInt]] + - [[KeyPgCptr CPtr]] + - [[KeyPgCshort CShort]] + - [[KeyPgCsign CSign]] + - [[KeyPgCsng CSng]] + - [[KeyPgCubyte CUByte]] + - [[KeyPgCuint CUInt]] + - [[KeyPgCulng CULng]] + - [[KeyPgCulngint CULngInt]] + - [[KeyPgCunsg CUnsg]] + - [[KeyPgCushort CUShort]] + **Entrée utilisateur** + - [[KeyPgGetjoystick GetJoystick]] + - [[KeyPgGetkey GetKey]] -{{fbdoc item="section" value="User input"}} - - {{fbdoc item="keyword" value="KeyPgGetjoystick|GETJOYSTICK"}} - - {{fbdoc item="keyword" value="KeyPgGetkey|GETKEY"}} - - {{fbdoc item="keyword" value="KeyPgGetmouse|GETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgInkey|INKEY"}} - - {{fbdoc item="keyword" value="KeyPgInputnum|INPUT"}} - - {{fbdoc item="keyword" value="KeyPgInput|INPUT (Statement)"}} - - {{fbdoc item="keyword" value="KeyPgLineinput|LINE INPUT"}} - - {{fbdoc item="keyword" value="KeyPgMultikey|MULTIKEY"}} - - {{fbdoc item="keyword" value="KeyPgSetmouse|SETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgStick|STICK"}} +- [[KeyPgGetmouse GetMouse]] + - [[KeyPgInkey Inkey]] + - [[KeyPgInputnum Input]] + - [[KeyPgInput Input (Déclaration)]] + - [[KeyPgLineinput Line Input]] + - [[KeyPgMultikey MultiKey]] + - [[KeyPgSetmouse SetMouse]] + - [[KeyPgStick Stick]] + - [[KeyPgStrig Strig]] + - [[KeyPgWinput WInput]] + ;
- {{fbdoc item="keyword" value="KeyPgStrig|STRIG"}} - {{fbdoc item="keyword" value="KeyPgWinput|WINPUT"}} >>::c:: diff --git a/fbdocs/manual/cache/CatPgGfx.wakka b/fbdocs/manual/cache/CatPgGfx.wakka index dfb1f960bd..7817d808fe 100644 --- a/fbdocs/manual/cache/CatPgGfx.wakka +++ b/fbdocs/manual/cache/CatPgGfx.wakka @@ -1,63 +1,63 @@ {{fbdoc item="title" value="Graphics Keyword List"}}---- -A list of the keywords and procedures of ""FreeBASIC""'s graphics library. +Liste des mots-clés et des procédures de la bibliothèque graphique de FreeBasic. -<< - - {{fbdoc item="keyword" value="KeyPgAddGfx|ADD"}} - - {{fbdoc item="keyword" value="KeyPgAlphaGfx|ALPHA"}} - - {{fbdoc item="keyword" value="KeyPgAndGfx|AND (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgBload|BLOAD"}} - - {{fbdoc item="keyword" value="KeyPgBsave|BSAVE"}} - - {{fbdoc item="keyword" value="KeyPgCircle|CIRCLE"}} - - {{fbdoc item="keyword" value="KeyPgColor|COLOR"}} - - {{fbdoc item="keyword" value="KeyPgCustomgfx|CUSTOM"}} - - {{fbdoc item="keyword" value="KeyPgDraw|DRAW"}} - - {{fbdoc item="keyword" value="KeyPgDrawString|DRAW STRING"}} - - {{fbdoc item="keyword" value="KeyPgFlip|FLIP"}} - - {{fbdoc item="keyword" value="KeyPgImageConvertRow|IMAGECONVERTROW"}} - - {{fbdoc item="keyword" value="KeyPgImagecreate|IMAGECREATE"}} - - {{fbdoc item="keyword" value="KeyPgImageDestroy|IMAGEDESTROY"}} - - {{fbdoc item="keyword" value="KeyPgImageInfo|IMAGEINFO"}} - - {{fbdoc item="keyword" value="KeyPgGetgraphics|GET (GRAPHICS)"}} - - {{fbdoc item="keyword" value="KeyPgGetjoystick|GETJOYSTICK"}} - - {{fbdoc item="keyword" value="KeyPgGetmouse|GETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgInp|INP"}} - - {{fbdoc item="keyword" value="KeyPgLinegraphics|LINE (GRAPHICS)"}} - - {{fbdoc item="keyword" value="KeyPgMultikey|MULTIKEY"}} - - {{fbdoc item="keyword" value="KeyPgOut|OUT"}} - - {{fbdoc item="keyword" value="KeyPgOrGfx|OR (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgPaint|PAINT"}} - - {{fbdoc item="keyword" value="KeyPgPalette|PALETTE"}} - - {{fbdoc item="keyword" value="KeyPgPcopy|PCOPY"}} - - {{fbdoc item="keyword" value="KeyPgPmap|PMAP"}} - - {{fbdoc item="keyword" value="KeyPgPoint|POINT"}} + - [[KeyPgAddGfx Add]] + - [[KeyPgAlphaGfx Alpha]] + - [[KeyPgAndGfx And (Graphics Put)]] + - [[KeyPgBload BLoad]] + - [[KeyPgBsave BSave]] + - [[KeyPgCircle Circle]] + - [[KeyPgColor Color]] + - [[KeyPgCustomgfx Custom]] + - [[KeyPgDraw Draw]] + - [[KeyPgDrawString Draw String]] + - [[KeyPgFlip Flip]] + - [[KeyPgImageConvertRow ImageConvertRow]] + - [[KeyPgImagecreate ImageCreate]] + - [[KeyPgImageDestroy ImageDestroy]] + - [[KeyPgImageInfo ImageInfo]] + - [[KeyPgGetgraphics Get (Graphics)]] + - [[KeyPgGetjoystick GetJoystick]] + - [[KeyPgGetmouse GetMouse]] + - [[KeyPgInp Inp]] + - [[KeyPgLinegraphics Line (Graphics)]] + - [[KeyPgMultikey MultiKey]] + - [[KeyPgOut Out]] + - [[KeyPgOrGfx Or (Graphics Put)]] + - [[KeyPgPaint Paint]] + - [[KeyPgPalette Palette]] + - [[KeyPgPcopy PCopy]] + - [[KeyPgPmap PMap]] + - [[KeyPgPoint Point]] + ; - [[KeyPgPreset PReset]] -<<>> - - {{fbdoc item="keyword" value="KeyPgPreset|PRESET"}} - - {{fbdoc item="keyword" value="KeyPgPset|PSET"}} - - {{fbdoc item="keyword" value="KeyPgPsetGfx|PSET (GRAPHICS PUT)"}} - - {{fbdoc item="keyword" value="KeyPgPutgraphics|PUT (GRAPHICS)"}} - - {{fbdoc item="keyword" value="KeyPgRgb|RGB"}} - - {{fbdoc item="keyword" value="KeyPgRgba|RGBA"}} - - {{fbdoc item="keyword" value="KeyPgScreengraphics|SCREEN (GRAPHICS)"}} - - {{fbdoc item="keyword" value="KeyPgScreencontrol|SCREENCONTROL"}} - - {{fbdoc item="keyword" value="KeyPgScreencopy|SCREENCOPY"}} - - {{fbdoc item="keyword" value="KeyPgScreenevent|SCREENEVENT"}} - - {{fbdoc item="keyword" value="KeyPgScreenglproc|SCREENGLPROC"}} - - {{fbdoc item="keyword" value="KeyPgScreeninfo|SCREENINFO"}} - - {{fbdoc item="keyword" value="KeyPgScreenlist|SCREENLIST"}} - - {{fbdoc item="keyword" value="KeyPgScreenlock|SCREENLOCK"}} - - {{fbdoc item="keyword" value="KeyPgScreenptr|SCREENPTR"}} - - {{fbdoc item="keyword" value="KeyPgScreenres|SCREENRES"}} - - {{fbdoc item="keyword" value="KeyPgScreenset|SCREENSET"}} - - {{fbdoc item="keyword" value="KeyPgScreensync|SCREENSYNC"}} - - {{fbdoc item="keyword" value="KeyPgScreenunlock|SCREENUNLOCK"}} - - {{fbdoc item="keyword" value="KeyPgSetmouse|SETMOUSE"}} - - {{fbdoc item="keyword" value="KeyPgTransGfx|TRANS"}} - - {{fbdoc item="keyword" value="KeyPgViewgraphics|VIEW (GRAPHICS)"}} - - {{fbdoc item="keyword" value="KeyPgWait|WAIT"}} - - {{fbdoc item="keyword" value="KeyPgWindow|WINDOW"}} - - {{fbdoc item="keyword" value="KeyPgWindowtitle|WINDOWTITLE"}} - - {{fbdoc item="keyword" value="KeyPgXorGfx|XOR (GRAPHICS PUT)"}} +- [[KeyPgPset PSet]] + - [[KeyPgPsetGfx Pset (Graphics Put)]] + - [[KeyPgPutgraphics Put (Graphics)]] + - [[KeyPgRgb RGB]] + - [[KeyPgRgba RGBA]] + - [[KeyPgScreengraphics Screen (Graphics)]] + - [[KeyPgScreencontrol ScreenControl]] + - [[KeyPgScreencopy ScreenCopy]] + - [[KeyPgScreenevent ScreenEvent]] + - [[KeyPgScreenglproc ScreenGLProc]] + - [[KeyPgScreeninfo ScreenInfo]] + - [[KeyPgScreenlist ScreenList]] + - [[KeyPgScreenlock ScreenLock]] + - [[KeyPgScreenptr ScreenPtr]] + - [[KeyPgScreenres ScreenRes]] + - [[KeyPgScreenset ScreenSet]] + - [[KeyPgScreensync ScreenSync]] + - [[KeyPgScreenunlock ScreenUnlock]] + - [[KeyPgSetmouse SetMouse]] + - [[KeyPgTransGfx Trans]] + - [[KeyPgViewgraphics View (Graphics)]] + - [[KeyPgWait Wait]] + - [[KeyPgWindow Window]] + - [[KeyPgWindowtitle WindowTitle]] + - [[KeyPgXorGfx Xor (Graphics Put)]] + ;
+
>> diff --git a/fbdocs/manual/cache/CatPgGfx2D.wakka b/fbdocs/manual/cache/CatPgGfx2D.wakka index 8a38f6a7e6..176a02f7b8 100644 --- a/fbdocs/manual/cache/CatPgGfx2D.wakka +++ b/fbdocs/manual/cache/CatPgGfx2D.wakka @@ -1,82 +1,82 @@ {{fbdoc item="title" value="2D Drawing Functions"}}---- -Statements and procedures for working with 2D graphics. +Déclarations et procédures pour travailler avec des graphiques 2D. {{fbdoc item="desc"}} - The statements and procedures listed here provide ways of drawing to the screen. Image buffers can be created and blitted to the screen using a variety of blending methods. Palette colors can be retrieved or set in graphics modes that support them. + Les déclarations et les procédures énumérées ici fournissent des moyens de dessin à l'écran. Des tampons images peuvent être créés et affichés à l'écran en utilisant une variété de méthodes de transformation et manipulation. Les palettes de couleurs peuvent être récupérées ou définies dans les modes graphiques qui les supportent. -**{{anchor name="COLOR|Working with Color"}}** - Procedures that control the color used by other drawing procedures. -**{{anchor name="DRAWING|Drawing to Image Buffers"}}** - Procedures that draw shapes and text onto image buffers or to the screen. -**{{anchor name="IMGBUF|Image Buffer Creation"}}** - Procedures that create, free and save image buffers. -**{{anchor name="BLITTING|Blitting Image Buffers"}}** - Procedures that draw image buffers onto other image buffers or to the screen. +**[[#COLOR">Travailler avec la couleur]]** + Procédures qui contrôlent la couleur utilisée par d'autres procédures de dessin. +**[[#DRAWING">Dessin dans les tampons images]]** + Procédures qui dessinent des formes et du texte dans des tampons images ou à l'écran. +**[[#IMGBUF">Création de tampons images]]** + Procédures qui créent, libèrent et sauvegardent les tampons images. +**[[#BLITTING">Manipulation/transformation de tampons images]]** + Procédures qui appliquent des tampons images sur d'autres tampons images ou à l'écran. -<<{{anchor name="COLOR"}}{{fbdoc item="section" value="Working with Color"}} - =={{fbdoc item="keyword" value="KeyPgColor|COLOR"}}== - Sets the foreground and background color to use with the drawing procedures. - =={{fbdoc item="keyword" value="KeyPgPalette|PALETTE"}}== - Gets or sets color table information in paletted modes. - =={{fbdoc item="keyword" value="KeyPgRgb|RGB"}}== - Returns a color value for hi/truecolor modes. - =={{fbdoc item="keyword" value="KeyPgRgba|RGBA"}}== - Returns a color value including alpha (transparency) for hi/truecolor modes. - =={{fbdoc item="keyword" value="KeyPgPoint|POINT"}}== - Gets a pixel value from an image buffer or screen. +**Travailler avec la couleur** + **[[KeyPgColor Color]]** + Définit la couleur de premier plan et d'arrière-plan à utiliser avec les procédures de dessin. + **[[KeyPgPalette Palette]]** + Obtient ou définit la table d'informations des couleurs dans les modes palettisées. + **[[KeyPgRgb RGB]]** + Retourne une valeur de couleur pour les modes "hi/truecolor". + **[[KeyPgRgba RGBA]]** + Retourne une valeur de couleur dont la transparence (alpha) pour les modes "hi/truecolor". + **[[KeyPgPoint Point]]** + Obtient la valeur d'un pixel d'un tampon image ou de l'écran. -{{anchor name="DRAWING"}}{{fbdoc item="section" value="Drawing to Image Buffers"}} - =={{fbdoc item="keyword" value="KeyPgPset|PSET"}} and {{fbdoc item="keyword" value="KeyPgPreset|PRESET"}}== - Plots a single pixel on an image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgLinegraphics|LINE (GRAPHICS)"}}== - Plots a line of pixels on an image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgCircle|CIRCLE"}}== - Plots circles and ellipses on an image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgDraw|DRAW"}}== - Draws in a sequence of commands on an image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgDrawString|DRAW STRING"}}== - Writes text to an image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgPaint|PAINT"}}== - Fills an area with color on an image buffer or screen. +**Dessin dans les tampons images** + **[[KeyPgPset PSet]] et [[KeyPgPreset PReset]]** + Place un seul pixel sur un tampon image ou à l'écran. + **[[KeyPgLinegraphics Line (Graphics)]]** + Trace une ligne de pixels sur un tampon image ou à l'écran. + **[[KeyPgCircle Circle]]** + Trace des cercles et des ellipses sur un tampon image ou à l'écran. + **[[KeyPgDraw Draw]]** + Dessine à l'aide d'une séquence de commandes sur un tampon image ou à l'écran. + **[[KeyPgDrawString Draw String]]** + écrit du texte dans un tampon image ou à l'écran. + **[[KeyPgPaint Paint]]** + Remplit un espace avec une couleur sur un tampon image ou à l'écran. -{{anchor name="IMGBUF"}}{{fbdoc item="section" value="Image Buffer Creation"}} - =={{fbdoc item="keyword" value="KeyPgGetgraphics|GET (GRAPHICS)"}}== - Creates an image buffer from a portion of another image buffer or screen. - =={{fbdoc item="keyword" value="KeyPgImagecreate|IMAGECREATE"}}== - Creates an image buffer of a certain size and pixel depth. - =={{fbdoc item="keyword" value="KeyPgImageDestroy|IMAGEDESTROY"}}== - Frees an image buffer resource. - =={{fbdoc item="keyword" value="KeyPgImageConvertRow|IMAGECONVERTROW"}}== - Converts a row of pixels in an image buffer to a different color depth. - =={{fbdoc item="keyword" value="KeyPgImageInfo|IMAGEINFO"}}== - Retrieves useful information about an image buffer - =={{fbdoc item="keyword" value="KeyPgBload|BLOAD"}}== - Creates an image buffer from a file. - =={{fbdoc item="keyword" value="KeyPgBsave|BSAVE"}}== - Saves an image buffer to a file. +**Création de tampons images** + **[[KeyPgGetgraphics Get (Graphiques)]]** + Crée un tampon image à partir d'une portion d'un autre tampon d'image ou de l'écran. + **[[KeyPgImagecreate ImageCreate]]** + Crée un tampon image d'une certaine taille et profondeur de pixel. + **[[KeyPgImageDestroy ImageDestroy]]** + Libère une ressource tampon image. + **[[KeyPgImageConvertRow ImageConvertRow]]** + Convertit une rangée de pixels d'un tampon image avec une profondeur de couleur différente. + **[[KeyPgImageInfo ImageInfo]]** + Récupère des informations utiles sur un tampon image. + **[[KeyPgBload BLoad]]** + Crée un tampon image à partir d'un fichier. + **[[KeyPgBsave BSave]]** + Enregistre un tampon image dans un fichier. -<<>>{{anchor name="BLITTING"}}{{fbdoc item="section" value="Blitting Image Buffers"}} - =={{fbdoc item="keyword" value="KeyPgPutgraphics|PUT (GRAPHICS)"}}== - Blits an image buffer to another image buffer or screen. +;**Manipulation/transformation de tampons images** + **[[KeyPgPutgraphics Put (Graphiques)]]** + Affiche un tampon image sur un autre tampon image ou à l'écran. - {{fbdoc item="subsect" value="Blending Methods"}} - =={{fbdoc item="keyword" value="KeyPgAddGfx|ADD"}}== - Saturated addition of the source and target components. - =={{fbdoc item="keyword" value="KeyPgAlphaGfx|ALPHA"}}== - Blend using a uniform transparency or the image buffer's alpha channel. - =={{fbdoc item="keyword" value="KeyPgAndGfx|AND"}}== - Combine the source and target components using a bitwise ##[[KeyPgOpAnd And]]## - =={{fbdoc item="keyword" value="KeyPgOrGfx|OR"}}== - Combine the source and target components using a bitwise ##[[KeyPgOpOr Or]]## - =={{fbdoc item="keyword" value="KeyPgPsetGfx|PSET"}}== - Directly copy pixel colors from the source to the destination. - =={{fbdoc item="keyword" value="KeyPgTransGfx|TRANS"}}== - Pixels matching the transparent mask color are not blitted. - =={{fbdoc item="keyword" value="KeyPgCustomgfx|CUSTOM"}}== - Allows a custom blending procedure to be used. - =={{fbdoc item="keyword" value="KeyPgXorGfx|XOR"}}== - Combine the source and target components using a bitwise ##[[KeyPgOpXor Xor]]## + **Méthodes de Manipulation/transformation** + **[[KeyPgAddGfx Add]]** + Addition saturée des composants cible et source. + **[[KeyPgAlphaGfx Alpha]]** + Mélanger à l'aide d'une transparence uniforme ou le canal alpha du tampon image. + **[[KeyPgAndGfx And]]** + Mélanger les composants source et cible en utilisant la manipulation ##[[KeyPgOpAnd And]]## au niveau des bits + **[[KeyPgOrGfx Or]]** + Mélanger les composants source et cible en utilisant la manipulation ##[[KeyPgOpOr Or]]## au niveau des bits + **[[KeyPgPsetGfx PSet]]** + Copier directement les couleurs des pixels de la source vers la destination. + **[[KeyPgTransGfx Trans]]** + Les pixels correspondant à la couleur du masque transparent ne sont pas transformés. + **[[KeyPgCustomgfx Custom]]** + Permet d'utiliser une procédure personnalisée de mélange. + **[[KeyPgXorGfx Xor]]** + Mélanger les composants source et cible en utilisant la manipulation ##[[KeyPgOpXor Xor]]## au niveau des bits ->>::c:: +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgGfxInput.wakka b/fbdocs/manual/cache/CatPgGfxInput.wakka index 00be9cdf2d..fc45a61e15 100644 --- a/fbdocs/manual/cache/CatPgGfxInput.wakka +++ b/fbdocs/manual/cache/CatPgGfxInput.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="User Input Functions"}}---- -Procedures for working with mice, gaming devices and keyboards. +Procédures pour travailler avec la souris, le claviers et les appareils de jeu. {{fbdoc item="desc"}} - These procedures provide access to external devices such as keyboards, mice and gamepads. + Ces procédures permettent d'accéder à des périphériques externes tels que clavier, souris et manettes de jeu. -**{{anchor name="MOUSEJOY|Mouse and Joystick Input"}}** - Procedures that provide state information of the mouse or joystick. -**{{anchor name="KEYBOARD|Keyboard Input"}}** - Procedures that provide keyboard state information. +**[[#MOUSEJOY">Entrée souris et joystick]]** + Procédures qui fournissent des informations sur l'état de la souris ou d'un joystick. +**[[#KEYBOARD">Entrée clavier]]** + Procédures qui fournissent des informations sur l'état du clavier. -<<{{anchor name="MOUSEJOY"}}{{fbdoc item="section" value="Mouse and Joystick Input"}} - =={{fbdoc item="keyword" value="KeyPgGetmouse|GETMOUSE"}}== - Gets button and axis information for the mouse. - =={{fbdoc item="keyword" value="KeyPgSetmouse|SETMOUSE"}}== - Sets position and visibility of the mouse cursor. - =={{fbdoc item="keyword" value="KeyPgGetjoystick|GETJOYSTICK"}}== - Gets button and axis information for gaming devices. - =={{fbdoc item="keyword" value="KeyPgStick|STICK"}}== - Gets axis position for gaming devices. - =={{fbdoc item="keyword" value="KeyPgStrig|STRIG"}}== - Gets button state for gaming devices. -<<>>{{anchor name="KEYBOARD"}}{{fbdoc item="section" value="Keyboard Input"}} - =={{fbdoc item="keyword" value="KeyPgMultikey|MULTIKEY"}}== - Gets key information for the keyboard. ->>::c:: +**Entrée souris et joystick** + **[[KeyPgGetmouse GetMouse]]** + Obtient des informations sur les boutons et l'axe de la souris. + **[[KeyPgSetmouse SetMouse]]** + Définit la position et la visibilité du curseur de la souris. + **[[KeyPgGetjoystick GetJoystick]]** + Obtient des informations sur les boutons et l'axe pour les appareils de jeu. + **[[KeyPgStick Stick]]** + Obtient la position de l'axe pour les appareils de jeu. + **[[KeyPgStrig Strig]]** + Obtient l'état du bouton pour les appareils de jeu. +;**Entrée clavier** + **[[KeyPgMultikey MultiKey]]** + Obtient des informations sur les touches du clavier. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} diff --git a/fbdocs/manual/cache/CatPgGfxScreen.wakka b/fbdocs/manual/cache/CatPgGfxScreen.wakka index 6603b845c1..8f0bf4132d 100644 --- a/fbdocs/manual/cache/CatPgGfxScreen.wakka +++ b/fbdocs/manual/cache/CatPgGfxScreen.wakka @@ -1,58 +1,58 @@ {{fbdoc item="title" value="Screen Functions"}}---- -Statements and procedures that work with the graphics display. +Déclarations et procédures qui travaillent avec l'affichage graphique. {{fbdoc item="desc"}} - These statements and procedures control the graphics capabilities of the ""FreeBASIC"" graphics library. Screen modes can be set with varying resolutions and color depths, window events can be handled, and specific OpenGL procedures can be retrieved. + Ces déclarations et procédures contrôlent les capacités graphiques de la bibliothèque graphique FreeBasic. Les modes écran peuvent être réglés avec des résolutions et profondeurs de couleur variées, les événements de fenêtre peuvent être gérés et des procédures OpenGL spécifiques peuvent être récupérées. -**{{anchor name="MODES|Working with screen modes"}}** - Procedures for setting and retrieving information about screen modes. -**{{anchor name="PAGES|Working with pages"}}** - Procedures that manipulate screen pages. -**{{anchor name="MEMORY|Working video memory"}}** - Procedures that provide direct access to framebuffer memory. -**{{anchor name="METRICS|Screen Metrics"}}** - Procedures that control the way coordinates are interpreted. +**[[#MODES">Travailler avec les modes écran]]** + Procédures pour définir et récupérer des informations sur les modes écran. +**[[#PAGES">Travailler avec des pages écran]]** + Procédures qui manipulent les pages écran. +**[[#MEMORY">Travailler avec la mémoire vidéo]]** + Les procédures qui permettent d'accéder directement au tampon mémoire. +**[[#METRICS">Métrique écran.]]** + Les procédures qui contrôlent la façon dont les coordonnées sont interprétées. -<<{{anchor name="MODES"}}{{fbdoc item="section" value="Working with screen modes"}} - =={{fbdoc item="keyword" value="KeyPgScreenlist|SCREENLIST"}}== - Gets the available fullscreen resolutions. - =={{fbdoc item="keyword" value="KeyPgScreengraphics|SCREEN"}} and {{fbdoc item="keyword" value="KeyPgScreenres|SCREENRES"}}== - Sets a new graphics display mode. - =={{fbdoc item="keyword" value="KeyPgScreeninfo|SCREENINFO"}}== - Gets information about the system desktop or current display mode. - =={{fbdoc item="keyword" value="KeyPgScreencontrol|SCREENCONTROL"}}== - Gets or sets internal graphics library settings. - =={{fbdoc item="keyword" value="KeyPgScreenevent|SCREENEVENT"}}== - Gets system events. - =={{fbdoc item="keyword" value="KeyPgScreenglproc|SCREENGLPROC"}}== - Returns the address of an OpenGL procedure. - =={{fbdoc item="keyword" value="KeyPgWindowtitle|WINDOWTITLE"}}== - Sets the running program's window caption. +**Travailler avec les modes écran** + **[[KeyPgScreenlist ScreenList]]** + Obtient les résolutions disponibles en plein écran. + **[[KeyPgScreengraphics Screen]] et [[KeyPgScreenres ScreenRes]]** + Définit un nouveau mode d'affichage graphique. + **[[KeyPgScreeninfo ScreenInfo]]** + Obtient des informations sur le bureau du système ou le mode d'affichage actuel. + **[[KeyPgScreencontrol ScreenControl]]** + Obtient ou définit les paramètres internes de la bibliothèque de graphique. + **[[KeyPgScreenevent ScreenEvent]]** + Obtient les événements du système. + **[[KeyPgScreenglproc ScreenGLProc]]** + Renvoie l'adresse d'une procédure d'OpenGL. + **[[KeyPgWindowtitle WindowTitle]]** + Définit la légende de la fenêtre du programme en cours. -{{anchor name="PAGES"}}{{fbdoc item="section" value="Working with pages"}} - =={{fbdoc item="keyword" value="KeyPgCls|CLS"}}== - Clears the entire screen or viewport. - =={{fbdoc item="keyword" value="KeyPgScreenset|SCREENSET"}}== - Sets the current work and visible pages. - =={{fbdoc item="keyword" value="KeyPgScreencopy|SCREENCOPY"}} and {{fbdoc item="keyword" value="KeyPgPcopy|PCOPY"}} and {{fbdoc item="keyword" value="KeyPgFlip|FLIP"}}== - Copies pixel data from one page to another. - =={{fbdoc item="keyword" value="KeyPgScreensync|SCREENSYNC"}}== - Waits for the vertical refresh of the monitor. -<<>>{{anchor name="MEMORY"}}{{fbdoc item="section" value="Working video memory"}} - =={{fbdoc item="keyword" value="KeyPgScreenptr|SCREENPTR"}}== - Gets the address of the working page's framebuffer. - =={{fbdoc item="keyword" value="KeyPgScreenlock|SCREENLOCK"}}== - Locks the current working page's framebuffer for direct access. - =={{fbdoc item="keyword" value="KeyPgScreenunlock|SCREENUNLOCK"}}== - Reverts a previous [[KeyPgScreenlock ScreenLock]] command. +**Travailler avec des pages écran** + **[[KeyPgCls Cls]]** + Efface la totalité de l'écran ou de la fenêtre. + **[[KeyPgScreenset ScreenSet]]** + Définit la page de travail courante et les pages visibles. + **[[KeyPgScreencopy ScreenCopy]] et [[KeyPgPcopy PCopy]] et [[KeyPgFlip Flip]]** + Copie des données pixels d'une page à une autre. + **[[KeyPgScreensync ScreenSync]]** + Attend le rafraîchissement vertical de l'écran. +;**Travailler avec la mémoire vidéo** + **[[KeyPgScreenptr ScreenPtr]]** + Obtient l'adresse de la page de travail du tampon image. + **[[KeyPgScreenlock ScreenLock]]** + Verrouille la page courante de travail du tampon image pour un accès direct. + **[[KeyPgScreenunlock ScreenUnlock]]** + Annule la commande [[KeyPgScreenlock ScreenLock]] précédente. -{{anchor name="METRICS"}}{{fbdoc item="section" value="Screen Metrics"}} - =={{fbdoc item="keyword" value="KeyPgViewgraphics|VIEW (GRAPHICS)"}}== - Sets a clipping region for all drawing and blitting procedures. - =={{fbdoc item="keyword" value="KeyPgWindow|WINDOW"}}== - Sets a new coordinate mapping for the current viewport. - =={{fbdoc item="keyword" value="KeyPgPmap|PMAP"}}== - Converts coordinates between physical and view mappings. ->>::c:: +**Métrique écran** + **[[KeyPgViewgraphics View (Graphics)]]** + Définit une zone de découpage pour toutes les procédures de dessin et de "blitting". + **[[KeyPgWindow Window]]** + Définit une nouvelle cartographie pour les coordonnées de la fenêtre actuelle. + **[[KeyPgPmap PMap]]** + Convertit des coordonnées entre les mappages physiques et vue. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgInput.wakka b/fbdocs/manual/cache/CatPgInput.wakka index 012556938b..ee0a919ffa 100644 --- a/fbdocs/manual/cache/CatPgInput.wakka +++ b/fbdocs/manual/cache/CatPgInput.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="User Input"}}---- -Statements and procedures that get input from the user. +Déclarations et procédures entrée utilisateur. {{fbdoc item="desc"}} - These statements and procedures allow access to the keyboard buffer, and provide ways of getting input from the user. + Ces déclarations et procédures permettent l'accès à la mémoire tampon du clavier et de fournir des moyens de saisie côté utilisateur.. -**{{anchor name="READKEY|Reading keys from the keyboard buffer"}}** - Procedures that read individual keys from the keyboard buffer. -**{{anchor name="READVALUE|Reading values from the keyboard buffer"}}** - Procedures that read characters and values from the keyboard buffer. +**[[#READKEY">Lecture des touches à partir de la mémoire tampon du clavier]]** + Procédures qui lisent individuellement les touches à partir de la mémoire tampon du clavier. +**[[#READVALUE">Lecture de valeurs à partir de la mémoire tampon du clavier]]** + Procédures qui lisent des caractères et des valeurs à partir de la mémoire tampon du clavier. -<<{{anchor name="READVALUE"}}{{fbdoc item="section" value="Reading values from the keyboard buffer"}} - =={{fbdoc item="keyword" value="KeyPgInput|INPUT"}}== - Reads values from the keyboard buffer. - =={{fbdoc item="keyword" value="KeyPgLineinput|LINE INPUT"}}== - Reads a line of text from the keyboard buffer. - =={{fbdoc item="keyword" value="KeyPgInputnum|INPUT()"}}== - Reads a number of characters from the keyboard buffer, file or device. - =={{fbdoc item="keyword" value="KeyPgWinput|WINPUT()"}}== - Reads a number of wide characters from the keyboard buffer, file or device. -<<>>{{anchor name="READKEY"}}{{fbdoc item="section" value="Reading keys from the keyboard buffer"}} - =={{fbdoc item="keyword" value="KeyPgInkey|INKEY"}}== - Gets the first key, if any, waiting in the keyboard buffer. - =={{fbdoc item="keyword" value="KeyPgGetkey|GETKEY"}}== - Gets and waits for the first key in the keyboard buffer. ->>::c:: +**Lecture des touches à partir de la mémoire tampon du clavier** + **[[KeyPgInput Input]]** + Lit les valeurs à partir de la mémoire tampon du clavier. + **[[KeyPgLineinput Line Input]]** + Lit une ligne de texte à partir de la mémoire tampon du clavier. + **[[KeyPgInputnum Input()]]** + Lit un nombre de caractères à partir de la mémoire tampon du clavier, d'un fichier ou d'un périphérique. + **[[KeyPgWinput Winput()]]** + Lit un nombre de caractères larges à partir de la mémoire tampon du clavier, d'un fichier ou d'un périphérique. +;**Lecture de valeurs à partir de la mémoire tampon du clavier** + **[[KeyPgInkey Inkey]]** + Récupère la première touche, s'il y en a une, en attente dans la mémoire tampon du clavier. + **[[KeyPgGetkey GetKey]]** + Récupère et attend la première touche dans la mémoire tampon du clavier. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgMath.wakka b/fbdocs/manual/cache/CatPgMath.wakka index 74e51f3799..1ae5a0f6bc 100644 --- a/fbdocs/manual/cache/CatPgMath.wakka +++ b/fbdocs/manual/cache/CatPgMath.wakka @@ -1,55 +1,55 @@ {{fbdoc item="title" value="Mathematical Functions"}}---- -Procedures that work with numbers mathematically. +Les procédures qui travaillent mathématiquement avec des nombres. {{fbdoc item="desc"}} - This set of procedures provide basic algebraic and trigonometric function. Random numbers can also be retrieved, using a variety of random number generators. + Cet ensemble de procédures procure des fonctions de base algébriques et trigonométriques. Les nombres aléatoires peuvent également être récupérés, en utilisant une variété de générateurs de nombres aléatoires. -**{{anchor name="ALGEBRA|Algebraic Procedures"}}** - Absolute values, logarithms, square roots and more. -**{{anchor name="TRIG|Trigonometry Procedures"}}** - Sine, Cosine and other trigonometry-related procedures. -**{{anchor name="MISC|Miscellaneous Procedures"}}** - Miscellaneous procedures. +**[[#ALGEBRA">Procédures algébriques]]** + Valeurs absolues, logarithmes, racines carrées et autres. +**[[#TRIG">Procédures trigonométriques]]** + Sinus, cosinus et autres procédures liées à la trigonométrie. +**[[#MISC">Diverses procédures]]** + Procédures diverses. -<<{{anchor name="ALGEBRA"}}{{fbdoc item="section" value="Algebraic Procedures"}} - =={{fbdoc item="keyword" value="KeyPgAbs|ABS"}}== - Returns the absolute value of a number. - =={{fbdoc item="keyword" value="KeyPgExp|EXP"}}== - Returns //e// raised to some power. - =={{fbdoc item="keyword" value="KeyPgLog|LOG"}}== - Returns the natural logarithm of a number. - =={{fbdoc item="keyword" value="KeyPgSqr|SQR"}}== - Returns the square root of a number. - =={{fbdoc item="keyword" value="KeyPgFix|FIX"}}== - Returns the integer part of a number. - =={{fbdoc item="keyword" value="KeyPgFrac|FRAC"}}== - Returns the fractional part of a number. - =={{fbdoc item="keyword" value="KeyPgInt|INT"}}== - Returns the largest integer less than or equal to a number. - =={{fbdoc item="keyword" value="KeyPgSgn|SGN"}}== - Returns the sign of a number. - =={{fbdoc item="keyword" value="KeyPgRnd|RND"}}== - Returns a random [[KeyPgDouble Double]] in the range [0, 1). +**Procédures algébriques** + **[[KeyPgAbs Abs]]** + Retourne la valeur absolue d'un nombre. + **[[KeyPgExp Exp]]** + Retourne //e// élevé à une certaine puissance. + **[[KeyPgLog Log]]** + Retourne le logarithme naturel d'un nombre. + **[[KeyPgSqr Sqr]]** + Renvoie la racine carrée d'un nombre. + **[[KeyPgFix Fix]]** + Retourne la partie entière d'un nombre. + **[[KeyPgFrac Frac]]** + Retourne la partie décimale d'un nombre. + **[[KeyPgInt Int]]** + Retourne le plus grand entier inférieur ou égal à un certain nombre. + **[[KeyPgSgn Sgn]]** + Retourne le signe d'un certain nombre. + **[[KeyPgRnd Rnd]]** + Retourne un [[KeyPgDouble Double]] aléatoire dans l'intervalle [0, 1]. -<<>>{{anchor name="TRIG"}}{{fbdoc item="section" value="Trigonometry Procedures"}} - =={{fbdoc item="keyword" value="KeyPgSin|SIN"}}== - Returns the sine of an angle. - =={{fbdoc item="keyword" value="KeyPgAsin|ASIN"}}== - Returns the arcsine of a number. - =={{fbdoc item="keyword" value="KeyPgCos|COS"}}== - Returns the cosine of an angle. - =={{fbdoc item="keyword" value="KeyPgAcos|ACOS"}}== - Returns the arccosine of a number. - =={{fbdoc item="keyword" value="KeyPgTan|TAN"}}== - Returns the tangent of an angle. - =={{fbdoc item="keyword" value="KeyPgAtn|ATN"}}== - Returns the arctangent of a number. - =={{fbdoc item="keyword" value="KeyPgAtan2|ATAN2"}}== - Returns the arctangent of the ratio between two numbers. +;**Procédures trigonométriques** + **[[KeyPgSin Sin]]** + Retourne le sinus d'un angle. + **[[KeyPgAsin Asin]]** + Renvoie l'arc sinus d'un nombre. + **[[KeyPgCos Cos]]** + Retourne le cosinus d'un angle. + **[[KeyPgAcos Acos]]** + Retourne l'arc cosinus d'un certain nombre. + **[[KeyPgTan Tan]]** + Renvoie la tangente d'un angle. + **[[KeyPgAtn Atn]]** + Renvoie l'arc tangente d'un nombre. + **[[KeyPgAtan2 Atan2]]** + Renvoie l'arc tangente du rapport entre deux nombres. -{{anchor name="MISC"}}{{fbdoc item="section" value="Miscellaneous Procedures"}} - =={{fbdoc item="keyword" value="KeyPgRandomize|RANDOMIZE"}}== - Seeds the random number generator used by ##[[KeyPgRnd Rnd]]##. ->>::c:: +**Diverses procédures** + **[[KeyPgRandomize Randomize]]** + Alimente le générateur de nombres aléatoires utilisés par ##[[KeyPgRnd Rnd]]##. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgMemory.wakka b/fbdocs/manual/cache/CatPgMemory.wakka index a6bc01a516..648601126e 100644 --- a/fbdocs/manual/cache/CatPgMemory.wakka +++ b/fbdocs/manual/cache/CatPgMemory.wakka @@ -1,34 +1,34 @@ {{fbdoc item="title" value="Memory Functions"}}---- -Procedures that work with static and dynamic memory. +Les procédures de travail avec la mémoire statique ou dynamique. {{fbdoc item="desc"}} - These procedures provide access to the free store, or heap. Memory from the free store can be reserved and freed, and procedures are provided to read and write directly to that memory. + Ces procédures permettent d'accéder à la mémoire libre ou au "tas". La mémoire libre peut être réservée et libérée et des procédures sont prévues pour lire et écrire directement dans cette mémoire. -**{{anchor name="DYNAMEM|Working with Dynamic Memory"}}** - Procedures that reserve, resize or free dynamic memory. -**{{anchor name="MISC|Miscellaneous Procedures"}}** - Procedures that read or write values to and from addresses in memory. +**[[#DYNAMEM">Travailler avec la mémoire dynamique]]** + Procédures pour réserver, redimensionner ou libérer de la mémoire dynamique. +**[[#MISC">Diverses procédures]]** + Des procédures pour lire ou écrire des valeurs à des adresses de la mémoire. -<<{{anchor name="DYNAMEM"}}{{fbdoc item="section" value="Working with Dynamic Memory"}} - =={{fbdoc item="keyword" value="KeyPgAllocate|ALLOCATE"}}== - Reserves a number of bytes of uninitialized memory and returns the address. - =={{fbdoc item="keyword" value="KeyPgCallocate|CALLOCATE"}}== - Reserves a number of bytes of initialized (zeroed) memory and returns the address. - =={{fbdoc item="keyword" value="KeyPgReallocate|REALLOCATE"}}== - Changes the size of reserved memory. - =={{fbdoc item="keyword" value="KeyPgDeallocate|DEALLOCATE"}}== - Returns reserved memory back to the system. -<<>>{{anchor name="MISC"}}{{fbdoc item="section" value="Miscellaneous Procedures"}} - =={{fbdoc item="keyword" value="KeyPgPeek|PEEK"}}== - Reads some type of value from an address. - =={{fbdoc item="keyword" value="KeyPgPoke|POKE"}}== - Writes some type of value to an address. - =={{fbdoc item="keyword" value="KeyPgClear|CLEAR"}}== - Clears data in an array with a specified value. - =={{fbdoc item="keyword" value="KeyPgSwap|SWAP"}}== - Exchange the contents of two variables. - =={{fbdoc item="keyword" value="KeyPgSadd|SADD"}}== - Returns the address for the data in a string variable. ->>::c:: +**Travailler avec la mémoire dynamique** + **[[KeyPgAllocate Allocate]]** + Réserve un certain nombre d'octets de mémoire non initialisés et renvoie l'adresse. + **[[KeyPgCallocate CAllocate]]** + Réserves un certain nombre d'octets initialisés (zéro) de la mémoire et renvoie l'adresse. + **[[KeyPgReallocate Reallocate]]** + Modifie la taille de la mémoire réservée. + **[[KeyPgDeallocate Deallocate]]** + Retourne la mémoire réservée vers le système. +;**Diverses procédures** + **[[KeyPgPeek Peek]]** + Lit un certain type de valeur à partir d'une adresse. + **[[KeyPgPoke Poke]]** + Écrit un certain type de valeur à une adresse. + **[[KeyPgClear Clear]]** + Efface les données dans un tableau avec une valeur spécifiée. + **[[KeyPgSwap Swap]]** + Échange le contenu de deux variables. + **[[KeyPgSadd SAdd]]** + Renvoie l'adresse pour les données dans une variable de chaîne. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgMisc.wakka b/fbdocs/manual/cache/CatPgMisc.wakka index a70e1ac322..8d6e0886ca 100644 --- a/fbdocs/manual/cache/CatPgMisc.wakka +++ b/fbdocs/manual/cache/CatPgMisc.wakka @@ -1,55 +1,55 @@ {{fbdoc item="title" value="Miscellaneous Keywords"}}---- -<< - {{fbdoc item="section" value="Data"}} - - {{fbdoc item="keyword" value="KeyPgData|DATA"}} - - {{fbdoc item="keyword" value="KeyPgRead|READ"}} - - {{fbdoc item="keyword" value="KeyPgRestore|RESTORE"}} - - {{fbdoc item="section" value="Debugging"}} - - {{fbdoc item="keyword" value="KeyPgAssert|ASSERT"}} - - {{fbdoc item="keyword" value="KeyPgAssertwarn|ASSERTWARN"}} - - {{fbdoc item="keyword" value="KeyPgStop|STOP"}} - - {{fbdoc item="section" value="Hardware Access"}} - - {{fbdoc item="keyword" value="KeyPgInp|INP"}} - - {{fbdoc item="keyword" value="KeyPgLprint|LPRINT"}} - - {{fbdoc item="keyword" value="KeyPgLpos|LPOS"}} - - {{fbdoc item="keyword" value="KeyPgOut|OUT"}} - - {{fbdoc item="keyword" value="KeyPgWait|WAIT"}} - - {{fbdoc item="section" value="Operating System"}} - - {{fbdoc item="keyword" value="KeyPgBeep|BEEP"}} - - {{fbdoc item="keyword" value="KeyPgSleep|SLEEP"}} - - {{fbdoc item="keyword" value="KeyPgEnd|END (Statement)"}} - - {{fbdoc item="section" value="Stub Pages"}} - - {{fbdoc item="keyword" value="KeyPgAs|AS"}} - - {{fbdoc item="keyword" value="KeyPgFor|FOR"}} - - {{fbdoc item="keyword" value="KeyPgTo|TO"}} - - {{fbdoc item="keyword" value="KeyPgIs|IS"}} - - {{fbdoc item="keyword" value="KeyPgStep|STEP"}} - -<<>> - {{fbdoc item="section" value="Control Flow"}} - - {{fbdoc item="keyword" value="KeyPgDo|DO"}} - - {{fbdoc item="keyword" value="KeyPgEndif|END IF"}} - - {{fbdoc item="keyword" value="KeyPgIif|IIF"}} - - {{fbdoc item="keyword" value="KeyPgLoop|LOOP"}} - - {{fbdoc item="keyword" value="KeyPgNext|NEXT"}} - - {{fbdoc item="keyword" value="KeyPgThen|THEN"}} - - {{fbdoc item="keyword" value="KeyPgUntil|UNTIL"}} - - {{fbdoc item="keyword" value="KeyPgWend|WEND"}} - - {{fbdoc item="keyword" value="KeyPgWhile|WHILE"}} - - {{fbdoc item="section" value="Uncategorized"}} - - {{fbdoc item="keyword" value="KeyPgEndblock|END (Block)"}} - - {{fbdoc item="keyword" value="KeyPgOffsetof|OFFSETOF"}} - - {{fbdoc item="keyword" value="KeyPgSizeof|SIZEOF"}} - - {{fbdoc item="keyword" value="KeyPgTypeof|TYPEOF"}} - - {{fbdoc item="keyword" value="KeyPgLet|LET"}} - - {{fbdoc item="keyword" value="KeyPgRem|REM"}} - - {{fbdoc item="keyword" value="KeyPgOption|OPTION()"}} + **Données** + - [[KeyPgData Data]] + - [[KeyPgRead Read]] + - [[KeyPgRestore Restore]] + **Débogage** + + - [[KeyPgAssert Assert]] + - [[KeyPgAssertwarn AssertWarn]] + - [[KeyPgStop Stop]] + **Accès au matériel** + + - [[KeyPgInp Inp]] + - [[KeyPgLprint LPrint]] + - [[KeyPgLpos Lpos]] + - [[KeyPgOut Out]] + - [[KeyPgWait Wait]] + **Système d'exploitation** + + - [[KeyPgBeep Beep]] + - [[KeyPgSleep Sleep]] + - [[KeyPgEnd End (Déclaration)]] + **Stub Pages** + + - [[KeyPgAs As]] + - [[KeyPgFor For]] + - [[KeyPgTo To]] + - [[KeyPgIs Is]] + - [[KeyPgStep Step]] + ; **Contrôle de flux** + +- [[KeyPgDo Do]] + - [[KeyPgEndif End If]] + - [[KeyPgIif IIf]] + - [[KeyPgLoop Loop]] + - [[KeyPgNext Next]] + - [[KeyPgThen Then]] + - [[KeyPgUntil Until]] + - [[KeyPgWend Wend]] + - [[KeyPgWhile While]] + **Inclassables** + - [[KeyPgEndblock End (Bloc)]] + + - [[KeyPgOffsetof OffsetOf]] + - [[KeyPgSizeof SizeOf]] + - [[KeyPgTypeof TypeOf]] + - [[KeyPgLet Let]] + - [[KeyPgRem Rem]] + - [[KeyPgOption Option()]] + ;
+
>> diff --git a/fbdocs/manual/cache/CatPgModularizing.wakka b/fbdocs/manual/cache/CatPgModularizing.wakka index 08037703cc..5cba218c3c 100644 --- a/fbdocs/manual/cache/CatPgModularizing.wakka +++ b/fbdocs/manual/cache/CatPgModularizing.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Modularizing"}}---- -Keywords helpful when writing modular programs. +Mots-clés utiles lors de l'écriture des programmes modulaires. -<< - - {{fbdoc item="keyword" value="KeyPgCommon|COMMON"}} - - {{fbdoc item="keyword" value="KeyPgDylibfree|DYLIBFREE"}} - - {{fbdoc item="keyword" value="KeyPgDylibload|DYLIBLOAD"}} - - {{fbdoc item="keyword" value="KeyPgDylibsymbol|DYLIBSYMBOL"}} - - {{fbdoc item="keyword" value="KeyPgExport|EXPORT"}} - - {{fbdoc item="keyword" value="KeyPgExtern|EXTERN"}} + - [[KeyPgCommon Common]] + - [[KeyPgDylibfree DyLibFree]] + - [[KeyPgDylibload DyLibLoad]] + - [[KeyPgDylibsymbol DyLibSymbol]] + - [[KeyPgExport Export]] + - [[KeyPgExtern Extern]] + ; - [[KeyPgExternBlock Extern...End Extern]] -<<>> - - {{fbdoc item="keyword" value="KeyPgExternBlock|EXTERN...END EXTERN"}} - - {{fbdoc item="keyword" value="KeyPgImport|IMPORT"}} - - {{fbdoc item="keyword" value="KeyPgNamespace|NAMESPACE"}} - - {{fbdoc item="keyword" value="KeyPgPrivate|PRIVATE"}} - - {{fbdoc item="keyword" value="KeyPgPublic|PUBLIC"}} +- [[KeyPgImport Import]] + - [[KeyPgNamespace Namespace]] + - [[KeyPgPrivate Private]] + - [[KeyPgPublic Public]] + - [[KeyPgUsing Using (Espace de noms)]] + ;
- {{fbdoc item="keyword" value="KeyPgUsing|USING (Namespaces)"}} >> diff --git a/fbdocs/manual/cache/CatPgOpArithmetic.wakka b/fbdocs/manual/cache/CatPgOpArithmetic.wakka index 12fbf1cbb5..a84a591c3c 100644 --- a/fbdocs/manual/cache/CatPgOpArithmetic.wakka +++ b/fbdocs/manual/cache/CatPgOpArithmetic.wakka @@ -1,27 +1,27 @@ -{{fbdoc item="title" value="Arithmetic Operators"}}---- -Operators that can be used in mathematical expressions +{{fbdoc item="title" value="Arithmetic Opérateurs"}}---- +Opérateurs qui peuvent être utilisés dans des expressions mathématiques -The mathematical operators perform mathematical operations with the values of their operands and return the results. +Les opérateurs mathématiques effectueent des opérations mathématiques avec les valeurs de leurs opérandes et renvoient les résultats. -<<=={{fbdoc item="keyword" value="KeyPgOpAdd|Operator + (Add)"}}== - Returns the result of an addition of two operands. -=={{fbdoc item="keyword" value="KeyPgOpSubtract|Operator - (Subtract)"}}== - Returns the result of a subtraction of two operands. -=={{fbdoc item="keyword" value="KeyPgOpMultiply|Operator * (Multiply)"}}== - Returns the result of a multiplication of two operands. -=={{fbdoc item="keyword" value="KeyPgOpDivide|Operator / (Divide)"}}== - Returns the result of a division of two operands. -=={{fbdoc item="keyword" value="KeyPgOpIntegerDivide|Operator \ (Integer divide)"}}== - Returns the result of an integer divide of two operands. -<<>>=={{fbdoc item="keyword" value="KeyPgOpExponentiate|Operator ^ (Exponentiate)"}}== - Returns the result of an exponentiation of two operands. -=={{fbdoc item="keyword" value="KeyPgOpModulus|Operator Mod (Modulus)"}}== - Returns the result of a modulus of two operands. -=={{fbdoc item="keyword" value="KeyPgOpNegate|Operator - (Negate)"}}== - Returns the result of a negation of an operand. -=={{fbdoc item="keyword" value="KeyPgOpShiftLeft|Operator Shl (Shift left)"}}== - Returns the result of a bitwise shift left of an operand. -=={{fbdoc item="keyword" value="KeyPgOpShiftRight|Operator Shr (Shift right)"}}== - Returns the result of a bitwise shift right of an operand. ->>::c:: +**[[KeyPgOpAdd Opérateur + (Addition)]]** + Retourne le résultat de l'addition de deux opérandes. +**[[KeyPgOpSubtract Opérateur - (Soustraction)]]** + Retourne le résultat de la soustraction de deux opérandes. +**[[KeyPgOpMultiply Opérateur * (Multiplication)]]** + Retourne le résultat de la multiplication de deux opérandes. +**[[KeyPgOpDivide Opérateur / (Division)]]** + Retourne le résultat de la division de deux opérandes. +**[[KeyPgOpIntegerDivide Opérateur \ (Division entière)]]** + Retourne le résultat de la division entière de deux opérandes. +;**[[KeyPgOpExponentiate Opérateur ^ (Exposant)]]** + Retourne le résultat de la puissance de deux opérandes. +**[[KeyPgOpModulus Opérateur Mod (Modulo)]]** + Retourne le résultat de modulo de deux opérandes. +**[[KeyPgOpNegate Opérateur - (Négation)]]** + Retourne le résultat de la négation d'un opérande. +**[[KeyPgOpShiftLeft Opérateur Shl (Décalage vers la gauche)]]** + Retourne le résultat d'un décalage de bits vers la gauche d'un opérande. +**[[KeyPgOpShiftRight Opérateur Shr (Décalage vers la droite)]]** + Retourne le résultat d'un décalage de bits vers la droite d'un opérande. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpAssignment.wakka b/fbdocs/manual/cache/CatPgOpAssignment.wakka index 96711e9aa1..dcc3dd89a5 100644 --- a/fbdocs/manual/cache/CatPgOpAssignment.wakka +++ b/fbdocs/manual/cache/CatPgOpAssignment.wakka @@ -1,43 +1,43 @@ -{{fbdoc item="title" value="Assignment Operators"}}---- -Operators that assign values to operands +{{fbdoc item="title" value="Assignment Opérateurs"}}---- +Opérateurs qui affectent des valeurs aux opérandes -The assignment operators perform an assignment to the first, or //left-hand side//, operand based on the value of the second, or //right-hand side//, operand. Most of the assignment operators are combination operators, in that they first perform a mathematical or bitwise operation on the two operands, then assign the result to the //left-hand side// operand. +Les opérateurs d'affectation affectent une valeur au premier opérande, ou //côté gauche//, basée sur la valeur du second opérande, ou //côté droit//. La plupart des opérateurs d'affectation sont des combinaisons d'opérateurs, en ce sens qu'ils effectuent d'abord une opération mathématique ou bit à bit sur les deux opérandes, puis qu'ils affectent le résultat à l'opérande //côté gauche//. -<<=={{fbdoc item="keyword" value="KeyPgOpAssignment|Operator = (Assignment)"}}== - Assigns the value of one operand to the other. -=={{fbdoc item="keyword" value="KeyPgOpCombineConcat|Operator &= (Concatenate and Assign)"}}== - Assigns the value of a concatenation between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineAdd|Operator += (Add and Assign)"}}== - Assigns the value of an addition between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineSub|Operator -= (Subtract and Assign)"}}== - Assigns the value of a subtraction between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineMultiply|Operator *= (Multiply and Assign)"}}== - Assigns the value of a multiplication between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineDivide|Operator /= (Divide and Assign)"}}== - Assigns the value of a division between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineIntegerDivide|Operator \= (Integer Divide and Assign)"}}== - Assigns the value of an integer divide between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineExponentiate|Operator ^= (Exponentiate and Assign)"}}== - Assigns the value of a exponentiation between two operands. -=={{fbdoc item="keyword" value="KeyPgOpLet|Operator Let (Assignment)"}}== - Assigns the value of one user defined type to another. -=={{fbdoc item="keyword" value="KeyPgOpLetlist|Operator Let() (Assignment)"}}== - Assigns the fields of a user defined type to a list of variables. -<<>>=={{fbdoc item="keyword" value="KeyPgOpCombineModulus|Operator Mod= (Modulus and Assign)"}}== - Assigns the value of a modulus between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineAnd|Operator And= (Conjunction and Assign)"}}== - Assigns the value of a bitwise conjunction between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineEqv|Operator Eqv= (Equivalence and Assign)"}}== - Assigns the value of a bitwise equivalence between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineImp|Operator Imp= (Implication and Assign)"}}== - Assigns the value of a bitwise implication between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineOr|Operator Or= (Inclusive Disjunction and Assign)"}}== - Assigns the value of a bitwise inclusive or between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineXor|Operator Xor= (Exclusive Disjunction and Assign)"}}== - Assigns the value of a bitwise exclusive or between two operands. -=={{fbdoc item="keyword" value="KeyPgOpCombineShiftLeft|Operator Shl= (Shift Left and Assign)"}}== - Assigns the value of a bitwise shift left of an operand. -=={{fbdoc item="keyword" value="KeyPgOpCombineShiftRight|Operator Shr= (Shift Right and Assign)"}}== - Assigns the value of a bitwise shift right of an operand. ->>::c:: +**[[KeyPgOpAssignment Opérateur = (Affectation)]]** + Affecte la valeur d'un opérande à l'autre. +**[[KeyPgOpCombineConcat Opérateur &= (Concaténation et Affectation)]]** + Affecte la valeur de la concaténation de deux opérandes. +**[[KeyPgOpCombineAdd Opérateur += (Addition et Affectation)]]** + Affecte la valeur de l'addition de deux opérandes. +**[[KeyPgOpCombineSub Opérateur -= (Soustraction et Affectation)]]** + Affecte la valeur de la soustraction de deux opérandes. +**[[KeyPgOpCombineMultiply Opérateur *= (Multiplication et Affectation)]]** + Affecte la valeur de la multiplication de deux opérandes. +**[[KeyPgOpCombineDivide Opérateur /= (Division et Affectation)]]** + Affecte la valeur de la division de deux opérandes. +**[[KeyPgOpCombineIntegerDivide Opérateur \= (Division entière et Affectation)]]** + Affecte la valeur de la division entière de deux opérandes. +**[[KeyPgOpCombineExponentiate Opérateur ^= (Exposant et Affectation)]]** + Affecte la valeur de l'élévation à la puissance avec deux opérandes. +**[[KeyPgOpLet Opérateur Let (Assignment)]]** + Affecte la valeur d'un type défini par l'utilisateur à un autre. +**[[KeyPgOpLetlist Opérateur Let() (Affectation)]]** + Affecte les champs d'un type défini par l'utilisateur à une liste de variables. +;**[[KeyPgOpCombineModulus Opérateur Mod= (Modulo et Affectation)]]** + Affecte la valeur du modulo entre deux opérandes. +**[[KeyPgOpCombineAnd Opérateur And= (Conjonction et Affectation)]]** + Affecte la valeur de la conjonction de bits entre deux opérandes. +**[[KeyPgOpCombineEqv Opérateur Eqv= (Equivalence et Affectation)]]** + Affecte la valeur d'une équivalence de bits entre deux opérandes. +**[[KeyPgOpCombineImp Opérateur Imp= (Implication et Affectation)]]** + Affecte la valeur d'une implication sur les bits entre deux opérandes. +**[[KeyPgOpCombineOr Opérateur Or= (OU inclusif et Affectation)]]** + Affecte la valeur d'un OU inclusif bit à bit entre deux opérandes. +**[[KeyPgOpCombineXor Opérateur Xor= (OU exclusif et Affectation)]]** + Affecte la valeur d'un OU exclusif bit à bit entre deux opérandes. +**[[KeyPgOpCombineShiftLeft Opérateur Shl= (Décalage vers la gauche et Affectation)]]** + Affecte la valeur d'un décalage de bits vers la gauche d'un opérande. +**[[KeyPgOpCombineShiftRight Opérateur Shr= (Décalage vers la droite et Affectation)]]** + Affecte la valeur d'un décalage de bits vers la droite d'un opérande. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpConditional.wakka b/fbdocs/manual/cache/CatPgOpConditional.wakka index ba20b8c2ae..8510ad437c 100644 --- a/fbdocs/manual/cache/CatPgOpConditional.wakka +++ b/fbdocs/manual/cache/CatPgOpConditional.wakka @@ -1,19 +1,19 @@ -{{fbdoc item="title" value="Relational Operators"}}---- -Operators that compare relationships +{{fbdoc item="title" value="Relational Operator"}}---- +Opérateurs qui comparent les relations -The relational operators perform comparisons between the values of two operands. Each operator returns a //boolean// result that is //true// (-1) if the relationship holds true, or //false// (0) if not. +Les opérateurs relationnels effectuent des comparaisons entre les valeurs des deux opérandes. Chaque opérateur renvoie un résultat //booléen// qui est //vrai// (-1) si la relation est vraie, ou //faux// (0) si elle ne l'est pas. -<<=={{fbdoc item="keyword" value="KeyPgOpEqual|Operator = (Equal)"}}== - Compares the equal relation of two operands. -=={{fbdoc item="keyword" value="KeyPgOpNotEqual|Operator <> (Not equal)"}}== - Compares the inequality relation of two operands. -=={{fbdoc item="keyword" value="KeyPgOpLessThan|Operator < (Less than)"}}== - Compares the less than relation of two operands. -<<>>=={{fbdoc item="keyword" value="KeyPgOpLessThanOrEqual|Operator <= (Less than or equal)"}}== - Compares the less than or equal relation of two operands. -=={{fbdoc item="keyword" value="KeyPgOpGreaterThanOrEqual|Operator >= (Greater than or equal)"}}== - Compares the greater than or equal relation of two operands. -=={{fbdoc item="keyword" value="KeyPgOpGreaterThan|Operator > (Greater than)"}}== - Compares the greater than relation of two operands. ->>::c:: +**[[KeyPgOpEqual Opérateur = (Egal)]]** + Compare la relation d'égalité de deux opérandes. +**[[KeyPgOpNotEqual Opérateur <> (Non Egal)]]** + Compare la relation d'inégalité des deux opérandes. +**[[KeyPgOpLessThan Opérateur < (Inférieur)]]** + Compare les deux opérandes avec la relation "Inférieur à". +;**[[KeyPgOpLessThanOrEqual Opérateur <= (Inférieur ou Egal)]]** + Compare les deux opérandes avec la relation "Inférieur ou Egal". +**[[KeyPgOpGreaterThanOrEqual Opérateur >= (Supérieur ou Egal)]]** + Compare les deux opérandes avec la relation "Supérieur ou Egal". +**[[KeyPgOpGreaterThan Opérateur > (Supérieur)]]** + Compare les deux opérandes avec la relation "Supérieur". +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpIndex.wakka b/fbdocs/manual/cache/CatPgOpIndex.wakka index 46dd76b695..4578cb3cc8 100644 --- a/fbdocs/manual/cache/CatPgOpIndex.wakka +++ b/fbdocs/manual/cache/CatPgOpIndex.wakka @@ -1,92 +1,92 @@ {{fbdoc item="title" value="Operators List"}}---- -List of operators used in FreeBASIC. +Liste des opérateurs utilisés dans FreeBASIC. -<< -{{fbdoc item="section" value="Assignment Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAssignment|= (Assignment)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineConcat|&= (Concatenate and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineAdd|+= (Add and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineSub|-= (Subtract and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineMultiply|*= (Multiply and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineDivide|/= (Divide and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineIntegerDivide|\= (Integer Divide and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineExponentiate|^= (Exponentiate and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineModulus|MOD= (Modulus and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineAnd|AND= (Conjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineEqv|EQV= (Equivalence and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineImp|IMP= (Implication and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineOr|OR= (Inclusive Disjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineXor|XOR= (Exclusive Disjunction and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineShiftLeft|SHL= (Shift Left and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpCombineShiftRight|SHR= (Shift Right and Assign)"}} - - {{fbdoc item="keyword" value="KeyPgOpLet|LET (Assignment)"}} - - {{fbdoc item="keyword" value="KeyPgOpLetlist|LET() (Assignment)"}} +**Opérateurs d'assignation** +- [[KeyPgOpAssignment = (Affectation)]] + - [[KeyPgOpCombineConcat &= (Concaténation et Affectation)]] + - [[KeyPgOpCombineAdd += (Addition et Affectation)]] + - [[KeyPgOpCombineSub -= (Soustraction et Affectation)]] + - [[KeyPgOpCombineMultiply *= (Multiplication et Affectation)]] + - [[KeyPgOpCombineDivide /= (Division et Affectation)]] + - [[KeyPgOpCombineIntegerDivide \= (Division entière et Affectation)]] + - [[KeyPgOpCombineExponentiate ^= (Exposant et Affectation)]] + - [[KeyPgOpCombineModulus Mod= (Modulo et Affectation)]] + - [[KeyPgOpCombineAnd And= (Conjonction et Affectation)]] + - [[KeyPgOpCombineEqv Eqv= (Equivalence et Affectation)]] + - [[KeyPgOpCombineImp Imp= (Implication et Affectation)]] + - [[KeyPgOpCombineOr Or= (OU inclusif et Affectation)]] + - [[KeyPgOpCombineXor Xor= (Ou exclusif et Affectation)]] + - [[KeyPgOpCombineShiftLeft Shl= (Décalage de bits à gauche et Affectation)]] + - [[KeyPgOpCombineShiftRight Shr= (Décalage de bits à droite et Affectation)]] + - [[KeyPgOpLet Let (Affectation)]] + - [[KeyPgOpLetlist Let() (Affectation)]] + **Opérateurs arithmétiques** -{{fbdoc item="section" value="Arithmetic Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAdd|+ (Add)"}} - - {{fbdoc item="keyword" value="KeyPgOpSubtract|- (Subtract)"}} - - {{fbdoc item="keyword" value="KeyPgOpMultiply|* (Multiply)"}} - - {{fbdoc item="keyword" value="KeyPgOpDivide|/ (Divide)"}} - - {{fbdoc item="keyword" value="KeyPgOpIntegerDivide|\ (Integer divide)"}} - - {{fbdoc item="keyword" value="KeyPgOpExponentiate|^ (Exponentiate)"}} - - {{fbdoc item="keyword" value="KeyPgOpModulus|MOD (Modulus)"}} - - {{fbdoc item="keyword" value="KeyPgOpNegate|- (Negate)"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftLeft|SHL (Shift left)"}} - - {{fbdoc item="keyword" value="KeyPgOpShiftRight|SHR (Shift right)"}} +- [[KeyPgOpAdd + (Addition)]] + - [[KeyPgOpSubtract - (Soustraction)]] + - [[KeyPgOpMultiply * (Multiplication)]] + - [[KeyPgOpDivide / (Division)]] + - [[KeyPgOpIntegerDivide \ (Division entière)]] + - [[KeyPgOpExponentiate ^ (Exposant)]] + - [[KeyPgOpModulus Mod (Modulo)]] + - [[KeyPgOpNegate - (Negation)]] + - [[KeyPgOpShiftLeft Shl (Décalage de bits à gauche)]] + - [[KeyPgOpShiftRight Shr (Décalage de bits à droite)]] + **Opérateurs d'indexation** -{{fbdoc item="section" value="Indexing Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpArrayIndex|() (Array index)"}} - - {{fbdoc item="keyword" value="KeyPgOpStringIndex|[] (String index)"}} - - {{fbdoc item="keyword" value="KeyPgOpPtrIndex|[] (Pointer index)"}} +- [[KeyPgOpArrayIndex () (Indice de tableau)]] + - [[KeyPgOpStringIndex [] (Indice de chaîne)]] + - [[KeyPgOpPtrIndex [] (Indice de pointeur)]] + **Opérateurs Chaînes** -{{fbdoc item="section" value="String Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpConcat|+ (String concatenation)"}} - - {{fbdoc item="keyword" value="KeyPgOpConcatConvert|& (String concatenation with conversion)"}} - - {{fbdoc item="keyword" value="KeyPgOpStrptr|STRPTR (String pointer)"}} +- [[KeyPgOpConcat + (Concaténation de chaînes)]] + - [[KeyPgOpConcatConvert & (Concaténation de chaînes avec conversion)]] + - [[KeyPgOpStrptr Strptr (Pointeur de chaîne)]] + ;**Opérateurs relationnels** -<<>> -{{fbdoc item="section" value="Relational Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpEqual|= (Equal)"}} - - {{fbdoc item="keyword" value="KeyPgOpNotEqual|<> (Not equal)"}} - - {{fbdoc item="keyword" value="KeyPgOpLessThan|< (Less than)"}} - - {{fbdoc item="keyword" value="KeyPgOpLessThanOrEqual|<= (Less than or equal)"}} - - {{fbdoc item="keyword" value="KeyPgOpGreaterThanOrEqual|>= (Greater than or equal)"}} - - {{fbdoc item="keyword" value="KeyPgOpGreaterThan|> (Greater than)"}} +- [[KeyPgOpEqual = (Egal)]] +- [[KeyPgOpNotEqual <> (Non égal)]] + - [[KeyPgOpLessThan < (Inférieur à)]] + - [[KeyPgOpLessThanOrEqual <= (Inférieur à ou égal)]] + - [[KeyPgOpGreaterThanOrEqual >= (Supérieur à ou égal)]] + - [[KeyPgOpGreaterThan > (Supérieur à)]] + **Opérateurs manipulation de bits** + - [[KeyPgOpAnd And (Conjonction)]] -{{fbdoc item="section" value="Bitwise Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAnd|AND (Conjunction)"}} - - {{fbdoc item="keyword" value="KeyPgOpEqv|EQV (Equivalence)"}} - - {{fbdoc item="keyword" value="KeyPgOpImp|IMP (Implication)"}} - - {{fbdoc item="keyword" value="KeyPgOpNot|NOT (Complement)"}} - - {{fbdoc item="keyword" value="KeyPgOpOr|OR (Inclusive Disjunction)"}} - - {{fbdoc item="keyword" value="KeyPgOpXor|XOR (Exclusive Disjunction)"}} +- [[KeyPgOpEqv Eqv (Equivalence)]] + - [[KeyPgOpImp Imp (Implication)]] + - [[KeyPgOpNot Not (Complément)]] + - [[KeyPgOpOr Or (Disjonction inclusive)]] + - [[KeyPgOpXor Xor (Disjonction exclusive)]] + **Opérateurs court circuit** + - [[KeyPgOpAndAlso Andalso (Court circuit de Conjunction)]] -{{fbdoc item="section" value="Short Circuit Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAndAlso|ANDALSO (Short Circuit Conjunction)"}} - - {{fbdoc item="keyword" value="KeyPgOpOrElse|ORELSE (Short Circuit Inclusive Disjunction)"}} +- [[KeyPgOpOrElse Orelse (Court circuit Ou Inclusif)]] + **Opérateurs préprocesseur** + - [[KeyPgOpPpStringize # (Argument de Transformation en chaîne)]] -{{fbdoc item="section" value="Preprocessor Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpPpStringize|# (Argument stringize)"}} - - {{fbdoc item="keyword" value="KeyPgOpPpConcat|## (Argument concatenation)"}} - - {{fbdoc item="keyword" value="KeyPgOpPpEscape|! (Escaped String Literal)"}} - - {{fbdoc item="keyword" value="KeyPgOpPpNoescape|$ (Non-Escaped String Literal)"}} +- [[KeyPgOpPpConcat ## (Argument de Concatenation)]] + - [[KeyPgOpPpEscape ! (Escaped String Literal)]] + - [[KeyPgOpPpNoescape $ (Non-Escaped String Literal)]] + **Opérateurs pointeurs** + - [[KeyPgOpAt @ (Adresse de)]] -{{fbdoc item="section" value="Pointer Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpAt|@ (Address of)"}} - - {{fbdoc item="keyword" value="KeyPgOpValueOf|* (Value of)"}} - - {{fbdoc item="keyword" value="KeyPgOpVarptr|VARPTR (Variable pointer)"}} - - {{fbdoc item="keyword" value="KeyPgOpProcptr|PROCPTR (Procedure pointer)"}} +- [[KeyPgOpValueOf * (Valeur de)]] + - [[KeyPgOpVarptr Varptr (Pointeur de variable )]] + - [[KeyPgOpProcptr Procptr (Pointeur de procédure)]] + **Opérateurs Type ou Classe** + - [[KeyPgOpMemberAccess . (Accès membre)]] -{{fbdoc item="section" value="Type or Class Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpMemberAccess|. (Member access)"}} - - {{fbdoc item="keyword" value="KeyPgOpPtrMemberAccess|-> (Pointer to member access)"}} +- [[KeyPgOpPtrMemberAccess -> (Pointeur vers Accès membre)]] + **Opérateurs mémoire** + - [[KeyPgOpNew New]] -{{fbdoc item="section" value="Memory Operators"}} - - {{fbdoc item="keyword" value="KeyPgOpNew|New"}} - - {{fbdoc item="keyword" value="KeyPgOpPlacementNew|Placement New"}} - - {{fbdoc item="keyword" value="KeyPgOpDelete|Delete"}} +- [[KeyPgOpPlacementNew Placement New]] + - [[KeyPgOpDelete Delete]] + **Opérateurs d'itération** + - [[KeyPgOpFor For]], [[KeyPgOpFor Next]], et [[KeyPgOpFor Step]] -{{fbdoc item="section" value="Iteration Operators"}} +;
- {{fbdoc item="keyword" value="KeyPgOpFor|For"}}, [[KeyPgOpFor Next]], and [[KeyPgOpFor Step]] >>::c:: diff --git a/fbdocs/manual/cache/CatPgOpIndexing.wakka b/fbdocs/manual/cache/CatPgOpIndexing.wakka index 11f76ef9b4..44641b0821 100644 --- a/fbdocs/manual/cache/CatPgOpIndexing.wakka +++ b/fbdocs/manual/cache/CatPgOpIndexing.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Indexing Operators"}}---- -Operators that return references based on an index +Opérateurs qui retournent des références basées sur un indice -The indexing operators return references to some memory based on the value of their second, or //right-hand side//, operand. This operand is used as an index, or offset, from the beginning of some memory represented by the first, or //left-hand side//, operand. +Les opérateurs d'indexation retournent des références mémoire basées sur la valeur de leur 2ème opérande (//celui de droite//). Cet opérande est utilisé comme un indice, ou un déplacement, par rapport au début d'un espace mémoire représenté par le 1er opérande //(celui de gauche)//. -<<=={{fbdoc item="keyword" value="KeyPgOpArrayIndex|Operator () (Array index)"}}== - Returns a reference to an element in an array. -=={{fbdoc item="keyword" value="KeyPgOpStringIndex|Operator [] (String index)"}}== - Returns a reference to a character in a string. -<<>>=={{fbdoc item="keyword" value="KeyPgOpPtrIndex|Operator [] (Pointer index)"}}== - Returns a reference to memory offset from a base address. ->>::c:: +**[[KeyPgOpArrayIndex Opérateur () (Indice de tableau)]]** + Renvoie une référence à un élément d'un tableau. +**[[KeyPgOpStringIndex Opérateur [] (Indice de chaîne)]]** + Renvoie une référence à un caractère d'une chaîne. +;**[[KeyPgOpPtrIndex Opérateur [] (Indice de pointeur)]]** + Renvoie une référence à décalage mémoire par rapport à une adresse de base. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpIterating.wakka b/fbdocs/manual/cache/CatPgOpIterating.wakka index 7e4787c9af..c0b5222440 100644 --- a/fbdocs/manual/cache/CatPgOpIterating.wakka +++ b/fbdocs/manual/cache/CatPgOpIterating.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Iterating Operators"}}---- -Operators that work with iterator objects +Opérateurs qui fonctionnent avec des objets d'itération -These operators allow objects of user-defined types to be used as iterators and step values in ##[[KeyPgFornext For...Next]]## statements. +Ces opérateurs permettent à des objets de type défini par l'utilisateur d'être utilisés comme itérateurs et valeurs de pas dans les boucles ##[[KeyPgFornext For...Next]]##. -<<=={{fbdoc item="keyword" value="KeyPgOpFor|Operator For"}}== - Allows an iterator a chance to prepare for the loop. -=={{fbdoc item="keyword" value="KeyPgOpStep|Operator Step"}}== - Increments an iterator object. -<<>>=={{fbdoc item="keyword" value="KeyPgOpNext|Operator Next"}}== - Determines if the loop should terminate or continue iterating. ->>::c:: +**[[KeyPgOpFor Opérateur For]]** + Prépare un itérateur pour démarrer une boucle. +**[[KeyPgOpStep Opérateur Step]]** + Incrémente un objet itérateur. +;**[[KeyPgOpNext Opérateur Next]]** + Détermine si la boucle doit terminer/continuer son itération. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpLogical.wakka b/fbdocs/manual/cache/CatPgOpLogical.wakka index 8085a030c3..9c02c9ad52 100644 --- a/fbdocs/manual/cache/CatPgOpLogical.wakka +++ b/fbdocs/manual/cache/CatPgOpLogical.wakka @@ -1,19 +1,19 @@ {{fbdoc item="title" value="Logical Operators"}}---- -Operators that perform bitwise logic +Les opérateurs qui appliquent la logique au niveau des bits -The logical operators perform logical operations on the values of their operands, and return the results. These operators are //bitwise// operators, in that the results are found by performing logical operations on each bit of their operands. +Les opérateurs logiques effectuent des opérations logiques sur les valeurs de leurs opérandes et retournent les résultats. Ces opérateurs travaillent //au niveau des bits//, c'est à dire que les résultats sont produits en effectuant des opérations logiques sur chaque bit de leurs opérandes. -<<=={{fbdoc item="keyword" value="KeyPgOpAnd|Operator And (Conjunction)"}}== - Returns the result of a bitwise conjunction of two operands. -=={{fbdoc item="keyword" value="KeyPgOpEqv|Operator Eqv (Equivalence)"}}== - Returns the result of a bitwise equivalence of two operands. -=={{fbdoc item="keyword" value="KeyPgOpImp|Operator Imp (Implication)"}}== - Returns the result of a bitwise implication of two operands. -<<>>=={{fbdoc item="keyword" value="KeyPgOpNot|Operator Not (Complement)"}}== - Returns the result of a bitwise complement of an operand. -=={{fbdoc item="keyword" value="KeyPgOpOr|Operator Or (Inclusive Disjunction)"}}== - Returns the result of a bitwise inclusive or of two operands. -=={{fbdoc item="keyword" value="KeyPgOpXor|Operator Xor (Exclusive Disjunction)"}}== - Returns the result of a bitwise exclusive or of two operands. ->>::c:: +**[[KeyPgOpAnd Opérateur And (Conjunction)]]** + Retourne le résultat d'un AND des bits des deux opérandes. +**[[KeyPgOpEqv Opérateur Eqv (Equivalence)]]** + Retourne le résultat de l'équivalence des bits des deux opérandes. +**[[KeyPgOpImp Opérateur Imp (Implication)]]** + Retourne le résultat de l'implication sur les bits des deux opérandes. +;**[[KeyPgOpNot Opérateur Not (Complement)]]** + Retourne le résultat du complément à 2 des bits d'un opérande. +**[[KeyPgOpOr Opérateur Or (Inclusive Disjunction)]]** + Retourne le résultat d'un OU inclusif bit à bit des deux opérandes. +**[[KeyPgOpXor Opérateur Xor (Exclusive Disjunction)]]** + Retourne le résultat d'un OU exclusif bit des deux opérandes. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpMemory.wakka b/fbdocs/manual/cache/CatPgOpMemory.wakka index 2a614b4322..4e31bc9127 100644 --- a/fbdocs/manual/cache/CatPgOpMemory.wakka +++ b/fbdocs/manual/cache/CatPgOpMemory.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Memory Operators"}}---- -Operators that work with memory +Opérateurs qui travaillent avec la mémoire -The memory operators provide a way to dynamically allocate and deallocate variables and objects. +Les opérateurs mémoire procurent des moyens pour allouer/dé-allouer dynamiquement variables et objets. -<<=={{fbdoc item="keyword" value="KeyPgOpNew|Operator New"}}== - Allocates memory for and constructs objects. -=={{fbdoc item="keyword" value="KeyPgOpPlacementNew|Operator Placement New"}}== - Constructs objects at a specified memory location. -<<>>=={{fbdoc item="keyword" value="KeyPgOpDelete|Operator Delete"}}== - Destroys and deallocates memory for objects. ->>::c:: +**[[KeyPgOpNew Opérateur New]]** + Alloue de la mémoire et construit des objets. +**[[KeyPgOpPlacementNew Opérateur Placement New]]** + Construit des objets à une position mémoire spécifiée. +;**[[KeyPgOpDelete Opérateur Delete]]** + Détruit et dé-alloue la mémoire des objets. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpPoint.wakka b/fbdocs/manual/cache/CatPgOpPoint.wakka index 74be577b12..bdf7c8f5cc 100644 --- a/fbdocs/manual/cache/CatPgOpPoint.wakka +++ b/fbdocs/manual/cache/CatPgOpPoint.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="Pointer Operators"}}---- -Operators that work with pointers +Opérateurs qui fonctionnent avec les pointeurs -The pointer operators provide the ability to retrieve the addresses in memory of their operands, and to use, or //dereference//, that memory. +Les Opérateur pointeurs permettent de retrouver l'adresse de leurs opérandes en mémoire, et de les utiliser, ou de //déréférencer//, cette mémoire. -<<=={{fbdoc item="keyword" value="KeyPgOpVarptr|Operator Varptr (Variable pointer)"}}== - Returns the memory address of a variable. -=={{fbdoc item="keyword" value="KeyPgOpStrptr|Operator Strptr (String pointer)"}}== - Returns the memory address of a string's character data. -=={{fbdoc item="keyword" value="KeyPgOpProcptr|Operator Procptr (Procedure pointer)"}}== - Returns the memory address of a procedure. -<<>>=={{fbdoc item="keyword" value="KeyPgOpAt|Operator @ (Address of)"}}== - Returns the memory address of a variable, object or procedure. -=={{fbdoc item="keyword" value="KeyPgOpValueOf|Operator * (Value of)"}}== - Returns a reference to a variable or object at some memory address. ->>::c:: +**[[KeyPgOpVarptr Operator Varptr (Pointeur de variable)]]** + Retourne l'adresse mémoire d'une variable. +**[[KeyPgOpStrptr Operator Strptr (Pointeur de chaîne)]]** + Retourne l'adresse mémoire d'une chaîne de caractères. +**[[KeyPgOpProcptr Operator Procptr (Pointeur de procédure)]]** + Retourne l'adresse mémoire d'une procédure. +;**[[KeyPgOpAt Operator @ (Adresse de)]]** + Retourne l'adresse mémoire d'une variable, d'un objet ou d'une procédure. +**[[KeyPgOpValueOf Operator * (Valeur de)]]** + Retourne une référence à une variable ou un objet à une certaine adresse mémoire. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpPrepro.wakka b/fbdocs/manual/cache/CatPgOpPrepro.wakka index 4ca9f4db46..9100e872ae 100644 --- a/fbdocs/manual/cache/CatPgOpPrepro.wakka +++ b/fbdocs/manual/cache/CatPgOpPrepro.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="Preprocessor Operators"}}---- -Operators that are executed by the preprocessor +Opérateurs exécutés par le préprocesseur -These operators control how text is interpreted by the preprocessor. +Ces opérateurs contrôlent comment le texte est interprété par le préprocesseur. -<<=={{fbdoc item="keyword" value="KeyPgOpPpStringize|Operator # (Stringize)"}}== - Returns a text operand converted to a [[KeyPgString String]] literal. -=={{fbdoc item="keyword" value="KeyPgOpPpConcat|Operator ## (Concatenation)"}}== - Concatenates two text operands. -<<>>=={{fbdoc item="keyword" value="KeyPgOpPpEscape|Operator ! (Escaped String Literal)"}}== - Indicates string literal immediately following must be processed for escape sequences. -=={{fbdoc item="keyword" value="KeyPgOpPpNoescape|Operator $ (Non-Escaped String Literal)"}}== - Indicates string literal immediately following must not be processed for escape sequences. ->>::c:: +**[[KeyPgOpPpStringize Opérateur # (Stringize)]]** + Retourne le texte opérande converti en littéral [[KeyPgString String]]. +**[[KeyPgOpPpConcat Opérateur ## (Concaténation)]]** + Concatène deux opérandes texte. +;**[[KeyPgOpPpEscape Opérateur ! (Escaped String Literal)]]** + Indique que le littéral chaîne immédiatement après doit être traité comme séquence d'échappement. +**[[KeyPgOpPpNoescape Opérateur $ (Non-Escaped String Literal)]]** + Indique que le littéral chaîne immédiatement après ne doit pas être traité comme séquence d'échappement. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpShortCircuit.wakka b/fbdocs/manual/cache/CatPgOpShortCircuit.wakka index a1df7ffb31..167082dcd5 100644 --- a/fbdocs/manual/cache/CatPgOpShortCircuit.wakka +++ b/fbdocs/manual/cache/CatPgOpShortCircuit.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Short Circuit Operators"}}---- -Operators that perform a short circuit logical evaluation. +Opérateurs qui effectuent une évaluation de circuit-court logique. -The short circuit operators perform a evaluation on the left hand operand, and depending on the result, may go on to evaluate the right hand side. The evaluations take place logically, in a comparison to zero. +Les opérateurs circuit-court effectuent une évaluation sur l'opérande de gauche, et en fonction du résultat, évaluent ou non l'opérande de droite. Les évaluations se déroulent en toute logique, dans une comparaison à zéro. -<<=={{fbdoc item="keyword" value="KeyPgOpAndAlso|Operator AndAlso (Short Circuit Conjunction)"}}== - Returns the result of a short circuit conjunction of two operands. -<<>>=={{fbdoc item="keyword" value="KeyPgOpOrElse|Operator OrElse (Short Circuit Inclusive Disjunction)"}}== - Returns the result of a short circuit inclusive or of two operands.>> +**[[KeyPgOpAndAlso Opérateur Andalso (Short Circuit Conjunction)]]** + Retourne le résultat de la conjonction en circuit-court des deux opérandes. +;**[[KeyPgOpOrElse Opérateur Orelse (Short Circuit Inclusive Disjunction)]]** + Retourne le résultat d'un OR inclusif en circuit-court des deux opérandes..;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpString.wakka b/fbdocs/manual/cache/CatPgOpString.wakka index 88779d6e8e..9cd52f0f4f 100644 --- a/fbdocs/manual/cache/CatPgOpString.wakka +++ b/fbdocs/manual/cache/CatPgOpString.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="String Operators"}}---- -Operators that work with strings +Opérateurs qui travaillent avec les chaînes -These operators provide conversion to string, concatenation and retrieval of character data. +Ces opérateurs fournissent: conversion en chaîne, concaténation et extraction de données de type caractère. -<<=={{fbdoc item="keyword" value="KeyPgOpConcat|Operator + (String concatenation)"}}== - Concatenates two strings. -=={{fbdoc item="keyword" value="KeyPgOpConcatConvert|Operator & (String concatenation with conversion)"}}== - Concatenates two values converted to strings. +**[[KeyPgOpConcat Opérateur + (Concaténation de chaînes)]]** + Concaténation de deux chaînes. +**[[KeyPgOpConcatConvert Opérateur & (Concaténation de chaînes avec conversion)]]** + Concaténation de deux valeurs converties en chaînes. -<<>>=={{fbdoc item="keyword" value="KeyPgOpStrptr|Operator Strptr (String pointer)"}}== - Returns the address of a string's character data. ->>::c:: +;**[[KeyPgOpStrptr Opérateur Strptr (Pointeur de chaîne)]]** + Renvoie l'adresse d'une chaîne de caractères. +;
{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpTypeclass.wakka b/fbdocs/manual/cache/CatPgOpTypeclass.wakka index 5c75b584b0..cd6828b919 100644 --- a/fbdocs/manual/cache/CatPgOpTypeclass.wakka +++ b/fbdocs/manual/cache/CatPgOpTypeclass.wakka @@ -1,12 +1,11 @@ {{fbdoc item="title" value="Type or Class Operators"}}---- -Operators that work with objects +Opérateurs qui travaillent avec les objets -These operators return references to members of objects, given an object or its memory address. +Ces Opérateurs retournent des références sur des objets, donnent un objet ou son adresse mémoire. -<<=={{fbdoc item="keyword" value="KeyPgOpMemberAccess|Operator . (Member access)"}}== - Returns a reference to a member. -<<>>=={{fbdoc item="keyword" value="KeyPgOpPtrMemberAccess|Operator -> (Pointer to member access)"}}== - Returns a reference to a member from a pointer. ->>::c:: -{{fbdoc item="back" value="CatPgOperators|Operators"}} - +**[[KeyPgOpMemberAccess Opérateur . (Accès membre)]]** + Retourne une référence vers un membre. +;**[[KeyPgOpPtrMemberAccess Opérateur -> (Pointeur vers accès membre)]]** + Retourne une référence vers un membre à partir d'un pointeur. +;
+{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOperators.wakka b/fbdocs/manual/cache/CatPgOperators.wakka index 01ff136048..ffcacde316 100644 --- a/fbdocs/manual/cache/CatPgOperators.wakka +++ b/fbdocs/manual/cache/CatPgOperators.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="Operators"}}---- -Procedures that operate on one or more operands. +Procédures qui fonctionnent sur un ou plusieurs opérandes. -""FreeBASIC"" has numerous //operators// that perform a certain function with their //operands//. Many operators use a "##operand //operator// operand##" syntax, like ##[[KeyPgOpAssignment Operator = (Assignment)]]## or ##[[KeyPgOpAdd Operator +]]##, while others are called like normal procedures, like ##[[KeyPgOpStrptr Operator Strptr]]##. +FreeBasic a de nombreux //opérateurs// qui exercent une certaine fonction avec leurs //opérandes//. De nombreus opérateurs utilisent la syntaxe "##opérande //opérateur// opérande##", comme ##[[KeyPgOpAssignment Operator = (Assignment)]]## or ##[[KeyPgOpAdd Operator +]]##, alors que les autres sont appelés comme des procédures normales, comme ##[[KeyPgOpStrptr Operator Strptr]]##. -<<=={{fbdoc item="keyword" value="CatPgOpAssignment|Assignment operators"}}== - Operators which assign the value of one operand to the other. -=={{fbdoc item="keyword" value="CatPgOpArithmetic|Arithmetic operators"}}== - Operators that perform mathematical computations on their operands and return the result. -=={{fbdoc item="keyword" value="CatPgOpConditional|Conditional operators"}}== - Operators that compare the relationship between their operands. -=={{fbdoc item="keyword" value="CatPgOpLogical|Logical operators"}}== - Operators that perform bitwise computations with their operands and return the result. -=={{fbdoc item="keyword" value="CatPgOpShortCircuit|Short circuit operators"}}== - Operators that perform short circuit evaluations with their operands and return the result. -=={{fbdoc item="keyword" value="CatPgOpIndexing|Indexing operators"}}== - Operators that return references to variables or objects based on an index value. -<<>>=={{fbdoc item="keyword" value="CatPgOpString|String operators"}}== - Operators overloaded to work with strings. -=={{fbdoc item="keyword" value="CatPgOpPrepro|Preprocessor operators"}}== - Operators that control preprocessor behavior. -=={{fbdoc item="keyword" value="CatPgOpPoint|Pointer operators"}}== - Operators that work with pointers and addresses. -=={{fbdoc item="keyword" value="CatPgOpTypeclass|Type or Class operators"}}== - Operators that provide access to [[KeyPgType Type]] or [[KeyPgClass Class]] members. -=={{fbdoc item="keyword" value="CatPgOpMemory|Memory operators"}}== - Operators that allocate memory for and construct objects. -=={{fbdoc item="keyword" value="CatPgOpIterating|Iterating operators"}}== - Operators that use iterator objects in ##[[KeyPgFornext For...Next]]## statements. ->>::c:: +**[[CatPgOpAssignment Opérateurs d'affectation]]** + Opérateurs qui affectent la valeur d'un opérande à l'autre opérande. +**[[CatPgOpArithmetic Opérateurs arithmétiques]]** + Opérateurs qui effectuent des calculs mathématiques sur leurs opérandes et renvoient le résultat. +**[[CatPgOpConditional Opérateurs relationnels]]** + Opérateurs qui comparent la relation entre leurs opérandes. +**[[CatPgOpLogical Opérateurs logiques]]** + Opérateurs qui effectuent des calculs au niveau des bits avec leurs opérandes et renvoient le résultat. +**[[CatPgOpShortCircuit Opérateurs court circuit]]** + Opérateurs qui effectuent des évaluations de court-circuit avec leurs opérandes et renvoient le résultat. +**[[CatPgOpIndexing Opérateurs d'indexation]]** + Opérateurs qui renvoient des références à des variables ou des objets basés sur une valeur d'index. +;**[[CatPgOpString Opérateurs chaînes]]** + Opérateurs qui surchargent pour travailler avec des chaînes. +**[[CatPgOpPrepro Opérateurs préprocesseur]]** + Opérateurs qui contrôlent le comportement du préprocesseur. +**[[CatPgOpPoint Opérateurs pointeurs]]** + Opérateurs qui travaillent avec les pointeurs et les adresses. +**[[CatPgOpTypeclass Opérateurs de Type ou de Classe]]** + Opérateurs qui procurent un accès aux membres [[KeyPgType Type]] ou [[KeyPgClass Class]]. +**[[CatPgOpMemory Opérateurs mémoire]]** + Opérateurs qui allouent de la mémoire et construisent des objets. +**[[CatPgOpIterating Opérateurs d'itération]]** + Opérateurs qui utilisent des objets d'itération dans des déclarations ##[[KeyPgFornext For...Next]]##. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}}{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgOpsys.wakka b/fbdocs/manual/cache/CatPgOpsys.wakka index 064c2aeb4c..23a9e079e0 100644 --- a/fbdocs/manual/cache/CatPgOpsys.wakka +++ b/fbdocs/manual/cache/CatPgOpsys.wakka @@ -1,66 +1,66 @@ {{fbdoc item="title" value="Operating System Functions"}}---- -Statements and procedures for working with files, directories and the system. +Les déclarations et les procédures pour travailler avec des fichiers, les répertoires et le système. {{fbdoc item="desc"}} - The statements and procedures listed here provide access to the operating system environment. They transfer execution to external programs, get information about files and directories, manipulate the file system and send commands to the command shell. + Les déclarations et les procédures listées ici donnent accès à l'environnement du système d'exploitation. Elles transfèrent l'exécution à des programmes externes, obtiennent des informations sur les fichiers et répertoires, manipulent le système de fichiers et envoient des commandes à l'interpréteur de commandes. -**{{anchor name="FILES|Working with Files"}}** - Procedures that deal with files. -**{{anchor name="DIRS|Working with Directories"}}** - Various directory management procedures. -**{{anchor name="FILEPROPS|File Properties"}}** - Get information about files. -**{{anchor name="SYSPROCS|System Procedures"}}** - Procedures for working with the environment. +**[[#FILES">Travailler avec des fichiers]]** + Méthodes qui traîtent de fichiers. +**[[#DIRS">Travailler avec des répertoires]]** + Diverses procédures de gestion des répertoires. +**[[#FILEPROPS">Propriétés des fichiers]]** + Obtenir des informations sur les fichiers. +**[[#SYSPROCS">Procédures du Système]]** + Procédures pour travailler avec l'environnement. -<<{{anchor name="FILES"}}{{fbdoc item="section" value="Working with Files"}} - =={{fbdoc item="keyword" value="KeyPgExec|EXEC"}} and {{fbdoc item="keyword" value="KeyPgChain|CHAIN"}}== - Temporarily transfers control to another program. - =={{fbdoc item="keyword" value="KeyPgRun|RUN"}}== - Transfers control to another program. - =={{fbdoc item="keyword" value="KeyPgKill|KILL"}}== - Deletes an existing file. - =={{fbdoc item="keyword" value="KeyPgName|NAME"}}== - Renames an existing file. +**Travailler avec des fichiers** + **[[KeyPgExec Exec]] et [[KeyPgChain Chain]]** + Transfère temporairement le contrôle à un autre programme. + **[[KeyPgRun Run]]** + Transfère le contrôle à un autre programme. + **[[KeyPgKill Kill]]** + Supprime un fichier existant. + **[[KeyPgName Name]]** + Renomme un fichier existant. -{{anchor name="DIRS"}}{{fbdoc item="section" value="Working with Directories"}} - =={{fbdoc item="keyword" value="KeyPgCurdir|CURDIR"}}== - Gets the current working directory. - =={{fbdoc item="keyword" value="KeyPgChdir|CHDIR"}}== - Sets the current working directory. - =={{fbdoc item="keyword" value="KeyPgDir|DIR"}}== - Gets the names of files or directories matching certain attributes. - =={{fbdoc item="keyword" value="KeyPgExepath|EXEPATH"}}== - Gets the directory of the current running program. - =={{fbdoc item="keyword" value="KeyPgMkdir|MKDIR"}}== - Creates a new directory. - =={{fbdoc item="keyword" value="KeyPgRmdir|RMDIR"}}== - Deletes an existing directory. -<<>>{{anchor name="FILEPROPS"}}{{fbdoc item="section" value="File Properties"}} - =={{fbdoc item="keyword" value="KeyPgFileattr|FILEATTR"}}== - Gets information about a file bound to a file number. - =={{fbdoc item="keyword" value="KeyPgFilecopy|FILECOPY"}}== - Copies a file. - =={{fbdoc item="keyword" value="KeyPgFiledatetime|FILEDATETIME"}}== - Gets the last modified date and time of a file. - =={{fbdoc item="keyword" value="KeyPgFileexists|FILEEXISTS"}}== - Tests for the existence of a file. - =={{fbdoc item="keyword" value="KeyPgFilelen|FILELEN"}}== - Gets the length (in bytes) of a file. +**Travailler avec des répertoires** + **[[KeyPgCurdir CurDir]]** + Détermine le répertoire de travail courant. + **[[KeyPgChdir ChDir]]** + Définit le répertoire de travail courant. + **[[KeyPgDir Dir]]** + Obtient les noms des fichiers ou des répertoires correspondant à certains attributs. + **[[KeyPgExepath ExePath]]** + Obtient le répertoire du programme actuellement en cours d'exécution. + **[[KeyPgMkdir MkDir]]** + Crée un nouveau répertoire. + **[[KeyPgRmdir RmDir]]** + Supprime un répertoire existant. +;**Propriétés des fichiers** + **[[KeyPgFileattr FileAttr]]** + Obtient des informations sur un fichier lié à un numéro de fichier. + **[[KeyPgFilecopy FileCopy]]** + Copie un fichier. + **[[KeyPgFiledatetime FileDateTime]]** + Obtient la date et l'heure de la dernière modification d'un fichier. + **[[KeyPgFileexists FileExists]]** + Teste l'existence d'un fichier. + **[[KeyPgFilelen FileLen]]** + Obtient la longueur (en octets) d'un fichier. -{{anchor name="SYSPROCS"}}{{fbdoc item="section" value="System Procedures"}} - =={{fbdoc item="keyword" value="KeyPgFre|FRE"}}== - Gets the amount of free memory (in bytes) available. - =={{fbdoc item="keyword" value="KeyPgCommand|COMMAND"}}== +**Procédures du Système** + **[[KeyPgFre Fre]]** + Obtient la quantité de mémoire libre disponible (en octets). + **[[KeyPgCommand Command]]** Gets the command-line parameters passed to the program. - =={{fbdoc item="keyword" value="KeyPgEnviron|ENVIRON"}}== - Gets the value of an environment variable. - =={{fbdoc item="keyword" value="KeyPgSetenviron|SETENVIRON"}}== - Sets the value of an environment variable. - =={{fbdoc item="keyword" value="KeyPgShell|SHELL"}}== - Sends a command to the system command interpreter. - =={{fbdoc item="keyword" value="KeyPgSystem|SYSTEM"}}== - Closes all open files and exits the program. ->>::c:: + **[[KeyPgEnviron Environ]]** + Obtient la valeur d'une variable d'environnement. + **[[KeyPgSetenviron SetEnviron]]** + Définit la valeur d'une variable d'environnement. + **[[KeyPgShell Shell]]** + Envoie une commande à l'interpréteur de commandes du système. + **[[KeyPgSystem System]]** + Ferme tous les fichiers ouverts et quitte le programme. +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgPreProcess.wakka b/fbdocs/manual/cache/CatPgPreProcess.wakka index c4914513db..8988c5d954 100644 --- a/fbdocs/manual/cache/CatPgPreProcess.wakka +++ b/fbdocs/manual/cache/CatPgPreProcess.wakka @@ -1,83 +1,83 @@ {{fbdoc item="title" value="Preprocessor"}}---- -Commands that control the preprocessor. +Les commandes qui contrôlent le préprocesseur. {{fbdoc item="desc"}} - Preprocessor commands are sent to the compiler to control what gets compiled and how. They can be used to choose to compile one block of code rather than another for cross-platform compatibility, include headers or other source files, define small inline functions called macros, or alter how the compiler handles variables. + Les commandes du préprocesseur sont envoyées au compilateur pour contrôler ce qui est compilé et comment. Elles peuvent être utilisées pour choisir de compiler un bloc de code plutôt qu'une autre pour la compatibilité multi-plateforme, les en-têtes ou autres fichiers source, définir de petites fonctions "inline" (en ligne) appelées macros ou de modifier la façon dont le compilateur gère les variables. -**{{anchor name="CONDCOMP|Conditional Compilation"}}** - Commands that allow for branches in compilation based on conditions. -**{{anchor name="TEXTREPLACE|Text Replacement"}}** - Commands that create text-replacement macros. -**{{anchor name="FILE|File Directives"}}** - Commands that indicate to the compiler how other files relate to the source file. -**{{anchor name="CONTROL|Control Directives"}}** - Commands that set compile options, control compilation, and report compile time information. -**{{anchor name="METACOMMAND|Metacommands"}}** - Commands that are kept for backward compatibility. +**[[#CONDCOMP">Compilation conditionnelle]]** + Commandes qui permettent des branchements dans la compilation en fonction de conditions. +**[[#TEXTREPLACE">Texte de remplacement]]** + Commandes qui créent des macros de texte de remplacement. +**[[#FILE">Directives fichiers]]** + Commandes qui indiquent au compilateur comment lier d'autres fichiers au fichier source. +**[[#CONTROL">Directives de contrôle]]** + Commandes qui définissent des options de compilation, le contrôle de la compilation et rapporte des informations sur le déroulement de la compilation. +**[[#METACOMMAND">Métacommandes]]** + Les commandes qui sont conservées pour la compatibilité descendante. -<<{{anchor name="CONDCOMP"}}{{fbdoc item="section" value="Conditional Compilation"}} - =={{fbdoc item="keyword" value="KeyPgPpif|#IF"}}== - Compiles the following code block based on a condition. - =={{fbdoc item="keyword" value="KeyPgPpifdef|#IFDEF"}}== - Compiles the following code block if a symbol is defined. - =={{fbdoc item="keyword" value="KeyPgPpifndef|#IFNDEF"}}== - Compiles the following code block if a symbol is not defined. - =={{fbdoc item="keyword" value="KeyPgPpelseif|#ELSEIF"}}== - Compiles the following code block if a condition is true and the previous conditions was false. - =={{fbdoc item="keyword" value="KeyPgPpelse|#ELSE"}}== - Compiles the following code block if previous conditions were false. - =={{fbdoc item="keyword" value="KeyPgPpendif|#ENDIF"}}== - Signifies the end of a code block. - =={{fbdoc item="keyword" value="KeyPgDefined|DEFINED"}}== - Returns "-1" if a symbol is defined, otherwise "0". +**Compilation conditionnelle** + **[[KeyPgPpif #if]]** + Compilation du bloc de code qui suit, basée sur une condition. + **[[KeyPgPpifdef #ifdef]]** + Compilation du bloc de code qui suit, si un symbole est défini. + **[[KeyPgPpifndef #ifndef]]** + Compilation du bloc de code qui suit, si un symbole n'est pas défini. + **[[KeyPgPpelseif #elseif]]** + Compilation du bloc de code qui suit, si une condition est vraie et que les conditions précédentes étaient fausses. + **[[KeyPgPpelse #else]]** + Compilation du bloc de code qui suit, si les conditions précédentes étaient fausses. + **[[KeyPgPpendif #endif]]** + Signifie la fin d'un bloc de code. + **[[KeyPgDefined defined]]** + Retourne "-1" si un symbole est défini, sinon "0". -{{anchor name="TEXTREPLACE"}}{{fbdoc item="section" value="Text Replacement"}} - =={{fbdoc item="keyword" value="KeyPgPpdefine|#DEFINE"}}== - Creates a single-line text-replacement macro. - =={{fbdoc item="keyword" value="KeyPgPpmacro|#MACRO"}} and {{fbdoc item="keyword" value="KeyPgPpmacro|#ENDMACRO"}}== - Creates a multi-line text-replacement macro. - =={{fbdoc item="keyword" value="KeyPgPpundef|#UNDEF"}}== - Undefines a symbol. - ==[[KeyPgOpPpStringize # Preprocessor stringize]]== - Converts text into a string literal. - ==[[KeyPgOpPpConcat ## Preprocessor concatenate]]== - Concatenates two pieces of text. - =={{fbdoc item="keyword" value="KeyPgOpPpEscape|! Escaped String Literal"}}== - Indicates string literal immediately following must be processed for escape sequences. - =={{fbdoc item="keyword" value="KeyPgOpPpNoescape|$ Non-Escaped String Literal"}}== - Indicates string literal immediately following must not be processed for escape sequences. +**Texte de remplacement** + **[[KeyPgPpdefine #define]]** + Crée une macro d'une seule ligne de texte de remplacement. + **[[KeyPgPpmacro #macro]] et [[KeyPgPpmacro #endmacro]]** + Crée une macro multi-ligne de texte de remplacement. + **[[KeyPgPpundef #undef]]** + Annule la définition d'un symbole. + **[[KeyPgOpPpStringize # Preprocessor Stringize]]** + Convertit le texte dans une chaîne littérale. + **[[KeyPgOpPpConcat ## Preprocessor Concatenate]]** + Concaténation de deux morceaux de texte. + **[[KeyPgOpPpEscape ! Escaped String Literal]]** + Indique que le littéral de chaîne immédiatement après doit être traité avec des séquences d'échappement. + **[[KeyPgOpPpNoescape $ Non-Escaped String Literal]]** + Indique que le littéral de chaîne immédiatement après ne doit pas être traité avec des séquences d'échappement. -<<>>{{anchor name="FILE"}}{{fbdoc item="section" value="File Directives"}} - =={{fbdoc item="keyword" value="KeyPgInclude|#INCLUDE"}}== - Inserts text from a file. - =={{fbdoc item="keyword" value="KeyPgInclib|#INCLIB"}}== - Includes a library in the linking processes. - =={{fbdoc item="keyword" value="KeyPgPplibpath|#LIBPATH"}}== - Includes a path to search for libraries in the linking process. +;**Directives fichiers** + **[[KeyPgInclude #include]]** + Insère du texte à partir d'un fichier. + **[[KeyPgInclib #inclib]]** + Intègre une bibliothèque dans le processus de liaison. + **[[KeyPgPplibpath #libpath]]** + Intègre un chemin de recherche pour les bibliothèques dans le processus de liaison. -{{anchor name="CONTROL"}}{{fbdoc item="section" value="Control Directives"}} - =={{fbdoc item="keyword" value="KeyPgPragma|#PRAGMA"}}== - Sets compiling options. - =={{fbdoc item="keyword" value="KeyPgPplang|#LANG"}}== - Sets dialect from source. - =={{fbdoc item="keyword" value="KeyPgPpprint|#PRINT"}}== - Outputs a messages to standard output while compiling. - =={{fbdoc item="keyword" value="KeyPgPperror|#ERROR"}}== - Outputs a messages to standard output and stops compilation. - =={{fbdoc item="keyword" value="KeyPgPpline|#LINE"}}== - Sets the current line number and file name. +**Directives de contrôle** + **[[KeyPgPragma #pragma]]** + Définit des options de compilation. + **[[KeyPgPplang #lang]]** + Définit le dialecte de la source. + **[[KeyPgPpprint #print]]** + Affiche un message sur la sortie standard lors de la compilation. + **[[KeyPgPperror #error]]** + Affiche un message sur la sortie standard et arrête la compilation. + **[[KeyPgPpline #line]]** + Définit le numéro de ligne courant et nom de fichier. -{{anchor name="METACOMMAND"}}{{fbdoc item="section" value="Metacommands"}} - =={{fbdoc item="keyword" value="KeyPgInclude|'$INCLUDE"}}== - Alternate form of the [[KeyPgInclude #INCLUDE]] directive. - =={{fbdoc item="keyword" value="KeyPgMetaDynamic|'$DYNAMIC"}}== - Alternate form of the [[KeyPgOptiondynamic OPTION DYNAMIC]] statement. - =={{fbdoc item="keyword" value="KeyPgMetaStatic|'$STATIC"}}== - Alternate form of the [[KeyPgOptionstatic OPTION STATIC]] statement. - =={{fbdoc item="keyword" value="KeyPgMetaLang|'$LANG"}}== - Alternate form of the [[KeyPgPplang #lang]] directive. +**Métacommandes** + **[[KeyPgInclude '$Include]]** + Autre forme de la directive [[KeyPgInclude #include]]. + **[[KeyPgMetaDynamic '$Dynamic]]** + Autre forme de l'instruction [[KeyPgOptiondynamic Option Dynamic]]. + **[[KeyPgMetaStatic '$Static]]** + Autre forme de l'instruction [[KeyPgOptionstatic Option Static]]. + **[[KeyPgMetaLang '$Lang]]** + Autre forme de la directive [[KeyPgPplang #lang]]. ->>::c:: +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgProcedures.wakka b/fbdocs/manual/cache/CatPgProcedures.wakka index b480f2752f..96b0bfaa33 100644 --- a/fbdocs/manual/cache/CatPgProcedures.wakka +++ b/fbdocs/manual/cache/CatPgProcedures.wakka @@ -1,88 +1,88 @@ {{fbdoc item="title" value="Procedures"}}---- -Keywords that work with procedures. +Mots-clés qui fonctionnent avec des procédures. {{fbdoc item="desc"}} - These keywords control the declaration and definition of both module-level procedures and member procedures, how they are called, how arguments are passed and how their names are seen externally to other modules. Procedures can also be declared to be executed automatically before any module-level code is executed. + Ces mots-clés contrôlent la déclaration et la définition des procédures, à la fois, au niveau du module et au niveau des membres de procédures, comment ils sont appelés, comment les arguments sont passés et la manière dont leurs noms sont vus à l'extérieur par les autres modules. Des procédures peuvent également être déclarées d'être exécutées automatiquement avant que tout autre code de niveau module ne soit exécuté. -**{{anchor name="DECLARATION|Declaration"}}** - Keywords that declare and define procedures. -**{{anchor name="LINKAGE|Linkage"}}** - Keywords that specify how procedure names are seen by external modules. -**{{anchor name="CALLCONV|Calling conventions"}}** - Keywords that specify how arguments are used when calling procedures. -**{{anchor name="PARAMCONV|Parameter passing conventions"}}** - Keywords that specify how arguments are passed to procedures. -**{{anchor name="VARIADIC|Variadic Procedures"}}** - Macros that allow for an arbitrary number of arguments to be passed to a procedure. -**{{anchor name="AUTOEXEC|Automatic execution"}}** - Keywords that specify automatic execution of procedures. -**{{anchor name="MISC|Miscellaneous"}}** - Miscellaneous keywords. +**[[#DECLARATION">Déclaration]]** + Mots-clés que déclarent et définissent des procédures. +**[[#LINKAGE">Liens]]** + Mots-clés qui spécifient comment les noms de procédures sont perçus par des modules externes. +**[[#CALLCONV">Conventions d'appel]]** + Mots-clés qui précisent comment les arguments sont utilisés lors de l'appel de procédures. +**[[#PARAMCONV">Conventions de passage de paramètre(s)]]** + Mots-clés qui spécifient comment les arguments sont passés aux procédures. +**[[#VARIADIC">Procédures "Variadic"]]** + Les macros qui permettent de passer un nombre arbitraire d'arguments à une procédure. +**[[#AUTOEXEC">Exécution automatique]]** + Mots-clés qui spécifient l'exécution automatique de procédures. +**[[#MISC">Divers]]** + Divers mots-clés. -<<{{anchor name="DECLARATION"}}{{fbdoc item="section" value="Declaration"}} - =={{fbdoc item="keyword" value="KeyPgDeclare|Declare"}}== - Declares a module-level or member procedure. - =={{fbdoc item="keyword" value="KeyPgSub|Sub"}}== - Specifies a procedure that does not return an argument. - =={{fbdoc item="keyword" value="KeyPgFunction|Function"}}== - Specifies a procedure that returns an argument. - =={{fbdoc item="keyword" value="KeyPgOverload|Overload"}}== - Specifies that the procedure name can be used in other procedure declarations. - =={{fbdoc item="keyword" value="KeyPgStatic|Static"}}== - Specifies static storage for all variables and objects in the procedure body. - =={{fbdoc item="keyword" value="KeyPgConstMember|Const (Member)"}}== - Specifies a const member procedure in user-defined type definitions. - =={{fbdoc item="keyword" value="KeyPgStaticMember|Static (Member)"}}== - Specifies a static member procedure in user-defined type definitions. +**Déclaration** + **[[KeyPgDeclare Declare]]** + Déclare une procédure au niveau module ou une procédure membre. + **[[KeyPgSub Sub]]** + Indique une procédure qui ne renvoie pas d'argument. + **[[KeyPgFunction Function]]** + Indique une procédure qui retourne un argument. + **[[KeyPgOverload Overload]]** + Indique que le nom de la procédure peut être utilisé dans des déclarations d'autres procédures. + **[[KeyPgStatic Static]]** + Spécifie un stockage statique pour toutes les variables et les objets dans le corps de la procédure. + **[[KeyPgConstMember Const (Membre)]]** + Indique un membre de procédure constant dans des définitions de type défini par l'utilisateur. + **[[KeyPgStaticMember Static (Membre)]]** + Indique un membre de procédure static dans des définitions de type défini par l'utilisateur. -{{anchor name="LINKAGE"}}{{fbdoc item="section" value="Linkage"}} - =={{fbdoc item="keyword" value="KeyPgPublic|Public"}}== - Specifies external linkage for a procedure. - =={{fbdoc item="keyword" value="KeyPgPrivate|Private"}}== - Specifies internal linkage for a procedure. - =={{fbdoc item="keyword" value="KeyPgAlias|Alias"}}== - Specifies an alternate external name for a procedure. - =={{fbdoc item="keyword" value="KeyPgExport|Export"}}== - Specifies a procedure is to be exported from a shared library. - =={{fbdoc item="keyword" value="KeyPgLib|Lib"}}== - Specifies automatic loading of a library. +**Liens** + **[[KeyPgPublic Public]]** + Spécifie un lien externe pour une procédure. + **[[KeyPgPrivate Private]]** + Spécifie un lien interne pour une procédure. + **[[KeyPgAlias Alias]]** + Spécifie un autre nom externe pour une procédure. + **[[KeyPgExport Export]]** + Indique qu'une procédure doit être exportée à partir d'une bibliothèque partagée. + **[[KeyPgLib Lib]]** + Indique le chargement automatique d'une bibliothèque. -{{anchor name="CALLCONV"}}{{fbdoc item="section" value="Calling conventions"}} - =={{fbdoc item="keyword" value="KeyPgStdcall|Stdcall"}}== - Specifies the standard calling convention for BASIC languages, including ""FreeBASIC"". - =={{fbdoc item="keyword" value="KeyPgCdecl|Cdecl"}}== - Specifies the standard calling convention in the C and C""++"" languages. - =={{fbdoc item="keyword" value="KeyPgPascal|Pascal"}}== - Specifies the standard calling convention in the Fortran, Pascal and Microsoft ""QuickBASIC""/QBasic languages. -<<>>{{anchor name="PARAMCONV"}}{{fbdoc item="section" value="Parameter passing conventions"}} - =={{fbdoc item="keyword" value="KeyPgByref|Byref"}}== - Specifies passing an argument by reference. - =={{fbdoc item="keyword" value="KeyPgByval|Byval"}}== - Specifies passing an argument by value. - =={{fbdoc item="keyword" value="KeyPgAny|Any"}}== - Disables type-checking on arguments. +**Conventions d'appel** + **[[KeyPgStdcall stdcall]]** + Indique la convention d'appel standard pour les langages BASIC, notamment FreeBASIC. + **[[KeyPgCdecl cdecl]]** + Indique la convention d'appel standard en langages C and C++. + **[[KeyPgPascal pascal]]** + Indique la convention d'appel standard pour les langages Fortran, Pascal et Microsoft QuickBASIC/QBasic. +;**Conventions de passage de paramètre(s)** + **[[KeyPgByref ByRef]]** + Indique le passage d'un argument par référence. + **[[KeyPgByval ByVal]]** + Indique le passage d'un argument par valeur. + **[[KeyPgAny Any]]** + Désactive la vérification de type sur des arguments. -{{anchor name="VARIADIC"}}{{fbdoc item="section" value="Variadic Procedures"}} - =={{fbdoc item="keyword" value="KeyPgDots|... (Ellipsis)"}}== - Indicates a variadic procedure in a declaration. - =={{fbdoc item="keyword" value="KeyPgVaFirst|VA_FIRST"}}== - Macro to obtain the argument list in a variadic procedure. - =={{fbdoc item="keyword" value="KeyPgVaArg|VA_ARG"}}== - Macro to obtain the current argument in a variadic procedure. - =={{fbdoc item="keyword" value="KeyPgVaNext|VA_NEXT"}}== - Macro to move to the next argument in a variadic procedure. +**Procédures "Variadic"** + **[[KeyPgDots ... (Ellipse)]]** + Indique une procédure "variadic" dans une déclaration. + **[[KeyPgVaFirst va_first]]** + Macro pour obtenir la liste des arguments d'une procédure "variadic". + **[[KeyPgVaArg va_arg]]** + Macro pour obtenir l'argument courant dans une procédure "variadic". + **[[KeyPgVaNext va_next]]** + Macro pour passer à l'argument suivant dans une procédure "variadic". -{{anchor name="AUTOEXEC"}}{{fbdoc item="section" value="Automatic execution"}} - =={{fbdoc item="keyword" value="KeyPgModuleConstructor|Constructor (Module)"}}== - Indicates a procedure is to be executed before module-level code. - =={{fbdoc item="keyword" value="KeyPgModuleDestructor|Destructor (Module)"}}== - Indicates a procedure is to be executed after module-level code. +**Exécution automatique** + **[[KeyPgModuleConstructor Constructor (Module)]]** + Indique une procédure qui doit être exécutée avant le code au niveau du module. + **[[KeyPgModuleDestructor Destructor (Module)]]** + Indique une procédure qui doit être exécutée après le code au niveau du module. -{{anchor name="MISC"}}{{fbdoc item="section" value="Miscellaneous"}} - =={{fbdoc item="keyword" value="KeyPgCall|Call"}}== - Invokes a procedure. - =={{fbdoc item="keyword" value="KeyPgNaked|Naked"}}== - Specifies that a function body is not to be given any prolog/epilog code ->>::c:: +**Divers** + **[[KeyPgCall Call]]** + Appelle une procédure. + **[[KeyPgNaked Naked]]** + Spécifie qu'un corps de la fonction ne doit avoir aucun code prologue/épilogue +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgProgrammer.wakka b/fbdocs/manual/cache/CatPgProgrammer.wakka index 6d98ae4cd1..a8a95e2e29 100644 --- a/fbdocs/manual/cache/CatPgProgrammer.wakka +++ b/fbdocs/manual/cache/CatPgProgrammer.wakka @@ -1,107 +1,107 @@ {{fbdoc item="title" value="Programmer's Guide"}}---- -FreeBASIC programmer's guide. - -//Work in Progress: **New pages created for this guide should use the ""ProPg""* prefix.**// - -<<{{fbdoc item="section" value="Getting Started"}} - {{fbdoc item="keyword" value="ProPgHelloWorld|Hello World"}} - {{fbdoc item="keyword" value="ProPgPrimer1|FreeBASIC Primer #1"}} - -{{fbdoc item="section" value="Source Files"}} - {{fbdoc item="keyword" value="ProPgSourceFiles|Source Files (.bas)"}} - {{fbdoc item="keyword" value="ProPgHeaderFiles|Header Files (.bi)"}} - {{fbdoc item="keyword" value="ProPgPrebuiltLibraries|Using Prebuilt Libraries"}} - -{{fbdoc item="section" value="Lexical Conventions"}} - {{fbdoc item="keyword" value="ProPgComments|Comments"}} - {{fbdoc item="keyword" value="ProPgIdentifierRules|Identifier Rules"}} - {{fbdoc item="keyword" value="ProPgLiterals|Literals"}} - {{fbdoc item="keyword" value="ProPgLabels|Labels"}} - -{{fbdoc item="section" value="Variables and Datatypes"}} - Constants and Enumerations - Numeric Types - Strings (string, zstring, and wstring) - {{fbdoc item="keyword" value="ProPgDataConversion|Coercion and Conversion"}} - {{fbdoc item="keyword" value="ProPgConstants|Constants"}} - {{fbdoc item="keyword" value="ProPgVariables|Variables"}} - - {{fbdoc item="subsect" value="Arrays"}} - {{fbdoc item="keyword" value="ProPgArrays|Overview"}} - {{fbdoc item="keyword" value="ProPgFixLenArrays|Fixed-length Arrays"}} - {{fbdoc item="keyword" value="ProPgVarLenArrays|Variable-length Arrays"}} - {{fbdoc item="keyword" value="ProPgArrayIndex|Array Indexing"}} - Passing Arrays to Procedures - - {{fbdoc item="subsect" value="Pointers"}} - {{fbdoc item="keyword" value="ProPgPointers|Overview"}} - {{fbdoc item="keyword" value="ProPgPtrArithmetic|Pointer Arithmetic"}} - -{{fbdoc item="section" value="Declarations"}} - {{fbdoc item="keyword" value="ProPgImplicitdeclarations|Implicit Declarations"}} - {{fbdoc item="keyword" value="ProPgInitialization|Initialization"}} - {{fbdoc item="keyword" value="ProPgStorageClasses|Storage Classes"}} - Variable Lifetime - {{fbdoc item="keyword" value="ProPgVariableScope|Variable Scope"}} +Guide du programmeur FreeBASIC. + +//Travail en cours: **Les nouvelles pages créées pour ce guide doivent utiliser le préfixe ProPg*.**// + +**Comment démarrer** + [[ProPgHelloWorld Bonjour le monde (Hello World)]] + [[ProPgPrimer1 Premier livre #1 FreeBASIC]] + +**Fichiers** + [[ProPgSourceFiles Fichiers source (.bas)]] + [[ProPgHeaderFiles Fichiers en-tête (.bi)]] + [[ProPgPrebuiltLibraries Utilisation de bibliothèques pré-construites]] + +**Conventions lexicales** + [[ProPgComments Commentaires]] + [[ProPgIdentifierRules Règles d'identification]] + [[ProPgLiterals Les littéraux]] + [[ProPgLabels Les étiquettes (labels)]] + +**Variables and Datatypes** + Constantes et énumérations + Types numériques + Chaînes (string, zstring et wstring) + [[ProPgDataConversion Conversion]] + [[ProPgConstants Constantes]] + [[ProPgVariables Variables]] + + **Tableaux** + [[ProPgArrays Vue d'ensemble]] + [[ProPgFixLenArrays Tableaux de longueur fixe]] + [[ProPgVarLenArrays Tableaux de longueur variable]] + [[ProPgArrayIndex Indexation des tableaux]] + Passage de tableaux à des procédures + + **Pointeurs** + [[ProPgPointers Vue d'ensemble]] + [[ProPgPtrArithmetic Arithmétique des pointeurs]] + +**Déclarations** + [[ProPgImplicitdeclarations Les déclarations implicites]] + [[ProPgInitialization Initialisation]] + [[ProPgStorageClasses Classes de stockage]] + Durée de vie d'une variable + [[ProPgVariableScope Portée d'une variable]] Namespaces - {{fbdoc item="keyword" value="ProPgVarProcLinkage|Variable and Procedure Linkage"}} - -{{fbdoc item="section" value="User Defined Types"}} - {{fbdoc item="keyword" value="ProPgUDTs|Overview"}} - {{fbdoc item="keyword" value="ProPgTypeAliases|Type Aliases"}} - {{fbdoc item="keyword" value="KeyPgTypeTemp|Temporary Types"}} - {{fbdoc item="keyword" value="ProPgCtorsDtors|Constructors and Destructors"}} - {{fbdoc item="keyword" value="ProPgMemberProcedures|Member Procedures"}} - Properties - {{fbdoc item="keyword" value="ProPgMemberAccessRights|Member Access Rights"}} - {{fbdoc item="keyword" value="ProPgOperatorOverloading|Operator Overloading"}} - Iterators - New and Delete - {{fbdoc item="keyword" value="ProPgTypeObjects|Types as Objects"}} -<<>>{{fbdoc item="section" value="Statements and Expressions"}} - Assignments - {{fbdoc item="keyword" value="CatPgOperators|Operators List"}} - {{fbdoc item="keyword" value="OpPrecedence|Operator Precedence"}} - {{fbdoc item="keyword" value="ProPgControlFlow|Control Flow Statements"}} - -{{fbdoc item="section" value="Procedures"}} - {{fbdoc item="keyword" value="ProPgProcedures|Procedures Overview"}} - {{fbdoc item="keyword" value="ProPgPassingArguments|Passing Arguments to Procedures"}} - {{fbdoc item="keyword" value="ProPgReturnValue|Returning a Value"}} - Procedure Scopes - {{fbdoc item="keyword" value="ProPgCallingConventions|Calling Conventions"}} - Recursion - Constructors and Destructors - {{fbdoc item="keyword" value="ProPgProcedurePointers|Pointers to Procedures"}} - {{fbdoc item="keyword" value="CatPgVarArg|Variable Arguments"}} - -{{fbdoc item="section" value="Making Binaries"}} - Executables - {{fbdoc item="keyword" value="ProPgStaticLibraries|Static Libraries"}} - {{fbdoc item="keyword" value="ProPgSharedLibraries|Shared Libraries (DLLs)"}} - {{fbdoc item="keyword" value="ProPgProfiling|Profiling"}} - -{{fbdoc item="section" value="Preprocessor"}} - Overview - Conditional Compilation + [[ProPgVarProcLinkage Variable et lien avec les procédures]] + +**Types définis par l'utilisateur** + [[ProPgUDTs Vue d'ensemble]] + [[ProPgTypeAliases Alias de type]] + [[KeyPgTypeTemp Types temporaires]] + [[ProPgCtorsDtors Constructeurs et destructeurs]] + [[ProPgMemberProcedures Membres de procédures]] + Propriétés + [[ProPgMemberAccessRights Droits d'accès aux membres]] + [[ProPgOperatorOverloading Surcharge d'opérateur]] + Itérateurs + New et Delete + [[ProPgTypeObjects Types comme Objets]] +;**Déclarations et expressions** + Affectations + [[CatPgOperators Liste des opérateurs]] + [[OpPrecedence Priorité des opérateurs]] + [[ProPgControlFlow Déclarations de contrôle de flux]] + +**Procédures** + [[ProPgProcedures Vue d'ensemble des procédures]] + [[ProPgPassingArguments Passage d'arguments aux procédures]] + [[ProPgReturnValue Renvoi d'une valeur]] + Portée des procédures + [[ProPgCallingConventions Conventions d'appel]] + Récursivité + Constructeurs et destructeurs + [[ProPgProcedurePointers Pointeurs vers des procédures]] + [[CatPgVarArg Arguments variables]] + +**Création de binaires** + Exécutables + [[ProPgStaticLibraries Bibliothèques statiques]] + [[ProPgSharedLibraries Bibliothèques partagées (DLL)]] + [[ProPgProfiling Profilage]] + +**Préprocesseur** + Vue d'ensemble + Compilation conditionnelle Macros -{{fbdoc item="section" value="Other Topics"}} -(And topics that need to get placed elsewhere) - {{fbdoc item="keyword" value="CptAscii|ASCII"}} - {{fbdoc item="keyword" value="ProPgDates|Date Serials"}} - {{fbdoc item="keyword" value="ProPgRadians|Radians"}} - {{fbdoc item="keyword" value="GfxLib|FreeBASIC GfxLib overview"}} - {{fbdoc item="keyword" value="GfxInternalFormats|Internal Graphics Formats"}} - External Graphics File Formats - {{fbdoc item="keyword" value="KeyPgAsm|Inline ASM"}} - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} - {{fbdoc item="keyword" value="CatPgDddefines|Intrinsic Defines"}} - {{fbdoc item="keyword" value="ProPgCruntime|C Standard Library Functions"}} - {{fbdoc item="keyword" value="ProPgFileIO|File I/O in FreeBASIC"}} - -NOTE: Existing ""CatPg"" pages should be recreated as ""ProPg"" pages providing a general overview to the grouping of keywords. - ->>::c:: +**Autres sujets** +(Et les sujets qui doivent se rendre à un autre endroit) + [[CptAscii ASCII]] + [[ProPgDates Date Serials]] + [[ProPgRadians Radians]] + [[GfxLib Vue d'ensemble GfxLib FreeBASIC]] + [[GfxInternalFormats Formats graphiques internes ]] + Formats graphiques externes + [[KeyPgAsm Inline Asm]] + [[ProPgErrorHandling Gestion des erreurs]] + [[CatPgDddefines Définitions intrinsèques]] + [[ProPgCruntime Fonctions de la bibliothèque standard du langage C]] + [[ProPgFileIO Entrée/Sortie fichiers sous FreeBASIC]] + +NOTE: Les pages CatPg existantes doivent être recréés en tant que pages ProPg pour donner un aperçu général du groupement des mots-clés. + +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgStdDataTypes.wakka b/fbdocs/manual/cache/CatPgStdDataTypes.wakka index d4a8bf27ed..9b7dac3704 100644 --- a/fbdocs/manual/cache/CatPgStdDataTypes.wakka +++ b/fbdocs/manual/cache/CatPgStdDataTypes.wakka @@ -1,51 +1,51 @@ {{fbdoc item="title" value="Standard Data Types"}}---- -Built-in numerical and string types. +Types numériques et chaînes d'origine. -**{{anchor name="INTEGER|Integer types"}}** - Types that store integer values, whose range is determined by the size of the data type and its signedness. -**{{anchor name="FLOATING|Floating-point types"}}** - Types that store real number values, whose range and precision is determined by the size of the data type. -**{{anchor name="MODIFIERS|Data Type Modifiers"}}** - Specifies additional characteristics of a standard or user-defined data type. -**{{anchor name="STRING|String types"}}** - Types that store or point to an array of characters. +**[[#INTEGER">Types des nombres entiers]]** + Types qui stockent des valeurs entières, dont l'étendue est déterminée par la taille du type de donnée et le fait d'être signé ou non. +**[[#FLOATING">Types à virgule flottante]]** + Types qui stockent des valeurs réelles (nombres à virgule), dont l'étendue et la précision est déterminée par la taille du type de donnée. +**[[#MODIFIERS">Modificateurs de type de données]]** + Spécifient les caractéristiques supplémentaires d'une norme définie par l'utilisateur ou d'un type de données. +**[[#STRING">Types des chaînes]]** + Types qui stockent ou pointent vers un tableau de caractères. -<<{{anchor name="INTEGER"}}{{fbdoc item="section" value="Integer types"}} - =={{fbdoc item="keyword" value="KeyPgByte|BYTE"}} and {{fbdoc item="keyword" value="KeyPgUbyte|UBYTE"}}== - 8-bit wide data types that store integer values. - =={{fbdoc item="keyword" value="KeyPgShort|SHORT"}} and {{fbdoc item="keyword" value="KeyPgUshort|USHORT"}}== - 16-bit wide data types that store integer values. - =={{fbdoc item="keyword" value="KeyPgInteger|INTEGER"}} and {{fbdoc item="keyword" value="KeyPgUinteger|UINTEGER"}}== - 32-bit wide data types that store integer values. - =={{fbdoc item="keyword" value="KeyPgLong|LONG"}} and {{fbdoc item="keyword" value="KeyPgUlong|ULONG"}}== - 32-bit or 64-bit wide data types that store integer values. - =={{fbdoc item="keyword" value="KeyPgLongint|LONGINT"}} and {{fbdoc item="keyword" value="KeyPgUlongint|ULONGINT"}}== - 64-bit wide data types that store integer values. +**Types des nombres entiers** + **[[KeyPgByte Byte]] et [[KeyPgUbyte UByte]]** + Types de données de 8-bit d'étendue qui stockent des valeurs entières. + **[[KeyPgShort Short]] et [[KeyPgUshort UShort]]** + Type de données de 16-bit d'étendue qui stockent des valeurs entières. + **[[KeyPgInteger Integer]] et [[KeyPgUinteger UInteger]]** + Type de données de 32-bit d'étendue qui stockent des valeurs entières. + **[[KeyPgLong Long]] et [[KeyPgUlong Ulong]]** + Type de données de 32-bit ou 64-bit d'étendue qui stockent des valeurs entières. + **[[KeyPgLongint LongInt]] et [[KeyPgUlongint ULongInt]]** + Type de données de 64-bit d'étendue qui stockent des valeurs entières. -{{anchor name="FLOATING"}}{{fbdoc item="section" value="Floating-point types"}} - =={{fbdoc item="keyword" value="KeyPgSingle|SINGLE"}}== - 32-bit wide data types that store real number values. - =={{fbdoc item="keyword" value="KeyPgDouble|DOUBLE"}}== - 64-bit wide data types that store real number values. -<<>>{{anchor name="MODIFIERS"}}{{fbdoc item="section" value="Data Type Modifiers"}} - =={{fbdoc item="keyword" value="KeyPgConstQualifier|CONST"}}== - Specifies a read only type. - =={{fbdoc item="keyword" value="KeyPgPointer|POINTER"}} and {{fbdoc item="keyword" value="KeyPgPtr|PTR"}}== - Modifies types to be pointer types. - =={{fbdoc item="keyword" value="KeyPgUnsigned|UNSIGNED"}}== - Specifies an unsigned integer type. +**Types à virgule flottante** + **[[KeyPgSingle Single]]** + Type de données de 32-bit d'étendue qui stockent des valeurs réelles (nbre à virgule). + **[[KeyPgDouble Double]]** + Type de données de 64-bit d'étendue qui stockent des valeurs réelles (nbre à virgule). +;**Modificateurs de type de données** + **[[KeyPgConstQualifier Const]]** + Spéecifie un type de données en lecture seulement. + **[[KeyPgPointer Pointer]] et [[KeyPgPtr Ptr]]** + Modifie les types pour être des pointeurs de types. + **[[KeyPgUnsigned Unsigned]]** + Spécifie un type entier non-signé. -{{anchor name="STRING"}}{{fbdoc item="section" value="String types"}} - =={{fbdoc item="keyword" value="KeyPgString|STRING"}}== - Fixed-length and variable-length strings with built-in memory management. - =={{fbdoc item="keyword" value="KeyPgZstring|ZSTRING"}}== - Fixed-length and variable-length null-terminated strings. - =={{fbdoc item="keyword" value="KeyPgWstring|WSTRING"}}== - Fixed-length and variable-length null-terminated strings of wide characters. +**Types des chaînes** + **[[KeyPgString String]]** + Chaînes à longueur-fixe ou longueur-variable avec gestion intégrée de la mémoire. + **[[KeyPgZstring ZString]]** + Chaînes à longueur-fixe ou longueur-variable avec marqueur de fin nul. + **[[KeyPgWstring WString]]** + Chaînes de caractères longs à longueur-fixe ou longueur-variable avec marqueur de fin nul. ->>::c:: +;
{{fbdoc item="see"}} - - [[TblVarTypes Variable types and limits]] + - [[TblVarTypes Types de données standard et limites]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgString.wakka b/fbdocs/manual/cache/CatPgString.wakka index 124454ce34..5496e27799 100644 --- a/fbdocs/manual/cache/CatPgString.wakka +++ b/fbdocs/manual/cache/CatPgString.wakka @@ -1,133 +1,133 @@ {{fbdoc item="title" value="String Functions"}}---- -Statements and Procedures that work with strings. +Déclarations et procédures qui travaillent sur les chaînes. {{fbdoc item="desc"}} - These statements and procedures provide many ways to create and manipulate strings and substrings. Numbers can be converted to strings and vice-versa. Procedures are also provided to aid in serialization of numeric data, perhaps for persistent storage. + Ces déclarations et procédures fournissent de nombreux moyens pour créer et manipuler chaîne et sous-chaînes. Les nombres peuvent être convertis en chaînes et vice-versa. Des procédures sont également fournies pour faciliter la sérialisation des données numériques, même pour le stockage persistant. -**{{anchor name="CREATESTR|Creating Strings"}}** - String data types and procedures that create new strings. -**{{anchor name="CHRCONVERT|Character Conversions"}}** - Procedures that convert from character codes to strings and back. -**{{anchor name="NUMSTRCONV|Numeric to String Conversions"}}** - Procedures that convert numeric values to strings. -**{{anchor name="STRNUMCONV|String to Numeric Conversions"}}** - Procedures that convert strings to numeric values. -**{{anchor name="NUMSERIAL|Numeric Serializations"}}** - Procedures that convert raw numeric data to and from strings suitable for storage. -**{{anchor name="SUBSTRING|Working with Substrings"}}** - Procedures that return subsets of strings, or that modify subsets of strings. +**[[#CREATESTR">Création de chaînes]]** + Types de données chaîne et procédures qui céent de nouvelles chaînes. +**[[#CHRCONVERT">Conversions de caractères]]** + Procédures qui convertissent des codes carctères en chaînes et vice-versa. +**[[#NUMSTRCONV">Conversions numérique vers chaîne]]** + Procédures qui convertissent des valeurs numériques en chaînes. +**[[#STRNUMCONV">Conversions chaîne vers numérique]]** + Procédures qui convertissent des chaînes en valeurs numériques. +**[[#NUMSERIAL">Sérilisations numériques]]** + Procédures qui convertissent des données numériques brutes vers/depuis des chaînes appropriées pour le stockage. +**[[#SUBSTRING">Travail avec les sous-chaînes]]** + Procédures qui retournent des sous-ensembles de chaînes, ou qui modifient des sous-ensembles de chaînes. -<<{{anchor name="CREATESTR"}}{{fbdoc item="section" value="Creating Strings"}} - =={{fbdoc item="keyword" value="KeyPgString|STRING"}}== - Standard data type: 8 bit character string. - =={{fbdoc item="keyword" value="KeyPgStringFunction|STRING (Function)"}}== - Returns a [[KeyPgString String]] of multiple characters. - =={{fbdoc item="keyword" value="KeyPgZstring|ZSTRING"}}== - Standard data type: null terminated 8 bit character string. - =={{fbdoc item="keyword" value="KeyPgWstring|WSTRING"}}== - Standard data type: wide character string. - =={{fbdoc item="keyword" value="KeyPgWstringFunction|WSTRING (Function)"}}== - Returns a [[KeyPgWstring WString]] of multiple characters. - =={{fbdoc item="keyword" value="KeyPgSpace|SPACE"}}== - Returns a [[KeyPgString String]] consisting of spaces. - =={{fbdoc item="keyword" value="KeyPgWspace|WSPACE"}}== - Returns a [[KeyPgWstring WString]] consisting of spaces. - =={{fbdoc item="keyword" value="KeyPgLen|LEN"}}== - Returns the length of a string in characters. +**Création de chaînes** + **[[KeyPgString String]]** + Type de données standard : chaîne de caractères 8 bit. + **[[KeyPgStringFunction String (Function)]]** + Retourne une [[KeyPgString String]] de plusieurs caractères. + **[[KeyPgZstring ZString]]** + Type de données standard : chaîne de caractères 8 bit terminée par "null". + **[[KeyPgWstring WString]]** + Type de données standard : chaînes de caractères larges (2 octets). + **[[KeyPgWstringFunction Wstring (Function)]]** + Retourne une [[KeyPgWstring WString]] de multiples caractères. + **[[KeyPgSpace Space]]** + Retourne une [[KeyPgString String]] remplie d'espaces. + **[[KeyPgWspace WSpace]]** + Retourne une [[KeyPgWstring WString]] remplie d'espaces. + **[[KeyPgLen Len]]** + Retourne la longueur en caractères de la chaîne. -{{anchor name="CHRCONVT"}}{{fbdoc item="section" value="Character Conversion"}} - =={{fbdoc item="keyword" value="KeyPgAsc|ASC"}}== - Returns an [[KeyPgInteger Integer]] representation of an character. - =={{fbdoc item="keyword" value="KeyPgChr|CHR"}}== - Returns a string of one or more characters from their ASCII [[KeyPgInteger Integer]] representation. - =={{fbdoc item="keyword" value="KeyPgWchr|WCHR"}}== - Returns a [[KeyPgWstring WString]] of one or more characters from their Unicode [[KeyPgInteger Integer]] representation. +**Conversions de caractères** + **[[KeyPgAsc Asc]]** + Retourne un [[KeyPgInteger Integer (=entier)]] représentation d'un caractère. + **[[KeyPgChr Chr]]** + Retourne une chaîne d'un ou plusieurs caractères à partir de leur représentation [[KeyPgInteger Integer]] ASCII. + **[[KeyPgWchr WChr]]** + Retourne une [[KeyPgWstring WString]] d'un ou plusieurs caractères à partir de leur représentation [[KeyPgInteger Integer]] Unicode. -{{anchor name="NUMSTRCONV"}}{{fbdoc item="section" value="Numeric to String Conversions"}} - =={{fbdoc item="keyword" value="KeyPgBin|BIN"}}== - Returns a binary [[KeyPgString String]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgWbin|WBIN"}}== - Returns a binary [[KeyPgWstring WString]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgHex|HEX"}}== - Returns a hexadecimal [[KeyPgString String]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgWhex|WHEX"}}== - Returns a hexadecimal [[KeyPgWstring WString]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgOct|OCT"}}== - Returns an octal [[KeyPgString String]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgWoct|WOCT"}}== - Returns an octal [[KeyPgWstring WString]] representation of an integral value. - =={{fbdoc item="keyword" value="KeyPgStr|STR"}}== - Returns the [[KeyPgString String]] representation of numeric value. - =={{fbdoc item="keyword" value="KeyPgWstr|WSTR"}}== - Returns the [[KeyPgWstring WString]] representation of numeric value. - =={{fbdoc item="keyword" value="KeyPgFormat|FORMAT"}}== - Returns a formatted [[KeyPgString String]] representation of a [[KeyPgDouble Double]]. +**Conversions numérique vers chaîne** + **[[KeyPgBin Bin]]** + Retourne une [[KeyPgString String]] binaire représentation d'une valeur entière. + **[[KeyPgWbin WBin]]** + Retourne une [[KeyPgWstring WString]] binaire représentation d'une valeur entière. + **[[KeyPgHex Hex]]** + Retourne une [[KeyPgString String]] hexadécimale représentation d'une valeur entière. + **[[KeyPgWhex WHex]]** + Retourne une [[KeyPgWstring WString]] hexadécimale représentation d'une valeur entière. + **[[KeyPgOct Oct]]** + Retourne une [[KeyPgString String]] octale représentation d'une valeur entière. + **[[KeyPgWoct WOct]]** + Retourne une [[KeyPgWstring WString]] octale représentation d'une valeur entière. + **[[KeyPgStr Str]]** + Retourne la [[KeyPgString String]] représentation d'une valeur numérique. + **[[KeyPgWstr WStr]]** + Retourne la [[KeyPgWstring WString]] représentation d'une valeur numérique. + **[[KeyPgFormat Format]]** + Retourne une [[KeyPgString String]] formatée représentation d'un [[KeyPgDouble Double]]. -{{anchor name="STRNUMCONV"}}{{fbdoc item="section" value="String to Numeric Conversions"}} - =={{fbdoc item="keyword" value="KeyPgVal|VAL"}}== - Returns the [[KeyPgDouble Double]] conversion of a numeric string. - =={{fbdoc item="keyword" value="KeyPgValint|VALINT"}}== - Returns the [[KeyPgInteger Integer]] conversion of a numeric string. - =={{fbdoc item="keyword" value="KeyPgVallng|VALLNG"}}== - Returns the [[KeyPgLong Long]] conversion of a numeric string. - =={{fbdoc item="keyword" value="KeyPgValuint|VALUINT"}}== - Returns the [[KeyPgUinteger uInteger]] conversion of a numeric string. - =={{fbdoc item="keyword" value="KeyPgValulng|VALULNG"}}== - Returns the [[KeyPgUlong ULong]] conversion of a numeric string. +**Conversions chaîne vers numérique** + **[[KeyPgVal Val]]** + Retourne le [[KeyPgDouble Double]] conversion d'une chaîne numérique. + **[[KeyPgValint ValInt]]** + Retourne l'[[KeyPgInteger Integer]] conversion d'une chaîne numérique. + **[[KeyPgVallng ValLng]]** + Retourne le [[KeyPgLong Long]] conversion d'une chaîne numérique. + **[[KeyPgValuint ValUInt]]** + Retourne le [[KeyPgUinteger UInteger]] conversion d'une chaîne numérique. + **[[KeyPgValulng ValULng]]** + Retourne le [[KeyPgUlong Ulong]] conversion d'une chaîne numérique. -<<>>{{anchor name="NUMSERIAL"}}{{fbdoc item="section" value="Numeric Serialization"}} - =={{fbdoc item="keyword" value="KeyPgMkd|MKD"}}== - Returns an eight character [[KeyPgString String]] representation of a [[KeyPgDouble Double]]. - =={{fbdoc item="keyword" value="KeyPgMki|MKI"}}== - Returns a four character [[KeyPgString String]] representation of a [[KeyPgInteger Integer]]. - =={{fbdoc item="keyword" value="KeyPgMkl|MKL"}}== - Returns a four character [[KeyPgString String]] representation of a [[KeyPgLong Long]]. - =={{fbdoc item="keyword" value="KeyPgMklongint|MKLONGINT"}}== - Returns an eight character [[KeyPgString String]] representation of a [[KeyPgLongint Longint]]. - =={{fbdoc item="keyword" value="KeyPgMks|MKS"}}== - Returns a four character [[KeyPgString String]] representation of a [[KeyPgSingle Single]]. - =={{fbdoc item="keyword" value="KeyPgMkshort|MKSHORT"}}== - Returns a two character [[KeyPgString String]] representation of a [[KeyPgShort Short]]. - =={{fbdoc item="keyword" value="KeyPgCvd|CVD"}}== - Returns a [[KeyPgDouble Double]] representation of an eight character [[KeyPgString String]]. - =={{fbdoc item="keyword" value="KeyPgCvi|CVI"}}== - Returns an [[KeyPgInteger Integer]] representation of a four character [[KeyPgString String]]. - =={{fbdoc item="keyword" value="KeyPgCvl|CVL"}}== - Returns a [[KeyPgLong Long]] representation of a four character [[KeyPgString String]]. - =={{fbdoc item="keyword" value="KeyPgCvlongint|CVLONGINT"}}== - Returns a [[KeyPgLongint Longint]] representation of an eight character [[KeyPgString String]]. - =={{fbdoc item="keyword" value="KeyPgCvs|CVS"}}== - Returns a [[KeyPgSingle Single]] representation of a four character [[KeyPgString String]]. - =={{fbdoc item="keyword" value="KeyPgCvshort|CVSHORT"}}== - Returns a [[KeyPgShort Short]] representation of a two character [[KeyPgString String]]. +;**Sérialisations numériques** + **[[KeyPgMkd MKD]]** + Retourne une [[KeyPgString String]] de huit octets représentation d'un [[KeyPgDouble Double]]. + **[[KeyPgMki MKI]]** + Retourne une [[KeyPgString String]] de quatre octets représentation d'un [[KeyPgInteger Integer]]. + **[[KeyPgMkl MKL]]** + Retourne une [[KeyPgString String]] de quatre octets représentation d'un [[KeyPgLong Long]]. + **[[KeyPgMklongint MKLongInt]]** + Retourne une [[KeyPgString String]] de huit octets représentation d'un [[KeyPgLongint LongInt]]. + **[[KeyPgMks MKS]]** + Retourne une [[KeyPgString String]] de quatre octets représentation d'un [[KeyPgSingle Single]]. + **[[KeyPgMkshort MKShort]]** + Retourne une [[KeyPgString String]] de deux octets représentation d'un [[KeyPgShort Short]]. + **[[KeyPgCvd CVD]]** + Retourne un [[KeyPgDouble Double]] représentation d'une [[KeyPgString String]] de huit octets. + **[[KeyPgCvi CVI]]** + Retourne an [[KeyPgInteger Integer]] représentation d'une [[KeyPgString String]] de quatre octets. + **[[KeyPgCvl CVL]]** + Retourne a [[KeyPgLong Long]] représentation d'une [[KeyPgString String]] de quatre octets. + **[[KeyPgCvlongint CVLongInt]]** + Retourne a [[KeyPgLongint LongInt]] représentation d'une [[KeyPgString String]] de huit octets. + **[[KeyPgCvs CVS]]** + Retourne a [[KeyPgSingle Single]] représentation d'une [[KeyPgString String]] de quatre octets. + **[[KeyPgCvshort CVShort]]** + Retourne a [[KeyPgShort Short]] représentation d'une [[KeyPgString String]] de deux octets. -{{anchor name="SUBSTRING"}}{{fbdoc item="section" value="Working with Substrings"}} - =={{fbdoc item="keyword" value="KeyPgLeft|LEFT"}}== - Returns a substring of the leftmost characters in a string. - =={{fbdoc item="keyword" value="KeyPgMidfunction|MID (Function)"}}== - Returns a substring of a string. - =={{fbdoc item="keyword" value="KeyPgRight|RIGHT"}}== - Returns a substring of the rightmost characters in a string. - =={{fbdoc item="keyword" value="KeyPgLcase|LCASE"}}== - Returns a copy of a string converted to lowercase alpha characters. - =={{fbdoc item="keyword" value="KeyPgUcase|UCASE"}}== - Returns a copy of a string converted to uppercase alpha characters. - =={{fbdoc item="keyword" value="KeyPgLtrim|LTRIM"}}== - Removes surrounding substrings or characters on the left side of a string. - =={{fbdoc item="keyword" value="KeyPgRtrim|RTRIM"}}== - Removes surrounding substrings or characters on the right side of a string. - =={{fbdoc item="keyword" value="KeyPgTrim|TRIM"}}== - Removes surrounding substrings or characters on the left and right side of a string. - =={{fbdoc item="keyword" value="KeyPgInstr|INSTR"}}== - Returns the first occurrence of a substring or character within a string. - =={{fbdoc item="keyword" value="KeyPgInstrrev|INSTRREV"}}== - Returns the last occurrence of a substring or character within a string. - =={{fbdoc item="keyword" value="KeyPgMidstatement|MID (Statement)"}}== - Copies a substring to a substring of a string. - =={{fbdoc item="keyword" value="KeyPgLset|LSET"}}== - Left-justifies a string. - =={{fbdoc item="keyword" value="KeyPgRset|RSET"}}== - Right-justifies a string. +**Travail avec les sous-chaînes** + **[[KeyPgLeft Left]]** + Retourne une sous-chaîne des caractères les plus à gauche d'une chaîne. + **[[KeyPgMidfunction Mid (Function)]]** + Retourne une sous-chaîne d'une chaîne. + **[[KeyPgRight Right]]** + Retourne une sous-chaîne des caractères les plus à droite d'une chaîne. + **[[KeyPgLcase LCase]]** + Retourne une copie d'une chaîne convertie en caractères alphabétiques minuscules. + **[[KeyPgUcase UCase]]** + Retourne une copie d'une chaîne convertie en caractères alphabétiques majuscules. + **[[KeyPgLtrim LTrim]]** + Enlève les sous-chaines qui entourent ou les caractères sur le côté gauche d'une chaîne. + **[[KeyPgRtrim RTrim]]** + Enlève les sous-chaines qui entourent ou les caractères sur le côté droit d'une chaîne. + **[[KeyPgTrim Trim]]** + Enlève les sous-chaines qui entourent ou les caractères sur les côtés gauche et droit d'une chaîne. + **[[KeyPgInstr InStr]]** + Repère la première occurrence d'une sous-chaine ou d'un caractère dans une chaîne. + **[[KeyPgInstrrev InStrRev]]** + Repère la dernière occurrence d'une sous-chaine ou d'un caractère dans une chaîne. + **[[KeyPgMidstatement Mid (Statement)]]** + Copie une sous-chaine vers une sous-chaine d'une chaîne. + **[[KeyPgLset LSet]]** + Justification à gauche d'une chaîne. + **[[KeyPgRset RSet]]** + Justification à droite d'une chaîne. ->>::c:: +;
{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgThreading.wakka b/fbdocs/manual/cache/CatPgThreading.wakka index 42eaa919c2..efeee6d57e 100644 --- a/fbdocs/manual/cache/CatPgThreading.wakka +++ b/fbdocs/manual/cache/CatPgThreading.wakka @@ -1,45 +1,45 @@ {{fbdoc item="title" value="Threading Support Functions"}}---- -Procedures for working with multithreaded applications. +Procédures pour travailler avec des applications "multi-thread". {{fbdoc item="desc"}} - These procedures allow for multithreaded programming. Threads and conditional variables can be created and destroyed, and so-called //mutexes// can be obtained to protect thread-sensitive data. + Ces procédures permettent la programmation "multi-thread". "Threads" et variables conditionnelles peuvent être créés et détruits, et les //mutexes// peuvent être obtenus pour protéger les données de "thread" sensibles.. -**{{anchor name="THREADS|Threads"}}** - Procedures that start and wait for threaded procedures. -**{{anchor name="CONDVARS|Conditional Varables"}}** - Procedures that create and signal conditional variables. -**{{anchor name="MUTEXES|Mutexes"}}** - Procedures that deal with mutexes. +**[[#THREADS">Threads]]** + Les procédures de départ et d'attente pour les procédures de "thread". +**[[#CONDVARS">Varables conditionnelles]]** + Procédures qui créent et signalent des variables conditionnelles. +**[[#MUTEXES">Mutexes]]** + Méthodes qui traîtent avec les "mutex". -<<{{anchor name="THREADS"}}{{fbdoc item="section" value="Threads"}} - =={{fbdoc item="keyword" value="KeyPgThreadCreate|THREADCREATE"}}== - Starts a procedure in a separate thread of execution. - =={{fbdoc item="keyword" value="KeyPgThreadWait|THREADWAIT"}}== - Waits until a threaded procedure has finished. +**Threads** + **[[KeyPgThreadCreate ThreadCreate]]** + Démarre une procédure dans un "thread" séparé de l'exécution. + **[[KeyPgThreadWait ThreadWait]]** + Attend jusqu'à ce que une procédure de "thread" soit terminée. -{{anchor name="CONDVARS"}}{{fbdoc item="section" value="Conditional Variables"}} - =={{fbdoc item="keyword" value="KeyPgCondCreate|CONDCREATE"}}== - Creates a conditional variable. - =={{fbdoc item="keyword" value="KeyPgCondWait|CONDWAIT"}}== - Pauses execution of a threaded procedure. - =={{fbdoc item="keyword" value="KeyPgCondSignal|CONDSIGNAL"}}== - Resumes execution of a threaded procedure waiting for a conditional. - =={{fbdoc item="keyword" value="KeyPgCondBroadcast|CONDBROADCAST"}}== - Resumes all threaded procedures waiting for a conditional. - =={{fbdoc item="keyword" value="KeyPgCondDestroy|CONDDESTROY"}}== - Destroys a conditional variable that is no longer needed. +**Conditional Variables** + **[[KeyPgCondCreate CondCreate]]** + Crée une variable conditionnelle. + **[[KeyPgCondWait CondWait]]** + Suspend l'exécution d'une procédure de "thread". + **[[KeyPgCondSignal CondSignal]]** + Reprend l'exécution d'une procédure de "thread" en attente d'une valeur conditionnelle. + **[[KeyPgCondBroadcast CondBroadcast]]** + Reprend toutes les procéduresde "thread" en attente d'une valeur conditionnelle. + **[[KeyPgCondDestroy CondDestroy]]** + Détruit une variable conditionnelle qui n'est plus nécessaire. -<<>>{{anchor name="MUTEXES"}}{{fbdoc item="section" value="Mutexes"}} - =={{fbdoc item="keyword" value="KeyPgMutexCreate|MUTEXCREATE"}}== - Creates a mutex. - =={{fbdoc item="keyword" value="KeyPgMutexLock|MUTEXLOCK"}}== - Acquires a lock on a mutex. - =={{fbdoc item="keyword" value="KeyPgMutexUnlock|MUTEXUNLOCK"}}== - Releases a lock on a mutex. - =={{fbdoc item="keyword" value="KeyPgMutexDestroy|MUTEXDESTROY"}}== - Destroys a mutex that is no longer needed. ->>::c:: +;**Mutexes** + **[[KeyPgMutexCreate MutexCreate]]** + Crée un "mutex". + **[[KeyPgMutexLock MutexLock]]** + Acquiert un verrou sur un "mutex". + **[[KeyPgMutexUnlock MutexUnlock]]** + Annule un verrou sur un "mutex". + **[[KeyPgMutexDestroy MutexDestroy]]** + Détruit un "mutex" qui n'est plus nécessaire. +;
{{fbdoc item="target"}} - - These procedures are not supported in DOS. + - Ces procédures ne sont pas supportées par le DOS. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CatPgUserDefTypes.wakka b/fbdocs/manual/cache/CatPgUserDefTypes.wakka index 7ca622ae77..3793c1593b 100644 --- a/fbdocs/manual/cache/CatPgUserDefTypes.wakka +++ b/fbdocs/manual/cache/CatPgUserDefTypes.wakka @@ -1,34 +1,34 @@ {{fbdoc item="title" value="User Defined Types"}}---- -<< -{{fbdoc item="section" value="Declaration"}} - - {{fbdoc item="keyword" value="KeyPgEnum|ENUM...END ENUM"}} - - {{fbdoc item="keyword" value="KeyPgType|TYPE...END TYPE"}} - - {{fbdoc item="keyword" value="KeyPgUnion|UNION...END UNION"}} - - - {{fbdoc item="keyword" value="KeyPgField|FIELD"}} - -{{fbdoc item="section" value="Referencing"}} - - {{fbdoc item="keyword" value="KeyPgTypeTemp|Temporary Types"}} - - {{fbdoc item="keyword" value="KeyPgThis|THIS"}} - - {{fbdoc item="keyword" value="KeyPgTypeAlias|Type Alias"}} - - {{fbdoc item="keyword" value="KeyPgWith|WITH"}} - - -<<>> -{{fbdoc item="section" value="Member Procedures"}} - - {{fbdoc item="keyword" value="KeyPgConstructor|CONSTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgDestructor|DESTRUCTOR"}} - - {{fbdoc item="keyword" value="KeyPgMemberFunction|FUNCTION"}} - - {{fbdoc item="keyword" value="KeyPgOperator|OPERATOR"}} - - {{fbdoc item="keyword" value="KeyPgProperty|PROPERTY"}} - - {{fbdoc item="keyword" value="KeyPgMemberSub|SUB"}} - - {{fbdoc item="keyword" value="KeyPgStaticMember|STATIC (Member)"}} - - {{fbdoc item="keyword" value="KeyPgConstMember|CONST (Member)"}} - -{{fbdoc item="section" value="Member Access Control"}} - - {{fbdoc item="keyword" value="KeyPgVisPublic|PUBLIC: (Access Control)"}} - - {{fbdoc item="keyword" value="KeyPgVisPrivate|PRIVATE: (Access Control)"}} - - {{fbdoc item="keyword" value="KeyPgVisProtected|PROTECTED: (Access Control)"}} +**Déclaration** +- [[KeyPgEnum Enum...End Enum]] + - [[KeyPgType Type...End Type]] + - [[KeyPgUnion Union...End Union]] + - [[KeyPgField Field]] + + **Référencement** + +- [[KeyPgTypeTemp Types temporaires]] + - [[KeyPgThis This]] + - [[KeyPgTypeAlias Type Alias]] + - [[KeyPgWith With]] + ;**Membres de procédures ** + + +- [[KeyPgConstructor Constructor]] +- [[KeyPgDestructor Destructor]] + - [[KeyPgMemberFunction Function]] + - [[KeyPgOperator Operator]] + - [[KeyPgProperty Property]] + - [[KeyPgMemberSub Sub]] + - [[KeyPgStaticMember Static (Membre)]] + - [[KeyPgConstMember Const (Membre)]] + **Contrôle d'accès aux embres** + - [[KeyPgVisPublic Public: (Contrôle d'accès)]] + +- [[KeyPgVisPrivate Private: (Contrôle d'accès)]] + - [[KeyPgVisProtected Protected: (Contrôle d'accès)]] + ;
+
>> diff --git a/fbdocs/manual/cache/CatPgVarArg.wakka b/fbdocs/manual/cache/CatPgVarArg.wakka index 0ed74bd262..dc57d60b57 100644 --- a/fbdocs/manual/cache/CatPgVarArg.wakka +++ b/fbdocs/manual/cache/CatPgVarArg.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Variable Arguments"}}---- -<< - - {{fbdoc item="keyword" value="KeyPgDots|... (Ellipsis)"}} - - {{fbdoc item="keyword" value="KeyPgVaFirst|VA_FIRST"}} + - [[KeyPgDots ... (Ellipsis)]] + - [[KeyPgVaFirst va_first]] + ; - [[KeyPgVaArg va_arg]] -<<>> - - {{fbdoc item="keyword" value="KeyPgVaArg|VA_ARG"}} - - {{fbdoc item="keyword" value="KeyPgVaNext|VA_NEXT"}} +- [[KeyPgVaNext va_next]] + ;
+
>> diff --git a/fbdocs/manual/cache/CatPgVariables.wakka b/fbdocs/manual/cache/CatPgVariables.wakka index 466344b51e..788ddcf718 100644 --- a/fbdocs/manual/cache/CatPgVariables.wakka +++ b/fbdocs/manual/cache/CatPgVariables.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="Variable Declarations"}}---- -Statements to declare and allocate space for variables. +Déclarations permettant de définir et d'allouer de l'espace aux variables. -<< - **{{fbdoc item="keyword" value="KeyPgDim|DIM"}}** - Declares a variable at the current scope. - **{{fbdoc item="keyword" value="KeyPgConst|CONST"}}** - Declares a non-modifiable variable. - **{{fbdoc item="keyword" value="KeyPgScope|SCOPE"}}** - Begins a new scope block. + **[[KeyPgDim Dim]]** + Déclare une variable de portée locale. + **[[KeyPgConst Const]]** + Déclare une variable non-modifiable. + **[[KeyPgScope Scope]]** + Commence nouveau un bloc de portée des variables. + ; **[[KeyPgStatic Static]]** -<<>> - **{{fbdoc item="keyword" value="KeyPgStatic|STATIC"}}** - Declares variables in a procedure that retain their value between calls. - **{{fbdoc item="keyword" value="KeyPgShared|SHARED"}}** - Used with ##[[KeyPgDim Dim]]## allows variables to be visible throughout a module. - **{{fbdoc item="keyword" value="KeyPgVar|VAR"}}** - Declares variables where the data type is implied from an initializer. +Déclare des variables dans une procédure qui conservent leur valeur entre les appels. + **[[KeyPgShared Shared]]** + Utilisé avec ##[[KeyPgDim Dim]]## permet aux variables d'être visibles à travers un module. + **[[KeyPgVar Var]]** + Déclare des variables dont le type de données est implicite à partir d'une initialisation. + ;
+
>> diff --git a/fbdocs/manual/cache/CodeLibrary.wakka b/fbdocs/manual/cache/CodeLibrary.wakka index 52a4d8c32c..82befe2f75 100644 --- a/fbdocs/manual/cache/CodeLibrary.wakka +++ b/fbdocs/manual/cache/CodeLibrary.wakka @@ -1,183 +1,183 @@ -FB Code Lib, V0.01b. ""FreeBASIC"" Code, Games, and Libraries. Written in ""FreeBASIC"", by ""FreeBASIC"" Community Members. - -If you're looking for a code snippet demonstrating compiler features or how to use a certain library, check out your local ##**""FreeBASIC Compiler\examples""**## directory, which contains hundreds of source code snippets and examples. - -<<{{anchor name="EDITOR"}}{{fbdoc item="section" value="Code Editors & IDEs "}} - [[http://www.freebasic.net/forum/viewtopic.php?t=6715 FBEdit, an IDE for FB by KetilO (Win32)]] - [[http://www.planetsquires.com/jellyfishpro_freebasic.htm JellyFish Pro, an IDE for FB by Paul Squires (Win32)]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9035 VISG GUI Builder (WIN) by mrhx]] - [[http://www.freewebs.com/fielden/ EzeeGui GUI builder (WIN) by Jerry Fielden]] - -{{anchor name="GRAPHIC"}}{{fbdoc item="section" value="Graphics Code"}} - ==Demos== - [[http://aapproj.phatcode.net/fbgfx/index.html The FreeBASIC GFX Demo Central by Adigun A.Polack]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6938 Animated Clouds by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8817 Flame Demo by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7936 Island Generation by rdc]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8287 Ascii Fire by rdc]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8758 Plasma Generation by Zamaster]] + {{fbdoc item="title" value="Community Code Library"}}---- + +FB Code Lib, V0.01b. Code FreeBASIC, Jeux et bibliothèques. Rédigé en FreeBASIC, par les membres de la Communauté FreeBASIC. + Si vous êtes à la recherche d'un extrait de code démontrant les caractéristiques du compilateur ou de l'utilisation d'une certaine bibliothèque, consultez votre répertoire local ##**FreeBASIC Compiler\examples**##, qui contient des centaines de fragments de code source et des exemples. + **Editeurs de code & IDEs ** + [[http://www.freebasic.net/forum/viewtopic.php?t=6715">FBEdit, un IDE pour FB par KetilO (Win32)]] + [[http://www.planetsquires.com/jellyfishpro_freebasic.htm">JellyFish Pro, un IDE pour FB par Paul Squires (Win32)]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=9035">VISG GUI Builder (WIN) par mrhx]] + [[http://www.freewebs.com/fielden/">EzeeGui GUI builder (WIN) par Jerry Fielden]] + **Code graphique** + **Démos** + [[http://aapproj.phatcode.net/fbgfx/index The FreeBASIC GFX Demo Central par Adigun A.Polack]] + [[http://www.freebasic.net/forum/viewtopic.php?t=6938">Animated Clouds par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8817">Flame Demo par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7936">Island Generation par rdc]] - ==Graphics Functions and Primitives== - [[http://www.freebasic.net/forum/viewtopic.php?t=7111 AntiAliased Bezier Curves by Acetoline]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7067 Antialiased Circles by Acetoline]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9572 Ellipse Renderer by Pritchard]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7546 Catmull-rom Splines by relsoft]] [[http://www.freebasic.net/forum/viewtopic.php?t=7545 Bezier vs Catmull-rom by relsoft]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9588 Accurate Image Scaler by KristopherWindsor]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6676 Spline Curve by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=13251 Rotozoom by Dr_D]] - - ==Colors and Palettes== - [[http://www.freebasic.net/forum/viewtopic.php?t=9441 24bit to 16bit color width by Eternal_Pain]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8764 HSV Color Space by Antoni]] - - ==Formats== - [[http://www.freebasic.net/forum/viewtopic.php?t=8024 PNG_LOAD by yetifoot]] - [[http://www.freebasic.net/arch/category.php?id=6 JPEG image loader by Antoni]] - - ==3D== - [[http://www.freebasic.net/forum/viewtopic.php?t=8724 Tree Generation by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7931 Quadtree-Based Renderer by relsoft]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7332 Irrlicht 3D + ODE Physics by BMarley]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8400 OpenGL Shader Demo by Dr_D]] - - ==Animation== - [[http://www.freebasic.net/forum/viewtopic.php?t=7340 ASCII Animation Example by Pritchard]] - [[http://lachie.phatcode.net/articles.php Chain-Like Animation Tutorial by Lachie Dazdarian]] - -{{anchor name="SND"}}{{fbdoc item="section" value="Sound Code"}} - [[http://www.freebasic.net/forum/viewtopic.php?t=2294 Mic Input using FMod by mambazo]] - [[http://www.freebasic.net/forum/viewtopic.php?t=11 Using FMod In-Game by shiftlynx]] - [[http://www.freebasic.net/forum/viewtopic.php?p=20477 Using the PC Speaker by several]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9226 Wave synthesizer by Zamaster]] - -{{anchor name="MATH"}}{{fbdoc item="section" value="Math Code"}} - [[http://sourceforge.net/projects/fbmath/ FBMath by jdebord]] - [[http://www.freebasic.net/forum/viewtopic.php?t=4135 Pixel-Perfect Collision Detection by 1000101]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8963 2D vector class by Pritchard]] - [[http://www.freebasic.net/forum/viewtopic.php?t=386 A* Pathfinding by dumbledore]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7525 Fraction Library by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7173 Big Number Wrapper by Yetifoot]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9501 Minicalc textmode calculator by KristopherWindsor]] - [[http://www.freebasic.net/forum/viewtopic.php?p=75713 BCD arithmetics by srvaldez]] - [[http://www.freebasic.net/forum/viewtopic.php?p=49695 10Byte extended float by srvaldez, included in FB examples]] - - ==Physics simulation== - [[http://www.freebasic.net/forum/viewtopic.php?t=3167 Atom smash simulation by coderjeff]] - [[http://www.freebasic.net/forum/viewtopic.php?t=3428 2d rigid body library by coderjeff]] - [[http://www.freebasic.net/forum/viewtopic.php?t=14579 Irrlicht wrapper + Newton Intergrated by SiskinEDGE]] - -{{anchor name="TEXT"}}{{fbdoc item="section" value="Text/Parser Code"}} - [[http://hmcsoft.org/p/libini.php Cross Platform INI library by SirMud]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7437 XML Parser by Pritchard]] - [[http://www.freebasic.net/forum/viewtopic.php?t=5693 Expression Parser by yetifoot]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8680 Turing Machine by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7321 Roman Numeral to Integer Conversion by stylin]] - [[http://www.freebasic.net/forum/viewtopic.php?p=35589 Unicode console calender, by zippy and voodooattack]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8636 FB source to highlighted HTML by Kristopher Windsor]] - [[http://www.execulink.com/~coder/freebasic/docs.html Portable help (not .chm) viewer by coderjeff]] - [[http://www.execulink.com/~coder/freebasic/lisp.html Lisp interpreter by coderjeff]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8287">Ascii Fire par rdc]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8758">Plasma Generation par Zamaster]] + **Fonctions et primitives graphiques** + [[http://www.freebasic.net/forum/viewtopic.php?t=7111">AntiAliased Bezier Curves par Acetoline]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7067">Antialiased Circles par Acetoline]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9572">Ellipse Renderer par Pritchard]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7546">Catmull-rom Splines par relsoft]] [[http://www.freebasic.net/forum/viewtopic.php?t=7545">Bezier vs Catmull-rom par relsoft]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9588">Accurate Image Scaler par KristopherWindsor]] + + [[http://www.freebasic.net/forum/viewtopic.php?t=6676">Spline Curve par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=13251">Rotozoom par Dr_D]] + **Couleurs et palettes** + + [[http://www.freebasic.net/forum/viewtopic.php?t=9441">24bit to 16bit color width par Eternal_Pain]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8764">HSV Color Space par Antoni]] + **Formats** + + [[http://www.freebasic.net/forum/viewtopic.php?t=8024">PNG_LOAD par yetifoot]] + [[http://www.freebasic.net/arch/category.php?id=6">JPEG image loader par Antoni]] + **3D** + [[http://www.freebasic.net/forum/viewtopic.php?t=8724">Tree Generation par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7931">Quadtree-Based Renderer par relsoft]] + + [[http://www.freebasic.net/forum/viewtopic.php?t=7332">Irrlicht 3D + ODE Physics par BMarley]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8400">OpenGL Shader Demo par Dr_D]] + **Animation** + +[[http://www.freebasic.net/forum/viewtopic.php?t=7340">ASCII Animation Example par Pritchard]] + [[http://lachie.phatcode.net/articles.php">Chain-Like Animation Tutorial par Lachie Dazdarian]] + **Son** + [[http://www.freebasic.net/forum/viewtopic.php?t=2294">Mic Input using FMod par mambazo]] + [[http://www.freebasic.net/forum/viewtopic.php?t=11">Using FMod In-Game par shiftlynx]] + +[[http://www.freebasic.net/forum/viewtopic.php?p=20477">Using the PC Speaker par several]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9226">Wave synthesizer par Zamaster]] + **Maths** + [[http://sourceforge.net/projects/fbmath/">FBMath par jdebord]] + [[http://www.freebasic.net/forum/viewtopic.php?t=4135">Pixel-Perfect Collision Detection par 1000101]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8963">2D vector class par Pritchard]] + [[http://www.freebasic.net/forum/viewtopic.php?t=386">A* Pathfinding par dumbledore]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7525">Fraction Library par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7173">Big Number Wrapper par Yetifoot]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9501">Minicalc textmode calculator par KristopherWindsor]] + [[http://www.freebasic.net/forum/viewtopic.php?p=75713">BCD arithmetics par srvaldez]] + + [[http://www.freebasic.net/forum/viewtopic.php?p=49695">10Byte extended float par srvaldez, included in FB examples]] + **Simulation physique** + [[http://www.freebasic.net/forum/viewtopic.php?t=3167">Atom smash simulation par coderjeff]] + [[http://www.freebasic.net/forum/viewtopic.php?t=3428">2d rigid body library par coderjeff]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=14579">Irrlicht wrapper + Newton Intergrated par SiskinEDGE]] + **Text/Parser Code** + [[http://hmcsoft.org/p/libini.php">Cross Platform INI library par SirMud]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7437">XML Parser par Pritchard]] + [[http://www.freebasic.net/forum/viewtopic.php?t=5693">Expression Parser par yetifoot]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8680">Turing Machine par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7321">Roman Numeral to Integer Conversion par stylin]] + [[http://www.freebasic.net/forum/viewtopic.php?p=35589">Unicode console calender, par zippy and voodooattack]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8636">FB source to highlighted HTML par Kristopher Windsor]] + [[http://www.execulink.com/~coder/freebasic/docs Portable help (not .chm) viewer par coderjeff]] - ==Cryptography== - [[http://www.freebasic.net/forum/viewtopic.php?t=7379 MARS encryption by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7667 AES Encryption/Decryption by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7273 DES/LUCIFER Encryption/Decryption by Zamaster]] - [[http://www.freebasic.net/forum/viewtopic.php?t=5288 MD5 Calculator by DOS386]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9496 Tiger Hash by Mindless]] - -<<>>{{anchor name="GAME"}}{{fbdoc item="section" value="FreeBASIC Games"}} - [[http://games.freebasic.net/ FreeBASIC Games Directory by Lachie Dazdarian]] - ==Featured Games:== - [[http://csgp.suret.net/ Cute Short Game Project by redcrab]] - [[http://www.freebasic.net/forum/viewtopic.php?t=3931 Kingdoms by Piptol]] - [[http://www.freebasic.net/forum/viewtopic.php?t=5068 Lynn's Legacy by cha0s and Josiah Tobin]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7796 Nanohost by Several]] - [[http://lithium.zext.net/ Several Games by Lithium]] - [[http://lachie.phatcode.net/starcage.php Star Cage by Lachie Dazdarian]] - [[http://syn9.thingie.net/?table=griffonlegend The Griffon Legend by syn9]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9065 100 Line Tetris by Deleter]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9738 Any PNG or JPEG as a Jigsaw Puzzle by Mysoft]] - -{{anchor name="GUI"}}{{fbdoc item="section" value="GUI Code"}} - [[http://www.execulink.com/~coder/freebasic/jmgui.html In Game GUI by coderJeff]] - [[http://sourceforge.net/projects/zine/ Zine GUI by VonGodric]] - [[http://www.freebasic.net/forum/viewtopic.php?p=76965#76965 WX GUI example by ciw1973]] - [[http://www.imakegames.com/?q=node/23 KwikGUI (WIN/LIN/DOS) by Vincent DeCampo]] - [[http://sites.google.com/site/freebasicgui/Home FB_GUI by BasicScience]] - -{{anchor name="WEB"}}{{fbdoc item="section" value="Networking- Web Code"}} - [[http://www.freebasic.net/forum/viewtopic.php?t=4199 FB Web Server (Win) by parakeet]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7913 FB Server side scripting (uses the server above) by fishhf]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8454 ChiSock portable sockets library by cha0s]] - [[http://www.freebasic.net/forum/viewtopic.php?t=1608 CenoChat Serverless chat program by cenozoite]] - [[http://www.freebasic.net/forum/viewtopic.php?t=4036 LibIRCClient to create custom IRC clients by voodooattack]] - -{{anchor name="IO"}}{{fbdoc item="section" value="I/O Code"}} - [[http://www.freebasic.net/forum/viewtopic.php?t=6574 Text Input by Pritchard & sir_mud]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6847 ConLib Console library with PCopy by cha0s]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7744 Lock Mouse to Grid Positions by Pritchard]] - -{{anchor name="OSSPEC"}}{{fbdoc item="section" value="OS Specific Code"}} - ==Windows== - [[http://www.freebasic.net/forum/viewtopic.php?t=1173 Screen Saver Kit (WIN) by jofers]] - [[http://www.freebasic.net/forum/viewtopic.php?t=5942 ServiceFB (Win) by zerospeed]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9498 FBWinPrint 1.0 by vdecampo]] - [[http://www.freebasic.net/forum/viewtopic.php?p=47539 In memory dialogs by MichaelW]] - [[http://www.freebasic.net/forum/viewtopic.php?t=4767 Printing to UTF8 to Windows by Jonathan Brickman]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9495 Talking program usin Win Voice API, by coder guy]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6569 Jpeg and Gif resources using the API by Zippy]] - [[http://www.freebasic.net/forum/viewtopic.php?p=76442 Using GfxLib in Windows API by MichaelW]] - [[http://www.freebasic.net/forum/viewtopic.php?p=69681 Print a bitmap file by MichaelW]] - [[http://www.freebasic.net/forum/viewtopic.php?p=70771 ShellExecute wrapper by RayBritton]] - [[http://www.execulink.com/~coder/freebasic/fbwiki.html FBWiki to chm format converter by coderjeff]] - [[http://www.freebasic.net/forum/viewtopic.php?p=75625 FB ODBC library by KaraK]] - [[http://www.freebasic.net/forum/viewtopic.php?p=119557 Get a file from an URL by Sisophon]] - [[http://www.freebasic.net/forum/viewtopic.php?t=14224 FB Windows GUI Toolkit by eodor]] - [[http://www.freebasic.net/forum/viewtopic.php?t=13468 Screen to AVI lib by vdecampo]] + [[http://www.execulink.com/~coder/freebasic/lisp Lisp interpreter par coderjeff]] + **Cryptographie** + [[http://www.freebasic.net/forum/viewtopic.php?t=7379">MARS encryption par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7667">AES Encryption/Decryption par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7273">DES/LUCIFER Encryption/Decryption par Zamaster]] + [[http://www.freebasic.net/forum/viewtopic.php?t=5288">MD5 Calculator par DOS386]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=9496">Tiger Hash par Mindless]] + ;**Jeux FreeBASIC** - ==Linux== - [[http://www.freebasic.net/forum/viewtopic.php?t=8040 Printing on Linux by coderJeff]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7611 Using GfxLib on Gtk by caseih]] - - ==DOS== - [[http://www.freebasic.net/forum/viewtopic.php?p=70185 Detect system codepage by DrV]] - [[http://www.freebasic.net/forum/viewtopic.php?p=5993 Calling an Interrupt requiring a pointer by DrV]] - [[http://www.freebasic.net/forum/viewtopic.php?p=2766 Access BTRIEVE files by mjs]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8981 "GetDiskFreeSpaceEx" Check for disk total/free space on FAT32 by DOS386]] - [[http://www.freebasic.net/forum/viewtopic.php?t=4899 DPMI host detection version/capabilities by DrV]] - -{{anchor name="OTHER"}}{{fbdoc item="section" value="Miscellaneous Code"}} - [[http://code.google.com/p/fb-extended-lib/ FreeBASIC Extended Library]] + [[http://games.freebasic.net/">FreeBASIC Games Directory par Lachie Dazdarian]] + **Featured Games:** + [[http://csgp.suret.net/">Cute Short Game Project par redcrab]] + [[http://www.freebasic.net/forum/viewtopic.php?t=3931">Kingdoms par Piptol]] + [[http://www.freebasic.net/forum/viewtopic.php?t=5068">Lynn's Legacy par cha0s and Josiah Tobin]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7796">Nanohost par Several]] + [[http://lithium.zext.net/">Several Games par Lithium]] + [[http://lachie.phatcode.net/starcage.php">Star Cage par Lachie Dazdarian]] + [[http://syn9.thingie.net/?table=griffonlegend">The Griffon Legend par syn9]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9065">100 Line Tetris par Deleter]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=9738">Any PNG or JPEG as a Jigsaw Puzzle par Mysoft]] + **GUI** + [[http://www.execulink.com/~coder/freebasic/jmgui In Game GUI par coderJeff]] + [[http://sourceforge.net/projects/zine/">Zine GUI par VonGodric]] + [[http://www.freebasic.net/forum/viewtopic.php?p=76965#76965">WX GUI example par ciw1973]] + [[http://www.imakegames.com/?q=node/23">KwikGUI (WIN/LIN/DOS) par Vincent DeCampo]] + +[[http://sites.google.com/site/freebasicgui/Home">FB_GUI par BasicScience]] + **Réseaux - Web** + [[http://www.freebasic.net/forum/viewtopic.php?t=4199">FB Web Server (Win) par parakeet]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7913">FB Server side scripting (uses the server above) par fishhf]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8454">ChiSock portable sockets library par cha0s]] + [[http://www.freebasic.net/forum/viewtopic.php?t=1608">CenoChat Serverless chat program par cenozoite]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=4036">LibIRCClient to create custom IRC clients par voodooattack]] + **I/O Code** + [[http://www.freebasic.net/forum/viewtopic.php?t=6574">Text Input par Pritchard & sir_mud]] + [[http://www.freebasic.net/forum/viewtopic.php?t=6847">ConLib Console library with PCopy par cha0s]] - [[http://www.freebasic.net/forum/viewtopic.php?t=7441 FB CAD by owen]] - [[http://fbstd.sourceforge.net/ FBstd C++ Lib Port (W.I.P.) by stylin]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6859 Testly by zerospeed]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8935 Boolean Type by Imortis]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8226 Associative Arrays by jofers]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8823 Safe FBstring Type by stylin]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8778 Aligned Memory Allocation by 1000101]] - [[http://www.freebasic.net/forum/viewtopic.php?t=3545 FreeBASIC Memory Leak Detector by DrV & Others]] - [[http://www.freebasic.net/forum/viewtopic.php?t=6576 Auto-deallocating 'Smart' Pointers by stylin]] - [[http://www.freebasic.net/forum/viewtopic.php?t=9463 UDTs for Properties by Pritchard]] - [[http://www.freebasic.net/forum/viewtopic.php?t=8504 Portable way to add a resource to a program by voodooattack]] - [[http://www.freebasic.net/forum/viewtopic.php?p=66616 CPU Identification by MichaelW]] - [[http://www.freebasic.net/forum/viewtopic.php?t=4221 Cpu Cycle counter for benchmarking of code by MichaelW]] - [[http://www.freebasic.net/forum/viewtopic.php?p=84902&highlight=#84902 Use of the FBGfx built-in LZW routines by Lillo]] - [[http://rapidq.phatcode.net/tutorial/Freebasic_DLL_tutorial.html Using FB dll's in RapidQ programs by JohnK]] - - ==Serial Port== - [[http://www.freebasic.net/forum/viewtopic.php?p=66616 Drive a Parallax servo controller by phishguy]] - [[http://www.freebasic.net/forum/viewtopic.php?p=34643 Modbus device finder by Antoni]] - [[http://www.freebasic.net/forum/viewtopic.php?p=3132 Serial port terminal program by Antoni]] - [[http://www.freebasic.net/forum/viewtopic.php?p=26794 CRC Calculation by Fragmeister]] - - -{{anchor name="SITES"}}{{fbdoc item="section" value="Community Websites/Links"}} - [[http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibTOC External Library Documentation]] - [[http://www.sourceforge.net/ Sourceforge]] - [[http://report.freebasic.info/ The FreeBASIC Report]] - [[http://games.freebasic.net/ FreeBASIC Games Directory]] - -<<::c:: -This is a place to post worthy projects/code snippets for ""FreeBASIC"", in their relative categories. To add a page, link to either it's wiki page, website, or thread on the ""FreeBASIC"" Forums. State the project name and who it's by. Sections may be broken down into their own separate pages some time in the future. Note: Due to FB being in Beta stage of development, earlier coded projects may need to be reconfigured or recompiled to work on later versions of ""FreeBASIC"". - -{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file + [[http://www.freebasic.net/forum/viewtopic.php?t=7744">Lock Mouse to Grid Positions par Pritchard]] + **OS spécifiques** + **Windows** + [[http://www.freebasic.net/forum/viewtopic.php?t=1173">Screen Saver Kit (WIN) par jofers]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=5942">ServiceFB (Win) par zerospeed]] + + [[http://www.freebasic.net/forum/viewtopic.php?t=9498">FBWinPrint 1.0 par vdecampo]] + [[http://www.freebasic.net/forum/viewtopic.php?p=47539">In memory dialogs par MichaelW]] + [[http://www.freebasic.net/forum/viewtopic.php?t=4767">Printing to UTF8 to Windows par Jonathan Brickman]] + [[http://www.freebasic.net/forum/viewtopic.php?t=9495">Talking program usin Win Voice API, par coder guy]] + [[http://www.freebasic.net/forum/viewtopic.php?t=6569">Jpeg and Gif resources using the API par Zippy]] + [[http://www.freebasic.net/forum/viewtopic.php?p=76442">Using GfxLib in Windows API par MichaelW]] + [[http://www.freebasic.net/forum/viewtopic.php?p=69681">Print a bitmap file par MichaelW]] + [[http://www.freebasic.net/forum/viewtopic.php?p=70771">ShellExecute wrapper par RayBritton]] + [[http://www.execulink.com/~coder/freebasic/fbwiki FBWiki to chm format converter par coderjeff]] + [[http://www.freebasic.net/forum/viewtopic.php?p=75625">FB ODBC library par KaraK]] + [[http://www.freebasic.net/forum/viewtopic.php?p=119557">Get a file from an URL par Sisophon]] + [[http://www.freebasic.net/forum/viewtopic.php?t=14224">FB Windows GUI Toolkit par eodor]] + [[http://www.freebasic.net/forum/viewtopic.php?t=13468">Screen to AVI lib par vdecampo]] + **Linux** + [[http://www.freebasic.net/forum/viewtopic.php?t=8040">Printing on Linux par coderJeff]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7611">Using GfxLib on Gtk par caseih]] + + **DOS** + [[http://www.freebasic.net/forum/viewtopic.php?p=70185">Detect system codepage par DrV]] + [[http://www.freebasic.net/forum/viewtopic.php?p=5993">Calling an Interrupt requiring a pointer par DrV]] + + [[http://www.freebasic.net/forum/viewtopic.php?p=2766">Access BTRIEVE files par mjs]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8981">"GetDiskFreeSpaceEx" Check for disk total/free space on FAT32 par DOS386]] + [[http://www.freebasic.net/forum/viewtopic.php?t=4899">DPMI host detection version/capabilities par DrV]] + **Divers Codes** + [[http://code.google.com/p/fb-extended-lib/">FreeBASIC Extended Library]] + [[http://www.freebasic.net/forum/viewtopic.php?t=7441">FB CAD par owen]] + +[[http://fbstd.sourceforge.net/">FBstd C++ Lib Port (W.I.P.) par stylin]] + [[http://www.freebasic.net/forum/viewtopic.php?t=6859">Testly par zerospeed]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8935">Boolean Type par Imortis]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8226">Associative Arrays par jofers]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8823">Safe FBstring Type par stylin]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8778">Aligned Memory Allocation par 1000101]] + [[http://www.freebasic.net/forum/viewtopic.php?t=3545">FreeBASIC Memory Leak Detector par DrV & Others]] + [[http://www.freebasic.net/forum/viewtopic.php?t=6576">Auto-deallocating 'Smart' Pointers par stylin]] + +[[http://www.freebasic.net/forum/viewtopic.php?t=9463">UDTs for Properties par Pritchard]] + [[http://www.freebasic.net/forum/viewtopic.php?t=8504">Portable way to add a resource to a program par voodooattack]] + [[http://www.freebasic.net/forum/viewtopic.php?p=66616">CPU Identification par MichaelW]] + [[http://www.freebasic.net/forum/viewtopic.php?t=4221">Cpu Cycle counter for benchmarking of code par MichaelW]] + [[http://www.freebasic.net/forum/viewtopic.php?p=84902&highlight=#84902">Use of the FBGfx built-in LZW routines par Lillo]] + [[http://rapidq.phatcode.net/tutorial/Freebasic_DLL_tutorial Using FB dll's in RapidQ programs par JohnK]] + **Port série** + [[http://www.freebasic.net/forum/viewtopic.php?p=66616">Drive a Parallax servo controller par phishguy]] + [[http://www.freebasic.net/forum/viewtopic.php?p=34643">Modbus device finder par Antoni]] + [[http://www.freebasic.net/forum/viewtopic.php?p=3132">Serial port terminal program par Antoni]] + +[[http://www.freebasic.net/forum/viewtopic.php?p=26794">CRC Calculation par Fragmeister]] + **Sites communautaires / Liens** + [[http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibTOC">External Library Documentation]] + [[http://www.sourceforge.net/">Sourceforge]] + [[http://report.freebasic.info/">The FreeBASIC Report]] + +[[http://games.freebasic.net/">FreeBASIC Games Directory]] +
+ +Ceci est un endroit pour poster des projets/du code dignes d'intérêt pour FreeBASIC, par rapport leurs catégories. Pour ajouter une page, établissez un lien vers sa wiki page, son site web ou le fil sur les forums FreeBasic. Déclarez le nom du projet et qui l'a fait. Les articles peuvent être décomposés en pages séparées dans le temps. Note: Comme FB est en phase Béta de développement, des projets codés antérieurement auront peut-être besoin d'être reconfigurés ou recompilée pour fonctionner sur les versions ultérieures de FreeBASIC. \ No newline at end of file diff --git a/fbdocs/manual/cache/CommunityTutorials.wakka b/fbdocs/manual/cache/CommunityTutorials.wakka index e5139554ff..6eedf1a2f7 100644 --- a/fbdocs/manual/cache/CommunityTutorials.wakka +++ b/fbdocs/manual/cache/CommunityTutorials.wakka @@ -1,61 +1,61 @@ -{{image url="/images/fbwct.png"}} ---- -Tutorials submitted by the FreeBASIC community: -<< {{fbdoc item="section" value="Getting Started"}} - -[[TutGettingStartedQB Getting Started with FreeBASIC]] //by [[JasonFirth SJ Zero]]// - -[[TutUsingLibs Using libraries in FreeBASIC]] //by [[JasonFirth SJ Zero]]// - -[[TutUsingMouse Using the Mouse in FreeBASIC]] //by MystikShadows// - -[[TutBasicInput Get Information into your program]] //by [[TekRat TekRat]]// - -[[TutDynamicArrays Using Dynamic Arrays in FreeBASIC]] //by [[SephKnows]]// - -[[TutBeginnersGuideToTypesAsObjects Beginners Guide to Types as Objects (Part 1)]] //by ""YetiFoot""// - -[[TutBeginnersGuideToTypesAsObjects2 Beginners Guide to Types as Objects (Part 2)]] //by ""YetiFoot""// - -[[TutIntroScope Introduction to Variable Scope]] //by [[WikiRick rdc]]// - -[[TutIntroArrays Introduction to Arrays]] //by [[WikiRick rdc]]// - -[[TutIntroTypeDef Introduction to the Type Def]] //by [[WikiRick rdc]]// - -[[TutNewToProg New To Programming?]] //by ""The FB Community""// - -[[TutPortingFromQB Compiling a BIG QB program]] //by [[AntoniGual Antoni]]// - -{{fbdoc item="section" value="Game Programming"}} - - [[TutHowToProgGame1 How to Program a Game: Lesson 1]] //by Lachie Dazdarian// - - [[TutMngAHiScrTbl Managing A High Score Table]] //by Lachie Dazdarian// - -{{fbdoc item="section" value="Flow Control Statements"}} - -[[TutIfStatement The IF Statement]] //by [[WikiRick rdc]]// - -[[TutSelectStatement The Select Case Statement]] //by [[WikiRick rdc]]// - -{{fbdoc item="section" value="Pre Processor"}} - -[[TutConditionalCompilation Conditional Compilation And You]] //by AetherFox// - -{{fbdoc item="section" value="Memory Management"}} - -[[TutPointers Introduction to Pointers]] //by [[WikiRick rdc]]// - -[[TutPointersData Pointers, Data Types and Memory]] //by [[WikiRick rdc]]// - -[[TutPterDataType The Pointer Data Type]] //by [[WikiRick rdc]]// - -[[TutLinkedLists Using Linked Lists]] //by Parker// - -[[TutDynaArrayType Dynamic Arrays in Types]] //by [[WikiRick rdc]]// - -<< >> {{fbdoc item="section" value="Intermediate Techniques"}} - -[[TutFunctionOverloading Introduction to Function Overloading in FreeBASIC]] //by [[LaananFisher :stylin:]]// - -{{fbdoc item="section" value="Mathematics"}} - -[[TutMathAngles Different ways angles are measured]] //by RandyKeeling// - -[[TutMathIntroTrig A Brief Introduction To Trigonometry]] //by RandyKeeling// - -{{fbdoc item="section" value="Windows API"}} - -[[TutMessageIntro Introduction to Message-Based Programming]] //by [[WikiRick rdc]]// - -{{fbdoc item="section" value="Libraries"}} - -[[TutInterfacingWithC Interfacing with C]] //by ""UtenNavn""// - -[[TutIndexSDLNet SDL_NET]] //by Paragon// - -[[TutUsingLibrariesWithGCC Using FreeBASIC Built Libraries with GCC]] //by Jeff Marshall// - -{{fbdoc item="section" value="Object Oriented Programming"}} - -[[TutIntroExtType Introduction to the Extended Type]] //by [[WikiRick rdc]]// - -[[TutSimPolymorphism Simulating Polymorphism]] //by [[WikiRick rdc]]// - -[[TutOOPInNonOOPLanguages OOP in non-OOP languages]] //by KevinWhitefoot// - -[[TutConstQualifiers Const Qualifiers and You]] //by notthecheatr// - -{{fbdoc item="section" value="FBgfx"}} - -[[TutFBgfxImgAndFontBuf Creating and Understanding Your FBgfx Img and Font Buffer]] //by ""The FB Community""// - ->> +{{fbdoc item="title" value="Community Tutorials"}}---- +Tutoriels soumis par la communauté FreeBASIC: +
**Mise en route** +
  • [[TutGettingStartedQB Mise en route avec FreeBASIC]] //by [[JasonFirth SJ Zero]]// +
  • [[TutUsingLibs Utilisation des bibliothèques dans FreeBASIC]] //by [[JasonFirth SJ Zero]]// +
  • [[TutUsingMouse Utilisation de la souris dans FreeBASIC]] //by MystikShadows// +
  • [[TutBasicInput Obtenez de l'information dans votre programme]] //by [[TekRat TekRat]]// +
  • [[TutDynamicArrays Utilisation de tableaux dynamiques dans FreeBASIC]] //by SephKnows// +
  • [[TutBeginnersGuideToTypesAsObjects Guide pour débutants de types en tant qu'objets (Partie 1)]] //by YetiFoot// +
  • [[TutBeginnersGuideToTypesAsObjects2 Guide pour débutants de types en tant qu'objets (Partie 2)]] //by YetiFoot// +
  • [[TutIntroScope Introduction à la portée des variables]] //by [[WikiRick rdc]]// +
  • [[TutIntroArrays Introduction aux tableaux]] //by [[WikiRick rdc]]// +
  • [[TutIntroTypeDef Introduction à Type Def]] //by [[WikiRick rdc]]// +
  • [[TutNewToProg Nouveau à la programmation?]] //by The FB Community// +
  • [[TutPortingFromQB Compiler un GROS programme QB]] //by [[AntoniGual Antoni]]// + +**Programmation de jeu** + - [[TutHowToProgGame1 Comment programmer un jeu: Leçon 1]] //by Lachie Dazdarian// + - [[TutMngAHiScrTbl Gérer un tableau des meilleurs scores]] //by Lachie Dazdarian// + +**Les instructions de contrôle de flux** +
  • [[TutIfStatement La Déclaration IF]] //by [[WikiRick rdc]]// +
  • [[TutSelectStatement La Déclaration Select Case]] //by [[WikiRick rdc]]// + +**Préprocesseur** +
  • [[TutConditionalCompilation La compilation conditionnelle et vous]] //by AetherFox// + +**Memory Management** +
  • [[TutPointers Introduction aux pointeurs]] //by [[WikiRick rdc]]// +
  • [[TutPointersData Pointeurs, types de données et mémoire]] //by [[WikiRick rdc]]// +
  • [[TutPterDataType Le pointeur de type de données]] //by [[WikiRick rdc]]// +
  • [[TutLinkedLists Utilisation de listes chaînées]] //by Parker// +
  • [[TutDynaArrayType Les tableaux dynamiques dans les types]] //by [[WikiRick rdc]]// + +; **Techniques intermédiaires ** +
  • [[TutFunctionOverloading Introduction à la surcharge de fonction dans FreeBASIC]] //by [[LaananFisher :stylin:]]// + +**Mathématiques** +
  • [[TutMathAngles Différents façons de mesurer les angles]] //by RandyKeeling// +
  • [[TutMathIntroTrig Une brève introduction à la trigonométrie]] //by RandyKeeling// + +**API Windows** +
  • [[TutMessageIntro Introduction à la programmation axée sur les messages]] //by [[WikiRick rdc]]// + +**Bibliothèques** +
  • [[TutInterfacingWithC L'interfaçage avec C]] //by UtenNavn// +
  • [[TutIndexSDLNet SDL_NET]] //by Paragon// +
  • [[TutUsingLibrariesWithGCC Utilisation de bibliothèques FreeBASIC construites avec GCC]] //by Jeff Marshall// + +**Programmation Orientée Objet (POO)** +
  • [[TutIntroExtType Introduction à Extended Type]] //by [[WikiRick rdc]]// +
  • [[TutSimPolymorphism Simuler le Polymorphisme]] //by [[WikiRick rdc]]// +
  • [[TutOOPInNonOOPLanguages POO dans des langages non-POO]] //by KevinWhitefoot// +
  • [[TutConstQualifiers Qualificateur Const et Vous]] //by notthecheatr// + +**FBgfx** +
  • [[TutFBgfxImgAndFontBuf Création et compréhension de votre FBgfx Img et Font Buffer]] //by The FB Community// + +;
  • ::c:: {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerAbout.wakka b/fbdocs/manual/cache/CompilerAbout.wakka index 7478ac160f..67d0c0025b 100644 --- a/fbdocs/manual/cache/CompilerAbout.wakka +++ b/fbdocs/manual/cache/CompilerAbout.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="About"}}---- -About the ""FreeBASIC"" project. +A propos du projet FreeBASIC. - The ""FreeBASIC"" project is a set of cross-platform development tools initially created by Andre Victor, consisting of a compiler, GNU-based assembler, linker and archiver, and supporting runtime libraries, including a software-based graphics library. The compiler, //##fbc##//, currently supports building for i386-based architectures on the DOS, Linux, Windows and Xbox platforms. The project also contains thin bindings (header files) to some popular 3rd party libraries such as the [[en.wikipedia.org/wiki/C_standard_library C runtime library]], [[http://www.talula.demon.co.uk/allegro/ Allegro]], [[libsdl.org SDL]], [[opengl.org OpenGL]], [[gtk.org GTK+]], [[msdn2.microsoft.com/en-us/library/aa383750.aspx the Windows API]] and many others, as well as example programs for many of these libraries. + Le projet FreeBasic est un ensemble d'outils de développement multi-plate-forme initialement créé par André Victor, composé d'un compilateur, d'un assembleur basé GNU, d'un lieur et d'un archiveur, et de soutenir les bibliothèques d'exécution, y compris un logiciel basé sur la bibliothèque graphique. Le compilateur, //##fbc##//, actuellement supporte la construction pour des architectures basées i386 sous des plates-formes DOS, Linux, Windows and Xbox. Le projet contient également des liaisons (fichiers d'en-tête) pour certaines bibliothèques connues, comme [[en.wikipedia.org/wiki/C_standard_library la bibliothèque d'exécution C]], [[http://www.talula.demon.co.uk/allegro/">Allegro]], [[libsdl.org SDL]], [[opengl.org OpenGL]], [[gtk.org GTK]], [[msdn2.microsoft.com/en-us/library/aa383750.aspx l'API Windows]] et beaucoup d'autres, comme le montrent les nombreux exemples de programmes pour ces bibliothèques. - ""FreeBASIC"" is a high-level programming language supporting procedural, object-orientated and meta-programming paradigms, with a syntax compatible to [[en.wikipedia.org/wiki/QuickBASIC Microsoft QuickBASIC]]. In fact, the ""FreeBASIC"" project originally began as an attempt to create a code-compatible, free alternative to [[en.wikipedia.org/wiki/QuickBASIC Microsoft QuickBASIC]], but it has since grown into a powerful development tool. ""FreeBASIC"" can be seen to extend the capabilities of [[en.wikipedia.org/wiki/QuickBASIC Microsoft QuickBASIC]] in a number of ways, supporting more data types, language constructs, programming styles, and modern platforms and APIs. + FreeBASIC est un langage de programmation de haut niveau supportant les paradigmes procédural, orienté objet et la méta-programmation, avec une syntaxe compatible avec [[en.wikipedia.org/wiki/QuickBASIC Microsoft QuickBasic]]. En fait, le projet FreeBASIC a débuté comme une tentative de créer un code compatible, alternative libre à [[en.wikipedia.org/wiki/QuickBASIC Microsoft QuickBasic]], mais il est devenu depuis un outil de développement puissant. FreeBASIC peut être vu comme une extension des capacités de [[en.wikipedia.org/wiki/Quickasic Microsoft QuickBasic]] dans un certain nombre de cas, supportant plus de types de données, de constructions de langage, de styles de programmation et des plates-formes modernes et API. {{fbdoc item="back" value="FBWiki|Main Page"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerCmdLine.wakka b/fbdocs/manual/cache/CompilerCmdLine.wakka index 3a1cbd7be7..2f2cb0ff17 100644 --- a/fbdocs/manual/cache/CompilerCmdLine.wakka +++ b/fbdocs/manual/cache/CompilerCmdLine.wakka @@ -1,163 +1,163 @@ {{fbdoc item="title" value="fbc command-line"}}---- -Using the **fbc** command-line. +Utilisation de la ligne de commande **fbc**. - The official ""FreeBASIC"" distribution comes with **fbc**, ""FreeBASIC""'s flagship compiler. **fbc** is a command line compiler, and can be launched from the console - from DOS, the Windows command prompt or a Linux shell. Running **fbc** from the console without any arguments displays a list of available options, or command-line switches, that can be used to adjust the behavior of the compiler. + La distribution officielle FreeBASIC est livrée avec **fbc**, le compilateur phare de FreeBASIC. **fbc** est un compilateur en ligne de commande et peut être lancé depuis la console - depuis la console de DOS, l'invite de commande Windows ou un shell Linux. Exécuter **fbc** à partir de la console sans argument affiche une liste des options disponibles ou les commutateurs de ligne de commande qui peuvent être utilisés pour ajuster le comportement du compilateur. - At it's simplest, **fbc** takes a source file as a command-line argument and produces an executable file. It does this by compiling the source file (.bas) into an assembly (.asm) file, then compiling this into an object file (.o) using GAS and finally linking using LD this object file to other object files and libraries it needs to run, producing the final executable file. The assembly and compiled object files are deleted at this point by default. For example, the following command, + Au plus simple, **fbc** prend un fichier source comme argument de ligne de commande et produit un fichier exécutable. Il le fait en compilant le fichier source (.bas) en un fichier assembleur (.asm), puis en compilant les résultats dans un fichier objet (.o) en utilisant GAS et enfin en liant, à l'aide LD, ce fichier objet aux autres fichiers objet et bibliothèques dont il a besoin pour fonctionner, produisant le fichier exécutable final. Les fichiers objets assemblés et compilés sont supprimés à ce stade par défaut. Par exemple, la commande suivante, ##fbc foo.bas## - produces the executable ##foo.exe## in DOS and Windows, and ##./foo## in Linux. **fbc** can accept multiple source files at once, compile and link them all into one executable. For example, the following command, + produit l'exécutable ##foo.exe## sous DOS et Windows, et ##./foo## sous Linux. **fbc** peut accepter en une fois plusieurs fichiers source, les compiler et les lier en un seul exécutable. Par exemple, la commande suivante, ##fbc foo.bas bar.bas baz.bas## - produces the executable ##foo.exe## in DOS and Windows, and ##./foo## in Linux. Since ##foo.bas## was listed first, it will be the main entry point into the executable, and also provide its name. To specify a different entry point or executable name, use the "-m" and "-x" switches, respectively. To have, for example, ##baz.bas## provide the main entry point into an executable called ##foobar.exe##, you would use + produit l'exécutable ##foo.exe## sous DOS et Windows, et ##./foo## sous Linux. Comme ##foo.bas## a été répertorié en premier, il sera le point d'entrée principal de l'exécutable et fournira également son nom. Pour spécifier un point d'entrée différent ou un autre nom de l'exécutable, utilisez respectivement les options "-m" et "-x". Pour avoir, par exemple, ##baz.bas## comme principal point d'entrée dans un exécutable appelé ##foobar.exe##, vous utiliserez: ##fbc -x foobar.exe -m baz foo.bas bar.bas baz.bas## - The "-x" switch names the executable verbatim, so in Linux, the executable produced from the above command would be called ##./foobar.exe##. + L'option "-x" nomme textuellement l'exécutable, donc sous Linux, l'exécutable produit à partir de la commande ci-dessus serait appelé ##./foobar.exe##. {{fbdoc item="syntax"}} ##fbc [ //options// ] [ //input_list// ]## - Where //input_list// is a list of filenames. Accepted files are: - - {{table columns="2" cellpadding="1" cells="File extension;Description;.bas;FreeBASIC source file;.a;Library;.o;Object file;.rc;Resource script (Windows only);.res;Compiled resource (Windows only);.xpm;X icon pixmap (Linux only)"}} - -<<{{fbdoc item="section" value="Source code"}} - =={{fbdoc item="keyword" value="CompilerOptb|-b < name >"}}== - Add a source file to compilation - =={{fbdoc item="keyword" value="CompilerOpti|-i < name >"}}== - Add a path to search for include files - =={{fbdoc item="keyword" value="CompilerOptinclude|-include < name >"}}== - Include a header file on each source compiled - =={{fbdoc item="keyword" value="CompilerOptd|-d < name=val >"}}== - Add a preprocessor's define - =={{fbdoc item="keyword" value="CompilerOptlang|-lang < name >"}}== - Select language mode: ##fb##, ##fblite##, ##qb##, ##deprecated## - =={{fbdoc item="keyword" value="CompilerOptforcelang|-forcelang < name >"}}== - Select language mode: ##fb##, ##fblite##, ##qb##, ##deprecated## (overides statements in code) - -{{fbdoc item="section" value="Code generation"}} - =={{fbdoc item="keyword" value="CompilerOpttarget|-target < platform >"}}== - Set the target platform for cross compilation - =={{fbdoc item="keyword" value="CompilerOptgen|-gen < backend >"}}== - Sets the compiler backend (default is 'gas'). - =={{fbdoc item="keyword" value="CompilerOptarch|-arch < type >"}}== - Set target architecture (default: ##486##) - =={{fbdoc item="keyword" value="CompilerOptoptimization|-O < level >"}}== - Set the optimization level (-gen gcc). - =={{fbdoc item="keyword" value="CompilerOptvec|-vec < level >"}}== - Set level of vector optimizations enabled by the compiler (default: ##0##) - =={{fbdoc item="keyword" value="CompilerOptfpu|-fpu < type >"}}== - Set the floating point arithmetics unit (default: ##FPU##) - =={{fbdoc item="keyword" value="compileroptfpmode|-fpmode < type >"}}== - Select between fast and accurate floating-point operations (default: ##PRECISE##) - =={{fbdoc item="keyword" value="CompilerOptz|-z < value >"}}== - Sets miscellaneous or experimental options. - -{{fbdoc item="section" value="Compilation"}} - =={{fbdoc item="keyword" value="CompilerOptm|-m < name >"}}== - Main file without extension, the entry point (default is the first .bas file on the command line) - =={{fbdoc item="keyword" value="CompilerOptg|-g"}}== - Add debug info - =={{fbdoc item="keyword" value="CompilerOptprofile|-profile"}}== - Enable function profiling - =={{fbdoc item="keyword" value="CompilerOpte|-e"}}== - Add error checking - =={{fbdoc item="keyword" value="CompilerOptex|-ex"}}== - Add error checking with RESUME support - =={{fbdoc item="keyword" value="CompilerOptexx|-exx"}}== - Same as ##-ex## plus array bounds and null-pointer checking - =={{fbdoc item="keyword" value="CompilerOptWa|-Wa < opt >"}}== - Pass options to GAS (separated by commas) - =={{fbdoc item="keyword" value="CompilerOptWc|-Wc < opt >"}}== - Pass options to GCC (separated by commas) - =={{fbdoc item="keyword" value="CompilerOpto|-o < name >"}}== - Set object file path/name (must be passed after the .bas file) - -<<>>{{fbdoc item="section" value="Linking"}} - =={{fbdoc item="keyword" value="CompilerOpta|-a < name >"}}== - Add an object file to linker's list - =={{fbdoc item="keyword" value="CompilerOptl|-l < name >"}}== - Add a library file to linker's list - =={{fbdoc item="keyword" value="CompilerOptp|-p < name >"}}== - Add a path to search for libraries - =={{fbdoc item="keyword" value="CompilerOptmt|-mt"}}== - Link with thread-safe runtime library - =={{fbdoc item="keyword" value="CompilerOptnodeflibs|-nodeflibs"}}== - Do not include the default libraries - =={{fbdoc item="keyword" value="CompilerOptmap|-map < name >"}}== - Save the linking map to file name - =={{fbdoc item="keyword" value="CompilerOptWl|-Wl < opt >"}}== - Pass options to LD (separated by commas) - =={{fbdoc item="keyword" value="CompilerOptexport|-export"}}== - Export symbols for dynamic linkage - =={{fbdoc item="keyword" value="CompilerOptlib|-lib"}}== - Create a static library - =={{fbdoc item="keyword" value="CompilerOptdylib|-dylib"}}== - Create a DLL, including the import library - =={{fbdoc item="keyword" value="CompilerOptdll|-dll"}}== - Create a DLL, including the import library. (Same as ##-dylib##) - =={{fbdoc item="keyword" value="CompilerOptx|-x < name >"}}== - Set executable/library path/name - -{{fbdoc item="section" value="Behaviour"}} - =={{fbdoc item="keyword" value="CompilerOptprefix|-prefix < path >"}}== - Set the compiler prefix path - =={{fbdoc item="keyword" value="CompilerOptversion|-version"}}== - Show compiler version on the command line, do not compile or link. - =={{fbdoc item="keyword" value="CompilerOptv|-v"}}== - Be verbose - =={{fbdoc item="keyword" value="CompilerOptpp|-pp"}}== - Emit the preprocessed input file only, do not compile - =={{fbdoc item="keyword" value="CompilerOptr|-r"}}== - Compile into asm file(s) only, do not assemble or link - =={{fbdoc item="keyword" value="CompilerOptc|-c"}}== - Compile and assemble source file only, do not link - =={{fbdoc item="keyword" value="CompilerOptrupp|-R"}}== - Do not delete the asm file(s) - =={{fbdoc item="keyword" value="CompilerOptcupp|-C"}}== - Do not delete the object file(s) - =={{fbdoc item="keyword" value="CompilerOptw|-w < value >"}}== - Set min warning level: ##all##, ##pedantic##, ##next## or a value - =={{fbdoc item="keyword" value="CompilerOptmaxerr|-maxerr < val >"}}== - Only stop parsing if errors occurred - =={{fbdoc item="keyword" value="CompilerOptnoerrline|-noerrline"}}== - Do not show source line where error occurred - -{{fbdoc item="section" value="Target specific"}} - =={{fbdoc item="keyword" value="CompilerOpts|-s < name >"}}== - Set subsystem (##gui##, ##console##) - =={{fbdoc item="keyword" value="CompilerOptt|-t < value >"}}== - Set stack size in kbytes (default: 1M) - -{{fbdoc item="section" value="Meta"}} - =={{fbdoc item="keyword" value="CompilerOptoptfile|@< file >"}}== - Read (additional) command-line options from a file - ->>::c:: + Where //input_list// est une liste de noms de fichiers. Les fichiers acceptés sont: + + {{table columns="" cellpadding="2" cells="Extension fichier;Description;.bas;Fichier source FreeBASIC;.a;Bibliothèque;.o;Fichier objet;.rc;Script de ressources (Windows seulement);.res;Fichier ressources compilé (Windows seulement);.xpm;Icône pixmap X (Linux uniquement);
    + +**Code source** + **[[CompilerOptb -b < name >]]** + Ajouter un fichier source à la compilation + **[[CompilerOpti -i < name >]]** + Ajouter un chemin de recherche pour les fichiers à inclure + **[[CompilerOptinclude -include < name >]]** + Inclure un fichier en-tête dans chaque source compilé + **[[CompilerOptd -d < name=val >]]** + Ajouter une définition préprocesseur + **[[CompilerOptlang -lang < name >]]** + Sélection du mode de langage: ##fb##, ##fblite##, ##qb##, ##deprecated## + **[[CompilerOptforcelang -forcelang < name >]]** + Sélection du mode de langage: ##fb##, ##fblite##, ##qb##, ##deprecated## (modifie les déclarations dans le code) + +**Génération du code** + **[[CompilerOpttarget -target < platform >]]** + Règle la plate-forme cible pour la compilation croisée + **[[CompilerOptgen -gen < backend >]]** + Règle le compilateur "backend" (par défaut 'gas'). + **[[CompilerOptarch -arch < type >]]** + Règle l'architecture cible (par défaut: ##486##) + **[[CompilerOptoptimization -O < level >]]** + Règle le niveau d'optimisation (-gen gcc). + **[[CompilerOptvec -vec < level >]]** + Règle le niveau du vecteur d'optimisations activé par le compilateur (par défaut: ##0##) + **[[CompilerOptfpu -fpu < type >]]** + Règle l'unité d'arithmétique en virgule flottante (par défaut: ##FPU##) + **[[compileroptfpmode -fpmode < type >]]** + Choix entre rapide et précise pour les opérations en virgule flottante (par défaut: ##PRECISE##) + **[[CompilerOptz -z < value >]]** + Définition des options diverses ou expérimentales. + +**Compilation** + **[[CompilerOptm -m < name >]]** + Fichier principal sans extension, le point d'entrée (par défaut c'est le premier fichier .bas de la ligne de commande) + **[[CompilerOptg -g]]** + Ajouter les informations de débogage + **[[CompilerOptprofile -profile]]** + Valide la fonction de profilage + **[[CompilerOpte -e]]** + Valide la recherche des erreurs + **[[CompilerOptex -ex]]** + Valide la recherche des erreurs avec utilisation de RESUME + **[[CompilerOptexx -exx]]** + Comme ##-ex## avec en plus la recherche des bornes de tableaux et des pointeurs nuls + **[[CompilerOptWa -Wa < opt >]]** + Passe des options à GAS (séparées par des virgules) + **[[CompilerOptWc -Wc < opt >]]** + Passe des options à GCC (séparées par des virgules) + **[[CompilerOpto -o < name >]]** + Détermine chemin/nom pour le fichier objet (doit être passé après le fichier .bas) + +;**Liens** + **[[CompilerOpta -a < name >]]** + Ajouter un fichier objet à la liste éditeur de liens + **[[CompilerOptl -l < name >]]** + Ajouter un fichier bibliothèque à la liste éditeur de liens + **[[CompilerOptp -p < name >]]** + Ajouter un chemin de recherche pour les bibliothèques + **[[CompilerOptmt -mt]]** + Lien avec la bibliothèque d'exécution "thread-safe" + **[[CompilerOptnodeflibs -nodeflibs]]** + Ne pas inclure les bibliothèques par défaut + **[[CompilerOptmap -map < name >]]** + Enregistrer la carte de liaison sous le nom de fichier + **[[CompilerOptWl -Wl < opt >]]** + Passe des options à LD (séparées par des virgules) + **[[CompilerOptexport -export]]** + Exporte les symboles pour une liaison dynamique + **[[CompilerOptlib -lib]]** + Crée une librairie statique + **[[CompilerOptdylib -dylib]]** + Crée une DLL, y compris la bibliothèque d'importation + **[[CompilerOptdll -dll]]** + Crée une DLL, y compris la bibliothèque d'importation. (Comme ##-dylib##) + **[[CompilerOptx -x < name >]]** + Détermine exécutable/bibliothèque chemin/nom + +**Comportement** + **[[CompilerOptprefix -prefix < path >]]** + Régler le chemin du préfixe du compilateur + **[[CompilerOptversion -version]]** + Affiche la version du compilateur sur la ligne de commande, ne compile ni ne lie. + **[[CompilerOptv -v]]** + Mode bavard + **[[CompilerOptpp -pp]]** + Emet le le fichier d'entrée préprocédé seulement, ne compile pas + **[[CompilerOptr -r]]** + Compile en fichier(s) asm seulement, n'assemble pas ne lie pas + **[[CompilerOptc -c]]** + Compile et assemble le fichier source seulement, ne lie pas + **[[CompilerOptrupp -R]]** + Ne détruit pas le(s) fichier(s) asm + **[[CompilerOptcupp -C]]** + Ne détruit pas le(s) fichier(s) objet + **[[CompilerOptw -w < value >]]** + Détermine le niveau d'alarme minimum: ##all##, ##pedantic##, ##next## ou une valeur + **[[CompilerOptmaxerr -maxerr < val >]]** + Arrête l'analyse seulement si surviennent erreurs + **[[CompilerOptnoerrline -noerrline]]** + N'affiche pas la ligne oû une erreur a lieu + +**Spécifique à la cible ** + **[[CompilerOpts -s < name >]]** + Choix du subsystème (##gui##, ##console##) + **[[CompilerOptt -t < value >]]** + Régler la taille de la pile en kilo-octets (par défaut: 1M) + +**Méta** + **[[CompilerOptoptfile @< file >]]** + Lire (supplémentaire) des options de la ligne de commande depuis un fichier + +;
    {{fbdoc item="ex"}} ##fbc myfile.bas## - //(With DOS version of FBC, compile and link a DOS executable ##MYFILE.EXE##.)// + //(Avec la version DOS de FBC, compile et lie un exécutable DOS ##MYFILE.EXE##.)// ##fbc -s gui myfile.bas## - //(With Windows version of FBC, compile and link a Windows executable ##myfile.exe##. Running the program will not show the console window ("MS-DOS Prompt"))// + //(Avec la version Windows de FBC, compile et lie un exécutable Windows ##myfile.exe##. L'exécution du programme n'affiche pas la fenêtre de la console ("Invite MS-DOS"))// ##fbc -lib module1.bas module2.bas module3.bas -x libmylib.a## - //(Compile and link a static library ##libmylib.a## from the three source files)// + //(Compile et lie une bibliothèque statique ##libmylib.a## à partir des trois fichiers source)// ##fbc -m main_module -c main_module.bas## - //(Compile an object file ##main_module.o## and mark it as an entry point)// + //(Compile un fichier objet ##main_module.o## et le marquer comme point d'entrée)// ##fbc -c sub_module.bas## - //(Compile an object file ##sub_module.o##)// + //(Compile un fichier objet ##sub_module.o##)// ##fbc -x application.exe main_module.o sub_module.o## - //(Link an executable ##application.exe##)// + //(Lier un exécutable ##application.exe##)// {{fbdoc item="see"}} - - [[CatPgCompOpt Compiler Options]] - - [[CompilerInstalling Installing FreeBASIC]] - - [[CompilerRunning Invoking the FreeBASIC compiler]] + - [[CatPgCompOpt Options du compilateur]] + - [[CompilerInstalling Installation de FreeBASIC]] + - [[CompilerRunning Appeler le compilateur FreeBASIC]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerCredits.wakka b/fbdocs/manual/cache/CompilerCredits.wakka index 8fd6bc900f..2dffc2eee1 100644 --- a/fbdocs/manual/cache/CompilerCredits.wakka +++ b/fbdocs/manual/cache/CompilerCredits.wakka @@ -1,6 +1,6 @@ {{fbdoc item="title" value="Credits (in alphabetic order)"}}---- -==__Members__== +**Members** **Andre Victor** (av1ctor[at]yahoo.com.br) - Project Admin: - Project creator. @@ -39,14 +39,14 @@ **Ruben Rodriguez** (rubentbstk[at]gmail.com) - Project Member: - Many compiler improvements and bug fixes. - Corrected the errors in English in the readme.txt and migrating.txt files, plus the messages in compiler/error.bas. - - Added the ""__PATH__"" intrinsic define, and made OFFSETOF() work inside inline asm blocks. + - Added the __PATH__ intrinsic define, and made OFFSETOF() work inside inline asm blocks. **Simon Nash** - Project Member: - - Implemented the ""AndAlso""/""OrElse"" short-circuit operators. + - Implemented the AndAlso/OrElse short-circuit operators. - Many compiler improvements and bug fixes. -==__Contributors__== +**Contributors** **Abdullah Ali** (voodooattack[at]hotmail.com): - Fixed and finished the Windows NT DDK headers at the inc/win/ddk dir, translated by the SWIG FB wrapper. @@ -86,7 +86,7 @@ - Wrote the glade_gui demo at the examples/Gtk directory, besides the wx-c GUI examples (not included). **Garvan O'Keeffe** (sisophon2001[at]yahoo.com): - - Translated most of the ""NeHe""'s OpenGL lessons at the examples/GL/""NeHe"" dir. + - Translated most of the NeHe's OpenGL lessons at the examples/GL/NeHe dir. - Wrote the PDFlib demonstration, at examples/pdflib. **Hans L. Nemeschkal** (Hans.Leo.Nemeschkal[at]univie.ac.at): @@ -108,7 +108,7 @@ **Marzec** (marzce[at]sbox.tugraz.at): - Wrote the SDL_bassgl, SDL_opengl, and SDL_key tests in the SDL directory. - Translated the first SDL headers (replaced by new ones since version 0.11b). - - Wrote the first file routines for the runtime library. + - Wrote the first file routines for the run-time library. **Nek** (dave[at]nodtveidt.net): - Translated the Windows API headers, integrating parts of fsw's work (later replaced by the SWIG FB wrapper version). diff --git a/fbdocs/manual/cache/CompilerDialects.wakka b/fbdocs/manual/cache/CompilerDialects.wakka index 32154f562c..7cd9088e30 100644 --- a/fbdocs/manual/cache/CompilerDialects.wakka +++ b/fbdocs/manual/cache/CompilerDialects.wakka @@ -1,139 +1,139 @@ {{fbdoc item="title" value="FreeBASIC Dialects"}}---- - ""FreeBASIC"" version 0.17b introduces a //[[CompilerOptlang -lang]]// command-line option, used to change the language compatibility mode for different dialects of the basic language. + La version 0.17b de FreeBASIC introduit une nouvelle option ligne de commande //[[CompilerOptlang -lang]]//, utilisée pour changer le mode de compatibilité de langage pour les différents dialectes du langage de base. - Starting with version 0.18.3b the //[[CompilerOptlang -lang qb]]// dialect has been further restricted to only allow what would have been allowed in [[QuickBASIC QuickBASIC]]. + À partir de la version 0.18.3b le dialecte //[[CompilerOptlang -lang qb]]// a été encore plus restreinte pour ne permettre que ce qui aurait été admis dans [[QuickBASIC QuickBASIC]]. - In version 0.18.4b the //[[CompilerOptlang -lang fblite]]// dialect was added, intended to replace ##-lang deprecated## in future. + Dans la version 0.18.4b le dialecte //[[CompilerOptlang -lang fblite]]// a été ajouté, pour remplacer à l'avenir ##//-lang deprecated//##. - In version 0.20.0b the ##[[KeyPgPplang #lang]]## directive and ##[[KeyPgMetaLang $lang]]## metacommand were added to specify a dialect from source. + Dans la versio 0.20.0b la directive ##[[KeyPgPplang #lang]]## et la métacommande ##[[KeyPgMetaLang $Lang]]## ont été ajoutées pour préciser un dialecte pour la source. - {{table columns="2" cellpadding="1" cells="-lang option;description;fb;FreeBASIC compatibility (default);qb;qbasic compatibility;fblite;FreeBASIC language compatibility, with a more QBASIC-compatible coding style;deprecated;compatibility with FB 0.16"}} + {{table columns="" cellpadding="2" cells="-lang option;description;fb;Compatibilité FreeBasic (par défaut);qb;Compatibilité qbasic;fblite;Compatibilité langage FreeBASIC, avec un style de codage le plus possible compatible QBASIC;deprecated;Compatibilité avec FB 0.16;
    - The //[[CompilerOptlang -lang]]// option was needed to allow ""FreeBASIC"" to support object-orientation and other features in the future, without crippling the ""QuickBASIC"" support or breaking compatibility with old ""FreeBASIC"" sources, and without making ""FreeBASIC"" difficult to maintain with many different versions of very similar packages. The ""QuickBASIC"" support can continue to be improved, if needed, without breaking the sources written specifically for ""FreeBASIC"". + L'option //[[CompilerOptlang -lang]]// a été nécessaire pour permettre à FreeBASIC pour supporter l'orientation objet et d'autres fonctionnalités dans le futur, sans paralyser le support QuickBASIC ou la compatibilité de rupture avec les sources de l'ancien FreeBASIC, et sans rendre FreeBASIC difficile à maintenir avec de nombreuses versions différentes de paquets très similaires. Le support de QuickBASIC peut continuer à être amélioré, si nécessaire, sans rompre les sources écrites spécifiquement pour FreeBASIC. - To compile old GW-BASIC or ""QuickBASIC/QBasic"" sources without too many changes, use the //[[CompilerOptlang -lang qb]]// option on the command-line when running ##fbc##. This option will evolve into a better compatibility with ""QuickBASIC/QBasic"" code. + Pour compiler les sources de l'ancien GW-BASIC ou QuickBASIC/QBasic sans trop de changements, utilisez l'option //[[CompilerOptlang -lang qb]]// sur la ligne de commande lors de l'exécution de ##fbc##. Cette option va évoluer vers une meilleure compatibilité avec le code QuickBASIC/QBasic. - To compile ""FreeBASIC"" sources from 0.16b, use the //[[CompilerOptlang -lang deprecated]]// option. This option is maintained for compatibility and will not evolve in the future, and it's likely to disappear when ""FreeBASIC"" reaches a non-beta release. + Pour compiler les sources FreeBASIC from 0.16b, utilisez l'option //[[CompilerOptlang -lang deprecated]]//. Cette option est maintenue pour assurer la compatibilité et ne va pas évoluer à l'avenir et elle est susceptible de disparaître lorsque FreeBASIC atteindra une réalisation non-beta. - For programmers who want to access some of ""FreeBASIC""'s newer features, but want to retain a more QBASIC-friendly programming style, use the //[[CompilerOptlang -lang fblite]]// option. This dialect will not undergo significant changes in the future, but will continue to be maintained and supported. - This option is also the most compatible with sources that were made using older versions of ""FreeBASIC"". + Pour les programmeurs qui veulent accéder à certaines des nouvelles fonctionnalités de FreeBASIC, mais qui veulent conserver un style de programmation plus proche de QBASIC, utilisez l'option //[[CompilerOptlang -lang fblite]]//. Ce dialecte ne subira pas de changements importants dans l'avenir, mais continuera à être maintenu et supporté. + Cette option est également compatible avec la plupart des sources qui ont été écrites en utilisant les anciennes versions de FreeBASIC. - It is recommended to use //[[CompilerOptlang -lang fb]]// for new projects, as new features (object classes, inheritance..) will be added exclusively to this dialect. + Il est recommandé d'utiliser //[[CompilerOptlang -lang fb]]// pour de nouveaux projets, comme de nouvelles fonctions (classes d'objets, héritage ..) qui seront ajoutées exclusivement à ce dialecte. -{{fbdoc item="section" value="-lang fb (the default mode)"}} +**-lang fb (le mode par défaut)** - **Not supported:** + **Non pris en charge:** - ""1"") implicit variable declaration - - All variables must be explicitly declared, using ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]##, ##[[KeyPgVar Var]]##, ##[[KeyPgConst Const]]##, ##[[KeyPgExtern Extern]]## or ##[[KeyPgCommon Common]]##. + 1) déclaration de variable implicite + - Toutes les variables doivent être explicitement déclarées, en utilisant ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim ReDim]]##, ##[[KeyPgVar Var]]##, ##[[KeyPgConst Const]]##, ##[[KeyPgExtern Extern]]## ou ##[[KeyPgCommon Common]]##. - ""2"") type suffixes (##!, #, $, %, &##) - - They are only allowed for numeric literals, but it's recommended to use ##[[KeyPgCast Cast]]## or the ##f## (##single##), ##d## (##double##), ##ll## (##longint##), ##ul## (##uinteger##), ##ull## (##ulongint##) numeric literal suffixes to resolve overloading. + 2) suffixes de type (##!, #, $, %, &##) + - Ils ne sont autorisés que pour les littéraux numériques, mais il est recommandé d'utiliser ##[[KeyPgCast Cast]]## ou les suffixes numériques littéraux ##f## (##single##), ##d## (##double##), ##ll## (##longint##), ##ul## (##uinteger##), ##ull## (##ulongint##) pour résoudre la surcharge. - ""3"") ##[[KeyPgDefbyte Defbyte]]##, ##[[KeyPgDefubyte Defubyte]]##, ##[[KeyPgDefshort Defshort]]##, ##[[KeyPgDefushort Defushort]]##, ##[[KeyPgDefint Defint]]##, ##[[KeyPgDefuint Defuint]]##, ##[[KeyPgDeflng Deflng]]##, ##[[KeyPgDeflongint Deflongint]]##, ##[[KeyPgDefulongint Defulongint]]##, ##[[KeyPgDefsng Defsng]]##, ##[[KeyPgDefdbl Defdbl]]##, ##[[KeyPgDefstr Defstr]]## - - An explicit type ("##As //T//##") is needed when declaring variables using ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]##, ##[[KeyPgExtern Extern]]## or ##[[KeyPgCommon Common]]##. Variables declared using ##[[KeyPgVar Var]]## or ##[[KeyPgConst Const]]## have their types inferred from an initialization value (an explicit type is optional using ##[[KeyPgConst Const]]##). + 3) ##[[KeyPgDefbyte DefByte]]##, ##[[KeyPgDefubyte DefUByte]]##, ##[[KeyPgDefshort DefShort]]##, ##[[KeyPgDefushort DefUShort]]##, ##[[KeyPgDefint DefInt]]##, ##[[KeyPgDefuint DefUInt]]##, ##[[KeyPgDeflng DefLng]]##, ##[[KeyPgDeflongint Deflongint]]##, ##[[KeyPgDefulongint Defulongint]]##, ##[[KeyPgDefsng DefSng]]##, ##[[KeyPgDefdbl DefDbl]]##, ##[[KeyPgDefstr DefStr]]## + - Un type explicite ("##As //T//##") est nécessaire lors de la déclaration de variables en utilisant ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim ReDim]]##, ##[[KeyPgExtern Extern]]## ou ##[[KeyPgCommon Common]]##. Les variables déclarées avec ##[[KeyPgVar Var]]## ou ##[[KeyPgConst Const]]## voient leur type déduit à partir d'une valeur d'initialisation (un type explicite est facultatif en utilisant ##[[KeyPgConst Const]]##). - ""4"") all parameters passed by reference by default - - By default, all intrinsic scalar types - numeric and pointer types - are passed by value (##[[KeyPgByval Byval]]##). Any other type - ##[[KeyPgString String]]## or user-defined type - is passed by reference (##[[KeyPgByref Byref]]##). - - Use the ##-w pedantic## command-line option to have parameters without explicit ##[[KeyPgByval Byval]]## or ##[[KeyPgByref Byref]]## reported. + 4) tous les paramètres passés par référence par défaut + - Par défaut, tous les types intrinsèques scalaires - les types numériques et pointeurs - sont passés par valeur (##[[KeyPgByval ByVal]]##). Tout autre type - ##[[KeyPgString String]]## ou un type défini par l'utilisateur - est passé par référence (##[[KeyPgByref ByRef]]##). + - Utilisez l'option de ligne de commande ##-w pedantic## pour avoir les paramètres sans signalement explicite de ##[[KeyPgByval ByVal]]## ou ##[[KeyPgByref ByRef]]##. - ""5"") ##OPTION##s of any kind (no context-sensitivity) - - Instead of ##[[KeyPgOptionnokeyword Option Nokeyword]]##, use ###undef##. - - Instead of ##[[KeyPgOptionescape Option Escape]]##, use: ##!"some esc seq \n\r"## (notice the '##!##' char) and pass ##-w pedantic## to check for possible escape sequences. - - ##[[KeyPgOptionexplicit Option Explicit]]## isn't needed, see item 1. - - Instead of ##[[KeyPgOptiondynamic Option Dynamic]]##, declare variable-length arrays using ##[[KeyPgRedim Redim]]##. ##[[KeyPgDim Dim]]## can also be used to declare variable-length arrays using variable or no subscripts. - - Instead of ##[[KeyPgOptionbase Option Base]]##, use explicit lower-bound subscripts in arrays declarations. - - Instead of ##[[KeyPgOptionprivate Option Private]]##, use ##[[KeyPgPrivate Private]]## to declare procedures with internal linkage. - - Instead of ##[[KeyPgOptiongosub Option Gosub]]## and ##[[KeyPgOptionnogosub Option Nogosub]]##, use procedures with ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]##. + 5) ##OPTION##s de toute nature (pas de sensibilité au contexte) + - Au lieu de l'option ##[[KeyPgOptionnokeyword Option NoKeyword]]##, utilisez ###undef##. + - Au lieu de l'option ##[[KeyPgOptionescape Option Escape]]##, utilisez: ##!"certaines esc seq \n\r"## (notez le caractère '##!##') et passez ##-w pedantic## pour rechercher les séquences d'échappement possibles. + - ##[[KeyPgOptionexplicit Option Explicit]]## n'est pas nécessaire, voir le point 1. + - Au lieu de l'option ##[[KeyPgOptiondynamic Option Dynamic]]##, déclarez des tableaux de longueur variable à l'aide de ##[[KeyPgRedim ReDim]]##. ##[[KeyPgDim Dim]]## peut également être utilisé pour déclarer les tableaux de longueur variable utilisant une variable ou aucun indice. + - Au lieu de l'option ##[[KeyPgOptionbase Option Base]]##, utilisez des indices de la limite inférieure explicites dans les déclarations de tableaux. + - Au lieu de l'option ##[[KeyPgOptionprivate Option Private]]##, utilisez ##[[KeyPgPrivate Private]]## pour déclarer des procédures avec des liens internes. + - Au lieu des options ##[[KeyPgOptiongosub Option Gosub]]## et ##[[KeyPgOptionnogosub Option Nogosub]]##, utilisez des procédures avec ##[[KeyPgSub Sub]]## ou ##[[KeyPgFunction Function]]##. - ""6"") periods in symbol names - - Use namespaces instead. + 6) points dans les noms de symbole + - Utilisez les espaces de noms à la place. - ""7"") ##[[KeyPgGosub Gosub]]## or ##[[KeyPgReturn Return (from Gosub)]]## - - Nested procedures may be allowed in future. + 7) ##[[KeyPgGosub GoSub]]## ou ##[[KeyPgReturn Return (depuis Gosub)]]## + - Les procédures imbriquées pourront être autorisées dans le futur. - ""8"") ##[[KeyPgOngosub On Gosub]]## or ##[[KeyPgOngoto On Goto]]## + 8) ##[[KeyPgOngosub On Gosub]]## or ##[[KeyPgOngoto On Goto]]## - Use ##SELECT expr AS CONST## for the latter. - ""9"") ##[[KeyPgOnerror On Error]]## or ##[[KeyPgResume Resume]]## - - Most runtime and graphics library procedures now return an error code, like: ##IF OPEN( "text" FOR INPUT AS #1 ) <> 0 THEN error##... + 9) ##[[KeyPgOnerror On Error]]## ou ##[[KeyPgResume Resume]]## + - La plupart des procédures d'exécution et de la bibliothèque graphique maintenant retournent un code d'erreur: ##IF OPEN( "text" FOR INPUT AS #1 ) <> 0 THEN error##... - ""10"") ##'$DYNAMIC##, ##'$STATIC##, ##'$INCLUDE## meta-commands embedded in comments - - See item 5 about ##[[KeyPgOptiondynamic Option Dynamic]]##. - - Use ###include "filename"## instead of ##'$include##. + 10) ##'$DYNAMIC##, ##'$STATIC##, ##'$INCLUDE## méta-commandes intégrées dans les commentaires + - Voir le point 5 sur ##[[KeyPgOptiondynamic Option Dynamic]]##. + - Utilisez ###include "filename"## au lieu de ##'$include##. - ""11"") ##[[KeyPgCall Call]]## or ##[[KeyPgLet Let]]## - - Just remove them. + 11) ##[[KeyPgCall Call]]## ou ##[[KeyPgLet Let]]## + - Retirez-les. - ""12"") numeric labels - - No comment. + 12) les étiquettes numériques + - Pas de commentaire. - ""13"") global symbols with the same name as keywords - - Declare them inside a namespace. + 13) symboles globaux avec le même nom que des mots-clés + - Les déclarer à l'intérieur d'un espace de noms. -{{fbdoc item="section" value="-lang deprecated"}} +**-lang deprecated** - **Supported:** //Anything allowed in version 0.16b, but:// + **Pris en charge:** //Tout ce qui est permis dans la version 0.16b, mais:// - ""1"") ##GOSUB##/##RETURN## and ##ON ... GOSUB## (even at module-level) - - so the ##GOSUB## implementation could be thread-unsafe in the ##-lang qb## mode, allowing fast execution (##-lang qb## doesn't support multi-threading, while ##-lang deprecated## does). + 1) ##GOSUB##/##RETURN## et ##ON ... GOSUB## (même au niveau du module) + - donc la mise en œuvre de ##GOSUB## pourrait être thread-dangereuse dans le mode ##-lang qb##, permettant une rapidité d'exécution (##-lang qb## ne supporte pas le "multi-threading", alors que ##-lang deprecated## le supporte). - **Not supported:** + **Non pris en charge:** - ""1"") Classes - - Periods allowed in symbol names make it too difficult and/or ambiguous. + 1) Classes + - Les points dans les noms de symbole rendent ceci trop difficile et / ou ambigu. - ""2"") Operator overloading - - Periods allowed in symbol names make it too difficult and/or ambiguous. + 2) Surcharge des opérateurs + - Les points dans les noms de symbole rendent ceci trop difficile et / ou ambigu. - ""3"") Constructors, destructors and methods in ##TYPE##s. - - Periods allowed in symbol names make it too difficult and/or ambiguous. + 3) Les constructeurs, les destructeurs et les méthodes dans ##TYPE##s. + - Les points dans les noms de symbole rendent ceci trop difficile et / ou ambigu. -{{fbdoc item="section" value="-lang fblite"}} +**-lang fblite** - **Supported:** //Anything allowed in the //[[CompilerOptlang -lang deprecated]]// dialect, plus..// + **Pris en charge:** //Tout ce qui est permis dans le dialecte //[[CompilerOptlang -lang deprecated]]//, plus..// - ""1"") ##GOSUB##/##RETURN## - - Use ##[[KeyPgOptiongosub Option Gosub]]## to enable. This will disable ##RETURN## from exiting a procedure, due to ambiguity. + 1) ##GOSUB##/##RETURN## + - Utilisez ##[[KeyPgOptiongosub Option Gosub]]## pour valider. Cela va désactiver ##RETURN## de la sortie d'une procédure, en raison de l'ambiguïté. - **Not supported:** + **Non pris en charge:** - ""1"") ##[[KeyPgScope Scope]]## blocks - - All variables are given procedure scope. Explicit ##[[KeyPgScope Scope]]## blocks may be added later. + 1) Blocs ##[[KeyPgScope Scope]]## + - Toutes les variables ont la portée niveau procédure. Les blocs de ##[[KeyPgScope Portée]]## explicite seront peut être ajoutés plus tard. -{{fbdoc item="section" value="-lang qb"}} +**-lang qb** - **Supported:** //Everything not supported/allowed in the //[[CompilerOptlang -lang fb]]// dialect, plus..// + **Pris en charge:** //Tout n'est pas pris en charge/autorisé dans le dialecte //[[CompilerOptlang -lang fb]]//, plus..// - ""1"") ##[[KeyPgCall Call]]## can be used with forward-referenced functions. + 1) ##[[KeyPgCall Call]]## peut être utilisé avec des fonctions avant référencement.. - ""2"") ##[[KeyPgShared Shared]]## can be used inside functions. (W.I.P.) + 2) ##[[KeyPgShared Shared]]## peut être utilisé dans les fonctions. (en cours) - ""3"") All variables, implicitly or explicitly declared, are always allocated in the procedure scope, like in ""QuickBASIC"". + 3) Toutes les variables, implicitement ou explicitement déclarées, sont toujours allouées dans la portée procédure, comme dans QuickBASIC. - ""4"") The ##[[KeyPgData Data]]## statement won't look up symbols, every token is assumed to be a literal string even without quotes, like in ""QuickBASIC"". + 4) La déclaration ##[[KeyPgData Data]]## ne regardera pas les symboles, chaque symbole est supposé être une chaîne littérale, sans les guillemets, comme dans QuickBASIC. - **Not supported:** + **Non pris en charge:** - ""1"") Multi-threading - - None of the ##[[CatPgThreading threading]]## procedures may be used. + 1) Multi-threading + - Aucune des procédures de ##[[CatPgThreading threading]]## ne peut être utilisée. - ""2"") Classes and Namespaces + 2) Les classes et les espaces de noms - ""3"") Procedure and operator overloading + 3) La surcharge de procédure et d'opérateur - ""4"") Constructors, destructors and other member procedures in ##[[KeyPgType Type]]## definitions. + 4) Les constructeurs, les destructeurs et autres membres de procédures dans les définitions de ##[[KeyPgType Type]]## definitions. - ""5"") ##[[KeyPgScope Scope]]## blocks + 5) Blocs ##[[KeyPgScope Scope]]## - ""6"") ##[[KeyPgExternBlock Extern]]## blocks + 6) Blocs ##[[KeyPgExternBlock Extern]]## - ""7"") Variable initialization - - All variables are moved to the procedure scope (like in ""QuickBASIC""), making initializing local variables too difficult to support. + 7) Initialisation de variable + - Toutes les variables sont déplacées vers la la portée de la procédure (comme dans QuickBASIC), ce qui rend l'initialisation de variables locales trop difficile à supporter. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerErrMsg.wakka b/fbdocs/manual/cache/CompilerErrMsg.wakka index da64e99e64..327010fae6 100644 --- a/fbdocs/manual/cache/CompilerErrMsg.wakka +++ b/fbdocs/manual/cache/CompilerErrMsg.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Compiler Error Messages"}}---- -During the program compilation three types of errors can arise: +Au cours de la compilation du programme trois types d'erreurs peuvent se présenter: -==Compiler Warnings:== - The warnings don't stop the compilation, just alert the user some non-recommended and error-prone operation is attempted in the code. - Sometimes one of these operations is coded deliberately to achieve a result, in this case the warnings can be disabled by setting the //[[CompilerOptw -w 1]]// option at the command line. +**Avertissements du compilateur:** + Les avertissements n'arrêtent pas la compilation, ils signalent seulement à l'utilisateur qu'une opération non recommandée et sujette à erreur est tentée dans le code. + Parfois, une de ces opérations est codée délibérément pour obtenir un résultat, dans ce cas, les mises en garde peuvent être désactivées en définissant l'option //[[CompilerOptw -w 1]]// sur la ligne de commande. - //1 Passing scalar as pointer// - //2 Passing pointer to scalar// @@ -41,10 +41,10 @@ During the program compilation three types of errors can arise: - //34 'BYVAL AS STRING' actually behaves like 'BYREF AS ZSTRING' (this is hoped to change in future releases)// - //35 No newline at end of file// -==Compiler Error messages:== - The error messages stop the compilation after 10 errors (see the -maxerr command-line option to change that default value) or a fatal error occurred, and require a correction by the user before the compilation can be continued. The compiler signals the lines where the errors have been found, so the correction can be done quickly. In a few cases the place pointed at by the error messages is not where the errors can be found, it's the place where the compiler has given up in waiting for something that should be somewhere. +**Messages d'erreur du compilateur:** + Les messages d'erreur arrêtent la compilation après 10 erreurs (voir l'option de ligne de commande -maxerr pour modifier cette valeur par défaut) ou une erreur fatale se produit et exige une correction par l'utilisateur avant que la compilation puisse être poursuivie. Le compilateur signale les lignes où les erreurs ont été trouvées, de sorte que la correction peut se faire rapidement. Dans quelques cas, l'endroit pointé par les messages d'erreur n'est pas là où les erreurs se trouvent, c'est l'endroit où le compilateur a renoncé dans l'attente de quelque chose qui doit être quelque part. - - //1 Argument count mismatch// + - //1 Inadéquation du nombre d'arguments// - //2 Expected End-of-File// - //3 Expected End-of-Line// - //4 Duplicated definition// @@ -280,9 +280,9 @@ During the program compilation three types of errors can arise: - //234 Unsupported statement in -gen gcc mode// - //235 Too many labels// -==Third party programs errors== - These errors occur after the source has been compiled into assembler, they come from the auxiliary programs FB requires to compile a source into an executable: the linker, the assembler and (for Windows programs) the resource compiler. +**Erreurs des programmes "troisième partie"** + Ces erreurs se produisent après que la source a été compilé avec l'assembleur, ils proviennent des programmes auxiliaires nécessaires à FB pour compiler une source en un fichier exécutable: l'éditeur de liens, l'assembleur et (pour les programmes Windows) le compilateur de ressources. - If an IDE or a make utility are been used, additional errors can arise. These errors are outside the scope of this help. + Si un IDE ou un utilitaire "make" ont été utilisés, d'autres erreurs peuvent survenir. Ces erreurs sont en dehors du champ d'application de cette aide. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerFAQ.wakka b/fbdocs/manual/cache/CompilerFAQ.wakka index a5f6a711cf..6de5e9df39 100644 --- a/fbdocs/manual/cache/CompilerFAQ.wakka +++ b/fbdocs/manual/cache/CompilerFAQ.wakka @@ -1,257 +1,257 @@ {{fbdoc item="title" value="Frequently Asked Questions"}}---- -{{anchor name="item0"}} - -**""FreeBASIC"" questions:** - - ==- {{anchor name="item1|What is FreeBASIC?"}}== - ==- {{anchor name="item2|Who is responsible for FreeBASIC?"}}== - ==- {{anchor name="item3|Why should I use FreeBASIC rather than QBasic?"}}== - ==- {{anchor name="item4|Why should I use FreeBASIC rather than some other newer BASIC ?"}}== - ==- {{anchor name="item5|How fast is FreeBASIC?"}}== - ==- {{anchor name="item6|How compatible is FreeBASIC with QuickBASIC?"}}== - ==- {{anchor name="item7|How compatible is FreeBASIC with Windows? DOS? Linux?"}}== - ==- {{anchor name="item8|Does FreeBASIC support Object Oriented Programming?"}}== - ==- {{anchor name="item9|What are the future plans with FB / ToDo list ?"}}== - ==- {{anchor name="item10|Can I program GUI applications in FB ?"}}== - ==- {{anchor name="item11|Is FB suitable for complex / big applications?"}}== - ==- {{anchor name="item12|Can I use a non-latin charset in my FreeBASIC applications?"}}== - ==- {{anchor name="item13|Can I use Serial/COM and Hardware/CPU ports in FB?"}}== - -**Getting Started with ""FreeBASIC"" questions** + + +**Questions sur FreeBASIC:** + + **- [[#item1">Qu'est-ce que FreeBASIC?]]** + **- [[#item2">Qui est responsable de FreeBASIC?]]** + **- [[#item3">Pourquoi devrais-je utiliser FreeBasic plutôt que QBasic?]]** + **- [[#item4">Pourquoi devrais-je utiliser FreeBasic plutôt que certains autres nouveaux BASIC?]]** + **- [[#item5">FreeBASIC est-il rapide?]]** + **- [[#item6">FreeBASIC est-il compatible avec QuickBasic?]]** + **- [[#item7">FreeBASIC est-il compatible avec Windows? DOS? Linux?]]** + **- [[#item8">La programmation orientée objet est elle supportée par FreeBASIC?]]** + **- [[#item9">Quels sont les plans futurs avec FB / ToDo list?]]** + **- [[#item10">Puis-je programmer des applications GUI avec FB]]** + **- [[#item11">FB est-il approprié pour des applications grosses/complexes?]]** + **- [[#item12">Puis-je utiliser un encodage (jeu de caractères) non-latin dans mes applications FreeBASIC?]]** + **- [[#item13">Puis-je utiliser les ports Serial/COM et Hardware/CPU dans FB?]]** + +**Questions de débutants sur FreeBASIC** - ==- {{anchor name="item20|Where can I find more information about FreeBASIC?"}}== - ==- {{anchor name="item21|Why doesn't the QB GUI open when I start FreeBASIC?"}}== - ==- {{anchor name="item22|Can I have an offline version of the documentation?"}}== - ==- {{anchor name="item23|What's the idea behind the FB dialects?"}}== - ==- {{anchor name="item24|Why does my program crash when I define an array larger than xx ?"}}== + **- [[#item20">Où puis-je trouver plus d'informations sur FreeBASIC?]]** + **- [[#item21">Pourquoi le GUI de QB ne s'ouvre-t-il pas quand je lance FreeBASIC?]]** + **- [[#item22">Puis-je avoir une version hors ligne de la documentation?]]** + **- [[#item23">Quelle est l'idée derrière les dialectes FB?]]** + **- [[#item24">Pourquoi mon programme se plante-t-il quand je définis un tableau plus grand que xx?]]** -**Advanced ""FreeBASIC""** +**FreeBasic avancé** - ==- {{anchor name="item31|How do I link to C libraries?"}}== - ==- {{anchor name="item32|Can I use a debugger?"}}== - ==- {{anchor name="item33|What's the goal of the AR.EXE, AS.EXE and LD.EXE files included with FB ?"}}== - ==- {{anchor name="item34|Is there a limit on how big my source files can be?"}}== - ==- {{anchor name="item35|Can I write an OS in FreeBASIC ?"}}== - ==- {{anchor name="item36|I'm developing an OS, can FreeBASIC be ported to my OS ?"}}== - ==- {{anchor name="item37|Does FreeBASIC support returning reference from Functions, like in C++?"}}== + **- [[#item31">Comment puis-je lier à des bibliothèques C?]]** + **- [[#item32">Puis-je utiliser un débogueur?]]** + **- [[#item33">Quel est le but des fichiers AR.EXE, AS.EXE et LD.EXE fournis avec FB?]]** + **- [[#item34">Y a-t-il une limitation l'ampleur de mes fichiers source?]]** + **- [[#item35">Puis-je écrire un OS avec FreeBasic?]]** + **- [[#item36">Je développe un système d'exploitation, FreeBASIC peut-il être porté sur mon OS?]]** + **- [[#item37">FreeBasic permet-il le retour de références à partir de fonctions, comme en C++?]]** -{{anchor name="item999|See also"}} +[[#item999">See also]] -{{fbdoc item="back" value="DocToc|Table of Contents"}} +
    **Questions sur FreeBASIC** ----- +**Qu'est-ce que FreeBASIC?** -@@**""FreeBASIC"" questions**@@ +FreeBASIC est un compilateur BASIC 32-bit libre et gratuit, pour Windows (32-bit), DOS 32 bits en mode protégé (exécutables COFF, comme DJGPP), et Linux (x86). Il a commencé comme une tentative de créer un code compatible, une alternative libre et gratuite à Microsoft QuickBASIC, mais cela s'est rapidement transformé en un puissant outil de développement, incluant déjà le support de bibliothèques, comme Allegro, SDL, OpenGL et beaucoup d'autres dans son installation par défaut. -{{anchor name="item1"}}==What is ""FreeBASIC""?== - ""FreeBASIC"" is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, ""OpenGL"", and many others with its default installation. +En plus d'avoir une syntaxe compatible la plupart du temps avec QuickBASIC, FreeBasic introduit plusieurs nouvelles fonctionnalités à ce langage vieillissant, y compris des pointeurs vers les variables et fonctions et les types de données non signées. + Le compilateur FreeBasic est "auto-hébergement" - écrit en FreeBasic, les bibliothèques sont cependant écrites en C. - Aside from having a syntax mostly compatible with ""QuickBASIC"", ""FreeBASIC"" introduces several new features to the aged language, including pointers to variables and functions, and unsigned data types. + [[#item0">Retour en haut de la page]] - ""FreeBASIC"" compiler is self-hosting - written in ""FreeBASIC"", the libraries however are written in C. + **Qui est responsable de FreeBASIC?** -{{anchor name="item0|Back to top"}} +Les premières versions de FreeBASIC ont été développées exclusivement par V1ctor. Les versions ultérieures ont vu les contributions de nombreuses personnes, dont Lillo, qui a développé le portage Linux et la bibliothèque graphique, et DRV, qui a développé le portage DOS.br \> -{{anchor name="item2"}}==Who is responsible for ""FreeBASIC""?== - The first versions of ""FreeBASIC"" were developed exclusively by V1ctor. Later versions gained contributions from many people, including Lillo, who developed the Linux port and the graphics library, and ""DrV"", who developed the DOS port. +Voir la page [[CompilerCredits FreeBASIC Credits]]. + [[#item0">Retour en haut de la page]] - See the [[CompilerCredits FreeBASIC Credits]] page. + **Pourquoi devrais-je utiliser FreeBasic plutôt que QBasic?** -{{anchor name="item0|Back to top"}} +FreeBASIC a des avantages innombrables par rapport à QBasic, QuickBASIC, PDS et Visual Basic pour DOS. -{{anchor name="item3"}}==Why should I use ""FreeBASIC"" rather than ""QBasic""?== - ""FreeBASIC"" has innumerable advantages over ""QBasic"", ""QuickBASIC"", PDS, and Visual Basic for DOS. - - It supports 32-bit processors, where ""QBasic"" is designed for 16-bit CPU's. - - It supports modern OSes. It has ports to Windows, Linux, and 32-bit DOS. - - It supports modern APIs such as SDL, ""DirectX"", ""Win32"", and ""OpenGL"". - - It is distributed under the GPL, meaning it's free and legal to use, unlike most copies of ""QuickBASIC"" / other BASICs. - - The library is distributed under the LGPL with additional exception, meaning you may do whatever you want with your compiled programs, including selling them (note: possible problem with graphics library). - - ""FreeBASIC"" is many times faster than ""QuickBASIC"" / other BASICs. - - ""FreeBASIC"" supports many features, such as pointers and inline Assembly, which are not available in ""QuickBASIC"" / other BASICs. - - ""QuickBASIC"" only supports DOS. Windows support for DOS emulation (and thus ""QuickBASIC"") is becoming thinner with every new version. Vista does not support graphics or fullscreen text for DOS applications. +- Il supporte les processeurs 32-bit, alors que QBasic est conçu pour les CPU 16-bit. + - Il supporte les OS modernes. Il est doté de portages pour Windows, Linux et DOS 32 bits. + - Il supporte les API modernes telles que SDL, DirectX, Win32 et OpenGL. + - Il est distribué sous licence GPL, ce qui signifie qu'il est gratuit et légal de l'utiliser librement, contrairement à la plupart des copies de QuickBASIC et autres BASIC. + -La bibliothèque est distribuée sous licence LGPL avec une exception supplémentaire, ce qui signifie que vous pouvez faire ce que vous voulez avec vos programmes compilés, y compris les vendre (note: problème possible avec bibliothèque graphique). + - FreeBASIC est, la plupart du temps, beaucoup plus rapide que QuickBASIC et autres BASIC. + - FreeBASIC supporte de nombreuses fonctionnalités, telles que les pointeurs et l'assemblage en ligne (in line), qui ne sont pas disponibles dans QuickBASIC et autres BASIC. + - QuickBASIC ne supporte que le DOS. Le support de Windows pour l'émulation DOS (et donc QuickBASIC) est de plus en plus fine avec chaque nouvelle version. Vista ne prend pas en charge les graphiques ou le texte en plein écran pour les applications DOS. + [[#item0">Retour en haut de la page]] + **Pourquoi devrais-je utiliser FreeBasic plutôt que certains autres nouveaux BASIC?** -{{anchor name="item0|Back to top"}} +FreeBASIC a de nombreux traits qui le rendent préférable à la plupart des autres implémentations du langage BASIC: -{{anchor name="item4"}}==Why should I use ""FreeBASIC"" rather than some other newer BASIC ?== - ""FreeBASIC"" has many traits which make it more desirable than most other BASIC language implementations: - - ""FreeBASIC"" adheres closely to the standard BASIC syntax, making it easier to use. - - ""FreeBASIC"" is compiled to actual programs (executables), not bytecode. - - ""FreeBASIC"" has a large, dedicated community which has actively participated in the development of ""FreeBASIC"". - - ""FreeBASIC"" utilizes standard methods of accessing common C libraries. SDL, for example, is standard C SDL, not a new set of intrinsic commands. - - ""FreeBASIC"" has ports to Windows, Linux, and 32-bit DOS. It retains consistent syntax between the three ports. +- FreeBASIC adhère étroitement à la syntaxe BASIC standard, ce qui rend plus facile à utiliser. + - FreeBASIC est compilé en programmes réels (exécutables), et non du "bytecode". + - FreeBASIC a une importante communauté dédiée qui a activement participé à l'élaboration de FreeBASIC. + - FreeBASIC utilise des méthodes standard d'accès aux bibliothèques communes du langage C. SDL, par exemple, est standard C SDL, et non pas un nouvel ensemble de commandes intrinsèque + - FreeBASIC a des portages vers Windows, Linux et DOS 32-bit. Il conserve une syntaxe cohérente entre les trois portages. + [[#item0">Retour en haut de la page]] + **FreeBASIC est-il rapide?** -{{anchor name="item0|Back to top"}} +La plupart des tests effectués par la communauté ont montré que FreeBASIC est significativement plus rapide que QuickBasic, plus rapide que la plupart des autres BASIC commerciaux et souvent proche de CCG en termes de vitesse. -{{anchor name="item5"}}==How fast is ""FreeBASIC""?== - Most tests run by the community have shown ""FreeBASIC"" is significantly faster than ""QuickBASIC"", faster than most other GPL or commercial BASICs, and often approaching GCC in terms of speed. - The [[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all Computer Languages Benchmark Game]], an independent test team, give ""FreeBASIC"" for Linux a speed 1.8 times slower than ""GNU g++"". Tests are about calculation, memory and disk access speed in console programs, no graphics capabilities were tested. This is not a bad result considering ""FreeBASIC"" is not yet an optimizing compiler. - One area where there is a notable speed deficiency is in 32-bit console modes. While ""FreeBASIC"" is consistently on-par with other 32-bit console mode applications, 32-bit console mode operations are significantly slower than 16-bit console operations, as seen in ""QuickBASIC"". In DOS version, some I/O operations can slow down after porting from a 16-bit BASIC to FB - optimizing the code brings the speed back. +[[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all">Computer Languages Benchmark Game]], une équipe de test indépendante, donne FreeBASIC pour Linux une vitesse 1,8 fois plus lent que GNU g++. Les tests portent sur les calculs, la mémoire et la vitesse du disque dans les programmes de la console, aucune capacité graphique n'a été testée. Ce n'est pas un mauvais résultat compte tenu que FreeBASIC n'est pas encore un compilateur optimisant. + Un domaine où il y a une carence notable est la vitesse dans les modes console 32-bit. Bien que FreeBASIC soit constamment sur un pied d'égalité avec les autres-applications 32 bits en mode console, les opérations sur 32 bits en mode console sont nettement plus lentes que les opérations en console 16-bit, comme dans QuickBasic. Dans la version DOS, certaines opérations d'Entrée/Sortie peuvent devenir plus lentes après le portage depuis un BASIC 16-bit vers FB - l'optimisation du code récupère de la vitesse. + [[#item0">Retour en haut de la page]] + **FreeBASIC est-il compatible avec QuickBasic?** -{{anchor name="item0|Back to top"}} +La bibliothèque graphique de FreeBASIC émule les modes graphiques les plus utilisés de QB (modes 7,12,13) et implémente toutes les primitives de dessin proposées dans QB. -{{anchor name="item6"}}==How compatible is ""FreeBASIC"" with ""QuickBASIC""?== - The ""FreeBASIC"" built in graphics library emulates the most used QB graphics modes (modes 7,12,13) and implements all the drawing primitives featured in QB. - Most compatibility problems arise from the use of 8086-DOS-hardware specific low-level techniques in the old QB programs. VGA port programming, DOS interrupts, memory segment switching, poking to the screen memory or music playing using the PC speaker are not directly supported, even if they can be supported/emulated by external libraries. - Other issues in porting old QB programs, like variable name clashes with new FB keywords, variables with the name of a QB keyword plus a type suffix, default integer size being 32 bits in FB, are addressed by running ""FreeBASIC"" with the commandline switch ##-lang qb## . +La plupart des problèmes de compatibilité résultent de l'utilisation des techniques bas niveau spécifiques au matériel-8086-DOS dans les aciens programmes de QB. Programmation du port VGA, interruptions DOS, commutation des segments de mémoire, écriture dans la mémoire d'écran ou jouer de la musique en utilisant le haut-parleur PC ne sont pas directement pris en charge, même si cela peut être supporté/émulé par des bibliothèques externes. + D'autres problèmes dans le portage d'anciens programmes QB, comme les noms de variables en conflit avec des mots nouveaux de FB, variables avec le nom d'un mot-clé QB plus un suffixe de type, la taille par défaut des entiers étant de 32 bits dans FB, sont traitées en exécutant FreeBASIC avec sur la ligne de commande l'option ##-lang qb## . + Voir [[LangQB Différences entre FreeBASIC et QuickBasic]]. + [[#item0">Retour en haut de la page]] - See [[LangQB Differences between FreeBASIC and QuickBASIC]]. + **FreeBASIC est-il compatible avec Windows? DOS? Linux? ** -{{anchor name="item0|Back to top"}} +FreeBASIC est totalement compatible avec Windows, MS-DOS, Free-DOS et Linux. Lors de la planification pour créer un programme pour les trois plates-formes, cependant, gardez à l'esprit la disponibilité d'API -- le code utilisant OpenGL fonctionne sous Windows et Linux, par exemple, mais pas sous DOS, car OpenGL n'est pas disponible pour MS-DOS. -{{anchor name="item7"}}==How compatible is ""FreeBASIC"" with Windows? DOS? Linux? == - ""FreeBASIC"" is fully compatible with Windows, MS-DOS, ""FreeDOS"" and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing ""OpenGL"" will work in Windows and Linux, for example, but won't in DOS, because ""OpenGL"" is not available for DOS. +[[#item0">Retour en haut de la page]] + **La programmation orientée objet est elle supportée par FreeBASIC?** -{{anchor name="item0|Back to top"}} +Certaines fonctionnalités POO sont à la disposition des utilisateurs de FB depuis la version 0.17. La fonctionnalité POO complète est attendue pour le futur. A l'heure actuelle (version 0.22) il existe des méthodes à l'intérieur des types définis par l'utilisateur et la surcharge d'opérateur, mais l'héritage et le polymorphisme ne sont pas encore mis en oeuvre. Pour plus d' information voir: [[http://www.freebasic.net/wiki/wikka.php?wakka=TutBeginnersGuideToTypesAsObjects">Un guide pour débutants sur les Types comme Objets]]. -{{anchor name="item8"}}==Does ""FreeBASIC"" support Object Oriented Programming?== - Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future (0.23). At the moment (version 0.22) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented. For more information see: [[http://www.freebasic.net/wiki/wikka.php?wakka=TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]] and [[http://www.freebasic.net/forum/viewtopic.php?t=17571 Forum t=17571 "New fbc branch ('inheritance') on sourceforge (fbc SVN)"]]. +[[#item0">Retour en haut de la page]] + **Quels sont les plans futurs avec FB / ToDo list?** -{{anchor name="item0|Back to top"}} +Vous pouvez découvrir ce qui est prévu pour les versions futures en consultant directement [[http://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC/src/compiler/TODO.txt?view=markup">le fichier TODO]] pour le compilateur, qui est actuellement dans le SVN. -{{anchor name="item9"}}==What are the future plans with FB / ""ToDo"" list ?== +[[#item0">Retour en haut de la page]] - You can find out what's planned for the future releases by directly looking at the TODO file for the compiler, currently in SVN [[http://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC/src/compiler/TODO.txt?view=markup here]]. + **Puis-je programmer des applications GUI avec FB** -{{anchor name="item0|Back to top"}} +Oui, vous le pouvez. Les fichier en-têtes qui vous permettent d'appeler l'API graphique de Windows ou Linux sont fournies avec les versions respectives, mais les programmes fabriqués de cette façon ne sont pas portables. -{{anchor name="item10"}}==Can I program GUI applications in FB ?== - Yes, you can. Headers allowing you to call the GUI API of Windows and Linux are supplied with the respective versions, but the programs made this way are not portable. - There are some API wrappers and experimental RAD applications that create non-portable GUI code for Windows. - For portable programming a multiplatform GUI wrapper library as GTK or wx-Widgets may be used. GTK headers are provided with FB, but the OOP functionality currently available in FB prevents the use of wx-Widgets. The programs created with these libraries may require the user to install the wrapper libraries in their systems. - For games and small graphics applications there are some FB-specific libraries that draw and manage simple controls as buttons and edit boxes inside the graphics screen, programs made with those libs are entirely portable. +Il y a quelques protocoles API et applications RAD expérimentales qui créent du code non portable GUI pour Windows. + Pour une programmation portable une bibliothèque GUI telle que GTK ou "wx-Widgets" doit être utilisée. Les fichier en-têtes GTK sont fournis avec FB, mais la fonctionnalité POO actuellement disponible en FB empêche l'utilisation de wx-Widgets. Les programmes créés avec ces bibliothèques peuvent obliger l'utilisateur à installer les bibliothèques encapsulatrices (wrapper) dans leurs systèmes. + Pour les jeux et les petites applications graphiques il y a quelques bibliothèques spécifiques-FB qui dessinent et gérent des commandes simples comme des boutons et des boîtes à l'intérieur de l'écran graphique, les programmes réalisés avec ces bibliothèques sont entièrement portables + [[#item0">Retour en haut de la page]] + **FB est-il approprié pour des applications grosses/complexes?** -{{anchor name="item0|Back to top"}} +Le compilateur FB est "auto-hébergement", il est lui-même programmé dans FB. Cela signifie plus de 120 000 lignes de code pour le moment, une application assez complexe. -{{anchor name="item11"}}==Is FB suitable for complex / big applications?== - The FB compiler is self-hosting, it is programmed itself in FB. That means more than 120 000 lines of code at the moment, a fairly complex application. +[[#item0">Retour en haut de la page]] + **Puis-je utiliser un encodage (jeu de caractères) non-latin dans mes applications FreeBASIC?** -{{anchor name="item0|Back to top"}} +FreeBASIC supporte Unicode qui est fourni par la bibliothèque d'exécution C pour la plate-forme donnée. Cela signifie que FB DOS ne sera pas gêné par Unicode. Sur d'autres plateformes, vous pouvez utiliser [[KeyPgWstring Wstrings]] pour supporter tout jeu de caractères dont vous avez besoin. Le mot-clé OPEN a un paramètre additionnel [[KeyPgEncoding Encoding]] permettant différents encodages. Comme FreeBasic est lui-même codé dans FB, cela signifie que vous pouvez coder votre source dans un éditeur Unicode donc les commentaires et les chaînes littérales peuvent être dans n'importe quel jeu de caractères (mots-clés, étiquettes, noms de variables et de procédures doivent être conservés à l'intérieur du jeu ASCII..). -{{anchor name="item12"}}==Can I use a non-latin charset in my ""FreeBASIC"" applications?== +Pour la sortie à l'écran le support est différent de la console aux graphiques. En mode console l'affichage de "wstring" en caractères non latins est supporté si la police de caractères de la console le permet. Le mode graphique utilise une police avec un jeu de caractères interne CP437 (l'ancien jeu de caractères du DOS) donc les affichages non latins une police personnalisée et l'utilisation du mot-clef [[KeyPgDrawString Draw String]] keyword. Des outils tiers existent pour introduire une police externe et la convertir au format DRAW STRING. - ""FreeBASIC"" has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won't help you with Unicode. On other platforms you can use [[KeyPgWstring Wstrings]] to support any charset you need. The File OPEN keyword has an additional [[KeyPgEncoding Encoding]] parameter allowing for different encodings. As ""FreeBASIC"" is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..). - For the output to screen the support is different from console to graphics. In console mode wstring printing in non latin charsets is supported if the console font supports them. Graphics mode uses an internal CP437 charset (the old DOS charset) font so non-latin output requires a custom made raster font and the use of the [[KeyPgDrawString DRAW STRING]] keyword. Third party tools exist to grab an external font and convert it to the DRAW STRING format. + [[#item0">Retour en haut de la page]] + **Puis-je utiliser les ports Serial/COM et Hardware/CPU dans FB?** -{{anchor name="item0|Back to top"}} +Oui, FB a des fonctions intégrées pour accéder aux ports serial/COM port et hardware/CPU sans avoir besoin de bibliothèques externes. Voir [[#item999">FAQ des spécificités des OS]] pour des détails pour votre OS ainsi que [[KeyPgOpenCom Open Com]], [[KeyPgInp Inp]] et [[KeyPgOut Out]] . -{{anchor name="item13"}}==Can I use Serial/COM and Hardware/CPU ports in FB?== - Yes, FB has built in functions to access the serial/COM port and hardware/CPU ports with no need of external libraries. See the {{anchor name="item999|OS specific FAQ's"}} for details for your OS, and [[KeyPgOpenCom Open Com]], [[KeyPgInp INP]] and [[KeyPgOut OUT]] . +[[#item0">Retour en haut de la page]] +
    **Questions de débutants sur FreeBASIC** -{{anchor name="item0|Back to top"}} ----- +**Où puis-je trouver plus d'informations sur FreeBASIC?** +Le [[http://www.freebasic.net/wiki/">Wiki FreeBASIC]] est le manuel le-plus-à-jour pour l'utilisation de FreeBASIC. -@@**Getting Started with ""FreeBASIC"" questions**@@ +Des forums actifs sur FreeBASIC, outre le [[http://www.freebasic.net/forum">forum officiel]], peuvent être trouvés à [[http://www.qbasicnews.com/">qbasicnews]], [[http://www.petesqbsite.com/forum/">Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php">the FB Games directory]] ou [[http://www.freebasic-portal.de">freebasic-portal.de (en allemand)]]. -{{anchor name="item20"}}==Where can I find more information about ""FreeBASIC""?== - The ""FreeBASIC"" Wiki is the most up-to-date manual for using ""FreeBASIC"", available [[http://www.freebasic.net/wiki/ here]]. +Des magazines actifs qui ont régulièrement des articles liés FreeBasic [[http://www.petesqbsite.com/sections/express/express.shtml">QB Express]] and [[http://www.qbxl.net/">QBXL Magazine]]. Ces magazines sont toujours à la recherche de nouveaux articles, donc si vous pensez que vous avez une bonne idée pour un article sur FreeBasic, soumettez-le! + [[#item0">Retour en haut de la page]] - Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]]. + **Pourquoi le GUI de QB ne s'ouvre-t-il pas quand je lance FreeBASIC?** - Active magazines which regularly have ""FreeBASIC"" related articles are [[http://www.petesqbsite.com/sections/express/express.shtml QB Express]] and [[http://www.qbxl.net/ QBXL Magazine]]. These magazines are always looking for new articles, so if you think you've got a good idea for an article about ""FreeBASIC"", submit it! + QB avait un Environnement de Développement Intégré ou en anglais: Integrated Development Environment (IDE). FreeBASIC n'en a pas. -{{anchor name="item0|Back to top"}} +FreeBASIC est seulement un compilateur, non pas un "clone" complet de QuickBASIC. Il s'agit d'une application en mode console. Il acceptera un fichier BAS sur la ligne de commande et renverra un fichier EXE. -{{anchor name="item21"}}==Why doesn't the QB GUI open when I start ""FreeBASIC""?== - QB had an Integrated Development Environment (IDE). ""FreeBASIC"" does not. - ""FreeBASIC"" is only a compiler, not a complete ""QuickBASIC"" clone. It is a console mode application. It will accept a BAS file on the command line, and spit out an EXE file. - You can create the BAS file with the simplest plain text editor in your OS (Notepad, EDIT, nano,...), then run the compiler. - If you can't live without syntax coloring, error highlighting, multiple file managing, integrated debugger, context help or other features, you need an IDE. See the {{anchor name="item999|OS specific FAQ's"}} for the IDE's and editors available. +Vous pouvez créer le fichier BAS avec l'éditeur simple, plein texte de votre OS (Notepad, EDIT, nano,...), puis lancez le compilateur. + Si vous ne pouvez vivre sans la coloration syntaxique, le soulignement d'erreur, la gestion de fichiers multiples, un débogueur intégré, l'aide contextuelle ou d'autres fonctionnalités, vous avez besoin d'un IDE. Voyez [[#item999">FAQ des spécificités des OS]] pour les IDE et éditeurs disponibles. + [[#item0">Retour en haut de la page]] + **Puis-je avoir une version hors ligne de la documentation?** + La documentation officielle pour FB est ce Wiki, habituellement la version courante contient les dernières améliorations du SVN. -{{anchor name="item0|Back to top"}} +De temps en temps ce Wiki est converti en plusieurs formats lisibles hors-ligne. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165">CHM]] pour les utilisateurs de Windows, et [[http://www.execulink.com/~coder/freebasic/docs d'autres formats]]. -{{anchor name="item22"}}==Can I have an offline version of the documentation?== - The official documentation for FB is this Wiki, usually it is current with the latest improvements found in the SVN. - From time to time this Wiki is converted to several offline readable formats. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats here: [[http://sourceforge.net/projects/fbc/files/Documentation/ sf.net/.../Documentation]], ""CoderJeff""'s page (has FBHELP, doesn't have up-to-date manuals): [[http://www.execulink.com/~coder/freebasic/docs.html execulink.com/.../docs.html]]. +[[#item0">Retour en haut de la page]] + **Quelle est l'idée derrière les dialectes FB?** + L'idée est de permettre des améliorations dans le langage tout en conservant une compatibilité ascendante avec le code QB. Les bizarreries de la syntaxe QB ne sont pas compatibles avec le style plus rigide requis par la POO. Les nouveaux mots-clés FB sont souvent en conflit avec les noms de variables dans les anciens programmes de QB. QB permettait d'utiliser librement des points dans les noms de variables et n'étaient pas des procédures d'UDT. -{{anchor name="item0|Back to top"}} +Les trois dialectes (fb-lang, lang-qb,-lang fblite) permettent de combiner le meilleur de deux mondes. -{{anchor name="item23"}}==What's the idea behind the FB dialects?== - The idea is to allow improvements in the language while maintaining backwards compatibility with QB code. The quirks of the QB syntax are not compatible with the more rigid style required by OOP. The new FB keywords often clashed with variable names in old QB programs. QB allowed to use freely dots in variable names and procedures not being UDT's. - The three dialects (-lang fb, -lang qb, -lang fblite) allow to combine the best of two worlds. - -##lang fb## provides the framework required for OOP programming . Other dialects don't give access to OOP. - -##lang qb## will allow the developers to keep increasing the compatibility with qb programs. Newer keywords in FB can be used by preceding them with two underscores. For example, ##Getmouse## can be called by using ##_####_Getmouse## - -##lang fblite## offers ""FreeBASIC"" language compatibility, with a more QBASIC-compatible coding style. +
  • ##lang fb## fournit le cadre nécessaire pour la programmation orientée objet. Les autres dialectes ne donnent pas accès à la POO. +
  • ##lang qb## permettra aux développeurs de conserver la compatibilité ascendante avec les programmes QB. Les nouveaux mots-clés dans FB peuvent être utilisés par les précédant avec deux caractères de soulignement. Par exemple, ##Getmouse## peut être appelé en utilisant ##_####_Getmouse## +
  • ##lang fblite## offre une compatibilité linguistique FreeBASIC, avec un style de codage plus compatible QBASIC. + Voir [[CompilerDialects Les dialectes du compilateurs]] pour plus de détails. + [[#item0">Retour en haut de la page]] + **Pourquoi mon programme se plante-t-il quand je définis un tableau plus grand que xx?** - See [[http://www.freebasic.net/wiki/wikka.php?wakka=CompilerDialects Compiler Dialects]] for details. + Cela arrive généralement parce que vous avez fait un tableau //[[ProPgStorageClasses automatic]]// de longueur fixe trop large et il y a eu un débordement de la pile du programme. Vous avez plusieurs options: -{{anchor name="item0|Back to top"}} +- si c'est possible, de réduisez la taille du tableau //automatic// -{{anchor name="item24"}}==Why does my program crash when I define an array larger than xx ?== +- créez un tableau de longueur variable, en - This generally happens because you made an //[[ProPgStorageClasses automatic]]// fixed-length array too large, and it is corrupting the program stack. You have a couple of options: + - définissant le tableau avec une liste vide d'indices (en utilisant ##[[KeyPgDim Dim]]##), ou - - if possible, reduce the size of the //automatic// array - - create a variable-length array, by - - defining the array with an empty subscript list (using ##[[KeyPgDim Dim]]##), or - - defining the array with variable subscripts instead of numeric literals, [[KeyPgConst constants]] or [[KeyPgEnum enums]] (using ##[[KeyPgDim Dim]]##), or - - defining the array with ##[[KeyPgRedim Redim]]## - - reserve more memory for the program stack by using the ##-t## [[CompilerCmdLine command-line option]] when compiling. The default is ##-t 1024## (kilobytes). Note: it's a bad idea to use very large values here. - - create a //static// array by defining the array with ##[[KeyPgStatic Static]]## rather than ##[[KeyPgDim Dim]]## (only locally visible, but globally preserved) - - define the array with ##[[KeyPgShared Shared]]## access using ##[[KeyPgDim Dim]]## (this makes the array fully global) - - use [[ProPgPointers Pointers]] and [[CatPgMemory Memory Functions]] like ##[[KeyPgAllocate Allocate]]## and ##[[KeyPgDeallocate Deallocate]]## to manage memory yourself - this is the preferred way for storing big buffers, but not for beginners. + - définissant le tableau avec des indices variables au lieu de littéraux numériques, [[KeyPgConst Constants]] ou [[KeyPgEnum Enums]] (en utilisant ##[[KeyPgDim Dim]]##), ou en + - définissant le tableau avec ##[[KeyPgRedim ReDim]]## + - réservez plus de mémoire pour la pile du programme en utilisant l'option ##-t## de la [[CompilerCmdLine commande en ligne]] lors de la compilation. la valeur par défaut est ##-t 1024## (kilo-octets). Note: c'est une mauvaise idée d'utiliser, ici, de très grandes valeurs. + - créez un tableau //static// en définissant le tableau avec ##[[KeyPgStatic Static]]## plutôt que ##[[KeyPgDim Dim]]## (visible seulement localement, mais globalement préservé) + - définissez le tableau avec un accès ##[[KeyPgShared Shared]]## en utilisant ##[[KeyPgDim Dim]]## (ce qui rend le tableau parfaitement global) + - utilisez des [[ProPgPointers Pointeurs]] et [[CatPgMemory des fonctions mémoire]] telles que ##[[KeyPgAllocate Allocate]]## et ##[[KeyPgDeallocate Deallocate]]## pour gérer vous-même la mémoire - c'est le moyen privilégié pour le stockage des grands tampons, mais pas pour les débutants. + Les tableaux //Static// et //variable-length// n'utilisent pas la pile du programme pour leurs éléments de données, nous n'avons donc pas le problème associé des tableaux //automatic// à longueur fixe. Voir les [[ProPgStorageClasses Classes de stockage]] pour plus d'informations. Notez que le stockage d'énormes tampons définis comme //static// ou l'augmentation de la taille de la pile au-dessus de la valeur par défaut n'est pas une très bonne idée, car elle augmente la quantité fixe de mémoire nécessaire pour charger et démarrer votre programme, même si la plupart de celle-ci n'est pas utilisée plus tard, et cela peut entraîner une dégradation des performances, ou même de provoquer un refus de chargement votre programme. + [[#item0">Retour en haut de la page]] +
    **FreeBasic avancé** - //Static// and //variable-length// arrays don't use the program stack for their element data, so do not have the problem associated with //automatic// fixed-length arrays. See [[ProPgStorageClasses Storage Classes]] for more information. Note that storing huge buffers as //static// or increasing the stack size far above the default is not a very good idea, since it increases the fixed amount of memory needed to load and start you program, even if most of it is not used later, and can result in performance degrade, or even refusing your program to load at all. + **Comment puis-je lier à des bibliothèques C?** -{{anchor name="item0|Back to top"}} +Les bibliothèques C sont mises en place de la même manière dans FreeBASIC qu'elles le sont en C. Chaque bibliothèque fournie avec FreeBASIC a un fichier de base "include" nommé "//nom-de-la-bibliothèque.bi//" qui utilise la métacommande [[KeyPgInclib #inclib]] pour inclure la bibliothèque et l'instruction [[KeyPgDeclare Declare]] to déclarer les fonctions au sein de la bibliothèque. FreeBASIC inclut des centaines de fichiers BI, voir la [[ExtLibTOC liste complète des en-têtes de bibliothèque]]. ----- +[[#item0">Retour en haut de la page]] -@@**Advanced ""FreeBASIC""**@@ +**Puis-je utiliser un débogueur?** -{{anchor name="item31"}}==How do I link to C libraries?== - C libraries are set up in much the same way in ""FreeBASIC"" as they are in C. Every library included with ""FreeBASIC"" has a basic include file named "//library name//.bi" which uses the [[KeyPgInclib #INCLIB]] metacommand to include the library, and the [[KeyPgDeclare Declare statement]] to declare the functions within the library. ""FreeBASIC"" includes hundreds of BI files, see full list of library headers [[ExtLibTOC here]]. +FreeBASIC peut utiliser de préférence un débogueur compatible avec GNU GDB. + - Win32: Insight est un "wrapper" (conteneur) convivial pour GDB, voir la [[FaqPgWin32 FAQ Win32]]. -{{anchor name="item0|Back to top"}} +- DOS: Soyez averti que DOS a également produit nommé "Insight", mais c'est un débogueur en mode réel qui n'est pas utilisable avec FreeBASIC, utilisez GDB ou au moins certains débogueur DPMI32. -{{anchor name="item32"}}==Can I use a debugger?== - ""FreeBASIC"" can use preferably a debugger compatible with GNU GDB. - - ""Win32"": Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]]. - - DOS: Be warned that DOS also has product named "Insight", but it's a real mode debugger not usable with ""FreeBASIC"", use GDB or some DPMI32 debugger at least. - - Linux: use GDB. +- Linux: utilisez GDB. + Voir la [[#item999">FAQ des spécificités des OS]] pour des détails sur votre OS. + [[#item0">Retour en haut de la page]] + **Quel est le but des fichiers AR.EXE, AS.EXE et LD.EXE fournis avec FB?** + AS.EXE c'est GAS, l'"assembleur GNU". Il est toujours impliqué dans la compilation. LD.EXE est le "linkeur GNU", impliqué dans la création d'exécutables. AR.EXE est l'"archiveur GNU", en fait, un fabricant de bibliothèques, crcréant des bibliothèques ##.A##. - See the {{anchor name="item999|OS specific FAQ's"}} for details for your OS. + [[#item0">Retour en haut de la page]] -{{anchor name="item0|Back to top"}} +**Y a-t-il une limitation l'ampleur de mes fichiers source?** -{{anchor name="item33"}}==What's the goal of the AR.EXE, AS.EXE and LD.EXE files included with FB ?== - AS.EXE is GAS, the "GNU assembler". It is always involved in compilation. LD.EXE is the "GNU linker", involved in creation of executables. AR.EXE is the "GNU archiver", in fact a librarian, creating ##.A## libraries. +Oui, comme FreeBASIC est un compilateur pleinement 32 bits, il peut fonctionner sur des fichiers source, théoriquement, jusqu'à 4GB ou 4294967296 octets, toutefois, votre capacité de mémoire vive (RAM) devra être nettement supérieure à la taille de votre source, sinon la compilation ne se terminera pas ou, au moins, sera très lente. + [[#item0">Retour en haut de la page]] -{{anchor name="item0|Back to top"}} +**Puis-je écrire un OS avec FreeBasic?** -{{anchor name="item34"}}==Is there a limit on how big my source files can be?== - Yes, since ""FreeBASIC"" is a fully 32-bit compiler it may operate on source files up to theoretically 4GB or 4294967296 bytes, however your RAM capacity should be significantly above the size of your source, otherwise the compilation won't finish or will be very slow at least. +OUI et NON. Si vous insistez pour écrire un OS et impliquer FB, la réponse est OUI. Si la question est de savoir si c'est une bonne idée que vous, encore plus si vous êtes un débutant, devrait commencer à coder maintenant un OS en utilisant FB, la réponse est NON. Plusieurs écueils sont applicables: + - Le développement d'un OS est difficile, voir [[http://www.osdev.org/wiki/Getting_Started">Getting Started]]. -{{anchor name="item0|Back to top"}} +- FB ne vous aidera pas à contourner la nécessité de s'occuper avec l'assembage, aussi C est peut être presque impossible à éviter. -{{anchor name="item35"}}==Can I write an OS in ""FreeBASIC"" ?== +- Vous ne serez pas en mesure d'utiliser la plupart des fonctions éprouvées de FB, comme les graphiques, fichiers E/S, flux, gestion de la mémoire, même les E/S de la console ... contrôle de débit, les mathématiques et la logique. Si vous avez besoin de ces bibliothèque de fonctions, vous aurez à les ** réimplémenter **. - YES and NO. If you really insist to write an OS and involve FB, the answer is YES. If the question is, whether it is a good idea that you, even more if a beginner, should start coding an OS using FB now, the answer is NO. Several pitfalls apply: - - OS development is hard, see [[http://www.osdev.org/wiki/Getting_Started]] . - - FB won't help you to bypass the need to deal with assembly, also C might be almost impossible to avoid. - - You won't be able to use most of the trusted FB features, like graphics, file I/O, threads, memory management, even console I/O ... just control flow, math and logic. If you need those library functions, you will have to **reimplement** them. - ""FreeBASIC"" relies on GCC, and available informations about developing an OS in C apply to ""FreeBASIC"" as well. FB will help you neither more nor less than GCC. + FreeBASIC s'appuie sur GCC et des informations disponibles sur l'élaboration d'un OS en C s'appliquent aussi à FreeBASIC. FB ne vous aidera ni plus ni moins que GCC. + [[#item0">Retour en haut de la page]] + **Je développe un système d'exploitation, FreeBASIC peut-il être porté sur mon OS?** + Cela dépend. Si votre OS atteint au moins les fonctionnalités du DOS avec DPMI32 (console I/O (recherche, plusieurs fichiers ouverts, ...), E/S fichier, gestion de la mémoire) **et** dispose d'un portage de GCC, alors la réponse est OUI. Si vous avez au moins un autre compilateur C compatible **avec** des bibliothèques, ce pourrait être possible. Vous ne pouvez pas raisonnablement porter FB par exemple vers un OS permettant de charger ou enregistrer un fichier dans un seul bloc, ou un OS 16-bit. + [[#item0">Retour en haut de la page]] -{{anchor name="item0|Back to top"}} +**FreeBasic permet-il le retour de références à partir de fonctions, comme en C++?** -{{anchor name="item36"}}==I'm developing an OS, can ""FreeBASIC"" be ported to my OS ?== +Depuis la version 0.20.0b, non. Il y a quelques mots-clés, tels que ##[[KeyPgPeek Peek]]## et les [[CatPgOpIndexing opérateurs d'indexation]], par exemple, qui se comportent comme s'ils étaient des procédures ##[[KeyPgFunction Function]]##qui retourne une référence, comme en C++. Autrement dit, ils évaluent à quelque chose qui peut être utilisé à la place d'un objet, un peu comme des [[ProPgPassingArguments références de paramètres]]. -Depends. If your OS at least egalizes the functionality of DOS with DPMI32 (console I/O (seeking, multiple files open, ...), file I/O, memory management) **and** has a port of GCC, then the answer is YES. If you have at least an other somewhat compliant C compiler **with** libraries, it might be possible. You can't reasonably port FB for example to an OS allowing to load or save a file in one block only, or a 16-bit OS. +Par exemple, si ##//mystring//## est de type ##[[KeyPgString String]]## de longueur non nulle, alors ##//mystring[0]//## correspond à une référence au premier caractère (un ##[[KeyPgUbyte UByte]]##), qui peut être assignée et modifiée, transmise à des procédures, etc. -{{anchor name="item0|Back to top"}} +##[[KeyPgPeek Peek]]## et les [[CatPgOpIndexing opérateurs d'indexation]] sont documentés comme des procédures ##[[KeyPgFunction Function]]## ou des opérateurs qui retourne une valeur, puisque FreeBASIC ne supporte pas encore le retour de références. Lorsque le retour de références sera pris en charge, la documentation sera changée pour refléter cela. -{{anchor name="item37"}}==Does ""FreeBASIC"" support returning references from Functions, like in ""C++""?== +[[#item0">Retour en haut de la page]] -As of version 0.20.0b, no. There are some keywords, such as ##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]], for instance, that behave as if they were ##[[KeyPgFunction Function]]## procedures that return a reference, as in ""C++"". That is, they evaluate to something that can be used in place of an object, much like [[ProPgPassingArguments reference parameters]]. +{{fbdoc item="see"}} -For example, if ##//mystring//## is of type ##[[KeyPgString String]]## of non-zero length, then ##//mystring[0]//## evaluates to a reference to the first character (a ##[[KeyPgUbyte UByte]]##), which can be assigned to and modified, passed to procedures, etc. +- [[FaqPgWin32 FAQ relative à Win32]] -##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]] are documented as ##[[KeyPgFunction Function]]## procedures or operators that return a value, since ""FreeBASIC"" does not yet support returning references. When returning references is supported, the documentation will be changed to reflect that. +- [[FaqDOS FAQ relative au DOS]] -{{anchor name="item0|Back to top"}} +- [[FaqPgLinux FAQ relative à Linux]] -{{anchor name="item999"}}{{fbdoc item="see"}} - - [[FaqPgWin32 Win32 related FAQ]] - - [[FaqDOS DOS related FAQ]] +et + - [[FaqPgrtlib FAQ de la bibliothèque d'exécution de FB]] + - [[FaqPggfxlib2 Questions Fréquemment Posées sur la bibliothèque graphique de FreeBASIC]] - [[FaqPgLinux Linux related FAQ]] and - [[FaqPgrtlib FB Runtime Library FAQ]] diff --git a/fbdocs/manual/cache/CompilerFeatures.wakka b/fbdocs/manual/cache/CompilerFeatures.wakka index 7f49af61fd..555d2bb29c 100644 --- a/fbdocs/manual/cache/CompilerFeatures.wakka +++ b/fbdocs/manual/cache/CompilerFeatures.wakka @@ -1,99 +1,99 @@ {{fbdoc item="title" value="Most Important Features"}}---- -{{fbdoc item="section" value="BASIC compatibility"}} - - FreeBASIC is not a "new" BASIC language. You don't need to learn much new if you are familiar with any Microsoft-BASIC variant. You can use either ##"-lang qb"## for compatibility, or (default) ##"-lang fb"## for some of the new features, but it also brings some restrictions and some similarity with the "C" programming language. See also [[CompilerDialects]]. - - FreeBASIC is case-insensitive; explicit "main" procedure is not required; most of the graphic and console statements and procedures found in Microsoft QuickBASIC are implemented, et cetera. - - Only with ##"-lang qb"##: scalar variables don't need to be dimensioned and suffixes can be used; line numbers are supported; ##[[KeyPgOnerror On Error]]## and ##[[KeyPgGosub Gosub]]## supported. - -{{fbdoc item="section" value="Clean syntax"}} - - Only a small number of keywords have been added. All procedures are implemented as libraries, so for the most part, there are no new intrinsic routines, and therefore there is a low chance of having name duplication with old code. - -{{fbdoc item="section" value="Thin bindings (header files) to existing C libraries and APIs"}} - - No wrappers or helpers are necessary, just a ported header file, making usage of external C libraries very easy - - The official distribution comes with several bindings to existing C libraries already, see [[ExtLibTOC External Libraries TOC]] for a complete up-to-date list - -{{fbdoc item="section" value="Multi-platform"}} - - FreeBASIC currently runs on 32-bit Windows, Linux, and DOS (a 16-bit DOS is good enough, although FreeBASIC itself and compiler output are 32-bit) and also creates applications for the Xbox console. More platforms to come. - - The runtime library was written with portability in mind. All third-party tools used exist on most operating systems already as they are from the GNU binutils. The compiler is written in 100% FreeBASIC code (that is, FreeBASIC compiles itself.), which makes it simple to be bootstrapped as it doesn't depend on non-portable tools. - -{{fbdoc item="section" value="Unicode support"}} - - Besides ASCII files with [[Unicode Unicode]] escape sequences (\u), FreeBASIC can parse UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE source (.bas) or header (.bi) files, they can be freely mixed with other sources/headers in the same project (also with other ASCII files). - - Literal strings can be typed in the original non-Latin alphabet, just use a text-editor that supports some of the [[Unicode Unicode]] formats listed above. - - The ##[[KeyPgWstring Wstring]]## type holds wide-characters, all string procedures (like ##[[KeyPgLeft Left]]##, ##[[KeyPgTrim Trim]]##, etc) will work with wide-strings too. - - ##[[KeyPgOpen Open]]## was extended to support UTF-8, UTF-16LE and UTF-32LE files with the ##[[KeyPgEncoding Encoding]]## specifier. ##[[KeyPgInputPp Input #]]## and ##[[KeyPgLineinputPp Line Input #]]##, as well as ##[[KeyPgPrintPp Print #]]## and ##[[KeyPgWritePp Write #]]## can be used normally, and any conversion between [[Unicode Unicode]] to ASCII is done automatically if necessary. - - ##[[KeyPgPrint Print]]## also supports [[Unicode Unicode]] output (see Requirements). - -{{fbdoc item="section" value="A large number of built-in data types"}} - - Integer: ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]##, ##[[KeyPgShort Short]]##, ##[[KeyPgUshort Ushort]]##, ##[[KeyPgInteger Integer]]##, ##[[KeyPgUinteger UInteger]]##, ##[[KeyPgLong Long]]##, ##[[KeyPgUlong ULong]]##, ##[[KeyPgLongint Longint]]##, ##[[KeyPgUlongint Ulongint]]## - - Floating-point: ##[[KeyPgSingle Single]]##, ##[[KeyPgDouble Double]]## - - String: fixed, variable-length or null-terminated (##[[KeyPgZstring Zstring]]##), up to 2GB long - - [[Unicode Unicode]] strings (##[[KeyPgWstring Wstring]]##), like ##[[KeyPgZstring Zstring]]##, but with support for wide characters. Use the Windows [[Unicode Unicode]] API procedures directly, etc. - -{{fbdoc item="section" value="User-defined types (UDTs)"}} - - Unlimited nesting. - - BASIC's ##[[KeyPgType Type]]## statement is supported, along with the new ##[[KeyPgUnion Union]]## statement (including anonymous nested unions). - - Array fields utilizing up to eight dimensions can be used. - - Procedure pointer fields. - - Bit fields. +**Compatibilité avec le BASIC** + - FreeBASIC n'est pas un "nouveau" langage BASIC. Vous n'avez pas besoin d'apprendre beaucoup de nouveautés si vous êtes familier avec toutes les variantes de Microsoft BASIC. Vous pouvez utiliser soit ##"-lang qb"## pour la compatibilité, soit (par défaut) ##"-lang fb"## pour quelques nouveautés, mais il apporte également certaines restrictions et une certaine similitude avec le langage "C" de programmation. Voir aussi ##[[CompilerDialects Les dialectes du FreeBASIC]]##. + - FreeBASIC n'est pas sensible à la casse; une procédure "main" explicite n'est pas requise; la plupart des déclarations et procédures graphiques et console de Microsoft QuickBASIC sont implémentées, etc. + - Seulement avec ##"-lang qb"##: les variables scalaires n'ont pas besoin d'être dimensionnées et des suffixes peuvent être utilisées; les numéros de ligne sont pris en charge; ##[[KeyPgOnerror On Error]]## and ##[[KeyPgGosub GoSub]]## sont utilisables. + +**Syntaxe "propre"** + - Seul un petit nombre de mots-clés ont été ajoutés. Toutes les procédures sont mises en oeuvre sous forme de bibliothèques, donc pour la plus grande partie, il n'y a pas de nouvelles routines intrinsèques et donc il y a peu de risque d'avoir des chevauchements de nom avec l'ancien code. + +**Relations (fichier en-tête) avec les bibliothèques C et les existantes** + - Pas de "wrappers" ou "helpers" nécesaires, juste un fichier d'en-tête porté, rendant très facile l'usage de bibliothèques C externes. + - La distribution officielle est déjà fournie avec plusieurs liaisons existantes aux bibliothèques C, voir [[ExtLibTOC Index des en-têtes de bibliothèques externes]] pour une liste complète et mise à jour + +**Multi-plateforme** + - FreeBASIC fonctionne actuellement sur Windows 32-bit, Linux et DOS (un DOS 16-bit est suffisant, bien que FreeBASIC lui-même et ses sorties compilateur soient 32-bit) et crée également des applications pour la console Xbox. D'autres plates-formes à venir. + - La bibliothèque d'exécution a été écrite avec la portabilité à l'esprit. Tous les outils tiers utilisés existent déjà sur la plupart des systèmes d'exploitation en tant que GNU binutils. Le compilateur est écrit à 100% en code FreeBASIC (donc, FreeBASIC se compile lui-même), ce qui le rend simple à être lancé car il ne dépend pas d'outils non portatables. + +**Support d'Unicode** + - Outre les fichiers ASCII avec des séquences d'échappement (\u) [[Unicode Unicode]], FreeBASIC peut analyser les fichiers source (.bas) ou en-tête (.bi) UTF-8, UTF-16LE, UTF-16BE, UTF-32LE et UTF-32BE, ils peuvent être librement mélangés avec d'autres sources/en-têtes dans le même projet (également avec d'autres fichiers ASCII). + - Les chaînes littérales peuvent être tapées dans leur alphabet original non-latin, il suffit d'utiliser un éditeur de texte qui supporte une partie des formats [[Unicode Unicode]] listés ci-dessus. + - Le type ##[[KeyPgWstring WString]]## contient des caractères "larges", toutes les procédures chaînes (comme ##[[KeyPgLeft Left]]##, ##[[KeyPgTrim Trim]]##, etc) fonctioneront aussi avec les chaînes à caractères "larges". + - ##[[KeyPgOpen Open]]## a été étendu pour supporter les fichiers UTF-8, UTF-16LE and UTF-32LE avec le spécificateur ##[[KeyPgEncoding Encoding]]##. ##[[KeyPgInputPp Input #]]## et ##[[KeyPgLineinputPp Line Input #]]##, ainsi que ##[[KeyPgPrintPp Print #]]## et ##[[KeyPgWritePp Write #]]## peuvent être utilisés normalement, et toute conversion de [[Unicode Unicode]] vers ASCII est effectuée si nécessaire. + - ##[[KeyPgPrint Print]]## supporte aussi les sorties [[Unicode Unicode]] (voir ##[[CompilerRequirements Exigences]]##). + +**Un grand nombre de types de données prédéfinis** + - Entiers: ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]##, ##[[KeyPgShort Short]]##, ##[[KeyPgUshort UShort]]##, ##[[KeyPgInteger Integer]]##, ##[[KeyPgUinteger UInteger]]##, ##[[KeyPgLong Long]]##, ##[[KeyPgUlong Ulong]]##, ##[[KeyPgLongint LongInt]]##, ##[[KeyPgUlongint ULongInt]]## + - A virgule flottante: ##[[KeyPgSingle Single]]##, ##[[KeyPgDouble Double]]## + - Chaînes: fixée, longueur variable ou terminée par NULL (##[[KeyPgZstring ZString]]##), jusqu'à 2GB de long + - Les chaînes [[Unicode Unicode]] (##[[KeyPgWstring WString]]##), comme ##[[KeyPgZstring ZString]]##, mais avec le support de caractères "larges". Utilisation directe des API [[Unicode Unicode]], etc. + +**Les types définis par l'utilisateur (UDT)** + - Nombre illimité d'imbrications. + - Prise en charge de l'instruction ##[[KeyPgType Type]]## du BASIC, avec la nouvelle déclaration ##[[KeyPgUnion Union]]## (y compris les unions anonymes imbriquées). + - Les tableaux utilisant jusqu'à huit dimensions peuvent être utilisés. + - Les pointeurs de procédure. + - Les champs de bits. -{{fbdoc item="section" value="Enumerations (enums)"}} - - Easily declare a list of constants with sequential values with ##[[KeyPgEnum Enum]]##. - -{{fbdoc item="section" value="Arrays"}} - - Fixed- and variable- length arrays are supported, up to 2 GB in size. - - Up to eight dimensions, including arrays with unknown dimensions. - - Any lower and upper boundaries. - - Element data can be preserved during a re-size of variable-length arrays with ##[[KeyPgRedim Redim]]## using the new ##[[KeyPgPreserve Preserve]]## specifier. - -{{fbdoc item="section" value="Pointers"}} - - Pointers to any of the data types listed above, including string characters, array elements and UDT's. - - Uses the same syntax as C. - - Unlimited indirection levels (e.g., pointer to pointer to ...). - - Procedure pointers. - - Indexing []'s (including string indexing). - - Type casting. +**Enumérations (enums)** + - Déclaration facile d'une liste de constantes avec des valeurs séquentielles avec ##[[KeyPgEnum Enum]]##. + +**Tableaux** + - Les tableaux de longueur fixe ou variable sont admis, jusqu'à 2 GB de taille. + - Jusqu'à huit dimensions, y compris les tableaux avec des dimensions indéterminées. + - Toutes possibilités de limites inférieures et supérieures. + - Préservation des éléments de données pendant un redimensionnement de tableau avec ##[[KeyPgRedim ReDim]]## en utilisant le nouveau spécificateur ##[[KeyPgPreserve Preserve]]##. + +**Pointeurs** + - Pointeurs vers tout type de données listé précédemment, y compris les chaînes de caractères, les éléments de tableau et les types définis par l'utilisateur. + - Utilisation de la même syntaxe que le langage C. + - Niveaux d'indirection illimité (par ex., pointeur vers pointeur vers ...). + - Pointeurs de procédures. + - Indexation avec [ ] (y compris l'indexation de chaînes). + - Transtypage. -{{fbdoc item="section" value="Variable, object and array initialization"}} - - For static, module-level or local variables, arrays and UDT's. +**Initialisation de variables, objets et tableaux** + - Pour les variables de niveau module ou locales statiques, les tableaux et les types définis par l'utilisateur. -{{fbdoc item="section" value="Default procedure parameter values"}} - - For numeric, string and UDT parameter types. +**Les valeurs par défaut des paramètres de procédure** + - Pour les paramètres des types numériques, les chaînes et les types définis par l'utilisateur. -{{fbdoc item="section" value="Procedure overloading"}} - - Including procedures with default parameter values. +**Surcharge de procédure** + - Y compris les procédures avec des valeurs par défaut de certains paramètres. -{{fbdoc item="section" value="In-line assembly"}} - - Intel syntax. - - Reference variables directly by name; no "trick code" needed. +**Assemblage en ligne** + - Syntaxe Intel. + - Référence aux variables directement par leur nom, pas de "code truc" nécessaire. -{{fbdoc item="section" value="Traditional preprocessor support"}} - - Same syntax as in C. - - Single-line macros supported with the ##[[KeyPgPpdefine #Define]]## command, including parameters. - - Multi-line macros supported with the ##[[KeyPgPpmacro #Macro]]## command. +**Support traditionnel du préprocesseur** + - Même syntaxe qu'en C. + - Support des macros mono-ligne avec la commande ##[[KeyPgPpdefine #define]]##, y compris les paramètres. + - Support des macros multi-ligne avec la commande ##[[KeyPgPpmacro #macro]]##. -{{fbdoc item="section" value="Type aliases"}} - - Supporting forward referencing as in C, including UDT and procedure pointer types. +**Alias de Type ** + - Support du "forward referencing" (référencement en avance) comme en C, y compris les types définis par l'utilisateur et pointeurs de procédure. -{{fbdoc item="section" value="C-like escape sequences for string literals"}} - - Same as in C (except numbers are interpreted as decimal, not octal). +**Séquences d'échappement, comme en C, pour les chaînes de caractères** + - Comme en C (mis à part que les nombres sont interprétés comme des décimaux, non en octal). -{{fbdoc item="section" value="Debugging support"}} - - Full debugging support with //GDB// (the GNU debugger) or //Insight// (a //GDB// GUI frontend). +**Support du débogage** + - Prise en charge complète du débogage avec //GDB// (le débogueur de GNU) ou //Insight// (un GUI pour //GDB//). - Array bounds checking (only enabled by the ##-exx## command-line option). - - Null pointer checking (same as above). + - Vérifier pointeur nul (comme précédemment). -{{fbdoc item="section" value="Create OBJ's, LIB's, DLL's, and console or GUI EXE's"}} - - You are in no way locked to an IDE or editor of any kind. - - You can create static and dynamic/shared libraries adding just one command-line option (##-lib## or ##-dylib/-dll##). +**Créer OBJ, LIB, DLL et console ou GUI EXE** + - Vous n'êtes en aucune manière bloqué sur un IDE ou un éditeur. + - Vous pouvez créer des bibliothèques statiques et dynamiques / partagées en ajoutant juste une option ligne de commande (##-lib## ou ##-dylib/-dll##). -{{fbdoc item="section" value="As a 32-bit application"}} - - FreeBASIC can compile source code files up to 2 GB in size. - - The number of symbols (variables, constants, et cetera) is only limited by the total memory available during compile time. (You can, for example, include OpenGL, GTK/SDL, BASS, simultaneously in your source code.) +**Comme une application 32-bit** + - FreeBASIC peut compiler des fichiers code source jusqu'à 2 GB. + - Le nombre de symboles (variables, constantes, etc) est seulement limité par la mémoire totale disponible pendant la compilation. (Vous pouvez, par exemple, inclure OpenGL, GTK/SDL, BASS, simultanément dans votre code source.) -{{fbdoc item="section" value="Optimized code generation"}} - - While FreeBASIC is not an optimizing compiler, it does many kinds of general optimizations to generate the fastest possible code on x86 CPU's, not losing to other BASIC alternatives, including the commercial ones. +**Génération de code optimisé** + - Bien FreeBasic ne soit pas un compilateur qui optimise le code, il fournit de nombreux types d'optimisations générales pour générer le code le plus efficace possible sur x86 CPU, sans oublier d'autres alternatives de base, notamment les commerciales. -{{fbdoc item="section" value="Completely free"}} - - All third-party tools are also free. No piece of abandoned or copyrighted software is used (except GoRC on Win32). The assembler, linker, archiver, and other command-line applications come from the GNU binutils programming tools. +**Complètement libre** + - Tous les outils tiers sont également libres. Aucun morceau de logiciel abandonné ou sous copyright n'est utilisé (excepté GoRC sous Win32). L'assembleur, le linker, l'archiveur et d'autres applications en ligne de commande proviennent des outils de programmation GNU binutils. {{fbdoc item="back" value="FBWiki|Main Page"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerHelp.wakka b/fbdocs/manual/cache/CompilerHelp.wakka index 79d2468146..8125c7d70c 100644 --- a/fbdocs/manual/cache/CompilerHelp.wakka +++ b/fbdocs/manual/cache/CompilerHelp.wakka @@ -1,40 +1,40 @@ {{fbdoc item="title" value="Getting help with FreeBASIC"}}---- -There are several options available for getting help with FreeBASIC. +Il ya plusieurs options disponibles pour obtenir de l'aide sur FreeBASIC. -{{fbdoc item="section" value="The Manual"}} - This huge user's manual is full of information that can help you learn to write programs using FreeBASIC. +**Le manuel** + Ce manuel d'utilisation énorme est rempli d'informations qui peuvent vous aider à apprendre à écrire des programmes utilisant FreeBASIC. - The manual is available online at [[http://www.freebasic.net/wiki http://www.freebasic.net/wiki]]. There is a search box at the bottom of every page to help you find what you're looking for. + Le manuel est disponible en ligne à [[http://www.freebasic.net/wiki">http://www.freebasic.net/wiki]]. Il y a un champ de recherche en bas de chaque page pour vous aider à trouver ce que vous cherchez. - If you are unfamiliar with FreeBASIC or the documentation, you may find these pages a good place to start: - - [[DocToc Table of Contents]] - - [[CatPgProgrammer Programmer's Guide]] - - [[ExtLibTOC Library Headers Index]] - - [[GlossaryIndex Glossary]] - - [[CompilerFAQ Compiler FAQ]] - - [[FaqPggfxlib2 Graphics Library FAQ]] - - [[FaqPgrtlib Runtime Library FAQ]] + Si vous n'êtes pas familier avec FreeBasic ou la documentation, les pages ci-dessous sont de bons endroits pour commencer: + - [[DocToc Table des matières]] + - [[CatPgProgrammer Le guide du programmeur]] + - [[ExtLibTOC Index des en-têtes de librairies]] + - [[GlossaryIndex Glossaire]] + - [[CompilerFAQ FAQ du compilateur]] + - [[FaqPggfxlib2 FAQ de la librairie graphique]] + - [[FaqPgrtlib FAQ du fonctionnement des librairies]] - A downloadable manual (in CHM format) is available from the sourceforge project page at [[http://sourceforge.net/projects/fbc http://sourceforge.net/projects/fbc]] which features a full table of contents, searching capabilities, an index, plus all the same content as the online version. + Un manuel téléchargeable (en format CHM) est disponible depuis la page sourceforge du projet à [[http://sourceforge.net/projects/fbc">http://sourceforge.net/projects/fbc]]. Il dispose d'une table des matières complète, de capacités de recherche, d'un index, et en plus le même contenu que la version en ligne. - Searching the manual on or offline is an excellent place to start finding help about how to write and use FreeBASIC programs. + Rechercher dans le manuel en ou hors ligne est un excellent endroit pour commencer à trouver de l'aide sur la façon d'écrire et d'utiliser des programmes FreeBasic. -{{fbdoc item="section" value="Examples and Source Code"}} - In the ./examples directory located where FreeBASIC was installed on your system are hundreds of examples to be compiled and run. Most of the external library examples will need additional libraries to be downloaded to allow them to work. See [[ExtLibTOC Library Headers Index]] for a full list. +**Exemples et Code Source** + Dans le répertoire ./exemples situés là où FreeBasic a été installé sur votre système vous trouverez des centaines d'exemples prêts à être compilés et exécutés. La plupart des exemples de bibliothèques externes nécessiteront des bibliothèques supplémentaires à télécharger pour leur permettre de fonctionner. Voir [[ExtLibTOC Index des en-têtes de librairies]] pour une liste complète. - FreeBASIC's official code archive is located at [[http://www.freebasic.net/arch http://www.freebasic.net/arch]]. This archive hosts user contributed libraries and tools and has links to source code located on other websites. + Les archives officielles de code FreeBASIC sont situées à [[http://www.freebasic.net/arch">http://www.freebasic.net/arch]]. Ces archives d'utilisateur ayant contribué à la création de bibliothèques et d'outils ont des liens vers le code source situé sur d'autres sites. -{{fbdoc item="section" value="Tutorials"}} - Community created tutorials about FreeBASIC can be found at [[http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials]]. Some selected tutorials are included in this manual. +**Tutorials** + Des tutoriels sur FreeBASIC créés par la communauté sont accessibles à [[http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials">http://www.freebasic.net/wiki/wikka.php?wakka=CommunityTutorials]]. Quelques-uns de ces tutoriels sont inclus dans ce manuel. -{{fbdoc item="section" value="FreeBASIC Forum"}} - An active community forum can be found at [[http://www.freebasic.net/forum http://www.freebasic.net/forum]] with several sub-forums. The forum has a search feature that can help you find answers to questions or problems that may have already been asked and solved. First do a search for your problem, if you can't find the answer then post a message in one of the sub-forums. +**Forum FreeBASIC** + Un forum actif de la communauté, ainsi que de nombreux sous-forums peuvent être trouvés à [[http://www.freebasic.net/forum">http://www.freebasic.net/forum]]. Le forum a une fonction de recherche qui peut vous aider à trouver des réponses à des questions ou des problèmes qui ont déjà été posés et résolus. Faites daAbord une recherche de votre problème, si vous ne trouvez pas la réponse alors postez un message dans un des sous-forums. -{{fbdoc item="section" value="Chat"}} - IRC or Internet Relay Chat is a great way to chat with the developers and other users, some of whom are very knowledgeable. There are several ways to connect to IRC, if you know what you're doing simply join #freebasic on FreeNode. +**Chat** + IRC (ou Internet Relay Chat) est un excellent moyen de discuter avec les développeurs et autres utilisateurs, dont certains sont très bien informés. Il existe plusieurs façons de se connecter à IRC, si vous savez ce que vous faites, joignez tout simplement #freebasic sur FreeNode. - If you haven't the foggiest what IRC is and you have Java installed, you can simply go [[http://www.freebasic.net/index.php/chat here]]. + Si vous n'avez pas la moindre idée ce qu'est l'IRC et que vous avez installé Java, vous pouvez simplement aller [[http://www.freebasic.net/index.php/chat">ici]]. - If you're trying to get help, the most important thing is to be patient. Sometimes you won't get a reply right away. Stick around or check back and the Community will try and assist you. + Si vous essayez d'obtenir de l'aide, la chose la plus importante est d'être patient. Parfois, vous ne recevrez pas de réponse tout de suite. Restez dans les parages ou vérifiez et que la Communauté va essayer de vous aider. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerInstalling.wakka b/fbdocs/manual/cache/CompilerInstalling.wakka index 794d15a8ba..fd1ab520cb 100644 --- a/fbdocs/manual/cache/CompilerInstalling.wakka +++ b/fbdocs/manual/cache/CompilerInstalling.wakka @@ -1,63 +1,63 @@ {{fbdoc item="title" value="Installing"}}---- -FreeBASIC installation. +Installation de FreeBASIC. -{{fbdoc item="section" value="Windows"}} - Run the installer executable, and follow its instructions. FreeBASIC uses the NSIS installer which has a strong compression. The download size is ca 6 MB, after extraction the full total size is ca 50 MB. +**Windows** + Exécutez l'installeur et suivez les instructions. FreeBASIC utilise l'installateur NSIS qui a une forte compression. La taille du téléchargement est d'environ 6 Mo, après extraction de la taille totale est d'environ 50 Mo. - FreeBASIC will be installed in ##C:\FreeBASIC##, or if you chose a different installation directory, in your chosen directory. Start Menu shortcuts to the Uninstaller and website will be installed as well. + FreeBASIC sera installé dans ##C:\FreeBASIC##, ou si vous avez choisi un répertoire différent, dans ce répertoire. Des raccourcis vers le programme de désinstallation et le site Web seront aussi installés dans le menu Démarrer. -{{fbdoc item="section" value="Linux"}} - Unpack the archive to a temporary folder and navigate to the root FreeBASIC installation directory. For example, if the FreeBASIC package you downloaded was called ##""FreeBASIC-vX.XX.Xb-linux.tar.gz""## and was in your home directory, type, +**Linux** + Décompressez l'archive dans un dossier temporaire et accédez au répertoire racine de l'installation FreeBASIC. Par exemple, si le paquet FreeBASIC que vous avez téléchargé est appelé ##FreeBASIC-vX.XX.Xb-linux.tar.gz## et est dans votre répertoire personnel, tapez: ##cd## - //(change to your home directory)// + //(changement à votre répertoire personnel)// ##mkdir -p tmp && cd tmp## - //(attempt to create a temporary directory and change to it)// - ##tar -xzf ""../FreeBASIC-vX.XX.Xb-linux.tar.gz""## - //(unpack the archive)// + //(tentative de créer un répertoire temporaire et le changement vers lui)// + ##tar -xzf ../FreeBASIC-vX.XX.Xb-linux.tar.gz## + //(décompresser l'archive)// ##cd FreeBASIC## - //(change to the root installation directory)// + //(changement à la racine de l'installation)// - Run the installation script ##install.sh## with the "-i" switch, optionally specifying the installation directory. For example, to install FreeBASIC into the default directory type, + Exécutez le script d'installation ##install.sh## avec l'option "-i", spécifiez éventuellement le répertoire d'installation. Par exemple, pour installer FreeBASIC dans le répertoire par défaut, tapez: ##sudo ./install.sh -i## - //(the default installation)// + //(l'installation par défaut)// - Run the installation script with no arguments for more info on command-line options. ##install.sh## will install FreeBASIC ##/usr/local## by default. + Exécutez le script d'installation sans argument pour en savoir plus sur les options de ligne de commande. ##install.sh## installera FreeBASIC dans ##/usr/local## par défaut. - To uninstall FreeBASIC, you can run "install.sh -u" + Pour désinstaller FreeBASIC, vous pouvez exécuter "install.sh -u" -{{fbdoc item="section" value="Linux (standalone)"}} - Unpack the archive to a temporary folder and navigate to the root FreeBASIC installation directory. For example, if the FreeBASIC package you downloaded was called ##""FreeBASIC-vX.XX.Xb-linux-standalone.tar.gz""## and was in your home directory, type, +**Linux (autonome)** + Décompressez l'archive dans un dossier temporaire et accédez au répertoire racine de l'installation FreeBASIC. Par exemple, si le paquet FreeBasic vous avez téléchargé s'appelle ##FreeBASIC-vX.XX.Xb-linux-standalone.tar.gz## et est dans votre répertoire personnel, tapez: ##cd## - //(change to your home directory)// + //(changement à votre répertoire personnel)// ##mkdir -p tmp && cd tmp## - //(attempt to create a temporary directory and change to it)// - ##tar -xzf ""../FreeBASIC-vX.XX.Xb-linux-standalone.tar.gz""## - //(unpack the archive)// + //(tentative de créer un répertoire temporaire et le changement vers lui)// + ##tar -xzf ../FreeBASIC-vX.XX.Xb-linux-standalone.tar.gz## + //(décompresser l'archive)// ##cd FreeBASIC## - //(change to the root installation directory)// + //(changement à la racine de l'installation)// - Run the installation script ##install-standalone.sh## with the "-i" switch, optionally specifying the installation directory. For example, to install FreeBASIC into the default directory type, + Exécutez le script d'installation ##install-standalone.sh## avec l'option "-i", spécifiez éventuellement le répertoire d'installation. Par exemple, pour installer FreeBASIC dans le répertoire par défaut, tapez: ##sudo ./install-standalone.sh -i## - //(the default installation)// + //(l'installation par défaut)// - Run the installation script with no arguments for more info on command-line options. ##install-standalone.sh## will install FreeBASIC to ##/usr/share/freebasic## by default and a symlink to the compiler binary will be created at ##/usr/bin/fbc## if run with root permission. + Exécutez le script d'installation sans argument pour en savoir plus sur les options de ligne de commande. ##install-standalone.sh## installera FreeBASIC dans ##/usr/share/freebasic## by default and a symlink to the compiler binary will be created at ##/usr/bin/fbc## if run with root permission. - To uninstall FreeBASIC, you can run "install-standalone.sh -u" + Pour désinstaller FreeBASIC, vous pouvez exécuter "install-standalone.sh -u" -{{fbdoc item="section" value="DOS"}} - - Find a place for FreeBASIC with at least 13 MiB free space. - - Unpack the ZIP archive, making sure that the directory structure as used inside the archive is preserved ("PKUNZIP -d" for example). - - The top-level directory is named FreeBASIC (will be truncated to "FREEBASI" in DOS without full LFN support), so you might want to rename it then to a convenient DOS-compliant name not longer than 8 characters and containing no white-spaces, like "FB". - - All the important files used by the compiler (includes, libs) inside the archive do have DOS-compliant names, therefore DOSLFN is not required to use FreeBASIC, however, some examples and texts do have longer names and will be truncated when extracted without full LFN support. +**DOS** + - Trouvez un endroit pour FreeBasic avec au moins 13 Mio d'espace libre. + - Décompressez l'archive ZIP, en s'assurant que la structure de répertoire tel qu' utilisée à l'intérieur de l'archive est conservée ("PKUNZIP -d" par exemple). + - Le répertoire de niveau supérieur est nommé FreeBASIC (sera tronqué à "FREEBASI" en DOS sans support complet LFN = Long File Name), de sorte que vous devez le renommer en utilisant un nom convenable pour DOS n'ayant pas plus de 8 caractères de longueur et ne contenant pas d'espaces, par exemple "FB". + - Tous les fichiers importants utilisés par le compilateur (includes, libs) l'intérieur de l'archive doivent avoir des noms convenables pour DOS, donc DOSLFN n'est pas nécessaire pour utiliser FreeBASIC, cependant, quelques exemples et textes ont des noms plus longs et seront tronqués lors de l'extraction sans support LFN complet. - (Note: you can install the DOS version "over" the Windows one or vice-versa, or "merge" those installations later, but rename the FBC.EXE file of the previous installation to FBCW.EXE , FBCD.EXE or such, or it will be overwritten by the new one. Other platform specific files are placed in subdirectories making sure that they won't conflict.) + (Note: vous pouvez installer la version DOS "sur" celle de Windows ou vice-versa, ou "fusionner" les installations plus tard, mais renommez le fichier FBC.EXE de l'installation précédente en FBCW.EXE, FBCD.EXE, ou autre, ou il sera écrasé par le nouveau. Les autres fichiers spécifiques pour certaines plates-formes dans des sous-répertoires afin de s'assurer qu'ils n'entrent pas en conflit.) {{fbdoc item="see"}} - - [[CompilerRunning Invoking the Compiler]] - - [[CompilerCmdLine Compiler Command Line Options]] + - [[CompilerRunning Appel du compilateur]] + - [[CompilerCmdLine Options en ligne de commande du compilateur]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptWa.wakka b/fbdocs/manual/cache/CompilerOptWa.wakka index acac4f825b..f143f446f7 100644 --- a/fbdocs/manual/cache/CompilerOptWa.wakka +++ b/fbdocs/manual/cache/CompilerOptWa.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="Compiler Option: -Wa"}}---- -Pass options to the assembler when using the assembly emitter (-gen gas), the default. +Passe les options de l'assembleur pour l'utilisation de l'émetteur d'assemblage (-gen gas), la valeur par défaut. {{fbdoc item="syntax"}}## **-Wa** < //options// > ## {{fbdoc item="param"}} ##//options//## - Additional options to pass to the assembler. + Options supplémentaires à passer à l'assembleur. {{fbdoc item="desc"}} - The ##-Wa## compiler option passes additional options to GAS, the assembler. Options must be separated by commas only. - For example: + L'option du compilateur ##-Wa## passe des options supplémentaires à GAS, l'assembleur. Les options doivent être séparées seulement par des virgules. + Par exemple: ##fbc -Wa -o,output.o,--verbose## {{fbdoc item="see"}} - - [[CompilerOptgen Compiler Option: -gen]] - - [[CompilerOptWc Compiler Option: -Wc]] - - [[CompilerOptWl Compiler Option: -Wl]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptgen Option du compilateur: -gen]] + - [[CompilerOptWc Option du compilateur: -Wc]] + - [[CompilerOptWl Option du compilateur: -Wl]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptWc.wakka b/fbdocs/manual/cache/CompilerOptWc.wakka index be315441ef..caf00231a2 100644 --- a/fbdocs/manual/cache/CompilerOptWc.wakka +++ b/fbdocs/manual/cache/CompilerOptWc.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="Compiler Option: -Wc"}}---- -Pass options to the C compiler when using the C emitter (-gen gcc). +Passe les options pour le compilateur C lors de l'utilisation de l'émetteur d'assemblage C (-gen gcc). {{fbdoc item="syntax"}}## **-Wc** < //options// > ## {{fbdoc item="param"}} ##//options//## - Additional options to pass to the C compiler. + Options supplémentaires à passer au compilateur C. {{fbdoc item="desc"}} - The ##-Wc## compiler option passes additional options to GCC, the C compiler. Options must be separated by commas only. - For example: + L'option du compilateur ##-Wc## passe des options supplémentaires pour GCC, le compilateur C. Les options doivent être séparées seulement par des virgules. + Par exemple: ##fbc -gen gcc -Wc -m32,--verbose,-include,some-header.h## {{fbdoc item="see"}} - - [[CompilerOptgen Compiler Option: -gen]] - - [[CompilerOptWa Compiler Option: -Wa]] - - [[CompilerOptWl Compiler Option: -Wl]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptgen Option du compilateur: -gen]] + - [[CompilerOptWa Option du compilateur: -Wa]] + - [[CompilerOptWl Option du compilateur: -Wl]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptWl.wakka b/fbdocs/manual/cache/CompilerOptWl.wakka index e2e02c86c8..de8af361f3 100644 --- a/fbdocs/manual/cache/CompilerOptWl.wakka +++ b/fbdocs/manual/cache/CompilerOptWl.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="Compiler Option: -Wl"}}---- -Pass options to linker +Passe des options à l'éditeur de liens {{fbdoc item="syntax"}}## **-Wl** < //options// > ## {{fbdoc item="param"}} ##//options//## - Additional options to pass to the linker. + Options supplémentaires à passer à l'éditeur de liens. {{fbdoc item="desc"}} - The ##-Wl## compiler option passes additional options to LD, the linker. Options must be separated by commas only. + L'option du compilateur ##-Wl## passe des options supplémentaires à LD, l'éditeur de liens. Les options doivent seulement être séparées par des virgules seulement. {{fbdoc item="see"}} - - [[CompilerOptWa Compiler Option: -Wa]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptWa Option du compilateur: -Wa]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOpta.wakka b/fbdocs/manual/cache/CompilerOpta.wakka index 8f08bb9d89..8550aedbaa 100644 --- a/fbdocs/manual/cache/CompilerOpta.wakka +++ b/fbdocs/manual/cache/CompilerOpta.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="Compiler Option: -a"}}---- -Add an object file to the linker's list +Ajouter un fichier objet à la liste de l'éditeur de liens {{fbdoc item="syntax"}}## [ **-a** ] < //object file// > ## {{fbdoc item="param"}} ##//object file//## - Name of the object file with extension. + Nom du fichier objet avec l'extension. {{fbdoc item="desc"}} - The ##-a## compiler option adds a compiled object file to the linker's list. The "-a" is optional if the object file name has a ".o" file extension. + L'option ##-a## du compilateur ajoute un fichier objet compilé à la liste de l'éditeur de liens. Le "-a" est facultative si le nom du fichier objet a une extension de fichier ".o". {{fbdoc item="see"}} - - [[CompilerOptb Compiler Option: -b]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptb Option du compilateur: -b]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptarch.wakka b/fbdocs/manual/cache/CompilerOptarch.wakka index c3e3f5523a..10d1979738 100644 --- a/fbdocs/manual/cache/CompilerOptarch.wakka +++ b/fbdocs/manual/cache/CompilerOptarch.wakka @@ -1,15 +1,15 @@ -{{fbdoc item="title" value="Compiler Option: -arch"}}---- -Set target architecture +.{{fbdoc item="title" value="Compiler Option: -arch"}}---- +Définir l'architecture cible {{fbdoc item="syntax"}}## **-arch** < //architecture// > ## {{fbdoc item="param"}} ##//architecture//## - The target architecture. + L'architecture cible. {{fbdoc item="desc"}} - The ##-arch## compiler option sets the target CPU architecture. The default is //486// if the //-arch// option is not specified. Recognized values: + L'option ##-arch## du compilateur définit l'architecture du processeur cible. La valeur par défaut est //486// si l'option //-arch// n'est pas spécifiée. Les valeurs reconnues sont: //386// //486// //586// @@ -25,9 +25,9 @@ Set target architecture //pentium4-sse3// //native// - Note: This option only affects newly generated code, not already-compiled code such as the ""FreeBASIC"" runtime libraries. + {{fbdoc item="see"}} -{{fbdoc item="see"}} +- [[CompilerCmdLine Utilisation de la ligne de commande]] - [[CompilerCmdLine Using the Command Line]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptb.wakka b/fbdocs/manual/cache/CompilerOptb.wakka index 2054ecae3b..36b143940c 100644 --- a/fbdocs/manual/cache/CompilerOptb.wakka +++ b/fbdocs/manual/cache/CompilerOptb.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Compiler Option: -b"}}---- -Add a source file to compilation +Ajouter un fichier source à la compilation {{fbdoc item="syntax"}}## [ **-b** ] < //source file// > ## {{fbdoc item="param"}} ##//source file//## - The name with extension, and optionally a path, of the basic source file. + Le nom avec l'extension et éventuellement un chemin d'accès du fichier source de base. {{fbdoc item="desc"}} - The ##**-b**## option adds a source file to the compilation list. In general, this option is redundant since source files with a //.bas// extension can be specified without it, but is useful if a source file does not have a //.bas// extension, or if exists in an other directory. + L'option ##**-b**## ajoute un fichier source à la liste de compilation. En général, cette option est superflue car les fichiers source avec une extension //.bas// peuvent être spécifiés sans elle, mais elle est utile si un fichier source n'a pas une extension //.bas// ou s'il existe dans un autre répertoire. - To compile and link the source files //file1.bas//, //file2.bas// and //file3.fb// into an executable (//file1.exe// in DOS/Windows, //file1// in Linux), type, + Pour compiler et lier les fichiers source //file1.bas//, //file2.bas// et //file3.fb// dans un fichier exécutable (//file1.exe// sous DOS/Windows, //file1// sous Linux), tapez: ##fbc **-b** file1.bas file2.bas **-b** file3.fb## - Note that the ##**-b**## option was not needed for //file1.bas// or //file2.bas//. + Notez que l'option ##**-b**## n'est pas nécessaire pour //file1.bas// ou //file2.bas//. {{fbdoc item="see"}} - - [[CompilerOpta Compiler Option: -a]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOpta Option du compilateur: -a]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptc.wakka b/fbdocs/manual/cache/CompilerOptc.wakka index bb00ccb2ec..dc75a5c748 100644 --- a/fbdocs/manual/cache/CompilerOptc.wakka +++ b/fbdocs/manual/cache/CompilerOptc.wakka @@ -1,19 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -c"}}---- -Compile and assemble source file only, do not link +Compile et assemble seulement le fichier source, ne lie pas {{fbdoc item="syntax"}}## **-c** ## {{fbdoc item="desc"}} - The ##**-c**## option specifies that any source files listed are to be compiled and assembled into object files, and not linked into an executable (the default behavior). + L'option ##**-c**## spécifie que tous les fichiers source listés doivent être compilés et assemblés en fichiers objet et non liés dans un fichier exécutable (comportement par défaut). - To compile the source files //file1.bas// and //file2.bas// into the object files //file1.o// and //apple.o//, type, - - ##fbc -c file1.bas file2.bas **-o** apple.o## - -{{fbdoc item="see"}} - - [[CompilerOptcupp Compiler Option: -C]] - - [[CompilerOptr Compiler Option: -r]] - - [[CompilerCmdLine Using the Command Line]] +Pour compiler les fichiers source //file1.bas// et //file2.bas// en fichier objet //file1.o// et //apple.o//, tapez: + ##fbc -c file1.bas file2.bas **-o** apple.o## + {{fbdoc item="see"}} + - [[CompilerOptcupp Option du compilateur: -C]] + - [[CompilerOptr Option du compilateur: -r]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptcupp.wakka b/fbdocs/manual/cache/CompilerOptcupp.wakka index 43f7a2e431..64c6d96073 100644 --- a/fbdocs/manual/cache/CompilerOptcupp.wakka +++ b/fbdocs/manual/cache/CompilerOptcupp.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Compiler Option: -C"}}---- -Do not delete the object file(s) +Ne pas supprimer le(s) fichier(s) objet {{fbdoc item="syntax"}}## **-C** ## {{fbdoc item="desc"}} - The ##-C## compiler option causes the object file(s) that are generated during the compile process to not be deleted. + L'option ##-C## du compilateur implique que le(s) fichier(s) objet qui est/sont généré(s) pendant le processus de compilation de n'est/ne sont pas supprimé(s). {{fbdoc item="see"}} - - [[CompilerOptc Compiler Option: -c]] - - [[CompilerOptrupp Compiler Option: -R]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptc Option du compilateur: -c]] + - [[CompilerOptrupp Option du compilateur: -R]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptd.wakka b/fbdocs/manual/cache/CompilerOptd.wakka index 42d286110c..d44633505e 100644 --- a/fbdocs/manual/cache/CompilerOptd.wakka +++ b/fbdocs/manual/cache/CompilerOptd.wakka @@ -1,22 +1,22 @@ -{{fbdoc item="title" value="Compiler Option: -d"}}---- -Add a preprocessor definition +h{{fbdoc item="title" value="Compiler Option: -d"}}---- +Ajouter une définition préprocesseur {{fbdoc item="syntax"}}## **-d** < //name//=//value// > ## {{fbdoc item="param"}} ##//name//## - Name of the preprocessor macro to define. + Nom de la macro du préprocesseur à définir. ##//value//## - Value to give to the macro. + Valeur à donner à la macro. {{fbdoc item="desc"}} - The ##-d## compiler option adds a preprocessor macro to all source files. The same as using the preprocessor directive ##[[KeyPgPpdefine #define]]## or ##[[KeyPgPpmacro #macro]]##. + L'option ##-d## du compilateur ajoute une macro préprocesseur à tous les fichiers source. Identique à l'utilisation de la directive préprocesseur ##[[KeyPgPpdefine #define]]## ou ##[[KeyPgPpmacro #macro]]##. {{fbdoc item="see"}} - [[KeyPgPpdefine #define]] - [[KeyPgPpmacro #macro]] - - [[CatPgDddefines Intrinsic Defines]] - - [[CompilerCmdLine Using the Command Line]] + - [[CatPgDddefines Définitions intrinsèques]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptdll.wakka b/fbdocs/manual/cache/CompilerOptdll.wakka index 9e3bd684c9..394bd14955 100644 --- a/fbdocs/manual/cache/CompilerOptdll.wakka +++ b/fbdocs/manual/cache/CompilerOptdll.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Compiler Option: -dll"}}---- -Create a DLL and import library +Créer une bibliothèque DLL et d'importation {{fbdoc item="syntax"}}## **-dll** ## {{fbdoc item="desc"}} - The ##-dll## compiler option creates a dynamic link library. This creates a DLL under Windows (including the import library), and creates a .so under Linux. + L'option du compilateur ##-dll## crée une bibliothèque de liens dynamiques. Cela crée une DLL sous Windows (y compris la bibliothèque d'importation), et crée un fichier .so sous Linux. - The intrinsic macro ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## is set to non-zero (-1) if the ##-dll## option was specified, and set to zero (0) otherwise. + La macro intrinsèque ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## est fixée à non-zéro (-1) si l'option ##-dll## a été spécifiée et à zéro (0) autrement. {{fbdoc item="target"}} - - Not supported on the DOS platform. + - Non supporté sur les plates-formes DOS. {{fbdoc item="see"}} - ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## - - [[ProPgSharedLibraries Shared Libraries]] - - [[CompilerCmdLine Using the Command Line]] + - [[ProPgSharedLibraries Bibliothèques partagées]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptdylib.wakka b/fbdocs/manual/cache/CompilerOptdylib.wakka index c5067be8d0..79737b28c0 100644 --- a/fbdocs/manual/cache/CompilerOptdylib.wakka +++ b/fbdocs/manual/cache/CompilerOptdylib.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Compiler Option: -dylib"}}---- -Create a DLL and import library +Créer une bibliothèque DLL et d'importation {{fbdoc item="syntax"}}## **-dylib** ## {{fbdoc item="desc"}} - The ##-dylib## compiler option creates a dynamic link library. This creates a DLL under Windows (including the import library), and creates a .so under Linux. + L'option du compilateur ##-dylib## crée une bibliothèque de liens dynamiques. Cela crée une DLL sous Windows (y compris la bibliothèque d'importation), et crée un fichier .so sous Linux. - The intrinsic macro ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## is set to non-zero (-1) if the ##-dll## option was specified, and set to zero (0) otherwise. + La macro intrinsèque ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## est fixée à non-zéro (-1) si l'option ##-dylib## a été spécifiée et à zéro (0) autrement. {{fbdoc item="target"}} - - Not supported on the DOS platform. + - Non supporté sur les plates-formes DOS. {{fbdoc item="see"}} - ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## - - [[ProPgSharedLibraries Shared Libraries]] - - [[CompilerCmdLine Using the Command Line]] + - [[ProPgSharedLibraries Bibliothèques partagées]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOpte.wakka b/fbdocs/manual/cache/CompilerOpte.wakka index 8fcdc128fa..440153aa63 100644 --- a/fbdocs/manual/cache/CompilerOpte.wakka +++ b/fbdocs/manual/cache/CompilerOpte.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -e"}}---- -Add error checking +Ajouter la vérification des erreurs {{fbdoc item="syntax"}}## **-e** ## {{fbdoc item="desc"}} - Adds QuickBASIC-like error checking. + Ajoute la vérification des erreurs comme dans QuickBASIC. {{fbdoc item="see"}} - ##[[KeyPgDdfberr __FB_ERR__]]## - - [[CompilerOptex Compiler Option: -ex]] - - [[CompilerOptexx Compiler Option: -exx]] - - [[ProPgErrorHandling Error Handling]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptex Option du compilateur: -ex]] + - [[CompilerOptexx Option du compilateur: -exx]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptex.wakka b/fbdocs/manual/cache/CompilerOptex.wakka index 03f333689b..1afc5dda2a 100644 --- a/fbdocs/manual/cache/CompilerOptex.wakka +++ b/fbdocs/manual/cache/CompilerOptex.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -ex"}}---- -Add error checking with ##[[KeyPgResume Resume]]## support +Ajouter la vérification des erreurs avec la prise en charge de ##[[KeyPgResume Resume]]## {{fbdoc item="syntax"}}## **-ex** ## {{fbdoc item="desc"}} - The ##-ex## compiler option adds error handling as with the //[[CompilerOpte -e]]// option plus support for ##[[KeyPgResume Resume]]##. + L'option du compilateur ##-ex## ajoute que la gestion des erreurs avec l'option //[[CompilerOpte -e]]// plus le support de ##[[KeyPgResume Resume]]##. {{fbdoc item="see"}} - ##[[KeyPgDdfberr __FB_ERR__]]## - - [[CompilerOpte Compiler Option: -e]] - - [[CompilerOptexx Compiler Option: -exx]] - - [[ProPgErrorHandling Error Handling]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOpte Option du compilateur: -e]] + - [[CompilerOptexx Option du compilateur: -exx]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptexport.wakka b/fbdocs/manual/cache/CompilerOptexport.wakka index b9f342c9fc..b9793d2db1 100644 --- a/fbdocs/manual/cache/CompilerOptexport.wakka +++ b/fbdocs/manual/cache/CompilerOptexport.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Compiler Option: -export"}}---- -Export symbols for dynamic linkage +Exporter les symboles pour la liaison dynamique {{fbdoc item="syntax"}}## **-export** ## {{fbdoc item="desc"}} - The ##-export## compiler option exports symbols for dynamic linkage. + L'option du compilateur ##-export## exporter les symboles pour la liaison dynamique. {{fbdoc item="see"}} - ##[[KeyPgExport Export]]## - - [[ProPgSharedLibraries Shared Libraries]] - - [[CompilerCmdLine Using the Command Line]] + - [[ProPgSharedLibraries Bibliothèques partagées]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptexx.wakka b/fbdocs/manual/cache/CompilerOptexx.wakka index 7af5d22d1d..40e230971c 100644 --- a/fbdocs/manual/cache/CompilerOptexx.wakka +++ b/fbdocs/manual/cache/CompilerOptexx.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -exx"}}---- -Add error checking with ##[[KeyPgResume Resume]]## support and array bounds and null-pointer checking +Ajouter la vérification des erreurs avec le support de ##[[KeyPgResume Resume]]##, des limites des tableaux et la vérification de pointeur NULL {{fbdoc item="syntax"}}## **-exx** ## {{fbdoc item="desc"}} - The ##-exx## compiler option adds error checking with ##[[KeyPgResume Resume]]## support plus array bounds and null-pointer checking. + L'option du compilateur ##-exx## ajoute la vérification des erreurs avec le support de ##[[KeyPgResume Resume]]## plus des limites de tableau et la vérification de pointeur NULL. {{fbdoc item="see"}} - ##[[KeyPgDdfberr __FB_ERR__]]## - - [[CompilerOpte Compiler Option: -e]] - - [[CompilerOptex Compiler Option: -ex]] - - [[ProPgErrorHandling Error Handling]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOpte Option du compilateur: -e]] + - [[CompilerOptex Option du compilateur: -ex]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptforcelang.wakka b/fbdocs/manual/cache/CompilerOptforcelang.wakka index e161dd78f0..1a65e313d0 100644 --- a/fbdocs/manual/cache/CompilerOptforcelang.wakka +++ b/fbdocs/manual/cache/CompilerOptforcelang.wakka @@ -1,41 +1,41 @@ {{fbdoc item="title" value="Compiler Option: -forcelang"}}---- -Provides ""QuickBASIC"" or backward compatibility +Permet QuickBASIC ou la compatibilité descendante {{fbdoc item="syntax"}}## **-forcelang** //dialect// ## {{fbdoc item="param"}} ##//dialect//## - The dialect to use in compilation, one of ##**fb**## (default), ##**fblite**##, ##**qb**## or ##**deprecated**##. + Le dialecte à utiliser pour la compilation, l'un de ceux-ci ##**fb**## (par défaut), ##**fblite**##, ##**qb**## ou ##**deprecated**##. {{fbdoc item="desc"}} - The ##-forcelang## compiler option changes the way source code is interpreted, and is meant as a tool to users wanting traditional ""QuickBASIC""-like behavior, or behavior deprecated from previous versions of ""FreeBASIC"". It overrides any ##[[KeyPgPplang #lang]]## statements within the code. + L'option du compilateur ##-forcelang## modifie la façon dont le code source est interprété, et est conçu comme un outil pour les utilisateurs souhaitant un comportement semblable à un QuickBASIC traditionnel, ou le comportement obsolète des versions précédentes de FreeBASIC. Elle remplace les déclarations ##[[KeyPgPplang #lang]]## dans le code. - The intrinsic macro ##[[KeyPgDdfblang __FB_LANG__]]## is set to the string name of the dialect specified on the command line, or ##"fb"## by default. + La macro intrinsèque ##[[KeyPgDdfblang __FB_LANG__]]## La macro intrinsèque est réglée sur la chaîne nom du dialecte spécifié sur la ligne de commande, ou ##"fb"## par défaut. - To learn more about the differences between each of these language dialects, see [[CompilerDialects Compiler Dialects]]. + Pour en savoir plus sur les différences entre chacun de ces dialectes du langage, voir [[CompilerDialects Les dialectes du compilateur]]. - {{fbdoc item="subsect" value="fb"}} + **fb** - This is the default dialect, and allows compilation of source code adhering to the most recent version of the ""FreeBASIC"" language. + C'est le dialecte par défaut, et il permet la compilation du code source en respectant la version la plus récente du langage FreeBasic. - {{fbdoc item="subsect" value="fblite"}} + **fblite** - This dialect provides support for ""FreeBASIC"" syntax and functionality, but with a more traditional ""QuickBASIC"" programming style. + Ce dialecte fournit un support pour la syntaxe et la fonctionnalité de FreeBasic mais avec un style de programmation QuickBASIC plus traditionnel. - {{fbdoc item="subsect" value="qb"}} + **qb** - This dialect provides the best support for older ""QuickBASIC"" code. + Ce dialecte offre le meilleur support du code QuickBASIC plus ancien. - {{fbdoc item="subsect" value="deprecated"}} + **deprecated** - This dialect is for backward compatibility with some previous versions of ""FreeBASIC"", however, this dialect may not exist in future versions. Programmers should consider using the "fblite" dialect instead. + Ce dialecte est pour la compatibilité descendante avec les versions précédentes de FreeBasic, cependant, ce dialecte peut ne plus exister dans les versions futures. Les programmeurs doivent envisager d'utiliser plutôt le dialecte "fblite". {{fbdoc item="see"}} - ##[[KeyPgPplang #lang]]## - ##[[KeyPgDdfblang __FB_LANG__]]## - - [[CompilerOptlang Compiler Option: -lang]] - - [[CompilerDialects Compiler Dialects]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptlang Option du compilateur: -lang]] + - [[CompilerDialects Dialectes du compilateur]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptfpu.wakka b/fbdocs/manual/cache/CompilerOptfpu.wakka index a713b8bb46..f62dfa8aa1 100644 --- a/fbdocs/manual/cache/CompilerOptfpu.wakka +++ b/fbdocs/manual/cache/CompilerOptfpu.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Compiler Option: -fpu"}}---- -Sets the math unit to be used for floating point arithmetics. +Définit l'unité de mathématique à utiliser pour les opérations arithmétiques en virgule flottante. {{fbdoc item="syntax"}}## **-fpu** < //type// > ## {{fbdoc item="param"}} ##//type//## - The floating point unit: ##X87## | ##SSE##. + L'unité de virgule flottante: ##X87## | ##SSE##. {{fbdoc item="desc"}} - The ##-fpu## compiler option sets the math unit to be used for floating point arithmetics. If this option is not specified, the default is ##-fpu X87##. + L'option du compilateur ##-fpu## définit l'unité de mathématique à utiliser pour l'arithmétique en virgule flottante. Si cette option n'est pas spécifiée, la valeur par défaut est ##-fpu X87##. - ##-fpu X87## will generate floating point instructions for the 387. + ##-fpu X87## va générer des instructions en virgule flottante pour le 387. - ##-fpu SSE## will generate floating point instructions for SSE and SSE2 with some math support still done by the 387. + ##-fpu SSE## va générer des instructions en virgule flottante pour les SSE et SSE2 avec un certain support en mathématique déjà produit par le 387. - Functions normally return a floating point value (##[[KeyPgSingle Single]]## or ##[[KeyPgDouble Double]]##) in the ##st(0)## register. Sometimes, this may be optimized by returning the value in the ##xmm0## register instead. This can be specified with ##[[KeyPgOption Option("SSE")]]## after the return type in a function's declaration or definition. ##[[KeyPgOption Option("SSE")]]## is ignored unless the source is compiled with the ##-fpu SSE## command line option. + Les fonctions normalement retournent une valeur à virgule flottante (##[[KeyPgSingle Single]]## ou ##[[KeyPgDouble Double]]##) dans le registre ##st(0)##. Parfois, cela peut être optimisé en retournant la valeur plutôt dans le registre ##xmm0##. Cela peut être spécifié avec l'##[[KeyPgOption Option("Sse")]]## après le type de retour dans la déclaration ou la définition d'une fonction. ##[[KeyPgOption Option("Sse")]]## est ignorée sauf si la source est compilée avec l'option de ligne de commande ##-fpu SSE##. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] - ##[[KeyPgOption Option()]]## - ##[[KeyPgDdfbfpu __FB_FPU__]]## diff --git a/fbdocs/manual/cache/CompilerOptg.wakka b/fbdocs/manual/cache/CompilerOptg.wakka index 92d1ef7ad1..0b1ef0f9b6 100644 --- a/fbdocs/manual/cache/CompilerOptg.wakka +++ b/fbdocs/manual/cache/CompilerOptg.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -g"}}---- -Add debug information +Ajouter les informations de débogage {{fbdoc item="syntax"}}## **-g** ## {{fbdoc item="desc"}} - The ##-g## compiler option inserts debugging symbols into output files, to use with GDB-compatible debuggers. + L'option du compilateur ##-g## insère des symboles de débogage dans les fichiers produits, pour les utiliser avec les débogueurs compatibles avec GDB. - The intrinsic macro ##[[KeyPgDdfbdebug __FB_DEBUG__]]## is set to non-zero (-1) if the option was specified, and set to zero (0) otherwise. + La macro intrinsèque ##[[KeyPgDdfbdebug __FB_DEBUG__]]## est fixée à non-zéro (-1) si l'option a été spécifiée, et mise à zéro (0) autrement. {{fbdoc item="see"}} - ##[[KeyPgDdfbdebug __FB_DEBUG__]]## - - [[DebuggerRunning Debugging]] - - [[CompilerCmdLine Using the Command Line]] + - [[DebuggerRunning Débogage]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptgen.wakka b/fbdocs/manual/cache/CompilerOptgen.wakka index 6d307bd312..74912f7578 100644 --- a/fbdocs/manual/cache/CompilerOptgen.wakka +++ b/fbdocs/manual/cache/CompilerOptgen.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Compiler Option: -gen"}}---- -Sets the backend code emitter. +Définit l'émetteur de code des étapes de la fin de la compilation. {{fbdoc item="syntax"}}## **-gen** < //backend// > ## {{fbdoc item="param"}} ##//backend//## - ##**gas**## for x86 GAS assembly or ##**gcc**## for GNU C. + ##**gas**## l'assemblage avec GAS pour x86 ou ##**gcc**## pour GNU C. {{fbdoc item="desc"}} - The ##-gen## compiler option sets the backend code emitter and assembler. + L'option de compilateur ##-gen## définit l'émetteur de code "backend" et assembleur. - {{fbdoc item="subsect" value="-gen gas"}} - The compiler will emit GAS assembler code to a ##.asm## file which will then be compiled to an object file using '##as##'. + **-gen gas** + Le compilateur enverra le code de l'assembleur GAS assembler à un fichier ##.asm## qui sera ensuite compilé dans un fichier objet à l'aide de '##as##'. - {{fbdoc item="subsect" value="-gen gcc"}} - The compiler will emit C code to a ##.c## file which will then be compiled to an object file using '##gcc##' as a high level assembler. **Note**: the C emitter is a work in progress, incomplete, and certainly not bug free. However, the goal of the C emitter (when complete) will be to make it possible to port ""FreeBASIC""-compiled programs (and ##fbc## itself) to other platforms. + **-gen gcc** + Le compilateur enverra le code à un fichier ##.c## qui sera ensuite compilé dans un fichier objet à l'aide de '##gcc##' en tant qu' assembleur de haut niveau. **Note:** l'émetteur C est un travail en cours, incomplet, et certainement pas exempt de bugs. Cependant, l'objectif de l'émetteur C (une fois terminé) sera de permettre de porter des programmes compilés FreeBASIC (et ##fbc## lui-même) sur d'autres plates-formes. {{fbdoc item="see"}} - - [[CompilerTools Tools used by fbc]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerTools Les outils utilisés par fbc]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} diff --git a/fbdocs/manual/cache/CompilerOpti.wakka b/fbdocs/manual/cache/CompilerOpti.wakka index ef45869410..8db45ab262 100644 --- a/fbdocs/manual/cache/CompilerOpti.wakka +++ b/fbdocs/manual/cache/CompilerOpti.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Compiler Option: -i"}}---- -Add a path to search for include files +Ajouter un chemin de recherche pour les fichiers "include" {{fbdoc item="syntax"}}## **-i** < //include path// > ## {{fbdoc item="param"}} ##//include path//## - The directory path, relative or absolute, of where to search for include files. + Le chemin du répertoire, relatif ou absolu, où chercher des fichiers d'inclusion. {{fbdoc item="desc"}} - The ##**-i**## option allows an additional directory to be used when searching for header files. By default, ##fbc## searches in the current directory, and //prefix///inc--in that order--where, //prefix// is the location where FreeBASIC is installed. A directory specified with the ##**-i**## option will be searched before these default directories, and when the ##**-i**## option is used multiple times, ##fbc## will search the directories in the order they are listed on the command-line. + L'option ##**-i**## permet d'ajouter un répertoire qui sera utilisé lors de la recherche des fichiers d'en-tête. Par défaut, ##fbc## cherche dans le répertoire courant et dans //prefix///inc --dans cet ordre-- où, //prefix// est l'emplacement où est installé FreeBASIC. Un répertoire spécifié avec l'option ##**-i**## sera cherché avant ces répertoires par défaut, et quand l'option ##**-i**## est utilisée plusieurs fois, ##fbc## recherchera les répertoires dans l'ordre où ils sont inscrits sur la ligne de commande. - To search in the subdirectory //includes// first for header files while compiling the source file //file.bas//, type, + Pour effectuer une recherche des fichiers d'en-tête, en premier dans le sous-répertoire //includes//, lors de la compilation du fichier source //file.bas//, tapez: ##fbc -i includes file.bas ## {{fbdoc item="see"}} - ##[[KeyPgInclude #include]]## - - [[CompilerOptinclude Compiler Option: -include]] - - [[ProPgHeaderFiles Header Files]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptinclude Option du compilateur: -include]] + - [[ProPgHeaderFiles Fichiers d'en-tête]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptinclude.wakka b/fbdocs/manual/cache/CompilerOptinclude.wakka index 585125ccfd..c9bf959f05 100644 --- a/fbdocs/manual/cache/CompilerOptinclude.wakka +++ b/fbdocs/manual/cache/CompilerOptinclude.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Compiler Option: -include"}}---- -Include a header file on each source compiled +Inclure un fichier en-tête dans chaque source compilé {{fbdoc item="syntax"}}## **-include** < //include file// > ## {{fbdoc item="param"}} ##//include file//## - The header file name with extension, and optionally a path, to include. + Le nom du fichier d'en-tête, à inclure, avec l'extension et éventuellement un chemin. {{fbdoc item="desc"}} - The ##**-include**## option has the effect of adding an ##[[KeyPgInclude #include]]## preprocessor directive to the very beginning of each source file before processing it. When used multiple times, the files will be included in the order they are listed on the command-line. + L'option ##**-include**## a pour effet ajouter une directive ##[[KeyPgInclude #include]]## du préprocesseur au début de chaque fichier source avant de le traiter. Lorsqu'elle est utilisée à plusieurs reprises, les fichiers seront inclus dans l'ordre où ils sont inscrits sur la ligne de commande. - To include the file //header.bi// when processing //file1.bas// and //file2.bas//, type, + Pour inclure le fichier //header.bi// lors de la compilation de //file1.bas// et //file2.bas//, tapez: ##fbc -include header.bi file1.bas file2.bas## {{fbdoc item="see"}} - ##[[KeyPgInclude #include]]## - - [[CompilerOpti Compiler Option: -i]] - - [[ProPgHeaderFiles Header Files]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptinclude Option du compilateur: -i]] + - [[ProPgHeaderFiles Fichiers d'en-tête]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptlang.wakka b/fbdocs/manual/cache/CompilerOptlang.wakka index d769d4346d..49fa559c37 100644 --- a/fbdocs/manual/cache/CompilerOptlang.wakka +++ b/fbdocs/manual/cache/CompilerOptlang.wakka @@ -1,43 +1,43 @@ {{fbdoc item="title" value="Compiler Option: -lang"}}---- -Provides ""QuickBASIC"" or backward compatibility +Fournit la compatibilité descendante ou QuickBASIC {{fbdoc item="syntax"}}## **-lang** //dialect// ## {{fbdoc item="param"}} ##//dialect//## - The dialect to use in compilation, one of ##**fb**## (default), ##**fblite**##, ##**qb**## or ##**deprecated**##. + Le dialecte à utiliser lors de la compilation, un des suivants ##**fb**## (défaut), ##**fblite**##, ##**qb**## ou ##**deprecated**##. {{fbdoc item="desc"}} - The ##-lang## compiler option changes the way source code is interpreted, and is meant as a tool to users wanting traditional ""QuickBASIC""-like behavior, or behavior deprecated from previous versions of ""FreeBASIC"". + L'option du compilateur ##-lang## L'option du compilateur modifie la manière dont le code source est interprété et se veut un outil pour les utilisateurs qui souhaitent un comportement traditionnel de type QuickBASIC ou un comportement obsolète des versions précédentes de FreeBASIC. - The intrinsic macro ##[[KeyPgDdfblang __FB_LANG__]]## is set to the string name of the dialect specified on the command line, or ##"fb"## by default. + La macro intrinsèque ##[[KeyPgDdfblang __FB_LANG__]]## est définie sur le nom de chaîne du dialecte spécifié sur la ligne de commande ou ##"fb"## par défaut. - To learn more about the differences between each of these language dialects, see [[CompilerDialects Compiler Dialects]]. + Pour en savoir plus sur les différences entre chacun de ces dialectes du langage, voir [[CompilerDialects Les dialectes du compilateur]]. - {{fbdoc item="subsect" value="fb"}} + **fb** - This is the default dialect, and allows compilation of source code adhering to the most recent version of the ""FreeBASIC"" language. + C'est le dialecte par défaut qui permet la compilation d'un code source adhérant à la version la plus récente du langage FreeBASIC. - {{fbdoc item="subsect" value="fblite"}} + **fblite** - This dialect provides support for ""FreeBASIC"" syntax and functionality, but with a more traditional ""QuickBASIC"" programming style. + Ce dialecte fournit un support pour la syntaxe et la fonctionnalité FreeBasic, mais avec une programmation de style QuickBASIC plus traditionnel. - {{fbdoc item="subsect" value="qb"}} + **qb** - This dialect provides the best support for older ""QuickBASIC"" code. + Ce dialecte offre le meilleur soutien pour l'ancien code de QuickBASIC. - {{fbdoc item="subsect" value="deprecated"}} + **deprecated** - This dialect is for backward compatibility with some previous versions of ""FreeBASIC"", however, this dialect may not exist in future versions. Programmers should consider using the "fblite" dialect instead. + Ce dialecte existe pour la compatibilité descendante avec les versions précédentes de FreeBasic, cependant, ce dialecte pourrait disparaître dans les versions futures. Les programmeurs doivent envisager d'utiliser plutôt le dialecte "fblite". - Note: this command-line option can be overridden by any ##[[KeyPgPplang #lang]]## statements used in the code. + Note: cette option de ligne de commande peut être annulée par les déclarations de ##[[KeyPgPplang #lang]]## utilisées dans le code. {{fbdoc item="see"}} - ##[[KeyPgPplang #lang]]## - ##[[KeyPgDdfblang __FB_LANG__]]## - [[CompilerOptforcelang Compiler Option: -forcelang]] - - [[CompilerDialects Compiler Dialects]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerDialects Les dialectes du compilateur]] + - [[CompilerCmdLine Utilisation de la ligne de commander]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptlib.wakka b/fbdocs/manual/cache/CompilerOptlib.wakka index f87424ea69..7cfa131604 100644 --- a/fbdocs/manual/cache/CompilerOptlib.wakka +++ b/fbdocs/manual/cache/CompilerOptlib.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -lib"}}---- -Create a static library +Créer une bibliothèque statique {{fbdoc item="syntax"}}## **-lib** ## {{fbdoc item="desc"}} - The ##-lib## compiler option creates a static library. + L'option du compilateur ##-lib## crée une bibliothèque statique. - The intrinsic macro ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## is set to non-zero (-1) if the ##-lib## option was specified, and set to zero (0) otherwise. + La macro est intrinsèque ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## est fixée à non-zéro (-1) si l'option ##-lib## a été spécifiée, et mise à zéro (0) autrement. {{fbdoc item="see"}} - ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## - - [[ProPgStaticLibraries Static Libraries]] - - [[CompilerCmdLine Using the Command Line]] + - [[ProPgStaticLibraries Les bibliothèques statiques]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptm.wakka b/fbdocs/manual/cache/CompilerOptm.wakka index b2657837ed..4bfececf39 100644 --- a/fbdocs/manual/cache/CompilerOptm.wakka +++ b/fbdocs/manual/cache/CompilerOptm.wakka @@ -1,21 +1,22 @@ {{fbdoc item="title" value="Compiler Option: -m"}}---- -Main file without extension to indicate the main module +Fichier principal sans extension pour indiquer le module principal {{fbdoc item="syntax"}}## **-m** < //source file// > ## {{fbdoc item="param"}} ##//source file//## - The name without extension of the main module source file + Le nom sans extension du fichier source du module principal {{fbdoc item="desc"}} - The ##-m## compiler option specifies a main entry point for a source file; the argument is the name of a source file minus its extension. If "-m" is not specified, the first source file listed is given a main entry point. When using the "-c" switch, "-m" must be specified when compiling a main source file. + L'option du compilateur ##-m## spécifie un point d'entrée principal pour un fichier source; l'argument est le nom d'un fichier source moins son extension. Si "-m" ou "-entry" n'est pas spécifié, le premier fichier source de la liste est donné comme point d'entrée principal. Lorsque vous utilisez l'option "-c", "-m" ou "-entry" doivent être spécifiés lors de la compilation d'un fichier source principal. Même chose que pour l'option "-entry" du compilateur. - The intrinsic macro ##[[KeyPgDdFBMain __FB_MAIN__]]## is defined in the main module and not defined in other modules. + La macro intrinsèque ##[[KeyPgDdFBMain __FB_MAIN__]]## La macro intrinsèque est définie dans le module principal et pas définie dans les autres modules. {{fbdoc item="see"}} - ##[[KeyPgDdFBMain __FB_MAIN__]]## - - [[CompilerOptc Compiler Option: -c]] + - [[CompilerOptc Option du compilateur: -c]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] - [[CompilerCmdLine Using the Command Line]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptmap.wakka b/fbdocs/manual/cache/CompilerOptmap.wakka index 0336b672d6..8b9b581fe4 100644 --- a/fbdocs/manual/cache/CompilerOptmap.wakka +++ b/fbdocs/manual/cache/CompilerOptmap.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -map"}}---- -Save the linking map to file name +Enregistrer la carte de l'édition des liens sous un nom de fichier {{fbdoc item="syntax"}}## **-map** < //map file// > ## {{fbdoc item="param"}} ##//map file//## - Name of the map file to save generated during linking. + Nom du fichier pour sauver la carte générée pedant l'édition des liens. {{fbdoc item="desc"}} - The ##-map## compiler option saves the a map file of the executable made. + L'option de compilateur ##-map## enregistre dans un fichier la carte de l'édition des liens de l'exécutable . {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptmaxerr.wakka b/fbdocs/manual/cache/CompilerOptmaxerr.wakka index 531b387f15..58e4fd366d 100644 --- a/fbdocs/manual/cache/CompilerOptmaxerr.wakka +++ b/fbdocs/manual/cache/CompilerOptmaxerr.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -maxerr"}}---- -Set maximum number of errors to report before aborting compilation +Fixe le nombre maximum d'erreurs à signaler avant l'abandon de la compilation {{fbdoc item="syntax"}}## **-maxerr** < //value// | "inf" > ## {{fbdoc item="param"}} ##//value// | "inf"## - Specifies the maximum number of errors or no maximum if "inf" is given instead of a value. + Spécifie le nombre maximum d'erreurs ou pas de maximum, si "inf" est donné au lieu d'une valeur. {{fbdoc item="desc"}} - The ##-maxerr## compiler option sets the maximum number of errors the compiler must find before stopping. The default is 10. If **inf**, for infinite, is specified the compiler continues until it finds the end of the source. Useful if an IDE is parsing the error messages. + L'option du compilateur ##-maxerr## définit le nombre maximum d'erreurs que le compilateur doit trouver avant de s'arrêter. La valeur par défaut est de 10. Si **inf**, pour l'infini, est spécifié le compilateur continue jusqu'à ce qu'il trouve la fin du source. Utile si un IDE analyse des messages d'erreur. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptmt.wakka b/fbdocs/manual/cache/CompilerOptmt.wakka index 2f6ccd368b..5f3f27cdaa 100644 --- a/fbdocs/manual/cache/CompilerOptmt.wakka +++ b/fbdocs/manual/cache/CompilerOptmt.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="Compiler Option: -mt"}}---- -Link with thread-safe runtime library +Lien avec bibliothèque "thread-safe runtime" {{fbdoc item="syntax"}}## **-mt** ## {{fbdoc item="desc"}} - The ##-mt## compiler option forces linking with thread-safe runtime library for multithreaded applications. The thread-safe version is always used automatically if the FreeBASIC built-in threading functions are used, so you only need to specify this option if using your own threading routines. + L'option de compilateur ##-mt## force la liaison avec la bibliothèque "runtime thread-safe" pour les applications "multi-thread". La version "thread-safe" est toujours utilisée automatiquement si les fonctions intégrées FreeBASIC sont utilisées, donc vous ne devez spécifier cette option que si vous utilisez vos propres routines de "threading". - The intrinsic macro ##[[KeyPgDdfbmt __FB_MT__]]## is set to non-zero (-1) if the ##-mt## option was specified, and set to zero (0) otherwise. + La macro intrinsèque ##[[KeyPgDdfbmt __FB_MT__]]## est mise à non-zéro (-1) si l'option ##-mt## a été spécifiée, et mise à zéro (0) autrement. {{fbdoc item="see"}} - ##[[KeyPgDdfbmt __FB_MT__]]## - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptnodeflibs.wakka b/fbdocs/manual/cache/CompilerOptnodeflibs.wakka index c4b5dfdb67..a9badf0818 100644 --- a/fbdocs/manual/cache/CompilerOptnodeflibs.wakka +++ b/fbdocs/manual/cache/CompilerOptnodeflibs.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Compiler Option: -nodeflibs"}}---- -Do not include the default libraries +Ne pas inclure les bibliothèques par défaut {{fbdoc item="syntax"}}## **-nodeflibs** ## {{fbdoc item="desc"}} - The ##-nodeflibs## compiler option causes default libraries not to be used when linking. The libraries which are normally linked by default can still be used, but only if they are explicitly specified. + L'option du compilateur ##-nodeflibs## entraîne la non-utilisation des bibliothèques lors de l'édition des liens. Les bibliothèques qui sont normalement liées par défaut peuvent toujours être utilisées, mais seulement si elles sont explicitement spécifiées. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptnoerrline.wakka b/fbdocs/manual/cache/CompilerOptnoerrline.wakka index 96d8b242b0..68a8972989 100644 --- a/fbdocs/manual/cache/CompilerOptnoerrline.wakka +++ b/fbdocs/manual/cache/CompilerOptnoerrline.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Compiler Option: -noerrline"}}---- -Do not show source line where error occurred +Ne pas afficher la ligne de source où l'erreur s'est produite {{fbdoc item="syntax"}}## **-noerrline** ## {{fbdoc item="desc"}} - The ##-noerrline## compiler option causes reported errors to not show the place in source where error occurred. Useful if an IDE is parsing the error messages. + L'option du compilateur ##-noerrline## force le compilateur a ne pas afficher la ligne du source où l'erreur s'est produite. Utile si un IDE analyse des messages d'erreur. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOpto.wakka b/fbdocs/manual/cache/CompilerOpto.wakka index 9aef9a254e..ffbbc19034 100644 --- a/fbdocs/manual/cache/CompilerOpto.wakka +++ b/fbdocs/manual/cache/CompilerOpto.wakka @@ -1,21 +1,27 @@ {{fbdoc item="title" value="Compiler Option: -o"}}---- -Set object file path/name +Définir le chemin/nom du fichier objet {{fbdoc item="syntax"}}## **-o** < //output file// > ## {{fbdoc item="param"}} ##//output file//## - The name, with optional path, of the object file to create. + Le nom, avec le chemin en option, du fichier d'objet à créer. {{fbdoc item="desc"}} - When used with the ##**[[CompilerOptc -c]]**## option, the ##**-o**## option specifies a name to give to the object file resulting in compiling the source file immediately preceding it. By default, the object file has the same name as the source file, but with a //.o// extension. This option is useful for saving object files in other directories. - - To compile the source files //file1.bas// and //file2.bas// into the object files //file1.o// and //apple.o//, type, - - ##fbc -c file1.bas file2.bas **-o** apple.o## - - Note that the ##**-o**## option only has an effect when used with the ##**[[CompilerOptc -c]]**## option (compile only), as object files are not saved otherwise. + Lorsqu'elle est utilisée avec l'option ##**[[CompilerOptc -c]]**##, l'option ##**-o**## spécifie le nom à donner au fichier objet résultant de la compilation du fichier source qui le précède immédiatement. Par défaut, le fichier objet porte le même nom que le fichier source, mais avec l'extension //.o//. Cette option est utile pour enregistrer les fichiers objets dans d'autres répertoires. + + Pour compiler les fichiers sources //file1.bas// et //file2.bas// en fichiers objet //file1.o// et //apple.o//, tapez: + + ##fbc -c file1.bas file2.bas **-o** apple.o## + Notez que l'option ##**-o**## n'a d'effet que lorsqu'elle est utilisée avec l'option ##**[[CompilerOptc -c]]**## (compiler uniquement), car autrement les fichiers objet ne sont pas sauvés. + {{fbdoc item="see"}} + - [[CompilerOptb Option du compilateur: -b]] + - [[CompilerOptc Option du compilateur: -c]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] + ##fbc 1.bas 2.bas -o 1.o -o 2.o## + + The ##[[CompilerOptv -v]]## option makes the compiler show the actual file names that it uses. {{fbdoc item="see"}} - [[CompilerOptb Compiler Option: -b]] diff --git a/fbdocs/manual/cache/CompilerOptoptfile.wakka b/fbdocs/manual/cache/CompilerOptoptfile.wakka index ce6db6defc..b31321e8a8 100644 --- a/fbdocs/manual/cache/CompilerOptoptfile.wakka +++ b/fbdocs/manual/cache/CompilerOptoptfile.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: @file"}}---- -Read (additional) command-line options from the file +Lire des options (supplémentaires) de ligne de commande à partir d'un fichier {{fbdoc item="syntax"}}## @//file// ## {{fbdoc item="param"}} ##//file//## - Name of a text file containing command line options. It's possible to use multiple lines in the file. The options in a line must be separated by SPACEs and support Double-quoted strings (like the real command line). This file can contain more @file options. + Nom d'un fichier texte contenant des options ligne de commande. Il est possible d'utiliser plusieurs lignes dans le fichier. Les ptions d'une ligne doivent être séparées par des ESPACEs et supporter des chaînes entourées de guillemets doubles (comme la ligne de commande réelle). Ce fichier peut contenir des options supplémentaires @file. {{fbdoc item="desc"}} - The ##@file## compiler option tells the compiler to parse the specified file to find more command line options. The options found in the file are treated as if they were found on the command line. This can be useful to pass very long command lines to the compiler, for example on DOS, where command lines are limited in length. + L'option compilateur ##@file## indique au compilateur d'analyser le fichier spécifié pour trouver des options supplémentaires de ligne de commande. Les des options dans le fichier sont traitées comme si elles se trouvaient sur la ligne de commande. Cela peut être utile pour passer des lignes de commande très longues au compilateur, par exemple sous DOS, où les lignes de commande sont limitées en longueur. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptoptimization.wakka b/fbdocs/manual/cache/CompilerOptoptimization.wakka index 1d3628e1e9..3e4ee6e33f 100644 --- a/fbdocs/manual/cache/CompilerOptoptimization.wakka +++ b/fbdocs/manual/cache/CompilerOptoptimization.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="Compiler Option: -O"}}---- -Set the optimization level for GCC +Définit le niveau d'optimisation de GCC {{fbdoc item="syntax"}}## **-O** < level > ## {{fbdoc item="param"}} ##//level//## - The optimization level: ##0##, ##1##, ##2##, ##3## or ##max## (##3##). + Le niveau d'optimisation: ##0##, ##1##, ##2##, ##3## ou ##max## (##3##). {{fbdoc item="desc"}} - Specifies the optimization level to be passed to GCC when using ##**[[CompilerOptgen -gen gcc]]**##. + Spécifie le niveau d'optimisation à passer à GCC quand on utilise ##**[[CompilerOptgen -gen gcc]]**##. {{fbdoc item="see"}} - - [[CompilerOptgen Compiler Option: -gen gcc]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptgen Option du compilateur: -gen gcc]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptp.wakka b/fbdocs/manual/cache/CompilerOptp.wakka index 62683b3e8b..53d50001e0 100644 --- a/fbdocs/manual/cache/CompilerOptp.wakka +++ b/fbdocs/manual/cache/CompilerOptp.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="Compiler Option: -p"}}---- -Add a path to search for libraries +Ajouter un chemin de recherche pour les bibliothèques {{fbdoc item="syntax"}}## **-p** < //library path// > ## {{fbdoc item="param"}} ##//library path//## - The directory path, relative or absolute, of where to search for library files. + Le chemin du répertoire, relatif ou absolu, où chercher les fichiers des bibliothèques. {{fbdoc item="desc"}} - The ##-p## compiler option adds a path to search for libraries. By default, libraries are looked for in the system FreeBASIC libraries directory and in the current directory. + L'option ##-p## du compilateur ajoute un chemin de recherche pour les bibliothèques. Par défaut, les bibliothèques sont à chercher dans le répertoire système FreeBasic des bibliothèques et dans le répertoire courant. {{fbdoc item="see"}} - ##[[KeyPgPplibpath #libpath]]## - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptpp.wakka b/fbdocs/manual/cache/CompilerOptpp.wakka index 2b615c4224..77a0cec1c1 100644 --- a/fbdocs/manual/cache/CompilerOptpp.wakka +++ b/fbdocs/manual/cache/CompilerOptpp.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Compiler Option: -pp"}}---- -Emit the preprocessed input file only, do not compile +Produit le fichier d'entrée traîté seulement par le préprocesseur, ne compile pas {{fbdoc item="syntax"}}## **-pp** ## {{fbdoc item="desc"}} - The ##-pp## compiler option enables the preprocessor-only mode. The code is parsed & checked as usual, but is not compiled. A pre-processed version of every input source.bas is generated, named source.pp.bas. + L'option ##-pp## du compilateur permet seulement le mode préprocesseur. Le code est analysé et contrôlé comme d'habitude, mais n'est pas compilé. Une version traitée pré-processeur de chaque fichier source.bas est générée, nommée source.pp.bas. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptprefix.wakka b/fbdocs/manual/cache/CompilerOptprefix.wakka index efa479880a..f654a983be 100644 --- a/fbdocs/manual/cache/CompilerOptprefix.wakka +++ b/fbdocs/manual/cache/CompilerOptprefix.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -prefix"}}---- -Set the compiler prefix path +Définit le préfixe du chemin du compilateur {{fbdoc item="syntax"}}## **-prefix** < //path// > ## {{fbdoc item="param"}} ##//path//## - The directory, relative or absolute to where fbc is located. + Le répertoire, relatif ou absolu de l'endroit où est situé fbc. {{fbdoc item="desc"}} - The ##-prefix## compiler option sets the compiler prefix (where the compiler finds the bin, lib, and inc directories); and defaults to the path where fbc resides, if this can be determined. + L'option de compilateur ##-prefix## définit le préfixe du chemin du compilateur (où le compilateur trouve les répertoires bin, lib, et inc); et par défaut ce sera le chemin où fbc réside, s'il peut être déterminé. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptprofile.wakka b/fbdocs/manual/cache/CompilerOptprofile.wakka index 5af101c1e0..bfbb8c1702 100644 --- a/fbdocs/manual/cache/CompilerOptprofile.wakka +++ b/fbdocs/manual/cache/CompilerOptprofile.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Compiler Option: -profile"}}---- -Enable function profiling +Active la fonction de profilage {{fbdoc item="syntax"}}## **-profile** ## {{fbdoc item="desc"}} - The ##-profile## compiler option enables function profiling. After running an executable compiled with this option, a gmon.out file will be created in the program directory, allowing use of GPROF for analysis of the program's execution. + L'option ##-profile## du compilateur active la fonction de profilage. Après l'exécution d'un exécutable compilé avec cette option, un fichier gmon.out sera créé dans le répertoire du programme, permettant d'utiliser GPROF pour l'analyse l'exécution du programme. {{fbdoc item="see"}} - - [[ProPgProfiling Profiling]] - - [[CompilerCmdLine Using the Command Line]] + - [[ProPgProfiling Profilage]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptr.wakka b/fbdocs/manual/cache/CompilerOptr.wakka index ab19c119e9..2eb48ccd38 100644 --- a/fbdocs/manual/cache/CompilerOptr.wakka +++ b/fbdocs/manual/cache/CompilerOptr.wakka @@ -1,15 +1,16 @@ {{fbdoc item="title" value="Compiler Option: -r"}}---- -Compile into asm file(s) only, do not assemble or link +Compile seulement en fichier(s) asm, n'assemble ou ne lie pas. {{fbdoc item="syntax"}}## **-r** ## {{fbdoc item="desc"}} - The ##**-r**## option specifies that any source files listed are to be compiled to asm files, and not compiled or linked into an executable. Note that in case of [[CompilerOptgen -gen gcc]] ##*.c## files are generated, instead of the normal ##*.asm## files. + L'option ##**-r**## du compilateur spécifie que tout fichier source listé doit être compilé en fichier asm et non pas compilé ou lié dans un fichier exécutable. Notez qu'avec [[CompilerOptgen -gen gcc]] des fichiers ##*.c## sont générés, au lieu de fichiers ##*.asm## normaux. {{fbdoc item="see"}} - - [[CompilerOptc Compiler Option: -c]] - - [[CompilerOptrupp Compiler Option: -R]] + - [[CompilerOptc Option du compilateur: -c]] + - [[CompilerOptrupp Option du compilateur: -R]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] - [[CompilerCmdLine Using the Command Line]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptrupp.wakka b/fbdocs/manual/cache/CompilerOptrupp.wakka index 8a8aeb4928..c4af0e17ef 100644 --- a/fbdocs/manual/cache/CompilerOptrupp.wakka +++ b/fbdocs/manual/cache/CompilerOptrupp.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Compiler Option: -R"}}---- -Do not delete the asm file(s) +Ne pas supprimer le(s) fichier(s) asm {{fbdoc item="syntax"}}## **-R** ## {{fbdoc item="desc"}} - The ##-R## compiler option causes the asm file(s) that are generated during the compile process to not be deleted. Preprocessor macros are expanded in these files. Note that in case of [[CompilerOptgen -gen gcc]] ##*.c## files are generated, instead of the normal ##*.asm## files. + L'option ##-R## du compilateur implique la non-suppression des fichiers asm file(s) générés pendant le processus de compilation. Notez qu'avec [[CompilerOptgen -gen gcc]] des fichiers ##*.c## sont générés, au lieu de fichiers ##*.asm## normaux. {{fbdoc item="see"}} - - [[CompilerOptcupp Compiler Option: -C]] - - [[CompilerOptr Compiler Option: -r]] - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerOptcupp Option du compilateur: -C]] + - [[CompilerOptr Option du compilateur: -r]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOpts.wakka b/fbdocs/manual/cache/CompilerOpts.wakka index 60e84a1f90..0691d3e659 100644 --- a/fbdocs/manual/cache/CompilerOpts.wakka +++ b/fbdocs/manual/cache/CompilerOpts.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Compiler Option: -s"}}---- -Sets the executable subsystem +Définit le sous-système exécutable {{fbdoc item="syntax"}}## **-s** < //subsystem// > ## {{fbdoc item="param"}} ##//subsystem//## - The executable subsystem: ##gui## or ##console##. + Le sous-système exécutable: ##gui## ou ##console##. {{fbdoc item="desc"}} - The ##-s## compiler option specifies the executable subsystem. Allowed subsystems are ##gui## and ##console## (by default, ##console## is used). Specifying a ##gui## subsystem prevents the console window from appearing behind the program window. + L'option ##-s## du compilateur spécifie le sous-système exécutable. Les sous-systèmes admis sont ##gui## et ##console## (par défaut, la ##console## est utilisée). La spécification d'un sous-système ##gui## d'interface graphique empêche la fenêtre de console d'apparaître derrière la fenêtre du programme. {{fbdoc item="target"}} - - Supported in the Windows platform only. + - Pris en charge seulement sur les plates-formes Windows. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptt.wakka b/fbdocs/manual/cache/CompilerOptt.wakka index 6737b4e988..346d6cce4b 100644 --- a/fbdocs/manual/cache/CompilerOptt.wakka +++ b/fbdocs/manual/cache/CompilerOptt.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Compiler Option: -t"}}---- -Set stack size in kilobytes +Définir la taille de la pile en kilo-octets {{fbdoc item="syntax"}}## **-t** < //stack size// > ## {{fbdoc item="param"}} ##//stack size//## - Stack size in kilobytes. + Taille de la pile en kilo-octets. {{fbdoc item="desc"}} - The ##-t## compiler option sets the stack size in kilobytes (defaults to 1024 KBytes). The local arrays are created in the stack, so 1MB of stack is not always enough. + L'option ##-t## du compilateur définit la la taille de la pile en kilo-octets (par défaut à 1024 Ko). Les tableaux locaux sont créés dans la pile, donc 1 Mo de pile ne suffit pas toujours. {{fbdoc item="target"}} - - Supported on Windows and DOS platforms only. + - Pris en charge seulement sur les plates-formes Windows et DOS. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOpttarget.wakka b/fbdocs/manual/cache/CompilerOpttarget.wakka index 69003e13c7..5f95fd2216 100644 --- a/fbdocs/manual/cache/CompilerOpttarget.wakka +++ b/fbdocs/manual/cache/CompilerOpttarget.wakka @@ -1,35 +1,28 @@ {{fbdoc item="title" value="Compiler Option: -target"}}---- -Set the target platform for cross compilation +Définit la plate-forme cible pour la compilation croisée {{fbdoc item="syntax"}}## **-target** < //platform// > ## {{fbdoc item="param"}} ##//platform//## - The target platform. (See below) + La plate-forme cible. (Voir ci-dessous) {{fbdoc item="desc"}} - The ##-target## compiler option is used to create an executable for a platform which is different from the host on which the source code is being compiled and linked. Appropriate libraries and cross compilation tools (assembler, linker) must be installed in the /lib/ and /bin/ directories for cross compilation to work. - - This option is only available if the compiler was built with cross compilation support. - - Possible targets: - ##cygwin## + L'option ##-target## du compilateur est utilisée pour créer un exécutable pour une plate-forme qui est différente de l'hôte sur lequel le code source est compilé et lié. Les bibliothèques appropriées et les outils de compilation croisée (assembleur, éditeur de liens) doivent être installés dans les répertoires /lib/ et /bin/ pour que la compilation croisée fonctionne. + + Cette option n'est disponible que si le compilateur a été construit avec le support de la compilation croisée. + + Cibles possibles: + + ##cygwin## ##darwin## ##dos## ##freebsd## - ##linux## - ##netbsd## - ##openbsd## - ##win32## - ##xbox## - -{{fbdoc item="target"}} - - Only available in versions fbc that have had cross compilation support enabled at configure time before building the compiler. Not all binary distributions will have the same cross compilation targets supported. - - The FreeBASIC package for DOS can be used as a cross compilation tool set when compiling from Windows to a DOS target. + + ##linux## -{{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] +##netbsd## + ##openbsd## -{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} - +##win32## \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptv.wakka b/fbdocs/manual/cache/CompilerOptv.wakka index 77535a04cb..f194f7eef6 100644 --- a/fbdocs/manual/cache/CompilerOptv.wakka +++ b/fbdocs/manual/cache/CompilerOptv.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Compiler Option: -v"}}---- -Be verbose +Mode bavard {{fbdoc item="syntax"}}## **-v** ## {{fbdoc item="desc"}} - The ##-v## compiler option activates verbose mode. In this mode the compiler shows its actions step by step + L'option ##-v## du compilateur active le mode verbeux. Dans ce mode, le compilateur affiche ses actions étape par étape. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptvec.wakka b/fbdocs/manual/cache/CompilerOptvec.wakka index ad47f96f06..a90cf3e422 100644 --- a/fbdocs/manual/cache/CompilerOptvec.wakka +++ b/fbdocs/manual/cache/CompilerOptvec.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="Compiler Option: -vec"}}---- -Enables vector optimizations by the compiler. +Active les optimisations vecteur par le compilateur. {{fbdoc item="syntax"}}## **-vec** < //level// > ## {{fbdoc item="param"}} ##//level//## - The level of vectorization: (##0## | ##NONE##) | ##1## | ##2##. + Le niveau de la vectorisation: (##0## | ##NONE##) | ##1## | ##2##. {{fbdoc item="desc"}} - The ##-vec## compiler option enables multiple levels of optimizations by searching for multiple scalar expressions that can be merged into a single vector expression. If this option is not specified, the default is ##-vec 0##. + L'option du compilateur ##-vec## active de multiples niveaux d'optimisations par la recherche de multiples expressions scalaires qui peuvent être fusionnées en un vecteur d'expression unique. Si cette option n'est pas spécifiée, la valeur par défaut est ##-vec 0##. - ##-vec 0## | ##none## will disable vector optimizations. + ##-vec 0## | ##none## aucune, désactive les optimisations vecteur. - ##-vec 1## will enable complete expression merging vectorization. + ##-vec 1## permettra l'expression complète des optimisations vecteur. - ##-vec 2## includes ##-vec 1## but also enables intra-expression vectorization. + ##-vec 2## inclut ##-vec 1## mais active également la vectorisation intra-expression. - This option is dependent on the ##-fpu SSE## command line option. Attempting to enable vector optimizations without using ##-fpu SSE## will generate an error. + Cette option dépend de l'option de ligne de commande ##-fpu SSE##. Tenter d'activer les optimisations vecteur sans l'aide de ##-fpu SSE## générera une erreur. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] - - [[CompilerOptfpu Compiler option -fpu]] + - [[CompilerCmdLine Utilisation de le ligne de commande]] + - [[CompilerOptfpu Option du compilateur: -fpu]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptversion.wakka b/fbdocs/manual/cache/CompilerOptversion.wakka index 18c86a69a4..6b12a4fe8b 100644 --- a/fbdocs/manual/cache/CompilerOptversion.wakka +++ b/fbdocs/manual/cache/CompilerOptversion.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Compiler Option: -version"}}---- -Show compiler version +Afficher la version du compilateur {{fbdoc item="syntax"}}## **-version** ## {{fbdoc item="desc"}} - The ##-version## compiler option makes FBC show the compiler version and exit. Any other command-line options are ignored, and no compilation will be performed. + L'option de compilateur ##-version## affiche la version du compilateur FBC show the compiler et abandonne. Toutes les autres options de ligne de commande sont ignorées et aucune compilation ne sera effectuée. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de le ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptw.wakka b/fbdocs/manual/cache/CompilerOptw.wakka index 3f3a857617..d54121c4d0 100644 --- a/fbdocs/manual/cache/CompilerOptw.wakka +++ b/fbdocs/manual/cache/CompilerOptw.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="Compiler Option: -w"}}---- -Set minimum warning level. +Indiquer le niveau minimal d'avertissement. {{fbdoc item="syntax"}}## **-w** //level// | **all** | **param** | **escape** | **pedantic** | **next** ## {{fbdoc item="param"}} ##//level//## - Warning messages only with a level equal or greater to this value will be output. + Messages d'avertissement affichés seulement avec un niveau égal ou supérieur à cette valeur. ##**all**## - Equivalent to specifying a ##//level//## of zero (##0##). + Équivalent à spécifier un ##//level//## zéro (##0##). ##**param**## - Warn when procedure parameters aren't specified with either ##[[KeyPgByval ByVal]]## or ##[[KeyPgByref ByRef]]##. + Avertir lorsque les paramètres de procédure ne sont pas précisés soit ##[[KeyPgByval ByVal]]## ou ##[[KeyPgByref ByRef]]##. ##**escape**## - Warn when string literals contain any number of escape characters (##\##). + Avertir lorsque les chaînes littérales contiennent un nombre quelconque de caractères d'échappement (##\##). ##**pedantic**## - Equivalent to specifying the ##**param**## and ##**escape**## arguments. + Équivalent à spécifier les arguments ##**param**## et ##**Escape**## arguments. ##**next**## - Warn when ##[[KeyPgNext Next]]## is followed by an identifier. + Avertir lorsque ##[[KeyPgNext Next]]## est suivi par un identificateur. {{fbdoc item="desc"}} - The ##-w## compiler option determines which compiler warnings, if any, are output. Each possible warning is associated with a warning level, starting from zero (##0##) and increasing with the potential problems that may occur. A significantly high ##//level//## value will have the effect of suppressing all warning messages. + L'option du compilateur ##-w## détermine quels avertissements du compilateur, s'il y a lieu, sont affichés. Chaque avertissement possible est associée à un niveau d'alerte, commençant à zéro (##0##) et augmentant avec les problèmes potentiels qui peuvent se produire. Une valeur de ##//level//## significativement élevé aura pour effet de supprimer tous les messages d'avertissement. - Note that the ##**param**##, ##**escape**##, ##**pedantic**## and ##**next**## arguments provide additional warnings not ordinarily output, even by default. + Notez que les arguments ##**param**##, ##**Escape**##, ##**pedantic**## et ##**Next**## fournissent des avertissements supplémentaires habituellement pas affichés, même par défaut. - If the ##**-w**## option is not specified, it's as if ##**-w 0**## was used. The ##**-w**## option can be specified multiple times. + Si l'option ##**-w**## n'est pas spécifiée, c'est comme si ##**-w 0**## était utilisé. L'option ##**-w**## peut être spécifiée pludieurs fois. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de le ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptx.wakka b/fbdocs/manual/cache/CompilerOptx.wakka index ef67ee996f..1756fcb05d 100644 --- a/fbdocs/manual/cache/CompilerOptx.wakka +++ b/fbdocs/manual/cache/CompilerOptx.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Compiler Option: -x"}}---- -Set executable/library path/name +Définit le nom/chemin de exécutable/bibliothèque {{fbdoc item="syntax"}}## **-x** < //name// > ## {{fbdoc item="param"}} ##//name//## - Name of the executable or library file. + Nom du fichier exécutable ou d'une bibliothèque. {{fbdoc item="desc"}} - The ##-x## compiler option set the executable or library name, with extension. Defaults to the name of the first source file passed on the command line. When compiling libraries, be sure to add the "lib" prefix to the file name, otherwise the linker will not be able to find it. If compiling and linking separately, this option must be set only in the linker. + L'option du compilateur ##-x## définit le nom d'un exécutable ou d'une bibliothèque, avec son extension. Par défaut, ce sera le nom du premier fichier source passé sur la ligne de commande. Lors de la compilation de bibliothèques, n'oubliez pas d'ajouter le préfixe "lib" au nom de fichier, sinon l'éditeur de liens ne sera pas capable de le trouver. Si la compilation et l'édition des liens ont lieu séparément, cette option doit être définie uniquement dans l'éditeur de liens. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerOptz.wakka b/fbdocs/manual/cache/CompilerOptz.wakka index ef88544806..d71a4d681b 100644 --- a/fbdocs/manual/cache/CompilerOptz.wakka +++ b/fbdocs/manual/cache/CompilerOptz.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="Compiler Option: -z"}}---- -Sets miscellaneous or experimental compiler options. +Définit des options de compilation diverses ou expérimentales. {{fbdoc item="syntax"}}## **-z** < //value// > ## {{fbdoc item="param"}} ##//value//## - Miscellaneous compiler option. + Diverses options du compilateur. {{fbdoc item="desc"}} - The ##-z## compiler option sets miscellaneous, obscure, temporary, or experimental options used by the developers. There is no guarantee that these options will be supported in future versions of the compiler. + L'option du compilateur ##-z## définit des options diverses, obscures, temporaires ou expérimentales utilisées par les développeurs. Il n'y a aucune garantie que ces options seront prises en charge dans les futures versions du compilateur. - {{fbdoc item="subsect" value="-z gosub-setjmp"}} - Specifies that the ##setjmp##/##longjmp## implementation of ##[[KeyPgGosub Gosub]]## should be used even when the GAS backend is used. By default, ##[[KeyPgGosub Gosub]]## will be supported in //[[CompilerOptgen -gen gas]]// using ##CALL##/##RET## assembly instructions and in //[[CompilerOptgen -gen gcc]]// using ##setjmp##/##longjmp## C runtime functions. + **-z gosub-setjmp** + Spécifie que la mise en oeuvre de ##setjmp##/##longjmp## de ##[[KeyPgGosub GoSub]]## devrait être utilisé même lorsque GAS est utilisé. Par défaut, ##[[KeyPgGosub GoSub]]## sera supporté dans //[[CompilerOptgen -gen gas]]// en utilisant les instructions d'assemblage ##CALL##/##RET## et dans //[[CompilerOptgen -gen gcc]]// en utilisant les fonctions C ##setjmp##/##longjmp##. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerQB.wakka b/fbdocs/manual/cache/CompilerQB.wakka index 5bbce4a966..8ac86da7e9 100644 --- a/fbdocs/manual/cache/CompilerQB.wakka +++ b/fbdocs/manual/cache/CompilerQB.wakka @@ -1,36 +1,36 @@ {{fbdoc item="title" value="FreeBASIC and QBasic"}}---- -==FreeBASIC the Successor== - FreeBASIC is designed as an official successor of sorts to a high level compiler for MS-DOS titled "QuickBASIC", which compiled BASIC code, an easy-to-read programming language created in 1964 by John Kemeny and Thomas Kurtz. "QB" was packaged with a user-friendly IDE and interpreter that made it very easy to write custom applications. This line of products is officially continued today in the form of "Visual Basic", part of Microsoft's Visual Studio .NET programming suite. +**FreeBasic le Successeur** + FreeBasic est conçu comme un successeur officiel d'un type de compilateur de haut niveau pour MS-DOS intitulé "QuickBASIC", qui compilait le code BASIC, un langage de programmation facile à lire créé en 1964 par John Kemeny et Thomas Kurtz. "QB" a été créé avec un IDE-interprèteur convivial and interpreter qui l'a rendu très pratique pour écrire facilement des applications personnalisées. Cette ligne de produits est officiellement poursuivi aujourd'hui sous la forme de "Visual Basic", qui fait partie de la suite de programmation Visual Studio .NET. -==Microsoft and BASIC Products== - Microsoft and BASIC extend far prior to QuickBASIC. In fact, Microsoft's first product was a small BASIC interpreter for Altair computers released in 1975, and until the early 1980s Microsoft was known only as a language vendor. They ported their BASIC software to several different personal computers at the time and made decent business doing it. +**Microsoft et produits BASIC** + Microsoft et BASIC existent bien avant QuickBASIC. En fait, le premier produit de Microsoft a été un petit interpréteur BASIC pour les ordinateurs Altair a publié en 1975 et jusqu'au début des années 1980, Microsoft n'était connu que comme un vendeur de langage. Ils ont porté leur logiciel BASIC sur plusieurs différents ordinateurs personnels de l'époque et fait ainsi des affaires intéressantes. - In August of 1981 Microsoft released the next major step in its BASIC line, "Advanced BASIC", as part of a commission for IBM's PC-DOS, and is more often called by its executable name, BASICA.EXE. For Microsoft's new MS-DOS, they released GW-BASIC, which was, for the most part, a port of BASICA that did not require IBM's Basic ROM included with its systems. + En août 1981 Microsoft a publié l'étape majeure suivante de sa ligne BASIC, un "BASIC avancé", dans le cadre d'une commission pour IBM PC-DOS qui est plus souvent appelé par le nom de son exécutable, BASICA.EXE. Pour Microsoft et son nouveau MS-DOS, ils ont sorti GW-BASIC, qui a été, en grande partie, un portage de BASICA qui ne nécessite pas d'IBM ROM inclus avec ses systèmes. - BASICA and GW-BASIC are interpreters. Interpreters read source code and "interpret" it into computer code as it is read. This is useful, but slow. Microsoft, in 1983, released BASCOM for MS-DOS. BASCOM compiled BASIC code into native machine code, which ran much faster than interpreted code. This was repackaged with an IDE and released as QuickBASIC in 1985. + BASICA et GW-BASIC sont des interprèteurs. Les interprèteures lisent le code source et l'"interprètent" dans le code informatique en le lisant. Ceci est utile, mais lent. Microsoft, en 1983, réalise BASCOM pour MS-DOS. BASCOM compile le code en code machine natif, qui s'exécute beaucoup plus rapidement que le code interprété. Cela a été reconditionné avec un IDE et réalisé sous l'appellation QuickBasic en 1985. -==QuickBASIC== - From 1985 to 1992, QuickBASIC was the primary BASIC product, released by Microsoft and using BASCOM, and later the Microsoft BASIC Compiler. In 1991, a slimmed down interpreter often thought to be the missing "QuickBASIC 5.0" was packaged with MS-DOS 5.0 and released as "QBasic 1.1". +**QuickBasic** + De 1985 à 1992, QuickBASIC est le produit BASIC primaire, publié par Microsoft et utilisant BASCOM, et plus tard, Microsoft BASIC Compiler. En 1991, une interprèteur allégé souvent considéré comme le "QuickBASIC 5.0" a été empaqueté avec MS-DOS 5.0 et publié comme "QBasic 1.1". - QuickBASIC as a BASIC dialect provides a loose standard for modern BASIC compilers. It abolishes the need for line numbers as a used in previous BASIC interpreters, is case sensitive and has keywords that are in plain English. QuickBASIC also featured a runtime library, a library compiled by default and usable in source code, with many useful commands. + QuickBasic comme dialecte BASIC fournit une norme pour les compilateurs BASIC modernes. Il supprime la nécessité des numéros de ligne utilisés dans les interprèteurs BASIC précédents, est sensible à la casse et comporte des mots-clés qui sont en anglais courant. QuickBASIC a également une bibliothèque d'exécution, une bibliothèque compilée par défaut et utilisable dans le code source, avec de nombreuses commandes utiles. - In 1991, Microsoft combined a drag-and-drop GUI designer made in 1988 called 'Ruby' with QuickBASIC. This product was called "Visual Basic", and marks the beginning of the end of QuickBASIC. Microsoft released one last version of QuickBASIC called "Visual Basic for DOS" in 1992, and discontinued the product forever. + En 1991, Microsoft a combiné un concepteur graphique "drag-and-drop" conçu en 1988 appelé 'Ruby' avec QuickBASIC. Ce produit a été appelé "Visual Basic" et marque le début de la fin de QuickBASIC. Microsoft a publié une dernière version de QuickBASIC appelé "Visual Basic for DOS" en 1992 et abandonné le produit à jamais. -==The Internet and QBasic's Second Wind== - Because the "QBasic 1.1" interpreter was packaged with MS-DOS, it was released with every copy of DOS until its dying days, Windows 3.1, and even Windows 95, 98 and ME. With the wild success of Windows, QBasic became the most widely available programming tool available for Microsoft operating systems. +**L'Internet et Deuxième Souffle de QBasic** + Parce que l'interprèteur "QBasic 1.1" a été empaqueté avec MS-DOS, il a été réalisé avec chaque copie de DOS jusqu'à ses derniers jours, Windows 3.1, et même Windows 95, 98 et ME. Avec l'énorme succès de Windows, QBasic est devenu l'outil de programmation le plus largement disponible disponible pour les systèmes d'exploitation Microsoft. - When the World Wide Web became popular in the mid-90s, many hobbyist programmers made websites dedicated to QuickBASIC not as an application tool, but as a platform for their demos and games. Many assembly libraries were created for it after Microsoft dropped support, and as these demos and games became more elaborate, so did the "QB Community". From the mid-90s, through the new millennium to today, QuickBASIC has enjoyed a small but present cult following. + Lorsque le "World Wide Web" est devenu populaire dans le milieu des années 90, les programmeurs amateurs de nombreux sites dédiés à QuickBASIC l'ont utilisé non pas comme un outil d'application, mais comme une plate-forme pour leurs démos et jeux. Beaucoup de bibliothèques assembleur ont été créés pour lui après que Microsoft ait abandonné son soutien, et que ces démos et jeux sont devenus plus complexes, tout comme le "QB communautaire". Depuis le milieu des années 90, depuis le nouveau millénaire à aujourd'hui, QuickBASIC a connu un véritable culte, modeste mais bien présent. - Andre Victor, FreeBASIC's creator, was first known over the internet as the author of several extensions to QuickBASIC in the form of libraries. He created routines to improve the speed of floating point operations, access the internet, use SVGA graphics, and provide powerful QBasic language programming features. In the late summer of 2004, he began work on a 32-bit compiler using Visual Basic for DOS. + André Victor, créateur du FreeBASIC, était d'abord connu sur Internet comme l'auteur de plusieurs extensions de QuickBASIC sous la forme de bibliothèques. Il a créé des routines pour améliorer la vitesse des opérations en virgule flottante, accéder à Internet, utiliser des graphismes SVGA et pour fournir de puissantes fonctionnalités du langage de programmation QBasic. A la fin de l'été 2004, il a commencé à travailler sur un compilateur 32-bit utilisant Visual Basic pour MS-DOS. -==FreeBASIC is Born== - FreeBASIC was first programmed in VB-DOS, with the goal of compiling itself. Because of this, both its syntax and runtime library are designed to emulate QB's syntax and runtime as far as it is practical in a 32-bit Windows environment. For the most part, the two dialects are extremely similar, and most code can be ported with little or no modification, though in some cases routines reliant on 16-bit DOS must be rewritten. The resulting compiler shares a greater similarity to QB than any compiler on the market, including Visual Basic. +**FreeBasic est né** + FreeBasic a d'abord été programmé en VB-DOS, dans le but de se compiler lui-même. Pour cette raison, sa syntaxe et sa bibliothèque d'exécution sont conçues pour reproduire la syntaxe et l'exécution de QB dans la mesure où il est pratiqué dans un environnement 32-bit Windows. En grande partie, les deux dialectes sont très similaires et la plupart du code peut être porté avec peu ou aucune modification, même si dans certains cas, des routines dépendantes du DOS 16-bit doivent être réécrites. Les actions résultant du compilateur ont une plus grande similitude avec QB qu'avec n'importe quel compilateur du marché, y compris Visual Basic. - Because of its open source, its well-written code and its similarity to QB, FreeBASIC has become popular among the "QB Community" and its boundaries continue to grow as it receives more attention and gathers more features that promise to move BASIC into the future. + En raison de son origine "open source", son code bien écrit et sa similitude avec QB, FreeBasic est devenu populaire parmi la "Communauté QB' et ses limites continuent à croître, car il reçoit plus d'attention et rassemble plus de fonctionnalités que la promesse de déplacer BASIC dans l'avenir. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerRequirements.wakka b/fbdocs/manual/cache/CompilerRequirements.wakka index fbdfc8a047..991b2302d4 100644 --- a/fbdocs/manual/cache/CompilerRequirements.wakka +++ b/fbdocs/manual/cache/CompilerRequirements.wakka @@ -1,30 +1,30 @@ {{fbdoc item="title" value="Requirements"}}---- -==Windows version== - - The FreeBASIC compiler (fbc.exe) and the executables generated by it, need at least Windows 95 to run -- it was not tested in Windows 3.x with the Win32 system installed yet (??) . - - The msvcrt.dll (the Microsoft's C runtime library) must be present (note: it wasn't shipped with Windows 95, but it's installed by many applications and can be also downloaded at: [[http://support.microsoft.com/default.aspx?scid=kb;en-us;259403 Microsoft]]). - - The gfx routines will use DirectX 5.0 or later if found on the host system, otherwise they'll fall back on standard Win32 GDI which will work on any Windows system. - - Unicode wide strings (WSTRING's) only work in Windows NT/2000/XP/2003/Vista or above. Applications that depend on wide-strings will run in Windows 98/Me, but no input/output will work if the character set isn't Latin-based, because those platforms don't support Unicode strings. Windows 95 has most Unicode API functions missing; applications using wide strings won't even be loaded by this specific OS. +**Version Windows** + - Le compilateur FreeBASIC (fbc.exe) et les exécutables générés par celui-ci, a besoin au moins de Windows 95 pour fonctionnerer -- il n'a pas été testé sous Windows 3.x avec le système Win32 encore installé (??). + - msvcrt.dll (la bibliothèque de l'exécution de Microsoft C) doit être présent (note: n'a pas été livré avec Windows 95, mais est installé par de nombreuses applications et peut également être téléchargé à l'adresse: [[http://support.microsoft.com/default.aspx?scid=kb;en-us;259403">Microsoft]]). + - Les routines gfx utiliseront DirectX 5.0 ou plus s'il est trouvé sur le système hôte, sinon elles vont se rabattre sur Win32 standard GDI qui fonctionne sur n'importe quel système Windows. + - Les chaînes larges Unicode (WSTRING) ne fonctionnent que dans Windows NT/2000/XP/2003/Vista ou au-dessus. Les applications qui dépendent de chaînes larges fonctionneront sous Windows 98/Me, mais aucune entrée/sortie ne fonctionnera si le jeu de caractères n'est pas basée Latin, parce que ces plates-formes ne supportent pas les chaînes Unicode. Sous Windows 95 la plupart des fonctions de l'API Unicode sont manquantes; les applications utilisant les "chaînes larges" ne seront pas chargées par cet OS spécifique. -==Linux version== - - The FreeBASIC compiler (fbc) and the executable generated by it depend on libc, libm, libpthread, libdl and libncurses. These are all standard Linux libraries and should be available by default on all modern distros. - - When using the gfx routines, the dependencies will increase. FreeBASIC gfx programs will also need libX11, libXext, libXpm, libXrender and libXrandr to be installed on the host system to be executed. This is usually not a problem as long as there's a recent X11 server installed in the system (at least XFree86 4.3.0 or any X.org version). - - If having a working X11 installation is enough to run FreeBASIC gfx programs, it may be not enough to compile them; you may need to install the X11 development libraries from your Linux packages repository. - - Unicode wide-strings (WSTRING's) with non-ASCII character sets can only be displayed in console if the locale is set to an UTF-8 version - most modern distros come with support that and char sets other than latin may work only in xterm. +**Version Linux** + - Le compilateur FreeBASIC (fbc) et les exécutables générés par celui-ci dépendent de libc, libm, libpthread, libdl et libncurses. Ce sont toutes des bibliothèques standard de Linux et devrait être disponibles par défaut sur toutes les distributions modernes. + - Lorsque vous utilisez les routines gfx, les dépendances augmentent. Les programmes gfx FreeBASIC nécessiteront aussi que libX11, libXext, libXpm, libXrender et libXrandr soient installées sur le système hôte pour être exécutés. Ce n'est généralement pas un problème tant qu'il y a un serveur X11 récent installé dans le système (au moins XFree86 4.3.0 ou toute version X.org). + - Si avoir une installation fonctionnelle de X11 est suffisant pour exécuter des programmes gfx FreeBasic, cela peut ne pas être suffisant pour les compiler; vous pourriez avoir besoin d'installer les bibliothèques de développement X11 à partir de vos dépôts de packages Linux. + - Les chaînes larges Unicode (WSTRING) avec des jeux de caractères non-ASCII ne peuvent être affichée dans la console que si la locale est une version UTF-8. La plupart des distributions modernes supportent ces jeux de caractères autres que Latin et peuvent travailler aussi dans un xterm. -==DOS version== - - Official requirement: A DPMI (DOS Protected-Mode Interface) server must be present to run fbc.exe and any executable generated by it. This is not as bad as it looks. It simply means, that the "CWSDPMI.EXE" file (cca 20 KiB) must be present in the same directory or a place where the PATH environment variable points to. CWSDPMI package: [[http://clio.rice.edu/cwsdpmi/csdpmi5b.zip csdpmi5b.zip]] (note: FreeDOS comes with it already installed). Further, there is a possibility to bypass this problem, and to use alternatively HDPMI, for details see [[FaqDOS DOS related FAQ]] . - - You need a 80386 or newer CPU and cca 4 MiB of RAM. For compiling of large programs or libraries, you will need more. Similar applies to executables generated by FBC, those using FB's graphics library however will need a better/faster CPU (200 MHz (?), work in progress, code not yet fully optimized, and exact minimum not known by now). FBC and executables generated by it need an FPU (80387, 80487, always built-in since Pentium). This requirement can by bypassed using "EMU387" (auto-loaded if needed, but not included in FB packages, see [[http://www.delorie.com/djgpp/v2faq/faq11_1.html delorie.com/djgpp/...]] ), or by avoiding floats and (non-trivial) removing float-related startup code. - - The DOS version should run in any DOS, like FreeDOS, [Enhanced-]DR-DOS (do **not** use the DR-EMM386's included DPMI, use CWSDPMI or HDPMI), or MS-DOS. It also works properly under a number of "DOS box" environments that emulate a DOS system, such as the Windows NT VDM; however, some of these environments are not implemented faithfully and contain bugs, so caution should be exercised. - - Long filenames are supported under systems that supply the long filename API defined by Windows 95, including DOS with an LFN TSR (for example, [[http://www.geocities.com/jadoxa/doslfn/ DOSLFN]]). Long filename support is not required to use the compiler; however, care must be taken in unpacking the distribution, for example, with a Windows program which creates short names with numeric tails (FREEBA~1) instead of truncating to 8 characters (FREEBASI). The filenames of all files in the distribution should be truncated to 8.3 if the compiler is to be used without long filename support. - - There are a few limitations, see [[FaqDOS DOS related FAQ]] . +**DOS version** + - Exigences officielles: Un serveur DPMI (DOS Protected-Mode Interface) doit être présent pour exécuter fbc.exe et tout exécutable généré par celui-ci. Ce n'est pas aussi mauvais qu'il n'y paraît. Cela signifie simplement, que le fichier "CWSDPMI.EXE" (20 Kb) doit être présents dans le même répertoire ou un lieu sur lequel pointe la variable d'environnement PATH. Paquet CWSDPMI: [[http://clio.rice.edu/cwsdpmi/csdpmi5b.zip">csdpmi5b.zip]] (note: déjà installé avec FreeDOS). En outre, il est possible de contourner ce problème et d'utiliser un HDPMI alternatif, pour plus de détails voir [[FaqDOS FAQ relative au DOS]] . + - Vous avez besoin d'un processeur 80386 ou plus récent et 4 Mo de RAM. Pour l'élaboration de grands programmes ou des bibliothèques, vous aurez besoin de plus. La même chose s'applique aux fichiers exécutables générés par FBC, ceux qui utilisent la bibliothèque graphique de FB cependant ont besoin d'un CPU meilleur/plus rapide (200 MHz (?),les travaux en cours, code non encore entièrement optimisé et l'exact minimum non connu à ce jour. FBC et les exécutables générés par celui-ci ont besoin d'un FPU (80387, 80487, toujours intégré depuis Pentium). Cette exigence peut être contournée en utilisant "EMU387" (auto-chargé, si nécessaire, mais non inclus dans les paquets FB, voir [[http://www.delorie.com/djgpp/v2faq/faq11_1 delorie.com/djgpp/...]] ), ou en évitant les nombres à virgule flottante et (non-trivial) en supprimant le code de démarrage lié à ceux-ci. + - La version DOS devrait s'exécuter dans n'importe quel DOS, comme FreeDOS, [Enhanced-]DR-DOS (**ne pas** utiliser DR-EMM386 incluant DPMI, utiliser CWSDPMI ou HDPMI), ou MS-DOS. Il travaille aussi correctement dans un certain nombre d'environnements "DOS box" qui émulent un système DOS, comme le Windows NT VDM; toutefois, certains de ces environnements ne sont pas implémentés fidèlement et contiennent des bugs, alors il faut être prudent. + - Les noms de fichiers longs sont pris en charge dans les systèmes qui fournissent l'API de nom de fichier long définie par Windows 95, y compris DOS avec un LFN TSR (par exemple, [[http://www.geocities.com/jadoxa/doslfn/">DOSLFN]]). Le support des noms longs de fichier n'est pas nécessaire pour utiliser le compilateur; Toutefois, des précautions doivent être prises dans la décompression de la distribution, par exemple, avec un programme Windows qui crée des noms courts avec des queues numérique (FREEBA~1) au lieu de tronquer à 8 caractères (FREEBASI). Les noms de tous les fichiers dans la distribution doivent être tronqués à 8.3 si le compilateur doit être utilisé sans support de nom long de fichier. + - Il ya quelques limitations, voir [[FaqDOS FAQ relative au DOS]] . {{fbdoc item="see"}} - - [[CompilerInstalling Installing FreeBASIC]] - - [[CompilerCmdLine Compiler Command Line Options]] -and - - [[CompilerFAQ Compiler FAQ]] - - [[FaqPgWin32 Win32 related FAQ]] - - [[FaqDOS DOS related FAQ]] + - [[CompilerInstalling Installation de FreeBASIC]] + - [[CompilerCmdLine Options de ligne de commande du compilateur]] +et + - [[CompilerFAQ FAQ du compilateur]] + - [[FaqPgWin32 FAQ relative à Win32]] + - [[FaqDOS FAQ relative au DOS]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerRunning.wakka b/fbdocs/manual/cache/CompilerRunning.wakka index 8031b6f49d..d394a0a46c 100644 --- a/fbdocs/manual/cache/CompilerRunning.wakka +++ b/fbdocs/manual/cache/CompilerRunning.wakka @@ -1,73 +1,73 @@ {{fbdoc item="title" value="Running"}}---- -Invoking the compiler after installation. +Utilisation du compilateur après l'installation. -{{fbdoc item="section" value="Windows"}} - The compiler can be manually invoked from the command-line, or automatically by your IDE/Code Editor. If you're using an IDE, you will usually have to tell it where the compiler was installed, so it can find it. How exactly to do that depends on the IDE. +**Windows** + Le compilateur peut être appelé manuellement à partir de la ligne de commande ou automatiquement par votre éditeur de Code/IDE. Si vous utilisez un IDE, vous aurez généralement à lui dire où le compilateur a été installé, ainsi il peut le trouver. Comment faire exactement cela, dépend de l'IDE. - To compile manually, you should append the FreeBASIC installation directory to your PATH environment variable, separating it from previous entries using a semi-colon. Now you can simply use "fbc" from the command prompt, instead of always having to type in the full path (e.g. "C:\FreeBASIC\fbc.exe"). + Pour compiler manuellement, vous devez ajouter le répertoire d'installation de FreeBasic à votre variable d'environnement PATH, la séparant des autres en utilisant un point-virgule. Maintenant vous pouvez simplement utiliser "fbc" de l'invite de commande, au lieu de toujours avoir à taper le chemin d'accès complet (exemple "C:\FreeBASIC\fbc.exe"). - Then, open a console/command prompt/MS DOS prompt, in the same directory as your program. To compile your program, you can use: + Ensuite, ouvrez une console/invite de commande/invite MS DOS, dans le même répertoire que votre programme. Pour compiler votre programme, vous pouvez utiliser: ##C:\mystuff\myprogram\> fbc myprogram.bas## - and ##myprogram.exe## will be created in the same directory. + et ##myprogram.exe## sera créé dans le même répertoire. - A console can be launched in a specific directory from Explorer by using Microsoft's "Open Command Window Here" ""PowerToy"" on Windows XP. On Windows Vista & above you can SHIFT+""RightClick"" on a folder in Explorer to see the 'Open Command Window Here' option. As a last resort, you can also select Start -> Run, type "cmd" and hit Enter, and use the "cd" command to change the current directory. + Une console peut être ouverte dans un répertoire spécifique à partir d'Explorer à l'aide de Microsoft "Open Command Window Here" PowerToy sur Windows XP. Sous Windows Vista & après vous pouvez SHIFT+ClicDroit sur un dossier dans l'explorateur pour voir l'option 'Open Command Window Here'. En dernier recours, vous pouvez également sélectionner Start -> Exécutez, tapez "cmd" et appuyez sur Entrée, et utilisez la commande "cd" pour changer le répertoire courant. - Note: You can in fact invoke the compiler from any directory you like, but you have to specifiy the correct path to your program, so the compiler can find it, for example: + Note: Vous pouvez en effet lancer le compilateur à partir de n'importe quel répertoire, mais vous devez spécifier le chemin d'accès correct à votre programme, de sorte que le compilateur puisse le trouver, par exemple: ##C:\> fbc mystuff\myprogram\myprogram.bas## - The resulting executable will still be put in the same directory as the program. + L'exécutable résultant sera encore mis dans le même répertoire que le programme. -{{fbdoc item="section" value="Linux"}} - If the install.sh script was successfully executed with enough priviledges, the compiler binary should have been copied ##/usr/local/bin/fbc##, allowing any user access to the compiler from any directory. +**Linux** + Si le script install.sh a été exécuté avec succès avec suffisamment de privilèges, le binaire du compilateur doit être copié dans ##/usr/local/bin/fbc##, permettant à tout utilisateur l'accès au compilateur de n'importe quel répertoire. - From the prompt, type, + Depuis l'invite, tapez: ##fbc## - to see a list of options. To compile the "Hello, world!" example program, navigate to the directory where the ""FreeBASIC"" examples were installed (/usr/local/share/freebasic), and type, + pour voir une liste d'options. Pour compiler l'exemple de programme "Hello, world!" ("Bonjour, monde!), accédez au répertoire où les exemples FreeBasic ont été installés (/usr/local/share/freebasic) et tapez: ##fbc examples/misc/hello.bas## - and a ##./hello## executable file will be created in the ##examples/misc## directory. + et un fichier exécutable ##./hello## sera créé dans le répertoire ##examples/misc##. -{{fbdoc item="section" value="Linux (standalone)"}} - If the install script ##install-standalone.sh## was successfully executed with enough privileges, a link to the compiler binary should have been created at ##/usr/bin/fbc##, allowing any user access to the compiler from any directory. If it was not possible to create the link, you may want to alter your ##PATH## environmental variable to be able to invoke the compiler from any directory. Navigate to the directory where ""FreeBASIC"" was installed. +**Linux (autonome)** + Si le script ##install-standalone.sh## a été exécuté avec succès avec suffisamment de privilèges, un lien vers le fichier binaire du compilateur doit avoir été créé à ##/usr/bin/fbc##, permettant à tout utilisateur l'accès au compilateur depuis n'importe quel répertoire. S'il n'était pas possible de créer le lien, vous pouvez modifier votre variable d'environnement ##PATH## pour être en mesure d'appeler le compilateur à partir de n'importe quel répertoire. Accédez au répertoire où a été installé FreeBASIC. - From the prompt, type, + Depuis l'invite, tapez: ##fbc## - to see a list of options. To compile the "Hello, world!" example program type, + pour voir une liste d'options. Pour compiler l'exemple de programme "Hello, world!" ("Bonjour, monde!), tapez: ##fbc examples/misc/hello.bas## - and a ##./hello## executable file will be created in the ##examples/misc## directory. + et un fichier exécutable ##./hello## sera créé dans le répertoire ##examples/misc##. -{{fbdoc item="section" value="DOS"}} - Navigate to the directory where ""FreeBASIC"" was installed. For example, if ""FreeBASIC"" is installed in the directory ##C:\FB##, type, +**DOS** + Accédez au répertoire où FreeBasic a été installé. Par exemple, si FreeBasic est installé dans le répertoire ##C:\FB##, tapez: ##C:## ##CD FB## - Some DOSes accept "##CDD C:\FB##" as well. You can also add the ""FreeBASIC"" directory to your PATH environment variable (usually something like "##SET PATH=C:\FB\;%PATH%##") so you can invoke the compiler from any directory. + Certains DOS acceptent aussi "##CDD C:\FB##". Vous pouvez également ajouter le répertoire de FreeBASIC à votre variable d'environnement PATH (généralement quelque chose comme "##SET PATH=C:\FB\;%PATH%##") de sorte que vous pourrez appeler le compilateur à partir de n'importe quel répertoire. - At the prompt, type, + Depuis l'invite, tapez: ##fbc## - to see a list of options. To compile the "Hello, world!" example program type, + pour voir une liste d'options. Pour compiler l'exemple de programme "Hello, world!" ("Bonjour, monde!), tapez: ##fbc examples\misc\hello.bas## - and a ##hello.exe## executable file will be created in the ##examples\misc## directory. + et un fichier exécutable ##hello.exe## sera créé dans le répertoire ##examples\misc##. {{fbdoc item="see"}} - - [[CompilerInstalling Installing FreeBASIC]] - - [[CompilerCmdLine Compiler Command Line Options]] - - [[CompilerFAQ Compiler FAQ]] + - [[CompilerInstalling Installation de FreeBASIC]] + - [[CompilerCmdLine Options de ligne de commande du compilateur]] + - [[CompilerFAQ FAQ du compilateur]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerTools.wakka b/fbdocs/manual/cache/CompilerTools.wakka index 00b052b073..1093c8a93b 100644 --- a/fbdocs/manual/cache/CompilerTools.wakka +++ b/fbdocs/manual/cache/CompilerTools.wakka @@ -1,45 +1,45 @@ {{fbdoc item="title" value="Tools used by fbc"}}---- -External tools the FreeBASIC compiler (fbc) may invoke during the compilation process. +Les outils externes dont le compilateur FreeBasic (fbc) peut se prévaloir au cours du processus de compilation. {{fbdoc item="desc"}} - FreeBASIC uses several tools for compiling source code in addition to the ##fbc## compiler. The exact tools used by ##fbc## and how they are invoked depends on how ##fbc## was configured, the host platform (where fbc is running), the target platform (where the produced executable will be run), and other options (like environment variables and command line options). + FreeBasic utilise plusieurs outils pour la compilation du code source en plus le compilateur ##fbc##. Les outils exact utilisé par ##fbc## et comment ils sont invoqués dépend de la façon ##fbc## a été configuré, la plate-forme d'accueil (où fbc est en cours d'exécution), la plate-forme cible (où le fichier exécutable sera exécuté) et d'autres options (comme les variables d'environnement et les options de ligne de commande). - FreeBASIC (##fbc##) may have been configured in one of two ways: either as standalone or prefixed. The standalone version searches directories relative to where the executable is located. The prefixed version has a hardcoded path configured in to the compiler indicating where it expects to find additional tools and libraries. For more information on configuring FreeBASIC, see the ##INSTALL## text file located in the src/compiler directory of the FreeBASIC sources. + FreeBASIC (##fbc##) peut être configuré de l'une des deux manières: en mode autonome ou préfixé. La version autonome recherche les répertoires par rapport où se trouve l'exécutable. La version préfixée a un chemin codé en dur configuré pour le compilateur indiquant où il s'attend à trouver d'autres outils et bibliothèques. Pour plus d'informations sur la configuration de FreeBASIC, voir le fichier texte ##INSTALL## situé dans le répertoire src/compiler des sources FreeBASIC. - You can check if your installed version of ##fbc## is "standalone" or "prefixed" by invoking ##fbc## with the //[[CompilerOptversion -version]]// command line option. + Vous pouvez vérifier si votre version installée de ##fbc## est "autonome" ou "préfixée" en appelant ##fbc## avec l'option //[[CompilerOptversion -version]]// en ligne de commande. -{{fbdoc item="section" value="Standalone"}} - If ##fbc## was configured as "standalone", it will search for files relative to where the ##fbc## executable is located. ##fbc## is at the "top" of the directory tree and searches sub-directories below it. The "top" directory (which defaults to the location where ##fbc## is located) can be overridden with the //[[CompilerOptprefix -prefix]]// command line option. "topdir" shown in the directories below represents the directory where the ##fbc## executable is located, or the directory specified with the //[[CompilerOptprefix -prefix]]// command line option (if it was given). "" refers to the target platform having the same name as specified by the //[[CompilerOpttarget -target]]// option. +**Standalone = Autonome** + Si ##fbc## a été configuré comme "standalone = autonome", il va rechercher les fichiers par rapport à l'endroit où se trouve l'exécutable ##fbc##. ##fbc## est au "sommet" de l'arborescence des répertoires et recherche les sous-répertoires en-dessous de lui. Le répertoire "sommet" (par défaut, à l'endroit où est situé ##fbc##) peut être modifié avec l'option en ligne de commande //[[CompilerOptprefix -prefix]]//. "topdir" des répertoires ci-dessous représente le répertoire où l'exécutable ##fbc## se trouve u le répertoire spécifié avec l'option en ligne de commande //[[CompilerOptprefix -prefix]]// (si elle a été utilisée). "" se réfère à la plate-forme cible ayant le même nom que celui spécifié par l'option //[[CompilerOpttarget -target]]//. - If not cross compiling, ##fbc## looks in these locations: + S'il n'y a pas de compilation croisée, ##fbc## cherche dans ces emplacements: - ##/topdir/inc## - ##/topdir/lib/## - ##/topdir/bin/## - - gcc is queried for missing libraries (currently on linux/freebsd only) + - gcc est demandé pour les bibliothèques manquantes (actuellement sur Linux/FreeBSD seulement) - If cross compiling, ##fbc## looks in the these locations: + S'il y a compilation croisée, ##fbc## cherche dans ces emplacements: - ##/topdir/inc## - ##/topdir/lib/## - ##/topdir/bin/## - - gcc is not queried (only target library directory is used) + - gcc n'est pas demandé (seulement le répertoire de la bibliothèque cible est utilisé) -{{fbdoc item="section" value="Prefixed"}} - If ##fbc## was configured as "prefixed", it will search for files relative to the configured prefix (hardcoded in the ##fbc## executable). "prefix" shown in the directories below represents the configured prefix, or the directory specified with the //[[CompilerOptprefix -prefix]]// command line option (if it was given). "####" refers to the target platform having the same name as specified by the //[[CompilerOpttarget -target]]// option. +**Prefixed = Préfixé** + Si ##fbc## a été configuré comme "prefixed = préfixé", il va rechercher les fichiers par rapport au préfixe configuré (en dur dans l'exécutable ##fbc##). "prefix" dans les répertoires ci-dessous représente le préfixe configuré ou le répertoire spécifié avec l'option de ligne de commande //[[CompilerOptprefix -prefix]]// (si elle a été donnée). "####" se réfère à la plate-forme cible ayant le même nom que celui spécifié par l'option //[[CompilerOpttarget -target]]//. - If not cross compiling, ##fbc## looks in these locations: + S'il n'y a pas de compilation croisée, ##fbc## cherche dans ces emplacements: - ##/prefix/include/freebasic## - ##/prefix/lib/freebasic/## - ##/prefix/bin/freebasic/## - - gcc is queried for missing libraries (currently on linux/freebsd only) + - gcc est demandé pour les bibliothèques manquantes (actuellement sur Linux/FreeBSD seulement) - If cross compiling, ##fbc## looks in the these locations: + S'il y a compilation croisée, ##fbc## cherche dans ces emplacements: - ##/prefix/include/freebasic## - ##/prefix/lib/freebasic/## - ##/prefix/bin/freebasic/## - - gcc is not queried (only target library directory is used) + - gcc n'est pas demandé (seulement le répertoire de la bibliothèque cible est utilisé) -{{fbdoc item="section" value="GCC Queries"}} - If ##fbc## is unable to locate a file, it may invoke ##gcc -print-file-name=## to query the location of the file. The following are files that may be located using gcc: +**Requêtes GCC** + Si ##fbc## est incapable de localiser un fichier, il peut invoquer ##gcc -print-file-name=## pour interroger l'emplacement du fichier. Les fichiers suivants sont susceptibles d'être localisés en utilisant gcc: - ##crt1.o## - ##crtbegin.o## - ##crtend.o## @@ -47,11 +47,11 @@ External tools the FreeBASIC compiler (fbc) may invoke during the compilation pr - ##crtn.o## - ##gcrt1.o## - ##libgcc.a## - - ##""libsupc+""+.a## - - ##libc.so (Linux only)## + - ##libsupc++.a## + - ##libc.so (Linux seulement)## -{{fbdoc item="section" value="Finding Binaries"}} - ##fbc## will invoke additional tools (binary executables) as part of the compiling and linking process. The following is a list of tools (executables) that may be invoked by ##fbc## depending on the host platform, target, or type of executable or library to be produced: +**Trouver les binaires** + ##fbc## appellera d'autres outils (exécutables) dans le cadre du processus de compilation et de liaison. Ce qui suit est une liste d'outils (exécutables) qui peuvent être invoqués par ##fbc## en fonction de la plate-forme d'accueil, la cible ou le type d'exécutable ou de bibliothèque à produire: - ##as## - ##ar## - ##ld## @@ -61,16 +61,16 @@ External tools the FreeBASIC compiler (fbc) may invoke during the compilation pr - ##pexports## - ##cxbe## - ##fbc## will search for these tools in the following manner: - - If an environment variable (having same name as the tool without any extension, all in uppercase) has been set, it explicitly indicates the path and name of the executable to be invoked. - - If the file (or a symlink) exists in ##prefix/bin/freebasic/##, or ##./bin/## for the standalone version, then use it. - - On Linux, if the tool could not be found in ##prefix/bin/freebasic/##, or ##./bin/## for the standalone version, ##fbc## tries to invoke it anyway as it may be installed on the system and located on the PATH. + ##fbc## va chercher ces outils de la manière suivante: + - Si une variable d'environnement (ayant le même nom que l'outil sans aucune extension, tout en majuscule) a été créée, il indique explicitement le chemin et le nom de l'exécutable à appeler. + - Si le fichier (ou un lien symbolique) existe dans ##prefix/bin/freebasic/## ou ##./bin/## pour la version autonome, alors il l'utilise. + - Sous Linux, si l'outil n'a pas pu être trouvé dans ##prefix/bin/freebasic/## ou ##./bin/## pour la version autonome, ##fbc## essaie de l'appeler de toute façon car il peut être installé sur le système et situé sur le chemin PATH. "####" refers to the target platform having the same name as specified by the //[[CompilerOpttarget -target]]// option. {{fbdoc item="see"}} - - [[CompilerRunning Running FreeBASIC]] - - [[CompilerCmdLine Compiler Command Line Options]] - - [[CompilerFAQ Compiler FAQ]] + - [[CompilerRunning Utilisation du compilateur FreeBASIC]] + - [[CompilerCmdLine Options de ligne de commande du compilateur]] + - [[CompilerFAQ FAQ du compilateur]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CompilerWelcome.wakka b/fbdocs/manual/cache/CompilerWelcome.wakka index 99aad7be82..002e170899 100644 --- a/fbdocs/manual/cache/CompilerWelcome.wakka +++ b/fbdocs/manual/cache/CompilerWelcome.wakka @@ -1,34 +1,34 @@ {{fbdoc item="title" value="Welcome to FreeBASIC"}}---- -Welcome to our world! This page is an overview of our online warehouse of knowledge. Enjoy your surfing and we hope this will be the first of many visits. +Bienvenue dans notre monde! Cette page est un aperçu de notre magasin en ligne de la connaissance. Bonne navigation et nous espérons que ce sera la première de nombreuses visites. -{{fbdoc item="section" value="Introduction"}} - FreeBASIC is a free 32-bit compiler for the BASIC language. It is open source and //[[GnuLicenses licensed under the GPL]]//. It is designed to be syntax compatible with QuickBASIC, while expanding on the language and capabilities. It can create programs for MS-Windows, DOS and Linux, and is being ported to other platforms. See //[[CompilerAbout About FreeBASIC]]// and //[[CompilerFeatures Main Features]]//. +**Introduction** + FreeBASIC est un compilateur libre 32-bit pour la langage BASIC. Il est "open source" et //[[GnuLicenses sous licence GPL]]//. Il est conçu pour être compatible avec la syntaxe QuickBASIC, tout en développant le langage et ses capacités. Il peut créer des programmes pour MS-Windows, DOS et Linux, et est en cours de portage sur d'autres plates-formes. Voir //[[CompilerAbout A propos de FreeBasic]]// and //[[CompilerFeatures Principales caractéristiques]]//. -{{fbdoc item="section" value="Latest Version"}} - FreeBASIC is a beta release compiler and development is ongoing. With each full update, many features are added, and bugs from previous releases are fixed. To see the latest version available, visit [[http://sourceforge.net/projects/fbc http://sourceforge.net/projects/fbc]] on [[http://sourceforge.net SourceForge]], or [[http://www.freebasic.net/index.php/download http://www.freebasic.net/index.php/download]] on [[http://www.freebasic.net FreeBASIC's official website]]. +**Dernière version** + FreeBasic est un compilateur version bêta et son développement est en cours. A chaque mise à jour complète, de nombreuses fonctionnalités sont ajoutées, et les bugs des versions précédentes sont éliminés. Pour voir la dernière version disponible, visitez [[http://sourceforge.net/projects/fbc">http://sourceforge.net/projects/fbc]] sur [[http://sourceforge.net">SourceForge]], ou [[http://www.freebasic.net/index.php/download">http://www.freebasic.net/index.php/download]] sur le [[http://www.freebasic.net">Site Web Officiel de FreeBASIC]]. -{{fbdoc item="section" value="Requirements and Installation"}} - Minimum hardware is listed on the //[[CompilerRequirements Requirements]]// page. Visit our //[[CompilerRequirements Installation]]// page for setting up FreeBASIC on your computer. +**Exigences et installation** + La configuration matérielle minimale est indiquée sur la page //[[CompilerRequirements Exigences]]//. Visitez notre page //[[CompilerRequirements Installation]]// pour intaller FreeBASIC sur votre ordinateur. -{{fbdoc item="section" value="Running"}} - FreeBASIC is a compiler and as such is not packaged with an IDE (Integrated Development Editor), although there are a few IDE's available. For information on using FreeBASIC without an IDE, see //[[CompilerRunning Running]]//. +**Fonctionnement** + FreeBasic est un compilateur et en tant que tel n'est pas emballé avec un IDE (Integrated Development Editor = Editeur avec développement intégré), cependant il y a quelques IDE disponibles. Pour plus d'informations sur l'utilisation freeBasic sans IDE, voir //[[CompilerRunning Fonctionnement]]//. -{{fbdoc item="section" value="Compatibility with QuickBASIC"}} - FreeBASIC is designed to be syntax compatible with QuickBASIC. For best code-compatibility with QuickBASIC, the //[[CompilerDialects QB dialect]]// can be used when compiling source code. See //[[CompilerDialects FreeBASIC Dialects]]// and //[[LangQB Differences from QB]]//. +**Compatibilité avec QuickBasic** + FreeBasic est conçu pour être compatible avec la syntaxe QuickBASIC. Pour la meilleure compatibilité du code avec celui de QuickBASIC, le //[[CompilerDialects dialecte QB]]// peut être utilisé lors de la compilation du code source. Voir //[[CompilerDialects Les dialectes du FreeBASIC]]// et //[[LangQB Différences avec QB]]//. -{{fbdoc item="section" value="Documentation"}} - All official documentation can be found online in the wiki at [[http://www.freebasic.net/wiki http://www.freebasic.net/wiki]]. The online documentation is the most up-to-date resource available. In all cases it can be regarded as the correct version. The downloadable versions of the manual are snapshots of the documentation available at a particular time and should be mostly correct for a specific released version of the compiler. However, we do not maintain multiple versions of the documentation so there may be some discrepancies. +**Documentation** + Tous les documents officiels peuvent être consultés en ligne dans le wiki à [[http://www.freebasic.net/wiki">http://www.freebasic.net/wiki]]. La documentation en ligne est la plus à jour des ressources disponibles. Dans tous les cas, elle peut être considérée comme la version correcte. Les versions téléchargeables de ce manuel sont des instantanés de la documentation disponible à un moment donné et devrait être correctes pour une version spécifique du compilateur. Cependant, nous ne maintenons pas plusieurs versions de la documentation donc il peut y avoir des écarts. -{{fbdoc item="section" value="Starting points in the Manual"}} - - [[DocToc Table of Contents]] - - [[CompilerHelp Getting Help with FreeBASIC]] - - [[CatPgProgrammer Programmer's Guide]] +**Les points de départ dans le Manuel** + - [[DocToc Table des matières]] + - [[CompilerHelp Obtenir de l'aide avec FreeBASIC]] + - [[CatPgProgrammer Guide du programmeur]] -{{fbdoc item="section" value="Starting points on the Web"}} - - Official Website at [[http://www.freebasic.net http://www.freebasic.net]] - - Official Forums at [[http://www.freebasic.net/forum http://www.freebasic.net/forum]] - - Official Archive at [[http://www.freebasic.net/arch http://www.freebasic.net/arch]] +**Les points de départ sur le Web** + - Site Officiel à [[http://www.freebasic.net">http://www.freebasic.net]] + - Forums officiels à [[http://www.freebasic.net/forum">http://www.freebasic.net/forum]] + - Archives officielles à [[http://www.freebasic.net/arch">http://www.freebasic.net/arch]] -Thank you for using FreeBASIC. Happy coding! +Merci d'utiliser freeBasic. Bonne programmation! {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/CptAscii.wakka b/fbdocs/manual/cache/CptAscii.wakka index 4649e45946..fee4b78a33 100644 --- a/fbdocs/manual/cache/CptAscii.wakka +++ b/fbdocs/manual/cache/CptAscii.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Table of ASCII Characters"}}---- -FreeBASIC supports in all versions the same "ASCII extended" character set the old DOS (and QBasic) supported. It is also called CP437 or Code page 437. Each character is represented with one (1) byte of data. Here is a table. Each entry has decimal code, hex code, and printed representation. +FreeBasic prend en charge dans toutes les versions le même jeu de caractères "ASCII étendu" supporté par l'ancien DOS (et QBasic). Il est aussi appelé CP437 ou "Code Page 437". Chaque caractère est représenté avec un (1) octet de données. Voici un tableau. Chaque entrée donne le code décimal, le code hexadécimal et la représentation imprimée. -"""" - ##"" ---+ + ##
    0000003220sp06440@09660`12880160A0192C0##└##224E0##α##00101##☺##03321!06541A09761a12981161A1193C1##┴##225E100202##☻##03422"06642B09862b13082é162A2194C2##┬##226E2##Γ##00303##♥##03523#06743C09963c13183163A3195C3##├##227E3##π##00404##♦##03624$06844D10064d13284164A4196C4##─##228E4##Σ##00505##♣##03725%06945E10165e13385165A5197C5##┼##229E5##σ##00606##♠##03826##&07046F10266f13486166A6198C6##╞##230E60070703927'07147G10367g13587167A7199C7##╟##231E7##τ##00808##◘##04028(07248H10468h13688ê168A8200C8##╚##232E8##Φ##00909##○##04129)07349I10569i13789169A9##⌐##201C9##╔##233E9##Θ##0100A##◙##0422A*0744AJ1066Aj1388Aè170AA202CA##╩##234EA##Ω##0110B##♂##0432B+0754BK1076Bk1398B171AB203CB##╦##235EB##δ##0120C##♀##0442C,0764CL1086Cl1408C172AC204CC##╠##236EC##∞##0130D##♪##0452D-0774DM1096Dm1418D173AD205CD##═##237ED##φ##0140E##♫##0462E.0784EN1106En1428E174AE206CE##╬##238EE##ε##0150F##☼##0472F/0794FO1116Fo1438F175AF207CF##╧##239EF##∩##01610##►##04830008050P11270p14490176B0##░##208D0##╨##240F0##≡##01711##◄##04931108151Q11371q14591177B1##▒##209D1##╤##241F101812##↕##05032208252R11472r14692178B2##▓##210D2##╥##242F2##≥##01913##‼##05133308353S11573s14793ô179B3##│##211D3##╙##243F3##≤##0201405234408454T11674t14894180B4##┤##212D4##╘##244F4##⌠##0211505335508555U11775u14995181B5##╡##213D5##╒##245F5##⌡##02216##▬##05436608656V11876v15096182B6##╢##214D6##╓##246F602317##↨##05537708757W11977w15197183B7##╖##215D7##╫##247F7##≈##02418##↑##05638808858X12078x15298184B8##╕##216D8##╪##248F802519##↓##05739908959Y12179y15399185B9##╣##217D9##┘##249F9##∙##0261A##→##0583A:0905AZ1227Az1549A186BA##║##218DA##┌##250FA0271B##←##0593B;0915B[1237B{1559B187BB##╗##219DB##█##251FB##√##0281C##∟##0603C<0925C\1247C|1569C188BC##╝##220DC##▄##252FC##ⁿ##0291D##↔##0613D=0935D]1257D}1579D189BD##╜##221DD##▌##253FD0301E##▲##0623E>0945E^1267E~1589E##₧##190BE##╛##222DE##▐##254FE##■##0311F##▼##0633F?0955F_1277F##⌂##1599F191BF##┐##223DF##▀##255FF
    ## +De nombreux caractères ASCII standards ne peuvent pas être imprimés en FreeBasic parce que la console interprète certains caractères comme des contrôles: 7 = sonnette, 8 = retour en arrière, 9 = tabulation, 10 = saut de ligne, 13 = retour chariot et d'autres. Il y a aussi des symboles associés ces caractères, mais il n'existe aucun moyen en FreeBASIC de les afficher l'écran. L'acronyme ASCII signifie "American Standard Code for Information Interchange". Pour plus d'informations, voir http://en.wikipedia.org/wiki/Ascii. Les symboles pour les codes 32 127 sont les mêmes que ceux de la norme [[http://en.wikipedia.org/wiki/ISO_8859-1">Latin ISO-8859-1]] jeu de caractères utilisé par la plupart des polices qu'utilise Windows. Les autres sont souvent très différents. +UNICODE est une nouvelle norme de jeux de caractères comportant deux ou plus d'octets par caractère, et peut être utilisée pour imprimer d'autres caractères une console compatible Unicode. +Dans les modes graphiques, ##[[KeyPgDrawString Draw String]]## ne donne pas un sens particulier pour les caractères de contrôle permettant une alternative pour afficher tous les caractères dans le jeu. @@ -16,8 +16,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 03220sp 06440@ 09660` -12880 -160A0 +12880Ç +160A0á 192C0 224E0α @@ -25,17 +25,17 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 03321! 06541A 09761a -12981 -161A1 +12981ü +161A1í 193C1 -225E1 +225E1ß 00202 03422" 06642B 09862b -13082 -162A2 +13082é +162A2ó 194C2 226E2Γ @@ -43,8 +43,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 03523# 06743C 09963c -13183 -163A3 +13183â +163A3ú 195C3 227E3π @@ -52,8 +52,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 03624$ 06844D 10064d -13284 -164A4 +13284ä +164A4ñ 196C4 228E4Σ @@ -61,26 +61,26 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 03725% 06945E 10165e -13385 -165A5 +13385à +165A5Ñ 197C5 229E5σ 00606 -03826& +03826& 07046F 10266f -13486 -166A6 +13486å +166A6ª 198C6 -230E6 +230E6µ -00707 +00707• 03927' 07147G 10367g -13587 -167A7 +13587ç +167A7º 199C7 231E7τ @@ -88,8 +88,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 04028( 07248H 10468h -13688 -168A8 +13688ê +168A8¿ 200C8 232E8Φ @@ -97,7 +97,7 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 04129) 07349I 10569i -13789 +13789ë 169A9 201C9 233E9Θ @@ -106,8 +106,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0422A* 0744AJ 1066Aj -1388A -170AA +1388Aè +170AA¬ 202CA 234EAΩ @@ -115,8 +115,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0432B+ 0754BK 1076Bk -1398B -171AB +1398Bï +171AB½ 203CB 235EBδ @@ -124,8 +124,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0442C, 0764CL 1086Cl -1408C -172AC +1408Cî +172AC¼ 204CC 236EC @@ -133,8 +133,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0452D- 0774DM 1096Dm -1418D -173AD +1418Dì +173AD¡ 205CD 237EDφ @@ -142,8 +142,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0462E. 0784EN 1106En -1428E -174AE +1428EÄ +174AE« 206CE 238EEε @@ -151,8 +151,8 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0472F/ 0794FO 1116Fo -1438F -175AF +1438FÅ +175AF» 207CF 239EF @@ -160,7 +160,7 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 048300 08050P 11270p -14490 +14490É 176B0 208D0 240F0 @@ -169,16 +169,16 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 049311 08151Q 11371q -14591 +14591æ 177B1 209D1 -241F1 +241F1± 01812 050322 08252R 11472r -14692 +14692Æ 178B2 210D2 242F2 @@ -187,25 +187,25 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 051333 08353S 11573s -14793 +14793ô 179B3 211D3 243F3 -02014 +02014¶ 052344 08454T 11674t -14894 +14894ö 180B4 212D4 244F4 -02115 +02115§ 053355 08555U 11775u -14995 +14995ò 181B5 213D5 245F5 @@ -214,16 +214,16 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 054366 08656V 11876v -15096 +15096û 182B6 214D6 -246F6 +246F6÷ 02317 055377 08757W 11977w -15197 +15197ù 183B7 215D7 247F7 @@ -232,16 +232,16 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 056388 08858X 12078x -15298 +15298ÿ 184B8 216D8 -248F8 +248F8° 02519 057399 08959Y 12179y -15399 +15399Ö 185B9 217D9 249F9 @@ -250,16 +250,16 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0583A: 0905AZ 1227Az -1549A +1549AÜ 186BA 218DA -250FA +250FA• 0271B 0593B; 0915B[ 1237B{ -1559B +1559B¢ 187BB 219DB 251FB @@ -268,7 +268,7 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0603C< 0925C\ 1247C| -1569C +1569C£ 188BC 220DC 252FC @@ -277,10 +277,10 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0613D= 0935D] 1257D} -1579D +1579D¥ 189BD 221DD -253FD +253FD² 0301E 0623E> @@ -295,13 +295,13 @@ FreeBASIC supports in all versions the same "ASCII extended" character set the o 0633F? 0955F_ 1277F -1599F +1599Fƒ 191BF 223DF 255FF  ""## """" """" """" """" -Many of the standard ASCII characters cannot be PRINTed in FreeBASIC, because the console interprets some characters as controls: 7 is bell, 8 is backspace, 9 is tab, 10 is line feed, 13 is carriage return, and others. There are symbols associated with these characters also, but there is no way in FreeBASIC to output them to the screen. The acronym ASCII stands for American Standard Code for Information Interchange. For more information, see [[http://en.wikipedia.org/wiki/Ascii]]. The symbols for codes 32 through 127 are the same as the standard [[http://en.wikipedia.org/wiki/ISO_8859-1 Latin ISO-8859-1]] char set most Windows fonts use. Others are often very different. +Many of the standard ASCII characters cannot be PRINTed in ""FreeBASIC"", because the console interprets some characters as controls: 7 is bell, 8 is backspace, 9 is tab, 10 is line feed, 13 is carriage return, and others. There are symbols associated with these characters also, but there is no way in ""FreeBASIC"" to output them to the screen. The acronym ASCII stands for American Standard Code for Information Interchange. For more information, see [[http://en.wikipedia.org/wiki/Ascii]]. The symbols for codes 32 through 127 are the same as the standard [[http://en.wikipedia.org/wiki/ISO_8859-1 Latin ISO-8859-1]] char set most Windows fonts use. Others are often very different. UNICODE is a newer standard of character sets involving two or more bytes per character, and may be used to print other characters to a Unicode-enabled console. diff --git a/fbdocs/manual/cache/DataType.wakka b/fbdocs/manual/cache/DataType.wakka index 87a46531b9..5a447c6011 100644 --- a/fbdocs/manual/cache/DataType.wakka +++ b/fbdocs/manual/cache/DataType.wakka @@ -1,7 +1,7 @@ {{fbdoc item="title" value="Data Types"}}---- -<< - - [[CatPgStdDataTypes Standard Data Types]] - - [[CatPgUserDefTypes User Defined Types]] + - [[CatPgStdDataTypes Types de données standard]] + - [[CatPgUserDefTypes Types définis par l'utilisateur]] + ;;
    <<>> >>::c:: \ No newline at end of file diff --git a/fbdocs/manual/cache/DebuggerRunning.wakka b/fbdocs/manual/cache/DebuggerRunning.wakka index 5d05b66666..3aef9d762e 100644 --- a/fbdocs/manual/cache/DebuggerRunning.wakka +++ b/fbdocs/manual/cache/DebuggerRunning.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Debugging"}}---- - The debugger is in the bin\win32 or bin\dos directories (the **GDB**.EXE file), for the Windows and DOS versions respectively. It usually comes already installed in most Linux distros. + Le débogueur est dans le bin\win32 ou les répertoires bin\dos (le fichier **GDB**.EXE), pour les versions Windows et DOS, respectivement. Il est habituellement déjà installé dans la plupart des distributions Linux. - (Note: all commands should be typed without quotes and then [return] must be pressed.) + (Note: toutes les commandes doivent être tapées sans les guillemets, puis [Entrée] doit être appuyé.) - - Compile the sources using the -g cmd-line option to add debugging support. - - Load it in GDB using: ##"gdb myapplicationname.exe"## - - Set the arguments to the application been debugged using: "set args arg1 arg2 argn". You can also run GDB and pass the arguments directly to the application been debugged: "gdb --args myapp.exe arg1 arg2 arg3". - - If the executable isn't in the same directory of the source files where it was compiled, type: ##"dir path/to/my/application/sources"##. - - Place a breakpoint in the first line using: "b main". To place a breakpoint in a function called "abc" use: "b ABC" (note: all in uppercase, GDB is case sensitive by default, but you can use the "set language pascal" command to change GDB to case-insensitive mode). - - Type "r" to start the application. - - Type "n" to step over function calls. Keep pressing [return] to skip to the next line. - - Type "s" to step into function calls. Same as above. - - Type "c" to continue execution until the next breakpoint. - - Use "print ABC" to show the contents of the variable called "abc". GDB supports pointer/pointer field dereferencing, indexing and arithmetics too, so "print *MYPOINTER" will also work. (note: undeclared variables or the ones with suffixes like % & ! # $ can't be printed). - - Use "disp ABC" to display the contents of a variable called "abc". - - Use "watch ABC" to stop each time a variable called "abc" is changed. - - Use "r" again to restart the application when finished. - - Type "q" to quit. - - Type "help" to see a list of commands, there are many others. + - Compilez les sources avec l'option -g sur la ligne de commande pour ajouter la prise en charge du débogage. + - Chargez-le en utilisant GDB: ##"gdb myapplicationname.exe"## + - Définir les arguments de l'application à déboguer en utilisant: "set args arg1 arg2 argn". Vous pouvez également exécuter GDB et passer les arguments directement à l'application à déboguer: "gdb --args myapp.exe arg1 arg2 arg3". + - Si l'exécutable n'est pas dans le même répertoire que les fichiers source où il a été compilé, tapez: ##"dir path/to/my/application/sources"##. + - Placez un point d'arrêt dans la première ligne à l'aide: "b main". Pour placer un point d'arrêt dans une fonction appelée "abc" utilisez: "b ABC" (note: tout en majuscules, GDB est sensible à la casse par défaut, mais vous pouvez utiliser la commande "set language pascal" pour passer GDB au mode insensible à la casse). + - Tapez "r" pour lancer l'application. + - Tapez "n" pour sauter les appels de fonction. Maintenez la touche [Entrée] pour passer à la ligne suivante. + - Tapez "s" pour entrer dans les appels de fonction. Idem que ci-dessus. + - Tapez "c" pour continuer l'exécution jusqu'au prochain point d'arrêt. + - Utilisez "print ABC" pour voir le contenu de la variable appelée "abc". GDB supporte pointeur/déréférencement de pointeur, l'indexation et l'arithmétique aussi, donc "print *MYPOINTER" fonctionnera également. (note: les variables non déclarées ou celles avec les suffixes % & ! # $ ne peuvent pas être PRINTées). + - Utilisez "disp ABC" pour afficher le contenu d'une variable appelée "abc". + - Utilisez "watch ABC" pour arrêter à chaque fois qu'une calle variable appelée "abc" est modifiée. + - Utilisez "r" again to restart the application when finished. + - Tapez "q" pour quitter. + - Tapez "help" pour voir une liste de commandes, il y en a beaucoup d'autres. diff --git a/fbdocs/manual/cache/DevBuild.wakka b/fbdocs/manual/cache/DevBuild.wakka new file mode 100644 index 0000000000..0997abb075 --- /dev/null +++ b/fbdocs/manual/cache/DevBuild.wakka @@ -0,0 +1,353 @@ +{{fbdoc item="title" value="Getting the FreeBASIC source code and compiling it"}}---- + +The source code of ""FreeBASIC"" is maintained on Sourceforge using the Git version control system, which allows different developers to work on the source code at the same time and later combine their work. It is possible for users to download this source code using anonymous read access and compile it using GNU development tools. + +Compiling the development version is not recommended for most users. ""FreeBASIC"" is a self-hosting compiler, still in active development, so there will be times when the current development version cannot be compiled by the last official release. Note also that the procedures for building the compiler described here may change with future versions of ""FreeBASIC"". + +On Windows, ""MinGW""/""MSYS"" is used to compile ""FreeBASIC"". Linux users will usually have the required development tools installed on their system already. The Cygwin build may be useful for Windows users wishing to access Linux libraries in windows. The DOS build is normally compiled on Windows using DJGPP. Advanced users may be able to cross-compile between other builds, but the correct development tools and libraries would be needed, and it has not been widely tested. + + +**{{anchor name="PREVIOUS|Previous guides (for compiling FB 0.23 and earlier)"}}** +**{{anchor name="SOURCE|Getting the current source code"}}** +**{{anchor name="SETUP|Setting up the environment"}}** +**{{anchor name="COMPILE|Compiling FreeBASIC"}}** +**{{anchor name="ALONEDOS|Making a self-contained DOS version (like the FB-dos release)"}}** +**{{anchor name="ALONEWIN32|Making a self-contained Win32 version (like the FB-win32 release)"}}** +**{{anchor name="RECOMPILE|Getting source code updates and recompiling"}}** +**{{anchor name="DEBUG|Recompiling fbc for debugging purposes"}}** +**{{anchor name="CONFIG|Compilation options"}}** +**{{anchor name="PROBLEMS|Known problems"}}** + + +{{anchor name="PREVIOUS"}}{{fbdoc item="section" value="Previous guides (for compiling FB 0.23 and earlier)"}} + + {{fbdoc item="keyword" value="SVNCygwin|Compiling from SVN for Cygwin"}} + {{fbdoc item="keyword" value="SVNWin32MSYS|Compiling from SVN for Win32, using MSYS on Win32"}} + {{fbdoc item="keyword" value="SVNLinux|Compiling from SVN for Linux"}} + {{fbdoc item="keyword" value="SVNDOSWin32|Compiling from SVN for DOS on Win32"}} + {{fbdoc item="keyword" value="SVNFreeBSD|Compiling from SVN for FreeBSD"}} + + +{{anchor name="SOURCE"}}{{fbdoc item="section" value="Getting the current source code"}} + + The current source (""FreeBASIC"" 0.24) is available from these Git repositories: + + Web view of main fbc/fbc repository: http://fbc.git.sourceforge.net/git/gitweb.cgi?p=fbc/fbc;a=summary + Git clone URL: ##""git://fbc.git.sourceforge.net/gitroot/fbc/fbc""## + + Github mirror: https://github.com/freebasic/fbc + Git clone URL: ##""https://github.com/freebasic/fbc.git""## + + If you need help with installing or using Git, search the web or check out the few [[Git Git tips here]]. + + +{{anchor name="SETUP"}}{{fbdoc item="section" value="Setting up the environment"}} + + The ""FreeBASIC"" compiler is self-hosting, and a working ""FreeBASIC"" installation is needed to compile it, while ##gcc## is needed to compile the ""FreeBASIC"" runtime libraries. It should be possible to compile the current development version of ##fbc## using ""FreeBASIC"" 0.21 or up. + + + ==DOS== + + The DOS version of ""FreeBASIC"" is typically compiled on Windows, using a DOS ""FreeBASIC"" and DJGPP. The DJGPP packages can be found on the [[http://www.delorie.com/djgpp/getting.html DJGPP homepage]]. ""FreeBASIC"" needs djdev204.zip from DJGPP 2.04 (DJGPP downloads directory: ##[[http://www.delorie.com/pub/djgpp/beta/v2/ beta/v2/]]##), but for the others it should be ok to use the ones from DJGPP 2.03 (DJGPP downloads directory: ##[[http://www.delorie.com/pub/djgpp/current/v2gnu/ current/v2gnu/]]##). Setup DJGPP by extracting everything into ##C:\DJGPP## and adding an environment variable named "DJGPP", set to ##C:\DJGPP\djgpp.env##. + + - ##binutils## (##bnu*b.zip##, ##bnu*a.zip##) + - ##bash## (##bsh*.zip##) + - ##djdev## (##djdev*.zip##) - //pick up djdev204.zip or later from the ##beta/## directory// + - ##fileutils## (##fil*.zip##) + - ##gcc## (##gcc*b.zip##) + - ##gpp## (##gpp*b.zip##) + - ##gettext## (##gtxt*b.zip##) - //libintl, for libbfd// + - ##make## (##mak*b.zip##) + - ##shellutils## (##shl*b.zip##) + - ##textutils## (##txt*b.zip##) + - ##zlib## (##zlib*b.zip##) - //zlib, for libbfd, from the ##[[http://www.delorie.com/pub/djgpp/current/v2tk/ current/v2tk/]]## directory// + + For example when working in parallel with ""MinGW"", it can be useful to use a batch script to launch a terminal with the DJGPP tools in its PATH environment variable, instead of modifying your system's global PATH environment variable: + + %%set DJGPP=C:\DJGPP\djgpp.env +set PATH=C:\DJGPP\bin;%PATH% +set PATH=C:\FBDOS;%PATH% +cd C:\ +cmd%% + + + ==Linux== + + This assumes a 32bit (x86) Linux system, however it should also be possible to crosscompile the (still only 32bit) ""FreeBASIC"" on a 64bit system, but the steps might be different. Roughly these Debian packages should be needed (with Fedora names in parentheses): + + - ##gcc## + - ##""g++""## (##""gcc-c++""##) + - ##binutils## + - ##binutils-dev## (##binutils-devel## or ##binutils-static##) - //libbfd for fbc's objinfo feature// + - ##make## + - ##libncurses-dev## (##ncurses-devel##) - //curses headers for the rtlib// + - ##libx11-dev## (##libX11-devel##) - //X11 headers for gfxlib2// + - ##libxext-dev## (##libXext-devel##) + - ##libxpm-dev## (##libXpm-devel##) + - ##libxrandr-dev## (##libXrandr-devel##) + - ##libxrender-dev## (##libXrender-devel##) + - ##libgpm-dev## (##gpm-devel##) - //General purpose mouse library headers for the rtlib// + - ##freeglut3-dev## (##freeglut-devel##) - //""OpenGL"" headers for gfxlib2// + + On 64bit Debian/Ubuntu, these packages should do the trick (To do: test and update): + + - ##ia32-libs-dev## + - ##libc6-dev-i386## + - ##gcc-multilib## + - ##""g++-multilib""## + - ##lib32ncurses5-dev## + + + ==Windows== + + To install [[http://www.mingw.org MinGW/MSYS]], download the latest version of the [[https://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/ mingw-get program]] and extract it into ##""C:\MinGW""##. After that open a command prompt (cmd.exe) and run: + + %%cd C:\MinGW\bin +mingw-get update +mingw-get upgrade +mingw-get install +%% + + The following packages are needed: + + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version4/ gcc-core]]## + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version4/ gcc-g++]]## (only needed to get ""libsupc++.a"") + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GNU-Binutils/ binutils]]## (binutils, and binutils-dev for libbfd) + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/ mingwrt]]## + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/Win32-API/ w32api]]## + - ##[[http://sourceforge.net/projects/mingw/files/MinGW/gettext/ gettext-dev]]## (libintl for libbfd) + - ##[[http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/msys-core/ msys-core]]## + - ##[[http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/bash/ bash]]## (terminal/shell) + - ##[[http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils/ msys-coreutils]]## + - ##[[http://sourceforge.net/projects/mingw/files/MSYS/findutils/ msys-findutils]]## (xargs for running the test suite) + - ##[[http://sourceforge.net/projects/mingw/files/MSYS/make/ msys-make]]## + + After installing, you can open a ""MinGW"" shell (MSYS bash) by running ##""C:\MinGW\msys\1.0\msys.bat""## (you can create a shortcut to it too). + + To use ""MinGW/MSYS"" programs from other shells (for example the cmd.exe command prompt), add both ##""C:\MinGW\bin""## and ##""C:\MinGW\msys\1.0\bin""## to the system's global PATH environment variable. + + To update an existing ""MinGW/MSYS"" installation: + + %%mingw-get update +mingw-get upgrade +mingw-get upgrade +%% + + + In order to compile ""FreeBASIC""'s gfxlib2, ""DirectX"" headers are needed in ##C:\""MinGW""\include##, specifically ##ddraw.h## and ##dinput.h##. You can get the headers from here: [[http://alleg.sourceforge.net/files/dx80_mgw.zip]] + + Note: It is most likely also possible to use other GCC-for-""Win32"" ports like [[http://tdm-gcc.tdragon.net/ TDM-GCC]] or [[http://mingw-w64.sourceforge.net/ MinGW-w64]], since they usually are almost identical. Things like different exception handling or 64bit support currently do not matter for ""FreeBASIC"". TDM-GCC was successfully used for the ""FreeBASIC"" 0.21 - 0.23 releases. + + +{{anchor name="COMPILE"}}{{fbdoc item="section" value="Compiling FreeBASIC"}} + + By default the compilation process creates a compiler that is intended to be installed into a unix-like directory tree such as ##/usr## or ##/usr/local## on Linux, or ##""C:\MinGW""## for the Windows version, or ##C:\DJGPP## for the DOS version. + + To compile ""FreeBASIC"", open a terminal (command prompt) and change to directory containing the ""FreeBASIC"" source code, then run: + + %%make%% + + The newly built compiler and run-time libraries will be placed in a build directory called ##new/##. This is a basically valid ""FreeBASIC"" installation, allowing it to be tested immediately, although on DOS and Windows there are additional steps necessary to get a fully working ""FreeBASIC"" tree. + + To install into ##/usr/local## on Linux: + + %%make install%% + + To install into ##""C:\MinGW""## on Windows: + + %%make install prefix=c:/mingw%% + + To install the DOS version: + + 1) %%make install prefix=c:/djgpp%% + + 1) Copy the modified ##libc.a## from the latest ""FreeBASIC-dos"" release into ##C:\DJGPP\lib\freebas## + + +{{anchor name="ALONEDOS"}}{{fbdoc item="section" value="Making a self-contained DOS version (like the FB-dos release)"}} + + The DOS version is typically compiled using DJGPP on Windows. Assuming the source code is in ##C:\fbc##: + + %%cd c:/fbc +make clean +# (This is added to config.mk so you don't have to retype it for every 'make' or 'make clean' etc.) +echo "ENABLE_STANDALONE=1" > config.mk +make clean +make +%% + + After the compilation, the following files need to be copied into the ##C:\fbc\new## tree: + + 1) Copy to ##""C:\fbc\new\bin""##: + - ##C:\DJGPP\bin\{ar,as,ld}.exe## + + 1) Copy to ##""C:\fbc\new\lib""##: + - ##C:\DJGPP\lib\{crt0,gcrt0}.o## + - ##C:\DJGPP\lib\lib{emu,m}.a## + - ##C:\DJGPP\lib\gcc\djgpp\version\lib{gcc,supcxx}.a##, and rename ##libsupcxx.a## to ##libsupcx.a## (8.3 file name) + - ##C:\DJGPP\lib\lib{bfd,iberty,intl,z}.a## //(For recompiling ""FreeBASIC"" using this tree)// + - The modified ##libc.a## from the latest ""FreeBASIC"" release //(Note: To use the libc.a from DJGPP, the _main.o it contains needs to be replaced with the one compiled from ##contrib/djgpp/libc/crt0/_main.c## from the fbc source code, to fix a bug in the original version from DJGPP)// + - and any additional libraries you want to use + + 1) Copy to ##""C:\fbc\new\include""##: + - any headers you want to use, from [[http://code.google.com/p/freebasic-headers/ freebasic-headers]] or the previous ""FreeBASIC"" release, etc. + + After this, ##C:\fbc\new## should be ready to compile your programs, and you can also copy it to another directory or share it if you want. + + +{{anchor name="ALONEWIN32"}}{{fbdoc item="section" value="Making a self-contained Win32 version (like the FB-win32 release)"}} + + Assuming the source code is in ##C:\fbc##: + + %%cd /c/fbc +make clean +# (This is added to config.mk so you don't have to retype it for every 'make' or 'make clean' etc.) +echo "ENABLE_STANDALONE=1" > config.mk +make clean +make +%% + + After the compilation, the following files need to be copied into the ##C:\fbc\new## tree: + + 1) Copy to ##""C:\fbc\new\bin""##: + - ##""C:\MinGW\bin\{ar,as,dlltool,ld}.exe""## + - ##""GoRC.exe""## (from [[http://www.godevtool.com/]] or the previous ""FreeBASIC"" release) + + 1) Copy to ##""C:\fbc\new\lib""##: + - ##""C:\MinGW\lib\{crt2,dllcrt2,gcrt2}.o""## + - ##""C:\MinGW\lib\lib{gmon,mingw32,mingwex,moldname}.a""## + - ##""C:\MinGW\lib\gcc\mingw32\version\{crtbegin,crtend}.o""## + - ##""C:\MinGW\lib\gcc\mingw32\version\lib{gcc,supc++}.a""## + - ##""C:\MinGW\lib\lib{advapi32,gdi32,kernel32,msvcrt,user32,winmm,winspool}.a""## //(Rename to ##lib*.dll.a## if preferred)// + - ##""C:\MinGW\lib\lib{bfd,iberty,intl}.a""## //(For recompiling ""FreeBASIC"" using this tree)// + - and any additional libraries you want to use + + 1) Copy to ##""C:\fbc\new\include""##: + - any headers you want to use, from [[http://code.google.com/p/freebasic-headers/ freebasic-headers]] or the previous ""FreeBASIC"" release, etc. + + After this, ##C:\fbc\new## should be ready to compile your programs, and you can also copy it to another directory or share it if you want. + + +{{anchor name="RECOMPILE"}}{{fbdoc item="section" value="Getting source code updates and recompiling"}} + + To download updates made available in the fbc Git repository, you can do a pull, either using your preferred graphical Git tool, or in a terminal: + + %%git pull%% + + To take a look at incoming changes //before// applying them, do this: + + %% +# Update remote branches +git fetch + +# Take a look +gitk --all + +# Everything looks ok? Then merge the remote branch into the current branch to apply the update. +git merge origin/master +%% + + Rebuilding is as easy as: + + %%make%% + + Note: If compilation options (like ENABLE_STANDALONE) were used for the previous build, it's necessary to specify them again this time. If they are set in ##config.mk## then they will be automatically set again. + + +{{anchor name="DEBUG"}}{{fbdoc item="section" value="Recompiling fbc for debugging purposes"}} + + %%make clean-compiler +make FBFLAGS=-exx%% + + +{{anchor name="CONFIG"}}{{fbdoc item="section" value="Compilation options"}} + + There are several compilation options that can be specified to the FB makefile via command line or inside a config.mk file that the makefile #includes. See also ##make help## for a full list. Many of these are intended for developing. + + - ##FBFLAGS='-g -exx'## + Sets extra options to be used when compiling fbc, for example to build a debug fbc. + + - ##CFLAGS='-g -O0'## + Sets extra options that are used when compiling rtlib and gfxlib2. + + - ##new=new-foo## + Change the build directory name. The default is ##new/##. This can be used to make multiple builds in one source tree. + + - ##prefix=c:/mingw## + Changes the /usr/local prefix to something else. Note: MSYS maps ##/usr/local## to ##C:\msys\1.0\local##. + + - ##HOST=i686-pc-mingw32## + To cross-compile an fbc that will run on the specified host. + + - ##TARGET=i686-pc-mingw32## + Allows building a cross-fbc that defaults to compiling for the specified target. rtlib and gfxlib2 will be compiled to run on this target. The target will be prefixed to the fbc executable name and include/lib directories. + + - ##SUFFIX=foo## + Append a suffix to the fbc executable's and include/ and lib/ directories' names. This allows installing multiple versions of FB in parallel. + + - ##SUFFIX2=foo## + Similar to ##SUFFIX##, except that this is a second suffix that will only be added to fbc executable's name, allowing to install multiple fbcs in parallel, but have them all use the same set of runtime libraries. + + - ##ENABLE_STANDALONE=1## + Intended for building self-contained installations (like the win32/dos FB releases), where fbc.exe is located in the toplevel directory, instead of bin/. This also changes some behavior in the compiler, and affects the include/ and lib/ directory layout. + + - ##ENABLE_PREFIX=1## + Allows hard-coding the ##prefix## into the compiler, instead of letting it use exepath() to be relocatable. + + - ##ENABLE_FBBFD=217## + Makes fbc use FB libbfd headers to use libbfd directly, instead of using a wrapper around the system's original ##bfd.h##. The specified version must match the version of the libbfd that this fbc will be linked with (because the libbfd ABI is very unstable). + + - ##DISABLE_OBJINFO=1## + If specified fbc will not use libbfd at all, at the cost of the [[DevObjinfo objinfo feature]] being disabled. This is useful in environments (e.g. Debian unstable) where the shared libbfd is updated frequently, as fbc will no longer depend on a specific libbfd version/soname. + + +{{anchor name="PROBLEMS"}}{{fbdoc item="section" value="Known problems"}} + + {{fbdoc item="subsect" value="Win32 rtlib compilation error: _controlfp, _PC_64 undeclared"}} + + %%CC new/libfb/hinit_win32.o +rtlib/hinit_win32.c: In function 'fb_hInit': +rtlib/hinit_win32.c:21:5: warning: implicit declaration of function '_controlfp' [-Wimplicit-function-declaration] +rtlib/hinit_win32.c:21:17: error: '_PC_64' undeclared (first use in this function) +%% + + Both the ""MinGW runtime"" and ""MinGW GCC"" have a ##float.h## header, and in some setups the GCC one is found before the ""MinGW"" one, causing the above errors. This issue shows up with some ""MinGW"" setups, for example gcc-core-4.6.1 + mingwrt-3.20, while for example gcc-core-4.5.2 + mingwrt-3.18 (a previous installation made with mingw-get) works fine. This problem also shows up with mingw32 cross compiler on Debian (gcc 4.4.4, mingwrt 3.13). + + Easiest temporary fix: Append ###include_next ## to ##""C:\MinGW\lib\gcc\mingw32\version\include\float.h""## + + See also: + - The comments at the top of ##""C:\MinGW\include\float.h""## + - ""MinGW GCC 4.6.1 bug report"": https://sourceforge.net/tracker/?func=detail&aid=3414086&group_id=2435&atid=102435 + - ""MinGW patch tracker, 2010"": https://sourceforge.net/tracker/?func=detail&aid=3011968&group_id=2435&atid=302435 + - http://lists.nongnu.org/archive/html/mingw-cross-env-list/2010-06/msg00038.html + - http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01034.html + - https://sourceforge.net/mailarchive/message.php?msg_id=28122574 + + + {{fbdoc item="subsect" value="Warning: .drectve ... unrecognized when linking fbc"}} + + %%CC new/compiler/bfd-wrapper.o +LINK new/bin/fbc.exe +Warning: .drectve `-aligncomm:"_FB_bfd_format",2 ' +Warning: .drectve `-aligncomm:"_FB_bfd_architecture",2' unrecognized +%% + + This happens when fbc's C libbfd wrapper module (##bfd-wrapper.c##) is used and compiled with a modern GCC (such as GCC 4.5.x, 2010), and the new fbc.exe is being linked by the old ld 2.15 (2005) from the current ""FreeBASIC-win32"" releases. The old ld complains about not knowing some sections that were added to later binutils. + + This is not known to cause any issue besides the warning, and can be solved by replacing the old ld.exe in the ""FreeBASIC-win32"" installation by a newer one from ""MinGW"". + + + {{fbdoc item="subsect" value="Newly built fbc crashes inside a bfd_*() function from libbfd"}} + + This is typically caused by libbfd header/library version mismatches. Note that FB 0.23 dos/win32/linux-standalone comes with libbfd.a 2.17, while the system's libbfd.a/bfd.h probably is a much later version (for example 2.21). There are three ways to handle this situation: + + - Use ##ENABLE_FBBFD=217## to compile against libbfd 2.17 headers instead of the system's bfd.h (and make sure to link against libbfd.a 2.17) + - Replace FB's libbfd.a by the one from the system + - Use ##DISABLE_OBJINFO=1## to avoid libbfd completely + + {{fbdoc item="subsect" value="MinGW binutils ld versions 2.18 to 2.21"}} + + fbc triggers a bug in the mentioned linker versions causing it to produce broken binaries. It's fixed in binutils 2.21.1 and up. + + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/DevCompilationProcess.wakka b/fbdocs/manual/cache/DevCompilationProcess.wakka new file mode 100644 index 0000000000..fbec9f28e5 --- /dev/null +++ b/fbdocs/manual/cache/DevCompilationProcess.wakka @@ -0,0 +1,99 @@ +An overview of what's basically happening during compilation on Windows: + +%% +1. fbc started through terminal/command prompt fbc started by IDE +. C:\FreeBASIC> fbc test.bas exec("C:\FreeBASIC\fbc.exe", "test.bas") +. \ / +. \ ,---------------------------------- +. \ / +. \ / +. \/ +. | +. | +. | +. V +2. fbc.exe started, sees 'test.bas' on command line +. | +. V +. Read in 'test.bas', check for syntax/semantic errors, +. compile into asm, generate 'test.asm' +. | +. | +. | +. V +3. Pass to as.exe (assembler) to create 'test.o' object file +. | +. | +. | +. | Precompiled runtime libraries +. | / +. | ,----------------- +. |/ +. | +. V +4. Pass to ld.exe (linker) to create 'test.exe' executable +%% + +An example of printing a number using a function from a library: + +%% +1. test.bas: print 123 +. | +. | +. V +2. test.asm: push 1 (Option telling it to print a newline character. wouldn't set this) +. push 123 (The number to print) +. push 0 (File to print into, as in , 0 means screen) +. call _fb_PrintInt@12 +. | +. | +. V +3. test.o (assembled object referencing _fb_PrintInt@12) +. | +. | +. | +. | libfb.a: io_print_int.o (assembled object prodiving _fb_PrintInt@12) +. | / +. | ,----------------- +. |/ +. | +. V +4. test.exe +%% + +An example with a win32 system function used through an import library: + +%% +1. test.bas: #include once "windows.bi" +. MessageBox(NULL, "Text", "Title", MB_OK) +. | +. | +. V +2. test.asm: push 0 (MB_OK) +. push offset _Literal2 ("Title") +. push offset _Literal1 ("Text") +. push 0 (NULL) +. call _MessageBoxA@16 +. +. .section .data +. _Literal1: .ascii "Text\0" +. _Literal2: .ascii "Title\0" +. | +. | +. V +3. test.o (assembled object referencing _MessageBoxA@16) +. | +. | +. | From the libuser32.dll.a import library: +. | An assembled object prodiving a _MessageBoxA@16 stub, +. | so later, when running test.exe, the system knows that user32.dll +. | must be loaded to use the real MessageBox() function. +. | / +. | ,----------------- +. |/ +. | +. V +4. test.exe +%% + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/DevFbcModules.wakka b/fbdocs/manual/cache/DevFbcModules.wakka new file mode 100644 index 0000000000..125972000b --- /dev/null +++ b/fbdocs/manual/cache/DevFbcModules.wakka @@ -0,0 +1,61 @@ +{{fbdoc item="title" value="Quick overview of all modules"}}(Only somewhat sorted)---- + +''fbc'' + Frontend: main module, entry point, command-line handling, assembling/linking/etc. + +''fb-objinfo'' + [[DevObjinfo Object/library information]] section reader/writer, used by ''fbc''. + +''bfd-wrapper'' + Small C wrapper around bfd.h (of the native libbfd) to avoid always having to use the exact matching FB headers. (FB headers for some libbfd versions exist, thus this wrapper isn't required, but it's the default to make compiling fbc less troublesome). + +''fb'' + FB parser interface, starts the ''parser'' for every input/include file. + +''parser'' + Recursive parser, asks ''lex'' for tokens, builds up the ''ast''. + +''lex'', ''pp'' + Lexer/tokenizer and preprocessor directive parsing. + +''error'' + Error reporting functions, used by many parts of fbc, mostly the ''parser'' though. + +''rtl'' + Helper functions to build up the ''ast'' nodes for rtlib/gfxlib function calls. Declarations must match the actual functions in the rtlib/gfxlib2 source code. + +''symb'' + Symbols lookup and storage (information on variables/functions), scope/namespace handling, name mangling; used by ''parser''/''ast''/emitters. + +''ast'' + Abstract syntax tree: per-function code-flow + expressions. + astNew*(): Node creation/tree building, used by the ''parser''. + astLoad*(): First step in emitting, calls ''ir'', called after each function is parsed. + +''ir'', ''ir-hlc'', ''ir-tac'' + Intermediate representation interface (using virtual registers) used to emit the ''ast''. + hlc: High level C emitter (gcc backend). + tac: Three-address-codes module (asm backend), calls ''emit''. + +''reg'' + Register allocator for ''ir-tac''. + +''emit'', ''emit_SSE'', ''emit_x86'' + Assembler emitter abstraction and SSE/x86 emitters. + +''edbg_stab'' + Stabs debug format emitting for ''emit_x86''. + +''dstr'' + Dynamic z/wstrings, used mostly by ''lex''. + +''hash'' + Generic hash table, used by ''symb''/''fbc''. + +''hlp'', ''hlp-str'' + Helper functions for all parts of the compiler, plus another implementation of dynamic z/wstrings. + +''list'', ''flist'', ''pool'', ''stack'' + Generic linked list + memory pool, foundation of all other data structures. + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/DevFbcTestSuite.wakka b/fbdocs/manual/cache/DevFbcTestSuite.wakka new file mode 100644 index 0000000000..00dcb36fe4 --- /dev/null +++ b/fbdocs/manual/cache/DevFbcTestSuite.wakka @@ -0,0 +1,75 @@ +{{fbdoc item="title" value="Compiling the test suite"}}---- + +The ""FreeBASIC"" project has a suite of tests which ensure that bugs stay dead and that new bugs have a harder time of gaining a foothold. The test suite is written with the ""FreeBASIC"" port of the CUnit library (Thanks, stylin!). + +{{fbdoc item="section" value="Invocation"}} + +The tests are located in the tests subdirectory within the main ""FreeBASIC"" directory. Invoking with make will present the following help text: + +## +$ make +usage: make target [options] + +Targets: (using cunit): + cunit-tests + log-tests + failed-tests + check + mostlyclean + clean + +Targets: (bypassing cunit) + log-tests ALLOW_CUNIT=1 + failed-tests ALLOW_CUNIT=1 + mostlyclean ALLOW_CUNIT=1 + clean ALLOW_CUNIT=1 + +Options: + FBC=/path/fbc + FB_LANG=fb | fblite | qb | deprecated + DEBUG=1 + EXTRAERR=1 + ARCH=arch (default is 486) + OS=DOS + FPU=fpu | sse + +Targets: Configuration and Checks + check + +Example: make all available tests + make cunit-tests + make log-tests + +Example: make obj -lang qb tests + make log-tests FB_LANG=qb +## + +When you make an invocation, such as: + +##make cunit-tests && make log-tests## + +Some initial generation of index files will take place, followed by the compilation of hundreds of tests. Be patient, it can take a while to run all of the tests... + +If you get an error message like: ##""FreeBASIC""/bin/linux/ld: cannot find -lcunit## + +This means you need to install the cunit library. On Ubuntu this looks like: + +##$ sudo apt-get install libcunit1-dev## + +{{fbdoc item="section" value="Known Failures"}} + +As of the writing of this document, the following tests are expected to fail on some platforms: + +## +Suite fbc_tests.string_.format_, Test number format test had failures: + 1. string/format.bas:168 - CU_ASSERT_EQUAL(sWanted,sResult) + 2. string/format.bas:168 - CU_ASSERT_EQUAL(sWanted,sResult) + 3. string/format.bas:168 - CU_ASSERT_EQUAL(sWanted,sResult) + 4. string/format.bas:168 - CU_ASSERT_EQUAL(sWanted,sResult) +## + +So if you get these failures, everything is normal. No other tests should ever fail, including log tests. + +Thank you for running the tests and contributing to make ""FreeBASIC"" a healthy compiler! Please report any other failures to http://www.freebasic.net/forum so we can investigate. + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/DevObjinfo.wakka b/fbdocs/manual/cache/DevObjinfo.wakka new file mode 100644 index 0000000000..3a8b25ebc9 --- /dev/null +++ b/fbdocs/manual/cache/DevObjinfo.wakka @@ -0,0 +1,14 @@ +{{fbdoc item="title" value="objinfo"}}---- + +fbc stores extra information into the object files (.o) it generates, in order to read it out again at link-time. The information that is stored currently consists of the -lang/-mt settings and all libraries/search paths (-l, #inclib, -p, #libpath) that were specified when compiling that object file. This way fbc can show a warning when mixing object files that were compiled with different options, because they may be incompatible, and fbc can automatically link in libraries that were specified via #inclib, even if the user compiles and links in separate steps. + +This is accomplished by emitting an extra section called "fbctinf" (""FreeBASIC"" compile time information?) when compiling, and using libbfd at link-time to find out whether object files contain that section, and if so, reading it in. Furthermore, when building a static library, fbc creates an extra object file (called ""__fb_ct.inf"") containing just that extra information and adds it to the library. At link-time fbc looks at each library (using libbfd again) to figure out whether it has such an ""__fb_ct.inf"" file or not. + +This feature heavily relies on libbfd, which can cause problems when building fbc, because libbfd does not exactly have a stable interface. Different versions are usually incompatible. That's why fbc has a small wrapper written in C, so it can use the original bfd.h, instead of relying on translated bfd.bi's. That way, you're less likely to run into libbfd-related compatibility problems. Each system (Linux and BSD distributions, ""MinGW"", DJGPP) has their own version of libbfd, sometimes shared, sometimes static, and require different additional libraries to get libbfd working. + +Besides these technical problems, there can be legal issues too. Quoting from ""FreeBASIC""/src/compiler/INSTALL: +Take care when linking to the BFD library. Newer versions are licensed under GNU GPL version 3 (or later) and can not be legally combined with ""FreeBASIC's"" compiler source which is licensed under GNU GPL version 2 (or later). Statically linking to libbfd.a will likely require that it be no greater than version 2.17. However, there are no known licensing conflicts if the ""FreeBASIC"" compiler is linked to a shared version of the BFD library. + +To avoid all difficulties, the objinfo feature can be disabled with the DISABLE_OBJINFO option when [[DevBuild compiling fbc]]. This is useful when porting fbc to a new platform, when building an independent/standalone/bootstrap fbc, or when running into any libbfd related problems. + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/DocToc.wakka b/fbdocs/manual/cache/DocToc.wakka index cb8912864a..ec60407e10 100644 --- a/fbdocs/manual/cache/DocToc.wakka +++ b/fbdocs/manual/cache/DocToc.wakka @@ -1,104 +1,124 @@ -{{image class="center" alt="FB Logo" title="FB Logo" url="/images/FBLOGO.PNG" link="RecentChanges"}}{{fbdoc item="title" value="FreeBASIC Manual"}}---- -@@{{fbdoc item="keyword" value="CompilerWelcome|Welcome to FreeBASIC"}} | {{fbdoc item="keyword" value="CompilerHelp|Getting Help with FreeBASIC"}}@@ -<<{{fbdoc item="section" value="Language Documentation"}} - The core features of ""FreeBASIC"". - - {{fbdoc item="keyword" value="CatPgFullIndex|Keywords - Alphabetical"}} - {{fbdoc item="keyword" value="CatPgFunctIndex|Keywords - Functional"}} - {{fbdoc item="keyword" value="CatPgGfx|Graphics Keywords"}} - {{fbdoc item="keyword" value="CatPgOpIndex|Operators List"}} - - {{fbdoc item="subsect" value="Variables and Data Types"}} - {{fbdoc item="keyword" value="CatPgVariables|Variable Declarations"}} - {{fbdoc item="keyword" value="CatPgUserDefTypes|User Defined Types"}} - {{fbdoc item="keyword" value="CatPgStdDataTypes|Standard Data Types"}} - {{fbdoc item="keyword" value="TblVarTypes|Standard Data Type Limits"}} - {{fbdoc item="keyword" value="CatPgCasting|Converting Between Data Types"}} - - {{fbdoc item="subsect" value="Operators"}} - {{fbdoc item="keyword" value="CatPgOperators|Operators"}} - {{fbdoc item="keyword" value="OpPrecedence|Operator Precedence"}} - {{fbdoc item="keyword" value="TblTruth|Bitwise Operators & Truth Tables"}} - - {{fbdoc item="subsect" value="Statements"}} - {{fbdoc item="keyword" value="CatPgControlFlow|Control Flow"}} - {{fbdoc item="keyword" value="CatPgProcedures|Procedures"}} - {{fbdoc item="keyword" value="CatPgModularizing|Modularizing"}} - - {{fbdoc item="subsect" value="Other"}} - {{fbdoc item="keyword" value="CatPgPreProcess|Preprocessor"}} - {{fbdoc item="keyword" value="TblEscapeSequences|Escape Sequences In String Literals"}} - {{fbdoc item="keyword" value="CatPgCompilerSwitches|Meta-statements"}} - {{fbdoc item="keyword" value="CatPgDddefines|Intrinsic Defines"}} - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} - {{fbdoc item="keyword" value="KeyPgAsm|Inline ASM"}} +{{fbdoc item="title" value="FreeBASIC Manual"}}---- +
    FB Logo +
    [[CompilerWelcome Bienvenue dans FreeBASIC]] | [[CompilerHelp Obtenir de l'aide sur FreeBASIC]] + **Documentation sur le langage** + + Les principaux éléments de FreeBasic. + [[CatPgFullIndex Mots-clefs - Alphabétique]] + [[CatPgFunctIndex Mots-clefs - Fonctions]] + [[CatPgGfx Mots-clefs graphiques]] + + [[CatPgOpIndex Liste des opérateurs]] + **Variables et types de données** + [[CatPgVariables Déclarations des variables]] + [[CatPgUserDefTypes Types définis par l'utilisateur]] + [[CatPgStdDataTypes Types de données standard]] + [[TblVarTypes Type de données standard et limites]] + + [[CatPgCasting Conversion entre types de données]] + **Opérateurs** + [[CatPgOperators Opérateurs]] + [[OpPrecedence Priorité des opérateurs]] + + [[TblTruth Opérateurs bit-à-bit & Tables de vérité]] + **Déclarations** + [[CatPgControlFlow Contrôle de déroulement de programme]] + [[CatPgProcedures Procédures]] + + [[CatPgModularizing Modularisation]] + **Autres** + [[CatPgPreProcess Préprocesseur]] + [[TblEscapeSequences Séquences d'échappement dans les chaînes littérales]] + [[CatPgCompilerSwitches Compilateur: Meta-commandes]] + [[CatPgDddefines Définitions intrinsèques]] + [[ProPgErrorHandling Gestion des erreurs]] -{{fbdoc item="section" value="Runtime Library Reference"}} - Procedures and macros that are a part of the ""FreeBASIC"" runtime library. - - {{fbdoc item="keyword" value="CatPgArray|Array Functions"}} - {{fbdoc item="keyword" value="CatPgBits|Bit Manipulation"}} - {{fbdoc item="keyword" value="CatPgConsole|Console Functions"}} - {{fbdoc item="keyword" value="CatPgDate|Date and Time Functions"}} - {{fbdoc item="keyword" value="CatPgError|Error Handling Functions"}} - {{fbdoc item="keyword" value="CatPgFile|File IO Functions"}} - {{fbdoc item="keyword" value="CatPgMath|Mathematical Functions"}} - {{fbdoc item="keyword" value="CatPgMemory|Memory Functions"}} - {{fbdoc item="keyword" value="CatPgOpsys|Operating System Functions"}} - {{fbdoc item="keyword" value="CatPgString|String Functions"}} - {{fbdoc item="keyword" value="CatPgThreading|Threading Support Functions"}} - {{fbdoc item="keyword" value="CatPgInput|User Input Functions"}} +[[KeyPgAsm Assembleur: Inline Asm]] + **Référence des bibliothèques de fonctionnement** + + Procédures et macros qui font partie de la librairie de fonctionnement de FreeBASIC. + [[CatPgArray Fonctions tableaux (array)]] + [[CatPgBits Manipulation de bits ]] + [[CatPgConsole Fonctions console]] + [[CatPgDate Fonctions date et temps]] + [[CatPgError Fonctions de gestion des erreurs]] + [[CatPgFile Fonctions fichiers entrée/sortie (E/S)]] + [[CatPgMath Fonctions mathématiques]] + [[CatPgMemory Fonctions mémoire]] + [[CatPgOpsys Fonctions du système d'exploitation (OS)]] + [[CatPgString Fonctions chaînes]] + [[CatPgThreading Fonctions "Support Threading"]] -{{fbdoc item="section" value="Graphics Library Reference"}} - Procedures and macros that are a part of the ""FreeBASIC"" graphics library. +[[CatPgInput Fonctions entrée utilisateur]] + **Référence de la librairie graphique** - {{fbdoc item="keyword" value="CatPgGfx2D|2D Drawing Functions"}} - {{fbdoc item="keyword" value="CatPgGfxInput|User Input Functions"}} - {{fbdoc item="keyword" value="CatPgGfxScreen|Screen Functions"}} + Procédures et macros that qui font partie de la librairie graphique FreeBASIC. + [[CatPgGfx2D Fonctions dessin 2D]] + [[CatPgGfxInput Fonctions entrée utilisateur]] - {{fbdoc item="keyword" value="GfxScancodes|Keyboard Scan Codes"}} - {{fbdoc item="keyword" value="GfxDefPalettes|Default Palettes"}} + [[CatPgGfxScreen Fonctions écran]] + [[GfxScancodes Codes de scrutation du clavier]] -<<>>{{fbdoc item="section" value="Tutorials"}} - How to write programs in ""FreeBASIC"". +[[GfxDefPalettes Palettes par défaut]] - {{fbdoc item="keyword" value="CatPgProgrammer|Programmer's Guide"}} - {{fbdoc item="keyword" value="CommunityTutorials|Community Tutorials"}} - {{fbdoc item="keyword" value="CodeLibrary|Community Code Library"}} + ;**Tutoriels** + Comment écrire des programmes en FreeBASIC. + + [[CatPgProgrammer Guide des programmeurs]] + [[CommunityTutorials Tutoriels de la communauté]] + + [[CodeLibrary Librairies codes de la communauté]] + **Utilisation du compilateur FreeBASIC** + + Le compilateur FreeBASIC est un outil en ligne de commande qui génère les exécutables à partir du code source FreeBASIC. Il n'est pas fourni avec un éditeur de code source. Cependant, des IDE (Environnement de développement intégré) spécifiques pour FreeBASIC sont disponibles, ainsi que le support de FreeBASIC dans beaucoup d'autres IDE et éditeurs de code. + [[CompilerInstalling Installation de FreeBASIC]] | [[CompilerRequirements Ce qui est requis]] -{{fbdoc item="section" value="Using the FreeBASIC compiler"}} - The ""FreeBASIC"" compiler is a command line tool that generates executables from ""FreeBASIC"" source code. It doesn't come with a source code editor. Still, IDEs specifically for ""FreeBASIC"" are available, aswell as ""FreeBASIC"" support in many other IDEs and code editors. +[[CompilerRunning Démarrer FreeBASIC]] + [[CompilerCmdLine Utilisation de la ligne de commande]] | [[CatPgCompOpt Options de la ligne de commande]] - {{fbdoc item="keyword" value="CompilerInstalling|Installing FreeBASIC"}} | {{fbdoc item="keyword" value="CompilerRequirements|Requirements"}} - {{fbdoc item="keyword" value="CompilerRunning|Running FreeBASIC"}} - {{fbdoc item="keyword" value="CompilerCmdLine|Using the Command Line"}} | {{fbdoc item="keyword" value="CatPgCompOpt|Command Line Options"}} + [[DebuggerRunning Débogage avec FreeBASIC]] + [[CompilerErrMsg Messages d'erreur du compilateur]] + [[CompilerTools Outils utilisés par fbc]] - {{fbdoc item="keyword" value="DebuggerRunning|Debugging with FreeBASIC"}} + **Dialectes FreeBASIC et QBASIC** - {{fbdoc item="keyword" value="CompilerErrMsg|Compiler Error Messages"}} - {{fbdoc item="keyword" value="CompilerTools|Tools used by fbc"}} + [[CompilerQB FreeBASIC et Qbasic]] | [[LangQB Différences avec QB]] + [[CompilerDialects Dialectes FreeBASIC]] -{{fbdoc item="section" value="FreeBASIC dialects and QBASIC"}} - {{fbdoc item="keyword" value="CompilerQB|FreeBASIC and Qbasic"}} | {{fbdoc item="keyword" value="LangQB|Differences from QB"}} - {{fbdoc item="keyword" value="CompilerDialects|FreeBASIC Dialects"}} +**Foire Aux Questions (FAQ)** + [[CompilerFAQ FAQ Compilateur]] + [[FaqPggfxlib2 FAQ librairie graphique]] -{{fbdoc item="section" value="FAQs"}} - {{fbdoc item="keyword" value="CompilerFAQ|Compiler FAQ"}} - {{fbdoc item="keyword" value="FaqPggfxlib2|Graphics Library FAQ"}} - {{fbdoc item="keyword" value="FaqPgrtlib|Runtime Library FAQ"}} - {{fbdoc item="keyword" value="FaqPgxbox|Xbox port FAQ"}} - {{fbdoc item="keyword" value="FaqDOS|DOS related FAQ"}} - {{fbdoc item="keyword" value="FaqPgWin32|Windows related FAQ"}} - {{fbdoc item="keyword" value="FaqPgLinux|Linux related FAQ"}} +[[FaqPgrtlib FAQ librairie d'exécution]] + [[FaqPgxbox FAQ portage Xbox ]] + [[FaqDOS FAQ relative au DOS]] + [[FaqPgWin32 FAQ relative à Windows]] + [[FaqPgLinux FAQ relative à Linux]] + **Divers** + [[ObsoletedKwds Mots-clefs obsolètes]] + [[GlossaryIndex Glossaire]] -{{fbdoc item="section" value="Miscellaneous"}} - {{fbdoc item="keyword" value="ObsoletedKwds|Obsoleted Keywords"}} - {{fbdoc item="keyword" value="GlossaryIndex|Glossary"}} - {{fbdoc item="keyword" value="CatPgMisc|Miscellaneous Keywords"}} - {{fbdoc item="keyword" value="ProPgCruntime|C Standard Library Functions"}} - {{fbdoc item="keyword" value="ExtLibTOC|Library Headers Index"}} - {{fbdoc item="keyword" value="CptAscii|ASCII Character Codes"}} - {{fbdoc item="keyword" value="TblRuntimeErrors|Runtime Error Codes"}} +[[CatPgMisc Divers mots-clefs]] + [[ProPgCruntime C Standard Library Functions]] + [[ExtLibTOC Library Headers Index]] + [[CptAscii ASCII Character Codes]] + [[TblRuntimeErrors Runtime Error Codes]] + ;
    + Traduction française du document : 2010/08/10 22:01:34 from http://www.freebasic.net/wiki/ + +{{fbdoc item="section" value="FreeBASIC Internals"}} + {{fbdoc item="keyword" value="DevBuild|Compiling FreeBASIC itself"}} + {{fbdoc item="keyword" value="DevFbcTestSuite|Running the FreeBASIC test suite"}} + {{fbdoc item="keyword" value="FbGrammar|FreeBASIC Grammar"}} + + compiler + {{fbdoc item="keyword" value="DevCompilationProcess|General compilation process"}} + {{fbdoc item="keyword" value="DevFbcModules|Quick overview of all modules"}} + {{fbdoc item="keyword" value="DevObjinfo|The objinfo feature"}} + + gfxlib2 + {{fbdoc item="keyword" value="GfxLib|Overview of drivers (backends)"}} + {{fbdoc item="keyword" value="GfxInternalFormats|Pixel formats"}} >>::c:: diff --git a/fbdocs/manual/cache/DrV.wakka b/fbdocs/manual/cache/DrV.wakka index 917fec7306..2936459b45 100644 --- a/fbdocs/manual/cache/DrV.wakka +++ b/fbdocs/manual/cache/DrV.wakka @@ -1,5 +1,5 @@ +{{fbdoc item="title" value="DrV"}}---- Daniel Verkamp (DrV) **i_am_drv** [at] **yahoo** [dot] **com** **i_am_drv** [at] **users** [dot] **sf** [dot] **net** http://drv.nu/ -//Part of the FreeBASIC Development team; DOS port maintainer// diff --git a/fbdocs/manual/cache/ExtLibCRT.wakka b/fbdocs/manual/cache/ExtLibCRT.wakka index a0249e1a2d..4992b75af9 100644 --- a/fbdocs/manual/cache/ExtLibCRT.wakka +++ b/fbdocs/manual/cache/ExtLibCRT.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="CRT, The C Runtime Library"}}---- -Common C Language Functions +Fonctions communes du langage C -Platforms supported: Win32, Linux, DOS -Headers to include: crt.bi -Function Reference: [[ProPgCruntime C Runtime Functions]] +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: crt.bi +Référence: [[ProPgCruntime C Runtime Functions]] {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibCUnit.wakka b/fbdocs/manual/cache/ExtLibCUnit.wakka index 3ee2d93df5..151de567fd 100644 --- a/fbdocs/manual/cache/ExtLibCUnit.wakka +++ b/fbdocs/manual/cache/ExtLibCUnit.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="CUnit"}}---- -Lightweight system for writing, administering, and running unit tests in C. +Système léger pour l'écriture, l'administration et l'exécution des tests unitaires en C. Website: http://cunit.sourceforge.net/ -Platforms supported: Win32, Linux, DOS -Headers to include: CUnit/CUnit.bi +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: CUnit/CUnit.bi Version: 2.1-0 -Example Usage: yes, in examples/libraries/CUnit/ +Exemple: oui,dans examples/libraries/CUnit/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibDUGL.wakka b/fbdocs/manual/cache/ExtLibDUGL.wakka index 05638778e2..1f50d633f9 100644 --- a/fbdocs/manual/cache/ExtLibDUGL.wakka +++ b/fbdocs/manual/cache/ExtLibDUGL.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="DUGL"}}---- -Graphics and game programming library +Bibliothèque graphique et jeu pour DOS. -Website: http://dugl.50webs.com -Platforms supported: DOS -Headers to include: DUGL.BI (not yet included with FB, see link below) -Example of usage: see link below -Note: use DUGL 1.13 or newer (see link below), older version have a bug and do crash when used with FB +Site Web: http://dugl.50webs.com +Plates-formes supportées: DOS +En-têtes à inclure: DUGL.BI (ne figurent pas encore avec FB, voir lien ci-dessous) +Exemple d'utilisation: voir le lien ci-dessous +Note: utilisez DUGL 1.13 ou plus récent (voir lien ci-dessous), l'ancienne version a un bug et plante lorsqu'elle est utilisée avec FB -See forum thread: http://www.freebasic.net/forum/viewtopic.php?t=11046 +Voir discussion sur le forum: http://www.freebasic.net/forum/viewtopic.php?t=11046 {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibFastCGI.wakka b/fbdocs/manual/cache/ExtLibFastCGI.wakka index 5fd5cd1891..38b6839aa5 100644 --- a/fbdocs/manual/cache/ExtLibFastCGI.wakka +++ b/fbdocs/manual/cache/ExtLibFastCGI.wakka @@ -1,9 +1,23 @@ {{fbdoc item="title" value="FastCGI"}}---- -Open extension to CGI that provides high performance without the limitations of server specific APIs. +Open extension de CGI qui fournit de hautes performances sans les limitations des API serveur spécifiques. Website: http://www.fastcgi.com -Platforms supported: Win32, Linux -Headers to include: fastcgi/fastcgi.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: fastcgi/fastcgi.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/fastcgi.bas"}}%%(freebasic) +#include "fastcgi/fcgi_stdio.bi" + +dim as integer count = 0 +while (FCGI_Accept() >= 0) + count += 1 + print !"Content-type: text/html\r\n" + print !"\r\n" + print "FastCGI Hello!" + print "

    FastCGI Hello!

    " + print using "Request number ### running on host &"; count, *getenv("SERVER_NAME"); +wend +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibFfi.wakka b/fbdocs/manual/cache/ExtLibFfi.wakka new file mode 100644 index 0000000000..791e1ab9e7 --- /dev/null +++ b/fbdocs/manual/cache/ExtLibFfi.wakka @@ -0,0 +1,105 @@ +{{fbdoc item="title" value="libffi"}}---- +""LibFFI"" is a foreign function interface library allowing programs to arbitrarily call native function without pointers and to bind function pointers to generic functions which take variable arguments via closures. It is used to bind native code in modern scripting languages. + +Website: http://sourceware.org/libffi/ +Platforms supported: Windows, Linux, DOS +Headers to include: ffi.bi + +{{fbdoc item="ex"}} + Hello world: + {{fbdoc item="filename" value="examples/manual/libraries/ffi/helloworld.bas"}}%%(freebasic) +#include "ffi.bi" + +' Simple "puts" equivalent function +function printer cdecl (byval s as zstring ptr) as integer + print *s + return 42 +end function + +' Initialize the argument info vectors +dim s as zstring ptr +dim args(0 to 0) as ffi_type ptr = {@ffi_type_pointer} +dim values(0 to 0) as any ptr = {@s} + +' Initialize the cif +dim cif as ffi_cif +dim result as ffi_status +result = ffi_prep_cif( _ + @cif, _ ' call interface object + FFI_DEFAULT_ABI, _ ' binary interface type + 1, _ ' number of arguments + @ffi_type_uint, _ ' return type + @args(0) _ ' arguments +) + +' Call function +dim return_value as integer +if result = FFI_OK then + s = @"Hello world" + ffi_call(@cif, FFI_FN(@printer), @return_value, @values(0)) + + ' values holds a pointer to the function's arg, so to + ' call puts() again all we need to do is change the + ' value of s */ + s = @"This is cool!" + ffi_call(@cif, FFI_FN(@printer), @return_value, @values(0)) + print using "Function returned &"; return_value +end if +%% + Closures: + {{fbdoc item="filename" value="examples/manual/libraries/ffi/closures.bas"}}%%(freebasic) +#include "ffi.bi" + +' Acts like puts with the file given at time of enclosure. +Sub Printer Cdecl(ByVal cif As ffi_cif Ptr, ByVal ret As Any Ptr, ByVal args As Any Ptr Ptr, ByVal File As Any Ptr) + Write #*CPtr(Integer Ptr, file), **CPtr(ZString Ptr Ptr, args[0]) + *CPtr(UInteger Ptr, ret) = 42 +End Sub + +' Allocate the closure and function binding +Dim PrinterBinding As Function(ByVal s As ZString Ptr) As Integer +Dim closure as ffi_closure ptr +closure = ffi_closure_alloc(sizeof(ffi_closure), @PrinterBinding) + +If closure <> 0 Then + ' Initialize the argument info vector + Dim args(0 to 0) as ffi_type ptr = {@ffi_type_pointer} + + ' Initialize the call interface + Dim cif as ffi_cif + Dim prep_result as ffi_status = ffi_prep_cif( _ + @cif, _ ' call interface object + FFI_DEFAULT_ABI, _ ' binary interface type + 1, _ ' number of arguments + @ffi_type_uint, _ ' return type + @args(0) _ ' arguments + ) + if prep_result = FFI_OK Then + ' Open console file to send to PrinterBinding as user data + Dim ConsoleFile As Integer = FreeFile() + Open Cons For Output As ConsoleFile + + ' Initialize the closure, setting user data to the console file + prep_result = ffi_prep_closure_loc( _ + closure, _ ' closure object + @cif, _ ' call interface object + @Printer, _ ' actual closure function + @ConsoleFile, _ ' user data, our console file # + PrinterBinding _ ' pointer to binding + ) + If prep_result = FFI_OK Then + ' Call binding as a natural function call + Dim Result As Integer + Result = PrinterBinding("Hello World!") + Print Using "Returned &"; Result + End IF + + Close ConsoleFile + End If +End If + +' Clean up +ffi_closure_free(closure) +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibIL.wakka b/fbdocs/manual/cache/ExtLibIL.wakka index fc75f864b0..512a24f605 100644 --- a/fbdocs/manual/cache/ExtLibIL.wakka +++ b/fbdocs/manual/cache/ExtLibIL.wakka @@ -1,9 +1,40 @@ {{fbdoc item="title" value="IL"}}---- -A full featured cross-platform image library. +Une Bibliothèque image complète multi-plateforme. -Website: http://openil.sourceforge.net/ -Platforms supported: Win32, Linux -Headers to include: IL/il.bi +Site Web: http://openil.sourceforge.net/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: IL/il.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/il.bas"}}%%(freebasic) +'' DevIL example + +#include once "IL/il.bi" + +'' Version check +if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) then + print "DevIL version is different" + end 1 +end if + +'' Good practice to explicitely initialize it +ilInit() + +'' Load a bitmap +dim as ILuint fblogo +ilGenImages(1, @fblogo) +ilBindImage(fblogo) + +print "Loading fblogo.bmp..." +ilLoadImage("fblogo.bmp") + +'' Save a copy +print "Saving a copy, fblogo-copy.bmp..." +ilEnable(IL_FILE_OVERWRITE) +ilSaveImage("fblogo-copy.bmp") + +'' Clean up +ilDeleteImages(1, @fblogo) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibIUP.wakka b/fbdocs/manual/cache/ExtLibIUP.wakka index d523d0daea..149fe0f2ea 100644 --- a/fbdocs/manual/cache/ExtLibIUP.wakka +++ b/fbdocs/manual/cache/ExtLibIUP.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="IUP"}}---- -Portable toolkit for building graphical user interfaces. +Boîte à outils portable pour créer des interfaces utilisateur. -Website: http://www.tecgraf.puc-rio.br/iup/ -Platforms supported: Win32, Linux -Headers to include: iup/iup.bi +Site Web: http://www.tecgraf.puc-rio.br/iup/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: iup/iup.bi Version: 2.3.0 -Example Usage: yes, in examples/libraries/IUP/ +Exemple d'utilisation: oui, dans examples/libraries/IUP/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibJit.wakka b/fbdocs/manual/cache/ExtLibJit.wakka new file mode 100644 index 0000000000..840bd665b6 --- /dev/null +++ b/fbdocs/manual/cache/ExtLibJit.wakka @@ -0,0 +1,139 @@ +{{fbdoc item="title" value="libjit"}}---- +""LibJIT"" is a fairly straightforward, lightweight library for runtime compilation with a simple and stable ABI. + +Website: [[http://www.dotgnu.org/libjit-doc/libjit.html]], [[http://freshmeat.net/projects/libjit]] +Platforms supported: Windows, Linux, DOS +Headers to include: jit.bi + +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/jit/mul_add.bas"}}%%(freebasic) +'' Simple mul/add example + +#include "jit.bi" + +' initialize libjit +dim context as jit_context_t = jit_context_create() +jit_context_build_start(context) + +' define function mul_add(x, y, z) +dim params(0 to 2) as jit_type_t = {jit_type_int, jit_type_int, jit_type_int} +dim signature as jit_type_t = jit_type_create_signature( _ + jit_abi_cdecl, _ ' C-style function + jit_type_int, _ ' Return type + @params(0), _ ' Parameter array + 3, _ ' Number of components + 1 _ ' Count references? +) +dim mul_add as jit_function_t = jit_function_create(context, signature) + +' build function (result = (x*y)+z) +dim as jit_value_t x, y, z, temp1, temp2 +x = jit_value_get_param(mul_add, 0) +y = jit_value_get_param(mul_add, 1) +temp1 = jit_insn_mul(mul_add, x, y) +z = jit_value_get_param(mul_add, 2) +temp2 = jit_insn_add(mul_add, temp1, z) +jit_insn_return(mul_add, temp2) + +' compile function function +jit_function_compile(mul_add) +jit_context_build_end(context) + +' call function +dim as integer a=3, b=5, c=2, result +dim args(0 to 2) as integer ptr = {@a, @b, @c} +jit_function_apply(mul_add, @args(0), @result) +print using "mul__add(&, &, &) = &"; a; b; c; result + +' clean up libjit +jit_context_destroy(context) +%% + +{{fbdoc item="filename" value="examples/manual/libraries/jit/gcd.bas"}}%%(freebasic) +'' GCD calculation example + +#include "jit.bi" + +' initialize libjit +dim context as jit_context_t = jit_context_create() +jit_context_build_start(context) + +' define function gcd(x as uinteger, y as uinteger) as uinteger +dim params(0 to 1) as jit_type_t = {jit_type_uint, jit_type_uint} +dim signature as jit_type_t = jit_type_create_signature( _ + jit_abi_cdecl, _ ' C-style function + jit_type_uint, _ ' Return type + @params(0), _ ' Parameter array + 2, _ ' Number of components + 1 _ ' Count references? +) +dim gcd as jit_function_t = jit_function_create(context, signature) + +' build function +' check x = y +dim as jit_value_t x, y, x_eq_y +x = jit_value_get_param(gcd, 0) +y = jit_value_get_param(gcd, 1) +x_eq_y = jit_insn_eq(gcd, x, y) + +' if x = y, return x +dim label_x_ne_y as jit_label_t = jit_label_undefined +jit_insn_branch_if_not(gcd, x_eq_y, @label_x_ne_y) +jit_insn_return(gcd, x) + +' else if... +jit_insn_label(gcd, @label_x_ne_y) + +' check x < y +dim as jit_value_t x_lt_y +dim label_x_gte_y as jit_label_t = jit_label_undefined +x_lt_y = jit_insn_lt(gcd, x, y) +jit_insn_branch_if_not(gcd, x_lt_y, @label_x_gte_y) + +' if x < y, return gcd(x, y-x) +dim as jit_value_t gcd_args(0 to 2), gcd_result +gcd_args(0) = x +gcd_args(1) = jit_insn_sub(gcd, y, x) +gcd_result = jit_insn_call( _ + gcd, _ ' where we are calling from + "gcd", _ ' function name + gcd, _ ' function reference + 0, _ ' signature = auto + @gcd_args(0), _ ' arguments + 2, _ ' argument count + 0 _ ' flags = nothing special +) +jit_insn_return(gcd, gcd_result) + +' else... +jit_insn_label(gcd, @label_x_gte_y) + +' return gcd(x-y, y) +gcd_args(0) = jit_insn_sub(gcd, x, y) +gcd_args(1) = y +gcd_result = jit_insn_call( _ + gcd, _ ' where we are calling from + "gcd", _ ' function name + gcd, _ ' function reference + 0, _ ' signature = auto + @gcd_args(0), _ ' arguments + 2, _ ' argument count + 0 _ ' flags = nothing special +) +jit_insn_return(gcd, gcd_result) + +' compile function +jit_function_compile(gcd) +jit_context_build_end(context) + +' call function +dim as jit_uint a=21, b=14, result +dim as jit_uint ptr args(0 to 1) = {@a, @b} +jit_function_apply(gcd, @args(0), @result) +print using "gcd(&, &) = &"; a; b; result + +' clean up libjit +jit_context_destroy(context) +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibLua.wakka b/fbdocs/manual/cache/ExtLibLua.wakka index e657166940..16993a1b52 100644 --- a/fbdocs/manual/cache/ExtLibLua.wakka +++ b/fbdocs/manual/cache/ExtLibLua.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Lua"}}---- -Lightweight, embeddable scripting engine using the Lua language. +Moteur de script léger, embarquable utilisant le langage Lua. Website: http://www.lua.org/ -Platforms supported: Win32, Linux -Headers to include: Lua/lua.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: Lua/lua.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibLzma.wakka b/fbdocs/manual/cache/ExtLibLzma.wakka new file mode 100644 index 0000000000..737e883083 --- /dev/null +++ b/fbdocs/manual/cache/ExtLibLzma.wakka @@ -0,0 +1,8 @@ +{{fbdoc item="title" value="liblzma"}}---- +Configurable compression library based around the LZMA algorithm with zlib-like API. liblzma is the heart of the xz-utils used to handle the .lzma and .xz file formats. It is based on 7-Zip's LZMA SDK. + +Website: http://tukaani.org/xz/ +Platforms supported: ""Win32"", Linux, DOS +Headers to include: lzma.bi + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibLzo.wakka b/fbdocs/manual/cache/ExtLibLzo.wakka index 65fd13574a..bfd1bbd3e1 100644 --- a/fbdocs/manual/cache/ExtLibLzo.wakka +++ b/fbdocs/manual/cache/ExtLibLzo.wakka @@ -1,9 +1,55 @@ {{fbdoc item="title" value="LZO"}}---- -LZO is a compression library offering fast compression and very fast decompression. +LZO est une bibliothèque de compression offrant une compression rapide et une décompression très rapide. Website: http://freshmeat.net/redir/lzo/6066/url_homepage/lzo -Platforms supported: Win32, Linux, DOS -Headers to include: LZO/lzo.bi +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: LZO/lzo.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/lzo.bas"}}%%(freebasic) +#include "lzo/lzo1x.bi" + +dim inbuf as zstring ptr = @"string to compress (or not, since it's so short)" +dim inlen as integer = len(*inbuf) + 1 +dim complen as lzo_uint = 100 +dim compbuf as zstring ptr = allocate(complen) +dim decomplen as lzo_uint = 100 +dim decompbuf as zstring ptr = allocate(decomplen) +dim workmem as any ptr + +print "initializing LZO: "; +if lzo_init() = 0 then + print "ok" +else + print "failed!" + end 1 +end if + +print "compressing '" & *inbuf & "': "; + +workmem = allocate(LZO1X_1_15_MEM_COMPRESS) + +if lzo1x_1_15_compress(inbuf, inlen, compbuf, @complen, workmem) = 0 then + print "ok (" & inlen & " bytes in, " & complen & " bytes compressed)" +else + print "failed!" + end 1 +end if + +deallocate(workmem) + +print "decompressing: "; + +workmem = allocate(LZO1X_MEM_DECOMPRESS) + +if lzo1x_decompress(compbuf, complen, decompbuf, @decomplen, NULL) = 0 then + print "ok: '" & *decompbuf & "' (" & complen & " bytes compressed, " & decomplen & " bytes decompressed)" +else + print "failed!" + end 1 +end if + +deallocate(workmem) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibOpenGL.wakka b/fbdocs/manual/cache/ExtLibOpenGL.wakka index 0db6d8f0e0..2362636a7f 100644 --- a/fbdocs/manual/cache/ExtLibOpenGL.wakka +++ b/fbdocs/manual/cache/ExtLibOpenGL.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="OpenGL, The Open Graphics Language"}}---- -Cross-platform 3D Graphics library +Bibliothèque graphique 3D multiplate-forme. -Website: http://www.opengl.org -Platforms supported: Win32, Linux -Headers to include: GL/gl.bi -Example Usage: yes, in examples/libraries/GL/ +Site Web: http://www.opengl.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: GL/gl.bi +Exemple d'utilisation: oui, dans examples/libraries/GL/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibSDL.wakka b/fbdocs/manual/cache/ExtLibSDL.wakka index c561eade6c..564396dcfb 100644 --- a/fbdocs/manual/cache/ExtLibSDL.wakka +++ b/fbdocs/manual/cache/ExtLibSDL.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="SDL, The Simple DirectMedia Layer"}}---- -Cross-platform mulitmedia library +Bibliothèque multiplate-forme multimédia. -Website: http://www.libsdl.org -Platforms supported: Win32, Linux -Headers to include: SDL/SDL.bi -Example Usage: yes, in examples/libraries/SDL/ +Site Web: http://www.libsdl.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: SDL/SDL.bi +Exemple d'utilisation: oui, dans examples/libraries/SDL/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibTOC.wakka b/fbdocs/manual/cache/ExtLibTOC.wakka index b942f4337e..cbbb0fa18c 100644 --- a/fbdocs/manual/cache/ExtLibTOC.wakka +++ b/fbdocs/manual/cache/ExtLibTOC.wakka @@ -1,85 +1,93 @@ {{fbdoc item="title" value="Library Headers Index"}}---- -An index of header files distributed with FreeBASIC for use with external libraries. Only the headers (include files) are distributed with FreeBASIC. To obtain a needed external library, visit the link shown on the information for each individual library below. - -{{fbdoc item="section" value="Graphics"}} - {{fbdoc item="keyword" value="ExtLiballegro|allegro"}} - Game programming library. - {{fbdoc item="keyword" value="ExtLibDUGL|DUGL"}} - Game and graphics library for DOS. - {{fbdoc item="keyword" value="ExtLibcaca|caca"}} - A colour ASCII art library. - {{fbdoc item="keyword" value="ExtLibcairo|cairo"}} - 2D graphics library with support for multiple output devices. - {{fbdoc item="keyword" value="ExtLibcgui|cgui"}} - Library for making GUIs in a simple way. - {{fbdoc item="keyword" value="ExtLibcurses|Curses"}} - Standardized console user interface library. - {{fbdoc item="keyword" value="ExtLibdislin|dislin"}} - Library of subroutines and functions that display data graphically. - {{fbdoc item="keyword" value="ExtLibfreeimage|FreeImage"}} - Open Source library to support popular graphics image formats. - {{fbdoc item="keyword" value="ExtLibfreetype2|Freetype2"}} - A Free, High-Quality, and Portable Font Engine. - {{fbdoc item="keyword" value="ExtLibgd|gd"}} - Open source code library for the dynamic creation of images by programmers. - {{fbdoc item="keyword" value="ExtLibgiflib|gif_lib"}} - GIFLIB is a package of portable tools and library routines for working with GIF images. - {{fbdoc item="keyword" value="ExtLibgrx|grx"}} - 2D graphics library. - {{fbdoc item="keyword" value="ExtLibgtk|GTK+"}} - Cross-platform Graphical User Interface Library. - {{fbdoc item="keyword" value="ExtLibIL|IL"}} - A full featured cross-platform image library. - {{fbdoc item="keyword" value="ExtLibIUP|IUP"}} - Portable toolkit for building graphical user interfaces. - {{fbdoc item="keyword" value="ExtLibjapi|japi"}} - Open source free software GUI toolkit using Java's AWT Toolkit. - {{fbdoc item="keyword" value="ExtLibjpeglib|jpeglib"}} - Cross-platform library for reading/writing jpeg images. - {{fbdoc item="keyword" value="ExtLibjpgalleg|jpgalleg"}} - JPGalleg is a small add-on for Allegro that adds JPG images handling capabilities to the library. - {{fbdoc item="keyword" value="ExtLiblibpng|libpng"}} - Allows reading and writing PNG images. - {{fbdoc item="keyword" value="ExtLibOpenGL|OpenGL"}} - Cross-platform 3D Graphics library. - {{fbdoc item="keyword" value="ExtLibpdflib|pdflib"}} - PDFlib is a development tool for PDF-enabling your software. - {{fbdoc item="keyword" value="ExtLibSDL|SDL"}} - Cross-platform multimedia library. - {{fbdoc item="keyword" value="ExtLibtinyptc|tinyptc"}} - A small and easy to use framebuffer graphics library. - {{fbdoc item="keyword" value="ExtLibwxc|wx-c"}} - Cross-platform Graphical User Interface Library. - -{{fbdoc item="section" value="Database"}} - {{fbdoc item="keyword" value="ExtLibmysql|mysql"}} - High-Quality, widely used database engine. - {{fbdoc item="keyword" value="ExtLibpostgresql|postgresql"}} - Free software object-relational database management system - {{fbdoc item="keyword" value="ExtLibsqlite|sqlite"}} - Small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. - -{{fbdoc item="section" value="Music / Sound"}} - {{fbdoc item="keyword" value="ExtLibbass|BASS"}} - Audio library for use in Windows with a beta for Linux. - {{fbdoc item="keyword" value="ExtLibbassmod|BASSMOD"}} - BASSMOD is a MOD only (XM, IT, S3M, MOD, MTM, UMX) version of BASS - {{fbdoc item="keyword" value="ExtLibfmod|FMOD"}} - Audio library supporting just about any format. - {{fbdoc item="keyword" value="ExtLibal|OpenAL"}} - Cross-platform 3D audio API. - -{{fbdoc item="section" value="Development Helpers"}} - {{fbdoc item="keyword" value="ExtLibbfd|bfd"}} - Allows applications to use the same routines to operate on object files whatever the object file format. - {{fbdoc item="keyword" value="ExtLibCUnit|CUnit"}} - Lightweight system for writing, administering, and running unit tests in C. - {{fbdoc item="keyword" value="ExtLibgdsl|gdsl"}} - The Generic Data Structures Library is a collection of routines for generic data structures. - {{fbdoc item="keyword" value="ExtLibaspell|GNU ASpell"}} - Free and Open Source spell checker. - -{{fbdoc item="section" value="Embeddable Languages"}} - {{fbdoc item="keyword" value="ExtLibjni|jni"}} - Standard programming interface for writing Java native methods and embedding the Java virtual machine* into native applications. - {{fbdoc item="keyword" value="ExtLibLua|Lua"}} - Lightweight, embeddable scripting engine using the Lua language. - {{fbdoc item="keyword" value="ExtLibspidermonkey|spidermonkey"}} - Embeddable javascript engine. - -{{fbdoc item="section" value="Cryptography"}} - {{fbdoc item="keyword" value="ExtLibcryptlib|cryptlib"}} - A powerful security toolkit which allows even inexperienced crypto programmers to easily add encryption and authentication services to their software. - -{{fbdoc item="section" value="Mathematics"}} - {{fbdoc item="keyword" value="ExtLibbigint|big_int"}} - Library for using arbitrarily large integers. - {{fbdoc item="keyword" value="ExtLibgmp|gmp"}} - Free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. - {{fbdoc item="keyword" value="ExtLibgsl|gsl"}} - Provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. - {{fbdoc item="keyword" value="ExtLibnewton|Newton"}} - Integrated solution for real time simulation of physics environments. - {{fbdoc item="keyword" value="ExtLibode|ode"}} - Open source, high performance library for simulating rigid body dynamics. - -{{fbdoc item="section" value="Networking"}} - {{fbdoc item="keyword" value="ExtLibcgiutil|cgi-util"}} - Small C library for creating CGI programs for Websites. - {{fbdoc item="keyword" value="ExtLibcurl|curl"}} - Free and easy-to-use client-side URL transfer library supporting almost every protocol. - {{fbdoc item="keyword" value="ExtLibFastCGI|FastCGI"}} - Open extension to CGI that provides high performance without the limitations of server specific APIs. - -{{fbdoc item="section" value="eXtensible Markup Language (XML)"}} - {{fbdoc item="keyword" value="ExtLibexpat|expat"}} - Stream oriented XML parser library with several useful features. - {{fbdoc item="keyword" value="ExtLiblibxml|libxml"}} - De-facto standard library for accessing xml files. - {{fbdoc item="keyword" value="ExtLiblibxslt|libxslt"}} - XSLT itself is a an XML language to define transformation for XML. - {{fbdoc item="keyword" value="ExtLibmxml|mxml"}} - Small XML parsing library that you can use to read XML and XML-like data files in your application. - -{{fbdoc item="section" value="Regular Expressions"}} - {{fbdoc item="keyword" value="ExtLibpcre|pcre"}} - Regular expression pattern matching using the same syntax as Perl. - {{fbdoc item="keyword" value="ExtLibtre|tre"}} - Lightweight, robust, and efficient POSIX compliant regexp matching library. - -{{fbdoc item="section" value="Compression"}} - {{fbdoc item="keyword" value="ExtLibLzo|LZO"}} - Offers fast compression and very fast decompression. - {{fbdoc item="keyword" value="ExtLibquicklz|QuickLZ"}} - Very fast Compression Library - {{fbdoc item="keyword" value="ExtLibzlib|zlib"}} - Lossless data compression library unencumbered by patents. - -{{fbdoc item="section" value="System Specific"}} +Index des fichiers d'en-tête distribués avec FreeBasic pour une utilisation avec des bibliothèques externes. Seules les en-têtes (fichiers include) sont distribuées avec FreeBasic. Pour obtenir une bibliothèque externe nécessaire, veuillez consulter le lien indiqué ci-dessous sur l'information pour chaque bibliothèque. + +**Graphiques** + +[[ExtLiballegro allegro]] - Bibliothèque de programmation de jeux. + +[[ExtLibDUGL DUGL]] - Bibliothèque graphique et jeu pour DOS. + [[ExtLibcaca caca]] - Une bibliothèque ASCII d'art couleur. + [[ExtLibcairo cairo]] - Bibliothèque graphique 2D avec le support de plusieurs périphériques de sortie. + [[ExtLibcgui cgui]] - Bibliothèque pour faire des interfaces graphiques de manière simple. + [[ExtLibcurses Curses]] - Bibliothèque console normalisée d'interface utilisateur. + [[ExtLibdislin dislin]] - Bibliothèque de sous-routines et de fonctions qui affichent les données sous forme graphique. + [[ExtLibfreeimage FreeImage]] - Bibliothèque Open Source pour la prise en charge de formats graphiques populaires. + [[ExtLibfreetype2 Freetype2]] - Un moteur de polices libre, de haute qualité et portable. + [[ExtLibgd gd]] - Bibliothèque "code source libre" pour la création dynamique d'images par les programmeurs. + [[ExtLibgiflib gif_lib]] - GIFLIB est un ensemble d'outils portables et une bibliothèque de routines pour travailler avec des images GIF. + [[ExtLibgrx grx]] - Bibliothèque graphique 2D. + [[ExtLibgtk GTK+]] - Bibliothèque graphique multiplate-forme, interface utilisateur. + [[ExtLibIL IL]] - Une Bibliothèque image complète multi-plateforme. + [[ExtLibIUP IUP]] - Boîte à outils portable pour créer des interfaces utilisateur. + [[ExtLibjapi japi]] - Boîte à outils GUI "code source libre" utilisant la boîte à outils Java AWT. + [[ExtLibjpeglib jpeglib]] - Bibliothèque multiplate-forme pour la lecture/écriture des images jpeg. + [[ExtLibjpgalleg jpgalleg]] - JPGalleg est un petit module complémentaire qui ajoute capacités de traitement des images JPG à la bibliothèque Allegro. + [[ExtLiblibpng libpng]] - Permet la lecture et l'écriture des images PNG. + [[ExtLibOpenGL OpenGL]] - Bibliothèque graphique 3D multiplate-forme. + [[ExtLibpdflib pdflib]] - PDFlib est un outil de développement qui permet à votre logiciel l'utilisation de PDF. + [[ExtLibSDL SDL]] - Bibliothèque multiplate-forme multimédia. + [[ExtLibtinyptc tinyptc]] - Une petite bibliothèque graphique permettant l'utilisation facile du tampon vidéo. + [[ExtLibwxc wx-c]] - Bibliothèque graphique d'interface utilisateur multiplate-forme. + **Base de données** + [[ExtLibmysql mysql]] - Moteur de base de données de haute qualité couramment utilisé. + +[[ExtLibpostgresql postgresql]] - Logiciel libre de système de gestion de base de données, objet-relationnel. + [[ExtLibsqlite sqlite]] - Petite bibliothèque C qui implémente un moteur de base de données SQL interne, embarquable, sans configuration. + **Musique / son** + [[ExtLibbass BASS]] - Bibliothèque audio pour une utilisation sous Windows avec une version bêta pour Linux. + +[[ExtLibbassmod BASSMOD]] - BASSMOD est seulement un MOD (XM, IT, S3M, MOD, MTM, UMX) version de BASS + [[ExtLibfmod FMOD]] - Bibliothèque audio prenant en charge à peu près n'importe quel format. + [[ExtLibal OpenAL]] - API audio 3D multiplate-forme. + **Aide au développement** + [[ExtLibbfd bfd]] - Permet aux applications d'utiliser les mêmes routines pour fonctionner sur des fichiers objets quel que soit le format de fichier objet. + +[[ExtLibCUnit CUnit]] - Système léger pour l'écriture, l'administration et l'exécution des tests unitaires en C. + [[ExtLibgdsl gdsl]] -"Generic Data Structures Library" est une collection de routines pour les structures de données génériques. + [[ExtLibaspell GNU ASpell]] - Vérificateur orthographique libre. + **Langages intégrables** + [[ExtLibjni jni]] - L'interface de programmation standard pour l'écriture de méthodes Java natif et l'incorporation de la machine virtuelle Java * dans les applications natives. + +[[ExtLibLua Lua]] - Moteur de script léger embarquable utilisant le langage Lua. + [[ExtLibspidermonkey spidermonkey]] - Moteur javascript intégrable. + **Cryptographie** + [[ExtLibcryptlib cryptlib]] - Une trousse d'outils de sécurité puissante qui permet même aux programmeurs inexpérimentés crypto d'ajouter facilement des services de chiffrement et d'authentification à leurs logiciels. + **Mathématiques** + [[ExtLibbigint big_int]] - Bibliothèque pour utiliser des entiers de taille arbitraire. + +[[ExtLibgmp gmp]] - Bibliothèque libre pour l'arithmétique de précision arbitraire, opérant sur des entiers signés, des nombres rationnels et nombres à virgule flottante. + [[ExtLibgsl gsl]] - Fournit un large éventail de routines mathématiques tels que les générateurs de nombres aléatoires, des fonctions spéciales et des "des moindres carrés". + +[[ExtLibnewton Newton]] - Une solution intégrée pour la simulation en temps réel des environnements physiques. + [[ExtLibode ode]] - Bibliothèque "code source libre" haute performance pour la simulation dynamique des corps rigides. + **Réseaux** + [[ExtLibcgiutil cgi-util]] - Petite bibliothèque C pour créer des programmes CGI pour site web. + [[ExtLibcurl curl]] - Bibliothèque de transfert URL côté client libre et facile à utiliser supportant presque tous les protocoles. + [[ExtLibFastCGI FastCGI]] - Extension libre de CGI qui fournit des performances élevées sans les limitations d'API serveur spécifique. + +**eXtensible Markup Language (XML)** + [[ExtLibexpat expat]] - Bibliothèque flux orientée analyseur XML avec plusieurs fonctionnalités utiles. + [[ExtLiblibxml libxml]] - Bibliothèque standard d'accès aux de fichiers xml. + [[ExtLiblibxslt libxslt]] - XSLT est lui-même un langage XML pour définir des transformations XML. + +[[ExtLibmxml mxml]] - Petite bibliothèque d'analyse XML que vous pouvez utiliser pour lire les données XML et les fichiers de données XML dans votre application. + **Expressions régulières** + [[ExtLibpcre pcre]] - Filtrage d'expression régulières utilisant la même syntaxe que Perl. + [[ExtLibtre tre]] - Bibliothèque légère, robuste, efficace et conforme aux expressions régulières POSIX. + **Compression** + +[[ExtLibLzo LZO]] - Compression rapide et décompression très rapide. + [[ExtLibquicklz QuickLZ]] - Bibliothèque de compression très rapide + [[ExtLibzlib zlib]] - Bibliothèque de compression sans perte de données non handicapée par des brevets. + +**Spécificités système** + [[ExtLibCRT C Runtime Library]] + [[ExtLibdos DOS API]] + [[ExtLibdisphelper disphelper]] - Bibliothèque de d'assistance pour utiliser des objets COM en pur langage C. + [[ExtLibwindows API Windows]] + **Bibliothèques contribution de l'utilisateur** + +Visit http://www.freebasic.net/arch/ pour d'autres bibliothèques. {{fbdoc item="keyword" value="ExtLibCRT|C Runtime Library"}} {{fbdoc item="keyword" value="ExtLibdos|DOS API"}} {{fbdoc item="keyword" value="ExtLibdisphelper|disphelper"}} - Helper library to use COM objects from plain C diff --git a/fbdocs/manual/cache/ExtLibZip.wakka b/fbdocs/manual/cache/ExtLibZip.wakka new file mode 100644 index 0000000000..cdeb232d39 --- /dev/null +++ b/fbdocs/manual/cache/ExtLibZip.wakka @@ -0,0 +1,118 @@ +{{fbdoc item="title" value="libzip"}}---- +Easy-to-use library for creating, reading out or modifying .zip archives. + +Website: http://www.nih.at/libzip/ +Platforms supported: ""Win32"", Linux, DOS +Headers to include: zip.bi + +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/zip.bas"}}%%(freebasic) +'' .zip unpacking using libzip +#include once "zip.bi" + +sub create_parent_dirs(byval file as zstring ptr) + '' Given a path like this: + '' foo/bar/baz/file.ext + '' Do these mkdir()'s: + '' foo + '' foo/bar + '' foo/bar/baz + dim as ubyte ptr p = file + do + select case (*p) + case asc("/") + *p = 0 + mkdir(*file) + *p = asc("/") + case 0 + exit do + end select + p += 1 + loop +end sub + +'' Asks libzip for information on file number 'i' in the .zip file, +'' and then extracts it, while creating directories as needed. +private sub unpack_zip_file(byval zip as zip ptr, byval i as integer) + #define BUFFER_SIZE (1024 * 512) + static as ubyte chunk(0 to (BUFFER_SIZE - 1)) + #define buffer (@chunk(0)) + + '' Retrieve the filename. + dim as string filename = *zip_get_name(zip, i, 0) + print "file: " & filename & ", "; + + '' Retrieve the file size via a zip_stat(). + dim as zip_stat stat + if (zip_stat_index(zip, i, 0, @stat)) then + print "zip_stat() failed" + return + end if + + if ((stat.valid and ZIP_STAT_SIZE) = 0) then + print "could not retrieve file size from zip_stat()" + return + end if + + print stat.size & " bytes" + + '' Create directories if needed + create_parent_dirs(filename) + + '' Write out the file + dim as integer fo = freefile() + if (open(filename, for binary, access write, as #fo)) then + print "could not open output file" + return + end if + + '' Input for the file comes from libzip + dim as zip_file ptr fi = zip_fopen_index(zip, i, 0) + do + '' Write out the file content as returned by zip_fread(), which + '' also does the decoding and everything. + '' zip_fread() fills our buffer + dim as integer bytes = _ + zip_fread(fi, buffer, BUFFER_SIZE) + if (bytes < 0) then + print "zip_fread() failed" + exit do + end if + + '' EOF? + if (bytes = 0) then + exit do + end if + + '' Write amount of bytes of the file + if (put(#fo, , *buffer, bytes)) then + print "file output failed" + exit do + end if + loop + + '' Done + zip_fclose(fi) + close #fo +end sub + +sub unpack_zip(byref archive as string) + dim as zip ptr zip = zip_open(archive, ZIP_CHECKCONS, NULL) + if (zip = NULL) then + print "could not open input file " & archive + return + end if + + '' For each file in the .zip... (really nice API, thanks libzip) + for i as integer = 0 to (zip_get_num_entries(zip, 0) - 1) + unpack_zip_file(zip, i) + next + + zip_close(zip) +end sub + + + unpack_zip("test.zip") +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibal.wakka b/fbdocs/manual/cache/ExtLibal.wakka index 0daf975dac..858d69fb9d 100644 --- a/fbdocs/manual/cache/ExtLibal.wakka +++ b/fbdocs/manual/cache/ExtLibal.wakka @@ -1,9 +1,101 @@ {{fbdoc item="title" value="OpenAL"}}---- -OpenAL is a cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications. +OpenAL est une API multi-plateforme 3D audio appropriée pour une utilisation avec les applications de jeux et de nombreux autres types d'applications audio. Website: http://www.openal.org -Platforms supported: Win32, Linux -Headers to include: al/al.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: al/al.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/openal.bas"}}%%(freebasic) +'' OpenAL-based .wav player example + +#include "al/al.bi" +#include "al/alut.bi" + +const SOUND_FILE = "test.wav" + +'' Initialize OpenAL +alutInit(0, 0) + +'' +'' Load the .wav into an OpenAL buffer +'' +dim as ALuint buffer +alGenBuffers(1, @buffer) + +dim as ALenum wavFormat +dim as ALsizei wavSize +dim as ALsizei wavFreq +dim as any ptr wavData +dim as ALboolean wavLoop +alutLoadWAVFile(SOUND_FILE, @wavFormat, @wavData, @wavSize, @wavFreq, @wavLoop) +alBufferData(buffer, wavFormat, wavData, wavSize, wavFreq) +alutUnloadWAV(wavFormat, wavData, wavSize, wavFreq) + +if (alGetError() <> AL_NO_ERROR) then + print "Error: Loading the .wav failed!" +end if + +'' +'' Setup sound sources -- each one can have a 3D position & velocity. +'' +dim as ALuint source +alGenSources(1, @source) + +dim as ALfloat SourcePos(0 to 2) = {0.0, 0.0, 0.0} +dim as ALfloat SourceVel(0 to 2) = {0.0, 0.0, 0.0} + +alSourcei(source, AL_BUFFER, buffer) +alSourcef(source, AL_PITCH, 1.0) +alSourcef(source, AL_GAIN, 1.0) +alSourcefv(source, AL_POSITION, @SourcePos(0)) +alSourcefv(source, AL_VELOCITY, @SourceVel(0)) + +'' +'' Setup the listener's 3D position etc. +'' +dim as ALfloat listener_position(0 to 2) = {0.0, 0.0, 0.0} +dim as ALfloat listener_velocity(0 to 2) = {0.0, 0.0, 0.0} +dim as ALfloat listener_orientation(0 to 5) = {0.0, 0.0, -1.0, _ '' look at + 0.0, 0.0, 1.0} '' up vector +alListenerfv(AL_POSITION, @listener_position(0)) +alListenerfv(AL_VELOCITY, @listener_velocity(0)) +alListenerfv(AL_ORIENTATION, @listener_orientation(0)) + +'' +'' Play the sound (change to AL_FALSE to disable looping) +'' +alSourcei(source, AL_LOOPING, AL_TRUE) +alSourcePlay(source) + +print "Sound is playing, press ESC to exit and anything else to pause..." +dim as string key +dim as integer active = -1 +do + key = inkey() + if (len(key) > 0) then + if (key = chr(27)) then + exit do + end if + + if (active) then + alSourcePause(source) + active = 0 + else + alSourcePlay(source) + active = -1 + end if + end if +loop + +alSourceStop(source) + +'' +'' Clean up +'' +alDeleteBuffers(1, @buffer) +alDeleteSources(1, @source) +alutExit() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLiballegro.wakka b/fbdocs/manual/cache/ExtLiballegro.wakka index 7471a5ac7e..c732b35c50 100644 --- a/fbdocs/manual/cache/ExtLiballegro.wakka +++ b/fbdocs/manual/cache/ExtLiballegro.wakka @@ -1,10 +1,9 @@ {{fbdoc item="title" value="Allegro"}}---- -Game programming library +Bibliothèque de programmation de jeux -Website: http://www.talula.demon.co.uk/allegro/ -Platforms supported: Win32, Linux, DOS -Headers to include: allegro.bi -Example Usage: yes, in examples/libraries/Allegro/ +Site Web: http://www.talula.demon.co.uk/allegro/ +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: allegro.bi +Exemple d'utilisation: oui, dans examples/libraries/Allegro/ -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibaspell.wakka b/fbdocs/manual/cache/ExtLibaspell.wakka index c09f8b3318..13b0ab8e0a 100644 --- a/fbdocs/manual/cache/ExtLibaspell.wakka +++ b/fbdocs/manual/cache/ExtLibaspell.wakka @@ -1,11 +1,62 @@ {{fbdoc item="title" value="GNU Aspell"}}---- -Free and Open Source spell checker. +Correcteur orthographique libre et Open Source. Website: http://aspell.net/ -Platforms supported: Win32, Linux -Headers to include: aspell.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: aspell.bi + Version: 0.50 -Example included: yes, in examples/libraries/ASpell/aspell_test.bas +Exemples inclus: oui, dans examples/libraries/ASpell/aspell_test.bas +'' GNU-ASspell example, converted from http://aspell.net/win32/ + +#include once "aspell.bi" + +dim as AspellConfig ptr spell_config = new_aspell_config() + +'' Change this to suit the installed dictionary language if desired +aspell_config_replace(spell_config, "lang", "en_CA") + +'' Create speller object +dim as AspellCanHaveError ptr possible_err = new_aspell_speller(spell_config) +if (aspell_error_number(possible_err) <> 0) then + print *aspell_error_message(possible_err) + end 1 +end if +dim as AspellSpeller ptr speller = to_aspell_speller(possible_err) + +dim as string word +do + print + input "Enter a word (blank to quit): ", word + if (len(word) = 0) then + exit do + end if + + if (aspell_speller_check(speller, strptr(word), len(word)) <> 0) then + print "Word is Correct" + else + print "Suggestions:" + dim as AspellStringEnumeration ptr elements = _ + aspell_word_list_elements(aspell_speller_suggest(speller, strptr(word), len(word))) + do + dim as zstring ptr w = aspell_string_enumeration_next(elements) + if (w = 0) then + exit do + end if + print " "; *w + loop + delete_aspell_string_enumeration(elements) + end if + + ' - Report the replacement + 'aspell_speller_store_repl(speller, misspelled_word, size, + ' correctly_spelled_word, size); + + ' - Add to session or personal dictionary + 'aspell_speller_add_to_session|personal(speller, word, size) +loop +delete_aspell_speller(speller) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibbass.wakka b/fbdocs/manual/cache/ExtLibbass.wakka index aa57776fc0..2becba7dd9 100644 --- a/fbdocs/manual/cache/ExtLibbass.wakka +++ b/fbdocs/manual/cache/ExtLibbass.wakka @@ -1,9 +1,42 @@ {{fbdoc item="title" value="BASS"}}---- -Audio library for use in Windows with a Beta Version for Linux. +Bibliothèque audio pour une utilisation sous Windows avec une version bêta pour Linux. Website: http://www.un4seen.com/bass.html -Platforms supported: Win32, Linux (beta) -Headers to include: bass.bi +Plates-formes supportées: Win32, Linux (beta) +En-têtes à inclure: bass.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/bass.bas"}}%%(freebasic) +#include once "bass.bi" + +const SOUND_FILE = "test.mod" + +if (BASS_GetVersion() < MAKELONG(2,2)) then + print "BASS version 2.2 or above required!" + end 1 +end if + +if (BASS_Init(-1, 44100, 0, 0, 0) = 0) then + print "Could not initialize BASS" + end 1 +end if + +dim as HMUSIC test = BASS_MusicLoad(FALSE, SOUND_FILE, 0, 0, BASS_MUSIC_LOOP, 0) +if (test = 0) then + print "BASS could not load '" & SOUND_FILE & "'" + BASS_Free() + end 1 +end if + +BASS_ChannelPlay(test, FALSE) + +print "Sound playing; waiting to keypress to stop and exit..." +sleep + +BASS_ChannelStop(test) +BASS_MusicFree(test) +BASS_Stop() +BASS_Free() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibbassmod.wakka b/fbdocs/manual/cache/ExtLibbassmod.wakka index a771f10b8f..5a0ce073f8 100644 --- a/fbdocs/manual/cache/ExtLibbassmod.wakka +++ b/fbdocs/manual/cache/ExtLibbassmod.wakka @@ -1,9 +1,40 @@ {{fbdoc item="title" value="BASSMOD"}}---- -BASSMOD is a MOD only (XM, IT, S3M, MOD, MTM, UMX) version of BASS - useful for demos, or anything else where you want to play some MOD music. +BASSMOD est un MOD seulement (XM, IT, S3M, MOD, MTM, UMX) version de BASS - utile pour des démonstrations, ou tout autre endroit où vous voulez jouer de la musique MOD. Website: http://www.un4seen.com/bassmod.html -Platforms supported: Win32, Linux -Headers to include: bassmod.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: bassmod.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/bassmod.bas"}}%%(freebasic) +#include once "bassmod.bi" + +const SOUND_FILE = "test.mod" + +if (BASSMOD_GetVersion() < 2) then + print "BASSMOD version 2 or above required!" + end 1 +end if + +if (BASSMOD_Init(-1, 44100, 0) = 0) then + print "Could not initialize BASSMOD" + end 1 +end if + +if (BASSMOD_MusicLoad(FALSE, SOUND_FILE, 0, 0, BASS_MUSIC_LOOP) = 0) then + print "BASSMOD could not load '" & SOUND_FILE & "'" + BASSMOD_Free() + end 1 +end if + +BASSMOD_MusicPlay() + +print "Sound playing; waiting for keypress to stop and exit..." +sleep + +BASSMOD_MusicStop() +BASSMOD_MusicFree() +BASSMOD_Free() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibbfd.wakka b/fbdocs/manual/cache/ExtLibbfd.wakka index 22a4ff7177..63e88bc32d 100644 --- a/fbdocs/manual/cache/ExtLibbfd.wakka +++ b/fbdocs/manual/cache/ExtLibbfd.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="BFD, The Binary File Descriptor Library"}}---- -Allows applications to use the same routines to operate on object files whatever the object file format. +Permet aux applications d'utiliser les mêmes routines pour fonctionner sur des fichiers objet quel que soit le format de fichier objet. Website: http://www.gnu.org/software/binutils/manual/bfd-2.9.1/html_chapter/bfd_toc.html -Platforms supported: Win32, Linux, DOS -Headers to include: bfd.bi +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: bfd.bi Version: 2.16, 2.17, 2.18 -Define ##""__BFD_VER__""## to 216, 217, or 218 to include the bfd header for binutils 2.16, 2.17, 2.18 respectively. +Define ##__BFD_VER__## to 216, 217 ou 218 pour inclure l'en-tête bfd pour binutils 2.16, 2.17, 2.18 respectivement. {{fbdoc item="ex"}} %%(freebasic)#define __BFD_VER__ 217 +#define __BFD_VER__ 217 #include "bfd.bi" -%% -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file +%% \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibbigint.wakka b/fbdocs/manual/cache/ExtLibbigint.wakka index 1d2e42922a..c6d32c1fd3 100644 --- a/fbdocs/manual/cache/ExtLibbigint.wakka +++ b/fbdocs/manual/cache/ExtLibbigint.wakka @@ -1,11 +1,40 @@ {{fbdoc item="title" value="big_int"}}---- -Library for using arbitrarily large integers. +Bibliothèque pour utiliser des entiers arbitrairement grands. Website: http://valyala.narod.ru/big_int/ (Russian) -Platforms supported: Win32, Linux -Headers to include: big_int/big_int.bi -Example Usage: yes, in examples/libraries/big_int/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: big_int/big_int.bi +Exemple: oui, dans examples/libraries/big_int/ +{{fbdoc item="filename" value="examples/manual/libraries/"}}%%(freebasic) +#include once "big_int/big_int_full.bi" + +sub print_num(byval num as big_int ptr) + dim as big_int_str ptr s = big_int_str_create(1) + if (s = 0) then + exit sub + end if + + if (big_int_to_str(num, 10, s) <> 0) then + exit sub + end if + + print *s->str; + + big_int_str_destroy(s) +end sub + + dim as big_int ptr bignum = big_int_create(1) + + big_int_from_int(2, bignum) + big_int_pow(bignum, 65536, bignum) + + print "2^65536 = "; + print_num(bignum) + print + + big_int_destroy(bignum) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibcaca.wakka b/fbdocs/manual/cache/ExtLibcaca.wakka index 60bfead17a..b34cd82ffe 100644 --- a/fbdocs/manual/cache/ExtLibcaca.wakka +++ b/fbdocs/manual/cache/ExtLibcaca.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="caca"}}---- -A colour ASCII art library. +Une bibliothèque ASCII d'art couleur. -Website: http://libcaca.zoy.org/ -Platforms supported: Win32, Linux, DOS -Headers to include: caca.bi -Example Usage: yes, in examples/libraries/caca/ +Site Web: http://libcaca.zoy.org/ +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: caca.bi +Exemple d'utilisation: oui, dans examples/libraries/caca/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibcairo.wakka b/fbdocs/manual/cache/ExtLibcairo.wakka index e4dd89877e..235d773bf9 100644 --- a/fbdocs/manual/cache/ExtLibcairo.wakka +++ b/fbdocs/manual/cache/ExtLibcairo.wakka @@ -1,11 +1,86 @@ {{fbdoc item="title" value="Cairo"}}---- -2D graphics library with support for multiple output devices. +Bibliothèque graphique 2D avec le support de plusieurs périphériques de sortie. -Website: http://www.cairographics.org -Platforms supported: Win32, Linux -Headers to include: cairo/cairo.bi -Example Usage: yes, in examples/libraries/cairo/ +Site Web: http://www.cairographics.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: cairo/cairo.bi +Exemple d'utilisation: oui, dans examples/libraries/cairo/ +{{fbdoc item="filename" value="examples/manual/libraries/cairo.bas"}}%%(freebasic) +'' Cairo clock. Translated from the C example written by Writser Cleveringa -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +#include once "cairo/cairo.bi" +#include once "datetime.bi" + +const SCREEN_W = 400 +const SCREEN_H = 300 + +const PI = 3.14159265358979323846# + +screenres SCREEN_W, SCREEN_H, 32 + +'' +'' Create a cairo drawing context, using the FB screen as surface. +'' +dim as cairo_surface_t ptr surface = _ + cairo_image_surface_create_for_data(screenptr(), _ + CAIRO_FORMAT_ARGB32, SCREEN_W, SCREEN_H, _ + SCREEN_W * sizeof(integer)) + +dim as cairo_t ptr c = cairo_create(surface) +cairo_scale(c, SCREEN_W, SCREEN_H) + +do + screenlock() + + '' + '' Draw a clock + '' + + '' compute the angles for the indicators of our clock + dim as double minutes = minute(now()) * PI / 30 + dim as double hours = hour(now()) * PI / 6 + dim as double seconds = second(now()) * PI / 30 + + '' Draw the entire context white. + cairo_set_source_rgba(c, 1, 1, 1, 1) + cairo_paint(c) + + '' Who doesn't want all those nice line settings :) + cairo_set_line_cap(c, CAIRO_LINE_CAP_ROUND) + cairo_set_line_width(c, 0.1) + + '' Translate to the center of the rendering context, + '' and draw a black clock outline. + cairo_set_source_rgba(c, 0, 0, 0, 1) + cairo_translate(c, 0.5, 0.5) + cairo_arc(c, 0, 0, 0.4, 0, PI * 2) + cairo_stroke(c) + + '' Draw a white dot on the current second. + cairo_set_source_rgba(c, 1, 1, 1, 0.6) + cairo_arc(c, sin(seconds) * 0.4, -cos(seconds) * 0.4, 0.05, 0, PI * 2) + cairo_fill(c) + + '' Draw the minutes indicator + cairo_set_source_rgba(c, 0.2, 0.2, 1, 0.6) + cairo_move_to(c, 0, 0) + cairo_line_to(c, sin(minutes) * 0.4, -cos(minutes) * 0.4) + cairo_stroke(c) + + '' Draw the hours indicator + cairo_move_to(c, 0, 0) + cairo_line_to(c, sin(hours) * 0.2, -cos(hours) * 0.2) + cairo_stroke(c) + + screenunlock() + + sleep 1000 +loop while (len(inkey()) = 0) + +'' Clean up the cairo context +cairo_destroy(c) +%% + + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibcgiutil.wakka b/fbdocs/manual/cache/ExtLibcgiutil.wakka index 80b412eb94..87428a273c 100644 --- a/fbdocs/manual/cache/ExtLibcgiutil.wakka +++ b/fbdocs/manual/cache/ExtLibcgiutil.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="cgi-util"}}---- -Small C library for creating CGI programs for Websites. +Petite bibliothèque C pour créer des programmes CGI pour les sites Web. Website: http://directory.fsf.org/cgi-util.html -Platforms supported: Win32, Linux -Headers to include: cgi-util.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: cgi-util.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibcgui.wakka b/fbdocs/manual/cache/ExtLibcgui.wakka index a453779426..be638f7a3b 100644 --- a/fbdocs/manual/cache/ExtLibcgui.wakka +++ b/fbdocs/manual/cache/ExtLibcgui.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="CGUI"}}---- -Library for making GUIs in a simple way. +Bibliothèque pour faire des interfaces graphiques de manière simple. -Website: http://www.allegro.cc/resource/Libraries/GUI/CGUI -Platforms supported: Win32, Linux -Headers to include: cgui.bi -Example Usage: yes, in examples/libraries/CGUI/ +Site Web: http://www.allegro.cc/resource/Libraries/GUI/CGUI +Plates-formes supportées: Win32, Linux +En-têtes à inclure: cgui.bi +Exemple d'utilisation: oui, dans examples/libraries/CGUI/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibcryptlib.wakka b/fbdocs/manual/cache/ExtLibcryptlib.wakka index 14bda2e9c0..f830816a42 100644 --- a/fbdocs/manual/cache/ExtLibcryptlib.wakka +++ b/fbdocs/manual/cache/ExtLibcryptlib.wakka @@ -1,11 +1,77 @@ {{fbdoc item="title" value="cryptlib"}}---- -A powerful security toolkit which allows even inexperienced crypto programmers to easily add encryption and authentication services to their software. +Une trousse d'outils de sécurité performants qui permet même aux programmeurs inexpérimentés d'ajouter facilement des crypto services de cryptage et d'authentification à leurs logiciels. Website: http://www.cs.auckland.ac.nz/~pgut001/cryptlib/ -Platforms supported: Win32, Linux -Headers to include: cryptlib.bi -Example Usage: yes, in examples/libraries/cryptlib/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: cryptlib.bi +Exemple: oui, dans examples/libraries/cryptlib/ +{{fbdoc item="filename" value="examples/manual/libraries/cryptlib.bas"}}%%(freebasic) +#include once "cryptlib.bi" + +function calc_hash( byval filename as string, byval algo as CRYPT_ALGO_TYPE ) as string + const BUFFER_SIZE = 8192 + dim as byte buffer( 0 to BUFFER_SIZE-1 ) + + '' create a new context using the wanted algorithm + dim as CRYPT_CONTEXT ctx + cryptCreateContext( @ctx, CRYPT_UNUSED, algo ) + + '' open input file in binary mode + dim as integer f = freefile() + if( open( filename for binary access read as #f ) <> 0 ) then + return "" + end if + + '' read until end-of-file + do until( eof( f ) ) + dim as integer oldpos = seek( f ) + get #f, , buffer() + dim as integer readlength = seek( f ) - oldpos + '' encrypt + cryptEncrypt( ctx, @buffer(0), readlength ) + loop + + '' close input file + close #f + + '' finalize + cryptEncrypt( ctx, 0, 0 ) + + '' get the hash result + dim as integer buffersize = BUFFER_SIZE + cryptGetAttributeString( ctx, CRYPT_CTXINFO_HASHVALUE, @buffer(0), @buffersize ) + + '' convert to hexadecimal + dim as string result = "" + for i as integer = 0 to length-1 + result += hex( buffer(i) ) + next + + '' free the context + cryptDestroyContext( ctx ) + + return result +end function + + dim as string filename = trim( command(1) ) + if( len( filename ) = 0 ) then + print "Usage: hash.exe filename" + end -1 + end if + + '' init cryptlib + cryptInit( ) + + '' calculate hashes + print "md5: "; calc_hash( filename, CRYPT_ALGO_MD5 ) + print "sha: "; calc_hash( filename, CRYPT_ALGO_SHA ) + + '' shutdown cryptlib + cryptEnd( ) + + sleep +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibcurl.wakka b/fbdocs/manual/cache/ExtLibcurl.wakka index 310f68a104..35a26b4c37 100644 --- a/fbdocs/manual/cache/ExtLibcurl.wakka +++ b/fbdocs/manual/cache/ExtLibcurl.wakka @@ -1,12 +1,62 @@ {{fbdoc item="title" value="curl"}}---- -Free and easy-to-use client-side URL transfer library supporting almost every protocol. +Bibliothèque côté-client de transfert URL, libre et facile à utiliser et soutenant presque tous les protocoles. Website: http://curl.haxx.se/libcurl/ -Platforms supported: Win32, Linux, DOS -Headers to include: curl.bi +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: curl.bi + Version: 7.15.4 -Example Usage: yes, in examples/libraries/Curl/ +Exemple: oui, dans examples/libraries/Curl/ +'' Curl HTTP Get example + +#include once "curl.bi" +#include once "crt/string.bi" + +'' this callback will be called when any data is received +private function write_callback cdecl _ + ( _ + byval buffer as byte ptr, _ + byval size as integer, _ + byval nitems as integer, _ + byval outstream as any ptr _ + ) as integer + + static as zstring ptr zstr = 0 + static as integer maxbytes = 0 + + dim as integer bytes = size * nitems + + '' current zstring buffer too small? + if( maxbytes < bytes ) then + zstr = reallocate( zstr, bytes + 1 ) + maxbytes = bytes + end if + + '' "buffer" is not null-terminated, so we must dup it and add the null-term + memcpy( zstr, buffer, bytes ) + zstr[bytes] = 0 + + '' just print it.. + print *zstr + + return bytes +end function + + '' init + dim as CURL ptr curl = curl_easy_init( ) + if( curl = 0 ) then + end 1 + end if + + '' set url and callback + curl_easy_setopt( curl, CURLOPT_URL, "freebasic.net" ) + curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, @write_callback ) + + '' execute.. + curl_easy_perform( curl ) + '' shutdown + curl_easy_cleanup( curl ) +%% -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibcurses.wakka b/fbdocs/manual/cache/ExtLibcurses.wakka index 087bb2d003..ae32e2f827 100644 --- a/fbdocs/manual/cache/ExtLibcurses.wakka +++ b/fbdocs/manual/cache/ExtLibcurses.wakka @@ -1,12 +1,55 @@ {{fbdoc item="title" value="Curses"}}---- -Standardized console user interface library +Bibliothèque console normalisée d'interface utilisateur. -Website: http://pdcurses.sourceforge.net/ and http://www.gnu.org/software/ncurses/ -Platforms supported: Win32, Linux -Headers to include: curses.bi -Example Usage: yes, in examples/libraries/curses/ -Note: On Win32 systems pdcurses is used, on Linux it uses the standard ncurses library. +Site Web: http://pdcurses.sourceforge.net/ and http://www.gnu.org/software/ncurses/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: curses.bi +Exemple d'utilisation: oui, dans examples/libraries/curses/ +Note: Sur les systèmes Win32 pdcurses est utilisé, sur Linux, il utilise la bibliothèque standard ncurses. +{{fbdoc item="filename" value="examples/manual/libraries/curses.bas"}}%%(freebasic) +#include once "curses.bi" + +initscr() +cbreak() +noecho() + +if (has_colors( )) then + dim as short f, b + start_color() + + pair_content( 0, @f, @b ) + printw(!"pair 0 contains (%d,%d)\n", f, b) + getch() + + printw(!"Initializing pair 1 to red/black\n") + init_pair(1, COLOR_RED, COLOR_BLACK) + attrset(COLOR_PAIR(1)) + printw(!"RED/BLACK\n") + getch() + + printw(!"Initializing pair 2 to white/blue\n") + init_pair(2, COLOR_WHITE, COLOR_BLUE) + attrset(COLOR_PAIR(2)) + printw(!"WHITE/BLUE\n") + getch() + + printw(!"Resetting colors to pair 0\n") + attrset(COLOR_PAIR(0)) + printw(!"Default Colors\n") + getch() + + printw(!"Resetting colors to pair 1\n") + attrset(COLOR_PAIR(1)) + printw(!"RED/BLACK\n") + getch() +else + printw("This demo requires a color terminal") + getch() +end if + +endwin() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibdislin.wakka b/fbdocs/manual/cache/ExtLibdislin.wakka index 26aba6fddf..41dbaed7d0 100644 --- a/fbdocs/manual/cache/ExtLibdislin.wakka +++ b/fbdocs/manual/cache/ExtLibdislin.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="DisLin"}}---- -Library of subroutines and functions that display data graphically. +Bibliothèque de sous-routines et de fonctions qui affichent les données sous forme graphique. -Website: http://www.mps.mpg.de/dislin/ -Platforms supported: Win32, Linux -Headers to include: dislin.bi +Site Web: http://www.mps.mpg.de/dislin/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: dislin.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibdisphelper.wakka b/fbdocs/manual/cache/ExtLibdisphelper.wakka index d00e947c3c..edf7c880a4 100644 --- a/fbdocs/manual/cache/ExtLibdisphelper.wakka +++ b/fbdocs/manual/cache/ExtLibdisphelper.wakka @@ -1,11 +1,107 @@ {{fbdoc item="title" value="disphelper"}}---- -Disphelper is a COM helper library that can be used in plain C. No MFC or ATL is required. It allows you to call COM objects with an easy printf style syntax. +Disphelper est une bibliothèque d'assistance COM qui peut être utilisée en plein C. Pas de MFC ou ATL requis. Vous permet d'appeler des objets COM avec une syntaxe pratique du style printf. Website: http://disphelper.sourceforge.net/ -Platforms supported: Win32, Linux (using WINE) -Headers to include: disphelper/disphelper.bi -Example Usage: yes, in examples/libraries/disphelper/ +Plates-formes supportées: Win32, Linux (using WINE) +En-têtes à inclure: disphelper/disphelper.bi +Exemple: oui, dans examples/libraries/disphelper/ +{{fbdoc item="filename" value="examples/manual/libraries/disphelper1.bas"}}%%(freebasic) +'' HTTP GET example, using MSXML2 -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +#define UNICODE +#include "disphelper/disphelper.bi" + +DISPATCH_OBJ(objHTTP) + +dhInitialize(TRUE) +dhToggleExceptions(TRUE) + +dhCreateObject("MSXML2.XMLHTTP.4.0", NULL, @objHTTP) + +dhCallMethod(objHTTP, ".Open(%s, %s, %b)", "GET", "http://sourceforge.net", FALSE) +dhCallMethod(objHTTP, ".Send") + +dim as zstring ptr szResponse +dhGetValue("%s", @szResponse, objHTTP, ".ResponseText") + +print "Response: "; *szResponse +dhFreeString(szResponse) + +SAFE_RELEASE(objHTTP) +dhUninitialize(TRUE) +%% + +{{fbdoc item="filename" value="examples/manual/libraries/disphelper2.bas"}}%%(freebasic) +'' IExplorer example + +#define UNICODE +#include "disphelper/disphelper.bi" + +sub navigate(byref url as string) + DISPATCH_OBJ(ieApp) + dhInitialize(TRUE) + dhToggleExceptions(TRUE) + + dhCreateObject("InternetExplorer.Application", NULL, @ieApp) + dhPutValue(ieApp, "Visible = %b", TRUE) + dhCallMethod(ieApp, ".Navigate(%s)", url) + + SAFE_RELEASE(ieApp) + dhUninitialize(TRUE) +end sub + + navigate("www.freebasic.net") +%% + +{{fbdoc item="filename" value="examples/manual/libraries/disphelper3.bas"}}%%(freebasic) +'' VB Script example + +#define UNICODE +#include "disphelper/disphelper.bi" + +'' This function runs a script using the MSScriptControl. +'' Optionally returns a result. +sub RunScript _ + ( _ + byval result_identifier as LPWSTR, _ + byval result as LPVOID, _ + byval script as LPWSTR, _ + byval language as LPWSTR _ + ) + + DISPATCH_OBJ(control) + if (SUCCEEDED(dhCreateObject("MSScriptControl.ScriptControl", NULL, @control))) then + if (SUCCEEDED(dhPutValue(control, ".Language = %T", language))) then + dhPutValue(control, ".AllowUI = %b", TRUE) + dhPutValue(control, ".UseSafeSubset = %b", FALSE) + + if (result) then + dhGetValue(result_identifier, result, control, ".Eval(%T)", script) + else + dhCallMethod(control, ".Eval(%T)", script) + end if + end if + end if + + SAFE_RELEASE(control) +end sub + + dhInitialize(TRUE) + dhToggleExceptions(TRUE) + + '' VBScript sample + RunScript(NULL, NULL, !"MsgBox(\"This is a VBScript test.\" & vbcrlf & \"It worked!\",64 Or 3)", "VBScript") + + '' JScript sample + dim as integer result + RunScript("%d", @result, "Math.round(Math.pow(5, 2) * Math.PI)", "JScript") + print "Result ="; result + + print "Press any key to exit..." + sleep + + dhUninitialize(TRUE) +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibdos.wakka b/fbdocs/manual/cache/ExtLibdos.wakka index 21574d02e2..94696086b5 100644 --- a/fbdocs/manual/cache/ExtLibdos.wakka +++ b/fbdocs/manual/cache/ExtLibdos.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="DOS API"}}---- -Provides access to low-level BIOS and DOS calls. +Permet d'accéder aux appels bas-niveau BIOS et DOS. Website: http://freedos.org -Platforms supported: DOS -Headers to include: dos/dos.bi +Plates-formes supportées: DOS +En-têtes à inclure: dos/dos.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibexpat.wakka b/fbdocs/manual/cache/ExtLibexpat.wakka index d3411820aa..38de072a8d 100644 --- a/fbdocs/manual/cache/ExtLibexpat.wakka +++ b/fbdocs/manual/cache/ExtLibexpat.wakka @@ -1,9 +1,134 @@ {{fbdoc item="title" value="expat"}}---- -Stream oriented XML parser library with several useful features. +Bibliothèque orientée flux parser XML avec plusieurs fonctionnalités utiles. Website: http://expat.sourceforge.net/ -Platforms supported: Win32, Linux -Headers to include: expat.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: expat.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/expat.bas"}}%%(freebasic) +'' XML file parser command line tool based on libexpat + +'' Can use zstring or wstring (libexpat or libexpatw): +'#define XML_UNICODE + +#include once "expat.bi" + +#define FALSE 0 +#define NULL 0 + +const BUFFER_SIZE = 1024 + +type Context + as integer nesting + as XML_char * (BUFFER_SIZE+1) text + as integer textlength +end type + +dim shared as Context ctx + +'' Callback called by libexpat when begin of XML tag is found +sub elementBegin cdecl _ + ( _ + byval userdata as any ptr, _ + byval element as XML_char ptr, _ + byval attributes as XML_char ptr ptr _ + ) + + '' Show its name + print space(ctx.nesting);*element; + + '' and its attributes (attributes are given as an array of XML_char pointers + '' much like argv, for each attribute there will apparently be the one + '' element representing the name and a second element representing the + '' specified value) + while (*attributes) + print " ";**attributes; + attributes += 1 + print "='";**attributes;"'"; + attributes += 1 + wend + print + + ctx.nesting += 1 + ctx.text[0] = 0 + ctx.textlength = 0 +end sub + +'' Callback called by libexpat when end of XML tag is found +sub elementEnd cdecl(byval userdata as any ptr, byval element as XML_char ptr) + '' Show text collected in charData() callback below + print space(ctx.nesting);ctx.text + ctx.text[0] = 0 + ctx.textlength = 0 + ctx.nesting -= 1 +end sub + +sub charData cdecl _ + ( _ + byval userdata as any ptr, _ + byval chars as XML_char ptr, _ '' Note: not null-terminated + byval length as integer _ + ) + + '' This callback will apparently recieve every data between xml tags + '' (really?), including newlines and space. + + '' Append to our buffer, if there still is free room, so we can print it out later + if (length <= (BUFFER_SIZE - ctx.textlength)) then + fb_MemCopy(ctx.text[ctx.textlength], chars[0], length * sizeof(XML_char)) + ctx.textlength += length + ctx.text[ctx.textlength] = 0 + end if +end sub + +'' +'' Main +'' + + dim as string filename = command(1) + if (len(filename) = 0) then + print "Usage: expat " + end 1 + end if + + dim as XML_Parser parser = XML_ParserCreate(NULL) + if (parser = NULL) then + print "XML_ParserCreate failed" + end 1 + end if + + ''XML_SetUserData(parser, userdata_pointer) + XML_SetElementHandler(parser, @elementBegin, @elementEnd) + XML_SetCharacterDataHandler(parser, @charData) + + + if (open(filename, for input, as #1)) then + print "Could not open file: '";filename;"'" + end 1 + end if + + static as ubyte buffer(0 to (BUFFER_SIZE-1)) + + dim as integer reached_eof = FALSE + do + dim as integer size = BUFFER_SIZE + dim as integer result = get(#1, , buffer(0), size, size) + if (result or (size <= 0)) then + print "File input error" + end 1 + end if + + reached_eof = (eof(1) <> FALSE) + + if (XML_Parse(parser, @buffer(0), size, reached_eof) = FALSE) then + print filename & "(" & XML_GetCurrentLineNumber(parser) & "): Error from XML parser: " + print *XML_ErrorString(XML_GetErrorCode(parser)) + end 1 + end if + loop while (reached_eof = FALSE) + + XML_ParserFree(parser) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibfmod.wakka b/fbdocs/manual/cache/ExtLibfmod.wakka index edd84857d5..47e2ee07f3 100644 --- a/fbdocs/manual/cache/ExtLibfmod.wakka +++ b/fbdocs/manual/cache/ExtLibfmod.wakka @@ -1,9 +1,116 @@ {{fbdoc item="title" value="FMOD"}}---- -Auido library supporting just about any format. +Bibliothèque audio supportant n'importe quel format. Website: http://www.fmod.org/index.php/products#FMOD3ProgrammersAPI -Platforms supported: Win32, Linux -Headers to include: fmod.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: fmod.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/fmod1.bas"}}%%(freebasic) +#include once "fmod.bi" + +const SOUND_FILE = "test.mod" + +if (FSOUND_GetVersion() < FMOD_VERSION) then + print "FMOD version mismatch" + end 1 +end if + +if (FSOUND_Init(44100, 32, 0) = 0) then + print "Could not initialize FMOD" + end 1 +end if + +dim as FMUSIC_MODULE ptr song = FMUSIC_LoadSong(SOUND_FILE) +if (song = 0) then + print "FMOD could not load '" & SOUND_FILE & "'" + FSOUND_Close() + end 1 +end if + +FMUSIC_PlaySong(song) + +print "Sound playing; waiting for keypress to stop and exit..." +sleep + +FMUSIC_FreeSong(song) +FSOUND_Close() +%% + +{{fbdoc item="filename" value="examples/manual/libraries/fmod2.bas"}}%%(freebasic) +'' mp3 player based on FMOD + +#include once "fmod.bi" + +const SOUND_FILE = "test.mp3" + +sub print_all_tags(byval stream as FSOUND_STREAM ptr) + dim as integer count = 0 + FSOUND_Stream_GetNumTagFields(stream, @count) + + for i as integer = 0 to (count - 1) + dim as integer tagtype, taglen + dim as zstring ptr tagname, tagvalue + FSOUND_Stream_GetTagField(stream, i, @tagtype, @tagname, @tagvalue, @taglen) + print left(*tagname, taglen) + next +end sub + +function get_tag _ + ( _ + byval stream as FSOUND_STREAM ptr, _ + byval tagv1 as zstring ptr, _ + byval tagv2 as zstring ptr _ + ) as string + + dim tagname as zstring ptr, taglen as integer + + FSOUND_Stream_FindTagField(stream, FSOUND_TAGFIELD_ID3V1, tagv1, @tagname, @taglen) + if (taglen = 0) then + FSOUND_Stream_FindTagField(stream, FSOUND_TAGFIELD_ID3V2, tagv2, @tagname, @taglen) + end if + + return left(*tagname, taglen) +end function + + if (FSOUND_GetVersion < FMOD_VERSION) then + print "FMOD version " + str(FMOD_VERSION) + " or greater required!" + end 1 + end If + + if (FSOUND_Init(44100, 4, 0) = 0) then + print "Could not initialize FMOD" + end 1 + end if + + FSOUND_Stream_SetBufferSize(50) + + dim as FSOUND_STREAM ptr stream = FSOUND_Stream_Open(SOUND_FILE, FSOUND_MPEGACCURATE, 0, 0) + if (stream = 0) then + print "FMOD could not load '" & SOUND_FILE & "'" + FSOUND_Close() + end 1 + end if + + '' Read out mp3 tags to show some meta information + print "Title:", get_tag(stream, "TITLE", "TIT2") + print "Album:", get_tag(stream, "ALBUM", "TALB") + print "Artist:", get_tag(stream, "ARTIST", "TPE1") + ''print_all_tags(stream) + + print "Playing mp3, press a key to exit..." + FSOUND_Stream_Play(FSOUND_FREE, stream) + + while (inkey() = "") + if (FSOUND_Stream_GetPosition(stream) >= FSOUND_Stream_GetLength(stream)) then + exit while + end if + sleep 50, 1 + wend + + FSOUND_Stream_Stop(stream) + FSOUND_Stream_Close(stream) + FSOUND_Close() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibfreeimage.wakka b/fbdocs/manual/cache/ExtLibfreeimage.wakka index 124e77b6ba..f0fe1122f9 100644 --- a/fbdocs/manual/cache/ExtLibfreeimage.wakka +++ b/fbdocs/manual/cache/ExtLibfreeimage.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="FreeImage"}}---- -FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit versions of Windows, and cross-platform (works both with Linux and Mac OS X). +FreeImage est une bibliothèque Open Source pour les développeurs qui veulent utiliser les formats images classiques tels que PNG, BMP, JPEG, TIFF et d'autres utilisés par les applications multimédia actuelles. FreeImage est facile d'utilisation, rapide, "multi-threading" sécure, compatible avec toutes les versions 32-bit de Windows et multi-plateformes (fonctionne aussi bien avec Linux et Mac OS X). -Website: http://freeimage.sourceforge.net/ -Platforms supported: Win32, Linux -Headers to include: FreeImage.bi -Example included: yes, in examples/gfx/freeimage.bas +Site Web: http://freeimage.sf.net +Plates-formes supportées: Win32, Linux +En-têtes à inclure: FreeImage.bi +Exemple inclus: oui, dans examples/gfx/freeimage.bas -Here follows an example of using FreeImage in FreeBASIC. If using Windows you will require freeimage.dll which is available from the [[http://freeimage.sourceforge.net/ FreeImage site]]. +Ci-dessous un exemple d'utilisation de FreeImage sous FreeBASIC. Si vous utilisez Windows vous aurez besoin de freeimage.dll qui est disponible sur le [[http://freeimage.sourceforge.net/">site de FreeImage]]. -##{{fbdoc item="filename" value="examples/manual/extras/freeimage.bas"}}%%(freebasic) +##%%(freebasic) '' Code example for loading all common image types using FreeImage. '' The example loads an image passed as a command line argument. @@ -92,6 +92,6 @@ else end if sleep -%%## +%% -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file +## \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibfreetype2.wakka b/fbdocs/manual/cache/ExtLibfreetype2.wakka index 1c78d18af4..281ed53ba2 100644 --- a/fbdocs/manual/cache/ExtLibfreetype2.wakka +++ b/fbdocs/manual/cache/ExtLibfreetype2.wakka @@ -1,11 +1,207 @@ {{fbdoc item="title" value="Freetype2"}}---- -A Free, High-Quality, and Portable Font Engine +Un moteur de polices libre, de haute qualité et portable. -Website: http://www.freetype.org -Platforms supported: Win32, Linux -Headers to include: freetype2/freetype.bi -Example Usage: yes, in examples/libraries/freetype/ +Site Web: http://www.freetype.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: freetype2/freetype.bi +Exemple d'utilisation: oui, dans examples/libraries/freetype/ +{{fbdoc item="filename" value="examples/manual/libraries/freetype2_1.bas"}}%%(freebasic) +'' FreeType2 library test, by jofers -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +#include "freetype2/freetype.bi" + +const TTF_FONT = "Vera.ttf" + +dim as FT_Face face +dim as FT_Library library + +#define CHECK_SUCCESS(call) if (call) then : print "Error: " + #call : end if + +if (FT_Init_FreeType(@library) <> 0) then + print "FT_Init_FreeType() failed" +end if + +'' +'' Load a font and render an '@' character on to a bitmap +'' + +if (FT_New_Face(library, TTF_FONT, 0, @face) <> 0) then + print "FT_New_Face() failed" +end if + +if (FT_Set_Pixel_Sizes(face, 0, 200) <> 0) then + print "FT_Set_Pixel_Sizes() failed" +end if + +if (FT_Load_Char(face, asc("@"), FT_LOAD_DEFAULT) <> 0) then + print "FT_Load_Char() failed" +end if + +if (FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL) <> 0) then + print "FT_Render_Glyph() failed" +end if + +'' +'' Draw the rendered bitmap +'' + +screenres 320, 200, 32 + +dim as FT_Bitmap ptr bitmap = @face->glyph->bitmap + +for y as integer = 0 to (bitmap->rows - 1) + for x as integer = 0 to (bitmap->width - 1) + dim as integer col = bitmap->buffer[y * bitmap->pitch + x] + pset(x, y), rgb(col, col, col) + next +next + +sleep +%% + +{{fbdoc item="filename" value="examples/manual/libraries/freetype2_2.bas"}}%%(freebasic) +'' Drawing text onto an FB screen using FreeType2, by jofers + +#include "freetype2/freetype.bi" + +const TTF_FONT = "Vera.ttf" +const SCREEN_W = 320 +const SCREEN_H = 240 + +dim shared as integer pixelsize +dim shared as FT_Library library +dim shared as FT_Face font1 + +sub draw_glyph _ + ( _ + byval font as FT_Face, _ + byval x as integer, _ + byval y as integer, _ + byval col as uinteger _ + ) + + dim as FT_Bitmap ptr bitmap = @font->glyph->bitmap + + dim as ubyte ptr source = bitmap->buffer + dim as integer h = bitmap->rows + dim as integer pitch = SCREEN_W - bitmap->width + + dim as uinteger ptr p = cptr(uinteger ptr, screenptr()) + (y * SCREEN_W) + x + + while (h > 0) + dim as integer w = bitmap->width + while (w > 0) + '' Doing alpha blending here + #define MASK_RB_32 &h00FF00FF + #define MASK_G_32 &h0000FF00 + + dim as uinteger srb = col and MASK_RB_32 + dim as uinteger sg = col and MASK_G_32 + + dim as uinteger dcol = p[0] + dim as uinteger drb = dcol and MASK_RB_32 + dim as uinteger dg = dcol and MASK_G_32 + + dim as integer alpha = source[0] + srb = ((srb - drb) * alpha) shr 8 + sg = ((sg - dg) * alpha) shr 8 + + *p = ((drb + srb) and MASK_RB_32) or ((dg + sg) and MASK_G_32) + + p += 1 + source += 1 + w -= 1 + wend + + h -= 1 + p += pitch + wend +end sub + +function print_text _ + ( _ + byval x as integer, _ + byval y as integer, _ + byref text as string, _ + byval font as FT_Face, _ + byval size as integer, _ + byval col as uinteger _ + ) as integer + + '' Get rid of any alpha channel + col = (col shl 8) shr 8 + + '' Set font size + if (FT_Set_Pixel_Sizes(font, size, size) <> 0) then + return 0 + end if + pixelsize = size + + '' Draw each character + dim as FT_GlyphSlot slot = font->glyph + dim as integer penx = x + dim as integer peny = y + + for i as integer = 0 to len(text) - 1 + '' Load character index + dim as FT_UInt index = FT_Get_Char_Index(font, text[i]) + + '' Load character glyph + if (FT_Load_Glyph(font, index, FT_LOAD_DEFAULT) <> 0) then + return 0 + end if + + '' Render glyph + if (FT_Render_Glyph(font->glyph, FT_RENDER_MODE_NORMAL) <> 0) then + return 0 + end if + + '' Do clipping + if ((penx + font->glyph->bitmap_left + font->glyph->bitmap.width) > SCREEN_W) then exit for + if ((peny - font->glyph->bitmap_top + font->glyph->bitmap.rows) > SCREEN_H) then exit for + if ((penx + font->glyph->bitmap_left) < 0) then exit for + if ((peny - font->glyph->bitmap_top) < 0) then exit for + + '' Draw the glyph bitmap to the screen + draw_glyph(font, penx + font->glyph->bitmap_left, peny - font->glyph->bitmap_top, col) + + penx += slot->advance.x shr 6 + next + + return -1 +end function + + if (FT_Init_FreeType(@library) <> 0) then + print "FT_Init_FreeType() failed" + sleep + end 1 + end if + + if (FT_New_Face(library, TTF_FONT, 0, @font1) <> 0) then + print "FT_New_Face() failed (font file not found?)" + sleep + end 1 + end if + + screenres SCREEN_W, SCREEN_H, 32 + + for x as integer = 0 to (SCREEN_W - 1) + for y as integer = 0 to (SCREEN_H - 1) + pset (x, y), x xor y + next + next + + randomize(timer()) + + for x as integer = 1 to 20 + print_text(rnd() * 200, rnd() * 180 + 20, _ + "Hello World!", font1, _ + rnd() * 22 + 10, _ + rgb(rnd() * 255, rnd() * 255, rnd() * 255)) + next + + sleep +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgd.wakka b/fbdocs/manual/cache/ExtLibgd.wakka index b72e74d704..5dedc978ae 100644 --- a/fbdocs/manual/cache/ExtLibgd.wakka +++ b/fbdocs/manual/cache/ExtLibgd.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="GD"}}---- -Open source code library for the dynamic creation of images by programmers. +Bibliothèque "code source libre" pour la création dynamique d'images par les programmeurs. -Website: http://www.libgd.org -Platforms supported: Win32, Linux -Headers to include: gd/gd.bi +Site Web: http://www.libgd.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: gd/gd.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgdsl.wakka b/fbdocs/manual/cache/ExtLibgdsl.wakka index 704a36cd1a..27c7a56bc3 100644 --- a/fbdocs/manual/cache/ExtLibgdsl.wakka +++ b/fbdocs/manual/cache/ExtLibgdsl.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="GDSL, The Generic Data Structures Library"}}---- -The Generic Data Structures Library is a collection of routines for generic data structures. +La bibliothèque de structures de données génériques est une collection de routines pour les structures de données génériques. Website: http://directory.fsf.org/All_Packages_in_Directory/GDSL.html -Platforms supported: Win32, Linux, DOS -Headers to include: gdsl/gdsl.bi +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: gdsl/gdsl.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgiflib.wakka b/fbdocs/manual/cache/ExtLibgiflib.wakka index b741f10d3b..79788c8d87 100644 --- a/fbdocs/manual/cache/ExtLibgiflib.wakka +++ b/fbdocs/manual/cache/ExtLibgiflib.wakka @@ -1,11 +1,11 @@ -{{fbdoc item="title" value="GIFLIB"}} ----- +{{fbdoc item="title" value="GIFLIB"}}---- +GIFLIB est un ensemble d'outils portables et une bibliothèque de routines pour travailler avec des images GIF. -GIFLIB is a package of portable tools and library routines for working with GIF images +Site Web: http://giflib.sourceforge.net/doc/ -Website: [[http://giflib.sourceforge.net/doc/]] -Platforms supported: Win32 (needs GIFLIB4.DLL), Linux, DOS(?) -Headers to include: gif_lib.bi +Plates-formes supportées: Win32 (a besoin de GIFLIB4.DLL), Linux, DOS(?) +En-têtes à inclure: gif_lib.bi +Exemple inclus: OUI Example included: YES {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgmp.wakka b/fbdocs/manual/cache/ExtLibgmp.wakka index 4ca165a495..2407589b7e 100644 --- a/fbdocs/manual/cache/ExtLibgmp.wakka +++ b/fbdocs/manual/cache/ExtLibgmp.wakka @@ -1,11 +1,27 @@ {{fbdoc item="title" value="gmp, The GNU Multiple Precision Arithmetic Library"}}---- -Free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. +Bibliothèque libre pour l'arithmétique en précision arbitraire, opérations sur les entiers signés, nombres rationnels et nombres à virgule flottante. Website: http://www.gmplib.org -Platforms supported: Win32, Linux -Headers to include: gmp.bi -Example Usage: yes, in examples/libraries/GMP/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: gmp.bi +Exemple: oui, dans examples/libraries/GMP/ +{{fbdoc item="filename" value="examples/manual/libraries/gmp.bas"}}%%(freebasic) +#include once "gmp.bi" + +dim as mpz_ptr bignum = allocate(sizeof(__mpz_struct)) +mpz_init_set_si(bignum, 2) +mpz_pow_ui(bignum, bignum, 65536) + +print "2^65536 = "; +dim as zstring ptr s = mpz_get_str(0, 10, bignum) +print *s; +deallocate(s) +print + +mpz_clear(bignum) +deallocate(bignum) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibgrx.wakka b/fbdocs/manual/cache/ExtLibgrx.wakka index e5cf8b734a..8a31f10abc 100644 --- a/fbdocs/manual/cache/ExtLibgrx.wakka +++ b/fbdocs/manual/cache/ExtLibgrx.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="GRX"}}---- -2D graphics library +Bibliothèque graphique 2D. -Website: http://grx.gnu.de/ -Platforms supported: Win32, Linux, DOS -Headers to include: grx/grx20.bi +Site Web: http://grx.gnu.de/ +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: grx/grx20.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgsl.wakka b/fbdocs/manual/cache/ExtLibgsl.wakka index 09fd4bb195..0a04e81d00 100644 --- a/fbdocs/manual/cache/ExtLibgsl.wakka +++ b/fbdocs/manual/cache/ExtLibgsl.wakka @@ -1,11 +1,56 @@ {{fbdoc item="title" value="gsl, The GNU Scientific Library"}}---- -Provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. +Fournit un large éventail de routines mathématiques telles que les générateurs de nombres aléatoires, les fonctions spéciales et la méthode des moindres carrés. Website: http://www.gnu.org/software/gsl/ -Platforms supported: Win32, Linux -Headers to include: gsl/*.bi -Example Usage: yes, in examples/libraries/GSL/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: gsl/*.bi +Exemple: oui, dans examples/libraries/GSL/ +{{fbdoc item="filename" value="examples/manual/libraries/gsl1.bas"}}%%(freebasic) +'' Elementary math example +#include "gsl/gsl_math.bi" -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +'' Raise the value of 3.141 to the fourth power +? "3.141 ^ 4 = "; gsl_pow_4(3.141) +? + +'' Find the hypotenuse of a right triangle with sides 3 and 4 +? "The hypotenuse of a right triangle with sides of length 3 and 4 is"; gsl_hypot(3,4) +? + +sleep +%% + +{{fbdoc item="filename" value="examples/manual/libraries/gsl2.bas"}}%%(freebasic) +'' Matrix example +#include "gsl/gsl_matrix.bi" + +'' gsl uses the c-style row major order, unlike VB or Fortran +? "A 3x3 matrix" +dim as gsl_matrix ptr m = gsl_matrix_alloc(3, 3) +for i as integer = 0 to 2 + for j as integer = 0 to 2 + gsl_matrix_set (m, i, j, 0.23 + 100*i + j) + next +next + +for i as integer = 0 to 2 + for j as integer = 0 to 2 + print "m(";i;",";j;") = "; gsl_matrix_get (m, i, j) + next +next +? + +gsl_matrix_transpose(m) + +? "And its transpose" +for i as integer = 0 to 2 + for j as integer = 0 to 2 + print "m(";i;",";j;") = "; gsl_matrix_get (m, i, j) + next +next + +sleep +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibgtk.wakka b/fbdocs/manual/cache/ExtLibgtk.wakka index c102dc92a7..d4a74ecb33 100644 --- a/fbdocs/manual/cache/ExtLibgtk.wakka +++ b/fbdocs/manual/cache/ExtLibgtk.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="GTK+, The GIMP ToolKit"}}---- -Cross-platform Graphical User Interface library +Bibliothèque graphique multiplate-forme, interface utilisateur. -Website: http://www.gtk.org -Platforms supported: Win32, Linux -Headers to include: gtk/gtk.bi -Example Usage: yes, in examples/libraries/Gtk/ +Site Web: http://www.gtk.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: gtk/gtk.bi +Exemple d'utilisation: oui, dans examples/libraries/Gtk/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibjapi.wakka b/fbdocs/manual/cache/ExtLibjapi.wakka index 997c88158f..3057c2423f 100644 --- a/fbdocs/manual/cache/ExtLibjapi.wakka +++ b/fbdocs/manual/cache/ExtLibjapi.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Java Application Programming Interface"}}---- -Open source free software GUI toolkit using Java's AWT Toolkit +Boîte à outils GUI "code source libre" utilisant la boîte à outils Java AWT. -Website: http://www.japi.de/ -Platforms supported: Win32, Linux -Headers to include: japi.bi +Site Web: http://www.japi.de/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: japi.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibjni.wakka b/fbdocs/manual/cache/ExtLibjni.wakka index 4ef9d20086..539fd0e3d2 100644 --- a/fbdocs/manual/cache/ExtLibjni.wakka +++ b/fbdocs/manual/cache/ExtLibjni.wakka @@ -1,9 +1,52 @@ {{fbdoc item="title" value="JNI, The Java Native Interface"}}---- -Standard programming interface for writing Java native methods and embedding the Java virtual machine* into native applications. +Interface de programmation standard pour écrire des méthodes Java natif et intégrant la machine virtuelle Java * en applications natives. Website: http://java.sun.com/j2se/1.4.2/docs/guide/jni/ -Platforms supported: Win32, Linux -Headers to include: jni.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: jni.bi +{{fbdoc item="ex"}} + + Three files: + + - ##mylib.bas## - A DLL writting in ""FreeBASIC"" + + {{fbdoc item="filename" value="examples/manual/libraries/jni/mylib.bas"}}%%(freebasic) +#include "jni.bi" + +'' Note: The mangling must be "windows-ms" or the JRE won't find any function +extern "windows-ms" + function Java_MyLib_add( env as JNIEnv ptr, obj as jobject, l as jint, r as jint ) as jint export + return l + r + end function +end extern%% + + - ##Mylib.java## - The Java class that represents the interface to the ""FreeBASIC"" code and ensures the ""FreeBASIC"" DLL is loaded + + {{fbdoc item="filename" value="examples/manual/libraries/jni/Mylib.java"}}%%(cpp) +class MyLib { + public native int add( int l, int r ); + static { + System.loadLibrary( "mylib" ); + } +} +%% + + - ##Test.java## - The Java main() that uses the Mylib class + + {{fbdoc item="filename" value="examples/manual/libraries/jni/mylib.bas"}}%%(cpp) +class Test { + public static void main(String[] args) { + MyLib lib = new MyLib(); + System.out.println( "2+2=" + lib.add( 2, 2 ) ); + } +} +%% + + Steps to test it: + + - //Compile the ""FreeBASIC"" DLL:// ##fbc mylib.bas -dll## + - //Compile the two Java classes:// ##javac Mylib.java Test.java## + - //Run the ##Test## class:// ##java Test## {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibjpeglib.wakka b/fbdocs/manual/cache/ExtLibjpeglib.wakka index 4ed34ffb0f..8e65f8e7b6 100644 --- a/fbdocs/manual/cache/ExtLibjpeglib.wakka +++ b/fbdocs/manual/cache/ExtLibjpeglib.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="jpeglib"}}---- -Cross-platform library for reading/writing jpeg images +Bibliothèque multi-plateforme pour la lecture/écriture des images jpeg. -Website: http://www.ijp.org -Platforms supported: Win32, Linux -Headers to include: jpeglib.bi -Example Usage: yes, in examples/gfx/jpeg_read.bas +Site Web: http://www.ijp.org +Plates-formes supportées: Win32, Linux +En-têtes à inclure: jpeglib.bi +Exemple d'utilisation: oui, dans examples/gfx/jpeg_read.bas {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibjpgalleg.wakka b/fbdocs/manual/cache/ExtLibjpgalleg.wakka index 440a581386..3bab6583a4 100644 --- a/fbdocs/manual/cache/ExtLibjpgalleg.wakka +++ b/fbdocs/manual/cache/ExtLibjpgalleg.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="JPGAlleg"}}---- -JPGalleg is a small addon for Allegro that adds JPG images handling capabilities to the library +JPGalleg est un petit module complémentaire qui ajoute des capacités de traitement des images JPG à la bibliothèque Allegro. -Website: http://www.ecplusplus.com/index.php?page=projects&pid=1 -Platforms supported: Win32, Linux -Headers to include: jpgalleg.bi +Site Web: http://www.ecplusplus.com/index.php?page=projects&pid=1 +Plates-formes supportées: Win32, Linux +En-têtes à inclure: jpgalleg.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLiblibpng.wakka b/fbdocs/manual/cache/ExtLiblibpng.wakka index 3395cae33b..fba46b3a5b 100644 --- a/fbdocs/manual/cache/ExtLiblibpng.wakka +++ b/fbdocs/manual/cache/ExtLiblibpng.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="libPNG"}}---- -Allows reading and writing PNG images. +Permet la lecture et l'écriture des images PNG. -Website: http://www.libpng.org/pub/png/libpng.html -Platforms supported: Win32, Linux -Headers to include: png.bi +Site Web: http://www.libpng.org/pub/png/libpng.html +Plates-formes supportées: Win32, Linux +En-têtes à inclure: png.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLiblibxml.wakka b/fbdocs/manual/cache/ExtLiblibxml.wakka index ee9d8e4fb1..45c82c2cbc 100644 --- a/fbdocs/manual/cache/ExtLiblibxml.wakka +++ b/fbdocs/manual/cache/ExtLiblibxml.wakka @@ -1,9 +1,50 @@ {{fbdoc item="title" value="libxml"}}---- -De-facto standard library for accessing xml files. +Bibliothèque standard pour accéder à des fichiers XML. Website: http://xmlsoft.org/ -Platforms supported: Win32, Linux -Headers to include: libxml/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: libxml/ +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/"}}%%(freebasic) +#include once "libxml/xmlreader.bi" +#define NULL 0 + +dim as string filename = command(1) +if( len( filename ) = 0 ) then + print "Usage: libxml filename" + end 1 +end if + +dim as xmlTextReaderPtr reader = xmlReaderForFile( filename, NULL, 0 ) +if (reader = NULL) then + print "Unable to open "; filename + return +end if + +dim as integer ret = xmlTextReaderRead( reader ) +do while( ret = 1 ) + dim as zstring ptr constname = xmlTextReaderConstName( reader ) + dim as zstring ptr value = xmlTextReaderConstValue( reader ) + + print xmlTextReaderDepth( reader ); _ + xmlTextReaderNodeType( reader ); _ + " "; *constname; _ + xmlTextReaderIsEmptyElement(reader); _ + xmlTextReaderHasValue( reader ); _ + *value + + ret = xmlTextReaderRead( reader ) +loop + +xmlFreeTextReader( reader ) + +if( ret <> 0 ) then + print "failed to parse: "; filename +end if + +xmlCleanupParser( ) +xmlMemoryDump() +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLiblibxslt.wakka b/fbdocs/manual/cache/ExtLiblibxslt.wakka index b6a54aa74d..d9201b4b92 100644 --- a/fbdocs/manual/cache/ExtLiblibxslt.wakka +++ b/fbdocs/manual/cache/ExtLiblibxslt.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="libxslt"}}---- -XSLT itself is a an XML language to define transformation for XML. +XSLT est lui-même un langage XML pour définir une transformation pour XML. Website: http://xmlsoft.org/XSLT/ -Platforms supported: Win32, Linux -Headers to include: libxslt/libxslt.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: libxslt/libxslt.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibmxml.wakka b/fbdocs/manual/cache/ExtLibmxml.wakka index af3bf264c0..20292bc76a 100644 --- a/fbdocs/manual/cache/ExtLibmxml.wakka +++ b/fbdocs/manual/cache/ExtLibmxml.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="mxml"}}---- -Mini-XML is a small XML parsing library that you can use to read XML and XML-like data files in your application without requiring large non-standard libraries. +Mini-XML est une petite bibliothèque d'analyse XML que vous pouvez utiliser pour lire des fichiers de données du XML et équivalent-XML dans votre application sans nécessiter de grandes bibliothèques non standard. Website: http://www.easysw.com/~mike/mxml/ -Platforms supported: Win32, Linux -Headers to include: mxml.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: mxml.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibmysql.wakka b/fbdocs/manual/cache/ExtLibmysql.wakka index 727d6d8fe8..78f9f5a8ef 100644 --- a/fbdocs/manual/cache/ExtLibmysql.wakka +++ b/fbdocs/manual/cache/ExtLibmysql.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="MySQL"}}---- -High-Quality, widely used database engine. +Moteur de la base de données, de haute qualité, largement utilisé. Website: http://www.mysql.org -Platforms supported: Win32, Linux -Headers to include: mysql/mysql.bi -Example Usage: yes, in examples/libraries/DB/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: mysql/mysql.bi +Exemple: oui, dans examples/libraries/DB/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibnewton.wakka b/fbdocs/manual/cache/ExtLibnewton.wakka index 68e0152f83..fdeb501135 100644 --- a/fbdocs/manual/cache/ExtLibnewton.wakka +++ b/fbdocs/manual/cache/ExtLibnewton.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Newton"}}---- -Integrated solution for real time simulation of physics environments. +Une solution intégrée pour la simulation en temps réel des environnements physiques. Website: http://newtondynamics.com/ -Platforms supported: Win32, Linux -Headers to include: Newton.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: Newton.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibode.wakka b/fbdocs/manual/cache/ExtLibode.wakka index 1fb08a2d5b..141512f2e8 100644 --- a/fbdocs/manual/cache/ExtLibode.wakka +++ b/fbdocs/manual/cache/ExtLibode.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="ODE"}}---- -Open source, high performance library for simulating rigid body dynamics. +Une bibliothèque Open source, de haute performance pour la simulation dynamique des corps rigides. Website: http://www.ode.org/ -Platforms supported: Win32, Linux -Headers to include: ode/ode.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: ode/ode.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibpcre.wakka b/fbdocs/manual/cache/ExtLibpcre.wakka index 170cc4072c..8b6acab53d 100644 --- a/fbdocs/manual/cache/ExtLibpcre.wakka +++ b/fbdocs/manual/cache/ExtLibpcre.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="pcre, Perl Compatible Regular Expressions"}}---- -Consists of a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. +Se compose d'un ensemble de fonctions qui mettent en oeuvre le modèle d'expression régulière correspondant utilisant la même syntaxe et sémantique que Perl 5. Website: http://www.pcre.org -Platforms supported: Win32, Linux -Headers to include: pcre/pcre.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: pcre/pcre.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibpdflib.wakka b/fbdocs/manual/cache/ExtLibpdflib.wakka index 856d35e2e7..b8930e722c 100644 --- a/fbdocs/manual/cache/ExtLibpdflib.wakka +++ b/fbdocs/manual/cache/ExtLibpdflib.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="PDFlib"}}---- -PDFlib is a development tool for PDF-enabling your software +PDFlib est un outil de développement qui permet à votre logiciel l'utilisation de PDF. -Website: http://www.pdflib.com -Platforms supported: Win32, Linux -Headers to include: pdflib.bi +Site Web: http://www.pdflib.com +Plates-formes supportées: Win32, Linux +En-têtes à inclure: pdflib.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibpostgresql.wakka b/fbdocs/manual/cache/ExtLibpostgresql.wakka index 163899ecc3..d439c41b18 100644 --- a/fbdocs/manual/cache/ExtLibpostgresql.wakka +++ b/fbdocs/manual/cache/ExtLibpostgresql.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="PostgreSQL"}}---- -Free software object-relational database management system +Logiciel libre système de gestion objet-relationnel de base de données Website: http://www.postgresql.org/ -Platforms supported: Win32, Linux -Headers to include: postgresql/postgres_ext.bi -Example Usage: yes, in examples/libraries/DB/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: postgresql/postgres_ext.bi +Exemple: oui, dans examples/libraries/DB/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibquicklz.wakka b/fbdocs/manual/cache/ExtLibquicklz.wakka index 1aa8874da4..67514f1713 100644 --- a/fbdocs/manual/cache/ExtLibquicklz.wakka +++ b/fbdocs/manual/cache/ExtLibquicklz.wakka @@ -1,10 +1,125 @@ {{fbdoc item="title" value="QuickLZ"}}---- -Cross-platform fast compression library +Bibliothèque multiplate-forme de compression rapide Website: http://www.quicklz.com -Platforms supported: Win32, Linux, DOS -Headers to include: quicklz.bi -Example Usage: yes, in examples/libraries/quicklz/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: quicklz.bi + +Exemple: oui, dans examples/libraries/quicklz/ +{{fbdoc item="filename" value="examples/manual/libraries/quicklz.bas"}}%%(freebasic) +'Real World Demonstration Program for the QuickLZ compression library: +'A command line file compression tool. + +#include "quicklz.bi" + +declare sub PrintUsage() +declare sub CompressFile( byref infile as string, byref outfile as string ) +declare sub DecompressFile( byref infile as string, byref outfile as string ) + +if len(command(1)) <> 1 then PrintUsage() +if len(command(2)) = 0 then PrintUsage() +if len(command(3)) = 0 then PrintUsage() + +select case lcase(command(1)) +case "c" + CompressFile( command(2), command(3) ) +case "d" + DeCompressFile( command(2), command(3) ) +case else + PrintUsage() +end select + +sub CompressFile( byref infile as string, byref outfile as string ) + dim as ubyte ptr inBuffer, outBuffer + dim as uinteger CSize, FSize + dim as integer FF + + FF = freefile() + if open(infile for binary access read as #FF) <> 0 then + print "Unable to open file for input" + end 2 + end if + + FSize = lof(FF) + inBuffer = allocate(FSize) + outBuffer = allocate(QLZ_BUFFER_SIZE(FSize)) + + get #FF, , *inBuffer, FSize + close #FF + + CSize = qlz_compress(inBuffer, outBuffer, FSize) + if CSize = 0 then + print "Compression failed!" + end 3 + end if + + FF = freefile() + if open(outfile for binary access write as #FF) <> 0 then + print "Unable to write compressed data!" + end 4 + end if + + put #FF, ,*outBuffer, CSize + close #FF + + deallocate(inBuffer) + deallocate(outBuffer) + + print "Uncompressed file: " & FSize & " bytes" + print "Compressed file: " & CSize & " bytes" + print "Difference: " & cint(CSize - FSize) & " bytes" +End Sub + +sub DecompressFile( byref infile as string, byref outfile as string ) + dim as ubyte ptr inBuffer, outBuffer + dim as uinteger CSize, FSize + dim as ubyte FF + + FF = freefile() + if open(infile for binary access read as #FF) <> 0 then + print "Unable to open compressed file for input" + end 5 + end if + + FSize = lof(FF) + inBuffer = allocate(FSize) + get #FF, , *inBuffer, FSize + + close #FF + + outBuffer = allocate(qlz_size_decompressed(inBuffer)) + + CSize = qlz_decompress(inBuffer, outBuffer) + if CSize = 0 then + print "Decompression failed, or uncompressed file is empty!" + end 6 + end if + + FF = freefile() + if open(outfile for binary access write as #FF) <> 0 then + print "Unable to write uncompressed data!" + end 7 + end if + + put #FF, ,*outBuffer, CSize + close #FF + + deallocate(inBuffer) + deallocate(outBuffer) + + print "Compressed file: " & FSize & " bytes" + print "Uncompressed file: " & CSize & " bytes" + print "Difference: " & cint(CSize - FSize) & " bytes" +End Sub + +sub PrintUsage() + print "QuickLZ 1.20 Demonstration Program" + print "Usage: qlz {c|d} infile outfile" + print "c flag is for compression" + print "d flag is for decompression" + end 1 +End Sub +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibspidermonkey.wakka b/fbdocs/manual/cache/ExtLibspidermonkey.wakka index 19e8a30ced..68218431d3 100644 --- a/fbdocs/manual/cache/ExtLibspidermonkey.wakka +++ b/fbdocs/manual/cache/ExtLibspidermonkey.wakka @@ -1,9 +1,131 @@ {{fbdoc item="title" value="SpiderMonkey"}}---- -Embeddable javascript engine. +Moteur JavaScript intégrable. Website: http://www.mozilla.org/js/spidermonkey/ -Platforms supported: Win32, Linux -Headers to include: spidermonkey/jsapi.bi +Plates-formes supportées: Win32, Linux +En-têtes à inclure: spidermonkey/jsapi.bi +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/libraries/spidermonkey1.bas"}}%%(freebasic) +'' Evaluating javascript code +#include once "spidermonkey/jsapi.bi" + +dim shared as JSClass global_class = _ +( _ + @"global", 0, _ + @JS_PropertyStub, @JS_PropertyStub, @JS_PropertyStub, @JS_PropertyStub, _ + @JS_EnumerateStub, @JS_ResolveStub, @JS_ConvertStub, @JS_FinalizeStub _ +) + +dim as JSRuntime ptr rt = JS_NewRuntime(1048576 /'memory limit'/) +dim as JSContext ptr cx = JS_NewContext(rt, 4096 /'stack size'/) +dim as JSObject ptr global = JS_NewObject(cx, @global_class, NULL, NULL) + +JS_InitStandardClasses(cx, global) + +'' This string could also be read in from a file or as part of HTTP data etc. +const TEST_SCRIPT = _ + !"function fact(n) \n" + _ + !"{ \n" + _ + !" if (n <= 1) \n" + _ + !" return 1; \n" + _ + !" \n" + _ + !" return n * fact(n - 1);\n" + _ + !"} \n" + _ + !" \n" + _ + !" fact(5) \n" + +dim as jsval rval +if (JS_EvaluateScript(cx, global, TEST_SCRIPT, len(TEST_SCRIPT), "localhost", 1, @rval) = 0) then + print "JS_EvaluateScript failed" + sleep + end 1 +end if + +print "result: " & *JS_GetStringBytes(JS_ValueToString(cx, rval)) + +JS_DestroyContext(cx) +JS_DestroyRuntime(rt) +%% + +{{fbdoc item="filename" value="examples/manual/libraries/spidermonkey2.bas"}}%%(freebasic) +'' Callback example: Functions that are used by the Javascript code, +'' but are implemented in FB. +#include once "spidermonkey/jsapi.bi" + +dim shared as JSClass global_class = _ +( _ + @"global", 0, _ + @JS_PropertyStub, @JS_PropertyStub, @JS_PropertyStub, @JS_PropertyStub, _ + @JS_EnumerateStub, @JS_ResolveStub, @JS_ConvertStub, @JS_FinalizeStub _ +) + +private function print_callback cdecl _ + ( _ + byval cx as JSContext ptr, _ + byval obj as JSObject ptr, _ + byval argc as uintN, _ + byval argv as jsval ptr, _ + byval rval as jsval ptr _ + ) as JSBool + + if (argc < 1) then + return 0 + end if + + print *JS_GetStringBytes(JS_ValueToString(cx, argv[0])) + + return 1 +end function + +private function ucase_callback cdecl _ + ( _ + byval cx as JSContext ptr, _ + byval obj as JSObject ptr, _ + byval argc as uintN, _ + byval argv as jsval ptr, _ + byval rval as jsval ptr _ + ) as JSBool + + if (argc < 1) then + return 0 + end if + + '' Get the first argument + dim as zstring ptr arg1 = JS_GetStringBytes(JS_ValueToString(cx, argv[0])) + + '' Get a buffer for the result string + dim as zstring ptr result = JS_malloc(cx, len(*arg1) + 1) + + '' Do the work + *result = ucase(*arg1) + + '' Return it in rval + *rval = STRING_TO_JSVAL(JS_NewString(cx, result, len(*result))) + + return 1 +end function + + dim as JSRuntime ptr rt = JS_NewRuntime(1048576 /'memory limit'/) + dim as JSContext ptr cx = JS_NewContext(rt, 4096 /'stack size'/) + dim as JSObject ptr global = JS_NewObject(cx, @global_class, NULL, NULL) + + JS_InitStandardClasses(cx, global) + + JS_DefineFunction(cx, global, "print", @print_callback, 1, 0) + JS_DefineFunction(cx, global, "ucase", @ucase_callback, 1, 0) + + const TEST_SCRIPT = "print(ucase('hello'));" + + dim as jsval rval + if (JS_EvaluateScript(cx, global, TEST_SCRIPT, len(TEST_SCRIPT), "localhost", 1, @rval) = 0) then + print "JS_EvaluateScript failed" + sleep + end 1 + end if + + JS_DestroyContext(cx) + JS_DestroyRuntime(rt) +%% {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibsqlite.wakka b/fbdocs/manual/cache/ExtLibsqlite.wakka index 4c0b628c87..89b1aa01b4 100644 --- a/fbdocs/manual/cache/ExtLibsqlite.wakka +++ b/fbdocs/manual/cache/ExtLibsqlite.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="SQLite"}}---- -Small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. +Petite bibliothèque C qui implémente un moteur de base de données SQL autonome, embarquable, zéro configuration. Website: http://sqlite.org -Platforms supported: Win32, Linux, DOS -Headers to include: sqlite2.bi or sqlite3.bi depending on version of library used. -Example Usage: yes, in examples/libraries/DB/ +Plates-formes supportées: Win32, Linux +En-têtes à inclure: sqlite2.bi or sqlite3.bi depending on version of library used. +Exemple: oui, dans examples/libraries/DB/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibtinyptc.wakka b/fbdocs/manual/cache/ExtLibtinyptc.wakka index 71b9bbc4ce..b02ccd63e5 100644 --- a/fbdocs/manual/cache/ExtLibtinyptc.wakka +++ b/fbdocs/manual/cache/ExtLibtinyptc.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="TinyPTC"}}---- -A small and easy to use framebuffer graphics library. +Une petite bibliothèque graphique permettant l'utilisation facile du tampon vidéo. -Website: http://sourceforge.net/projects/tinyptc/ -Platforms supported: Win32, Linux, DOS -Headers to include: tinyptc.bi +Site Web: http://sourceforge.net/projects/tinyptc/ +Plates-formes supportées: Win32, Linux, DOS +En-têtes à inclure: tinyptc.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibtre.wakka b/fbdocs/manual/cache/ExtLibtre.wakka index 155974f9f5..b31f488fcb 100644 --- a/fbdocs/manual/cache/ExtLibtre.wakka +++ b/fbdocs/manual/cache/ExtLibtre.wakka @@ -1,9 +1,8 @@ {{fbdoc item="title" value="tre"}}---- -Lightweight, robust, and efficient POSIX compliant regexp matching library +Bibliothèque regexp correspondance POSIX compatible, légère, robuste et efficace Website: http://laurikari.net/tre/index.html -Platforms supported: Win32, Linux -Headers to include: regex.bi - +Plates-formes supportées: Win32, Linux +En-têtes à inclure: regex.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibwindows.wakka b/fbdocs/manual/cache/ExtLibwindows.wakka index dba34ecac3..d3cbdda185 100644 --- a/fbdocs/manual/cache/ExtLibwindows.wakka +++ b/fbdocs/manual/cache/ExtLibwindows.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Windows API"}}---- -Standard API for all Windows Systems +API standard pour tous les systèmes Windows Website: http://msdn2.microsoft.com/en-us/library/aa383750.aspx -Platforms supported: Win32, Linux (using WINE) -Headers to include: windows.bi +Plates-formes supportées: Win32, Linux (en utilisant WINE) +En-têtes à inclure: windows.bi {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ExtLibwxc.wakka b/fbdocs/manual/cache/ExtLibwxc.wakka index d911e81ecb..792818173a 100644 --- a/fbdocs/manual/cache/ExtLibwxc.wakka +++ b/fbdocs/manual/cache/ExtLibwxc.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="wx-c, C Interface for WxWidgets"}}---- -Cross-platform Graphical User Interface library +Bibliothèque graphique d'interface utilisateur multiplate-forme. -Website: http://wxc.sourceforge.net -Platforms supported: Win32, Linux -Headers to include: wx-c/wx.bi -Example Usage: yes, in examples/libraries/wx-c/ +Site Web: http://wxc.sourceforge.net +Plates-formes supportées: Win32, Linux +En-têtes à inclure: wx-c/wx.bi +Exemple d'utilisation: oui, dans examples/libraries/wx-c/ {{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} diff --git a/fbdocs/manual/cache/ExtLibzlib.wakka b/fbdocs/manual/cache/ExtLibzlib.wakka index 032e66ce34..f3994ce6a1 100644 --- a/fbdocs/manual/cache/ExtLibzlib.wakka +++ b/fbdocs/manual/cache/ExtLibzlib.wakka @@ -1,12 +1,89 @@ {{fbdoc item="title" value="zlib"}}---- -Lostless data compression library using the Deflate algorithm unencumbered by patents. +Bibliothèque de compression de données sans perte en utilisant l'algorithme Deflate non grevé par des brevets. Website: http://www.zlib.net Platforms supported: Win32, Linux, DOS -Headers to include: zlib.bi -Example Usage: - - Included, see in: examples/libraries/compress/ - - Simple PNG save&load code see: http://www.freebasic.net/forum/viewtopic.php?t=3936 +En-têtes à inclure: zlib.bi -{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} - +Exemple d'utilisation: + - Inclus, voir: examples/libraries/compress/ + + - Simple sauvegarde/chargement code PNG voir: http://www.freebasic.net/forum/viewtopic.php?t=3936 + {{fbdoc item="filename" value="examples/manual/libraries/zlib.bas"}}%%(freebasic) +'' Zlib compress/decompress example, by yetifoot + +#include once "zlib.bi" + +Dim As Integer errlev + +'' This is the size of our test data in bytes. +Dim As Integer src_len = 100000 + +Print "ZLib test - Version " & *zlibVersion() +Print +Print "Test data size : " & src_len & " bytes." + +'' The size of the destination buffer for the compressed data is calculated by +'' the compressBound function. +Dim As Integer dest_len = compressBound(src_len) + +'' Allocate our needed memory. +Dim As Ubyte Ptr src = Allocate(src_len) +Dim As Ubyte Ptr dest = Allocate(dest_len) + +'' Fill the src buffer with random, yet still compressable data. +For i As Integer = 0 To src_len - 1 + src[i] = Rnd * 4 +Next + +'' Store the crc32 checksum of the input data, so we can check if the +'' uncompression has worked. +Dim As Uinteger crc = crc32(0, src, src_len) + +'' Perform the compression. dest_len is passed as its address, because when +'' the function returns it will contain the size of the compressed data. +errlev = compress(dest, @dest_len, src, src_len) +If errlev <> 0 Then + '' If the function returns a value other than 0 then an error occured. + Print "**** Error during compress - code " & errlev & " ****" +End If +Print "Compressed to : " & dest_len & " bytes." + +'' NOTE: in normal use in a program, you would store the src_len, in order to +'' be able to tell uncompress the output size. However in this example we can +'' just leave it in src_len. The same goes for dest_len, which is the compressed +'' datas size. + +'' Wipe the src buffer before we uncompress to it, so that we can check if the +'' decompression has worked. +For i As Integer = 0 To src_len - 1 + src[i] = 0 +Next + +'' Perform a decompression. This time we uncompress the data back to src. +'' src_len is passed as its address, because when +'' the function returns it will contain the size of the uncompressed data. +errlev = uncompress(src, @src_len, dest, dest_len) +If errlev <> 0 Then + '' If the function returns a value other than 0 then an error occured. + Print "**** Error during uncompress - code " & errlev & " ****" +End If +Print "Uncompressed to : " & src_len & " bytes." + +'' Make sure the checksum of the uncompressed data matches our original data. +If crc <> crc32(0, src, src_len) Then + Print "crc32 checksum : FAILED" +Else + Print "crc32 checksum : PASSED" +End If + +'' Free the buffers used in the test. +DeAllocate(src) +DeAllocate(dest) + +Print +Print "Press any key to end . . . " +Sleep +%% + +{{fbdoc item="back" value="ExtLibTOC|External Library Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/FMod.wakka b/fbdocs/manual/cache/FMod.wakka index 6c33b06d31..d3fa695be0 100644 --- a/fbdocs/manual/cache/FMod.wakka +++ b/fbdocs/manual/cache/FMod.wakka @@ -1,4 +1,4 @@ -FMod is a 3d sound and music library. Though its license is strange, it works acceptably for playing sounds, and it nicely encapsulates 3D sound. +{{fbdoc item="title" value="FMod"}}---- -Related: --[[TutUsingLibs Using libraries in FreeBASIC]] //by SJ Zero \ No newline at end of file +FMod est une bibliothèque musicale et son 3D. Bien que sa licence soit étrange, elle fonctionne de façon acceptable pour jouer des sons et il rend joliment le son 3D. +Relation: \ No newline at end of file diff --git a/fbdocs/manual/cache/FaqDOS.wakka b/fbdocs/manual/cache/FaqDOS.wakka index 73c894af47..818c32da1a 100644 --- a/fbdocs/manual/cache/FaqDOS.wakka +++ b/fbdocs/manual/cache/FaqDOS.wakka @@ -2,259 +2,263 @@ **DOS** -The ""FreeBASIC"" port to DOS is based on the [[http://www.delorie.com/djgpp/ DJGPP]] port of the GNU toolchain to 32-bit protected-mode DOS. +Le portage de FreeBASIC sous DOS est basé sur le portage [[http://www.delorie.com/djgpp/">DJGPP]] de la chaîne d'outils GNU en DOS mode-protége 32-bit. -The current maintainer of this port is [[DrV DrV]]. +Le responsable actuel de ce portage est [[DrV DrV]]. -//To be written: platform-specific information, differences from ""Win32""/Linux, differences from QB?, tutorials, etc. // +//A écrire: information spécifique à la plateforme, les différences Win32/Linux, les différences avec QB, des tutoriels, etc... // -**WANTED TESTERS** +**Nous RECHERCHONS des TESTEURS** -The DOS version/target of ""FreeBASIC"" needs more testers. If you are interested in using ""FreeBASIC"" on DOS, please don't wait for 1.0 release, give it a try now. Tests from running in DOS on both old and new PC's are welcome (graphics, file I/O, serial port, ...). If something doesn't work, please place a detailed bug report into the forum or bug Tracker. If all works well, you can write about your success as well. Make sure to test a recent version of FB (reports from FB older than 0.18 will be probably considered as obsolete and useless), and check this document **before** complaining about anything. +La version/cible DOS de FreeBASIC besoin de plus de testeurs. Si vous êtes intéressé par l'utilisation de FreeBASIC sous DOS, s'il vous plaît, n'attendez pas la version 1.0, essayez-le dès aujourd'hui. Les tests de fonctionnement sous DOS sur les anciens et nouveaux PC sont les bienvenus (graphiques, E/S fichiers, port série, ...). Si quelque chose ne fonctionne pas, s'il vous plaît placez un rapport de bug détaillé dans le forum ou le traqueur de bogues. Si tout fonctionne bien, vous pouvez aussi écrire sur votre succès. Veillez à tester une version récente de FB (les rapports plus anciens que la version 0,18 de FB seront probablement considérés comme obsolètes et inutiles) et d'étudier ce document **avant** de se plaindre de quelque chose. **Limitations** -The DOS target is fairly well working and supported by ""FreeBASIC"", and up-to-date. A few differences compared to other platforms exist, however. The features missing are mostly those not supported by the operating system or DOS extender or C runtime: - - Cross-compiling to an other target +La cible DOS fonctionne correctement et est assez bien soutenue par FreeBASIC et est mise à jour. Quelques différences existent, cependant, par rapport aux autres plates-formes. Les fonctionnalités manquantes sont principalement celles qui ne sont pas prises en charge par le système d'exploitation ou d'extension DOS ou d'exécution C: + - Compilation croisée vers une autre cible - Multithreading (see FAQ 23) - - Graphics in windowed mode or using ""OpenGL"" - - Setting ##[[KeyPgScreenres Screenres]]## to a size not matching any resolution supported by the graphics card - - Unicode isn't supported in DOS, ##[[KeyPgWstring Wstring]]## will be the same as ##[[KeyPgZstring Zstring]]##, character sets other than latin aren't supported. (do it yourself) - - Shared libraries (DLL's) can't be created/used (at least not "easily"), amount of available static external libraries usable with DOS is limited - -**""FreeBASIC"" DOS related questions:** - - ==- {{anchor name="item1|1. FB is a 32-bit compiler - do I need a 32-bit DOS?"}}== - ==- {{anchor name="item2|2. What about FreeDOS-32? Does/will FB work, is/will there be a version?"}}== - ==- {{anchor name="item3|3. When running FreeBASIC in DOS, I get a 'Error: No DPMI' message!"}}== - ==- {{anchor name="item4|4. Is there a possibility how to get rid of this CWSDPMI.EXE and CWSDPMI.SWP?"}}== - ==- {{anchor name="item5|5. Can I use other DOS extenders, like DOS/4GW, Causeway, DOS/32A?"}}== - ==- {{anchor name="item6|6. Where is the nice blue screen with all the ... / where is the IDE?"}}== - ==- {{anchor name="item7|7. How can I view the documentation in CHM or PDF format in DOS?"}}== - ==- {{anchor name="item8|8. How can I write/edit my source code?"}}== - ==- {{anchor name="item9|9. How can I play sound in DOS?"}}== - ==- {{anchor name="item10|10. How can I use USB in DOS?"}}== - ==- {{anchor name="item11|11. How can I use graphics in DOS?"}}== - ==- {{anchor name="item12|12. DEF SEG is missing in FB! How can I workaround this in my code?"}}== - ==- {{anchor name="item13|13. How can I rewrite QB's CALL INTERRUPT / access the DOS and BIOS interrupts?"}}== - ==- {{anchor name="item14|14. How can I rewrite QB's XMS/EMS handling?"}}== - ==- {{anchor name="item15|15. FBC gives me a 'cannot find lsupcxx' error!"}}== - ==- {{anchor name="item16|16. How can I use the serial or parallel port?"}}== - ==- {{anchor name="item17|17. How can I use a printer?"}}== - ==- {{anchor name="item18|18. How can I make a screenshot of a FreeBASIC program running in DOS?"}}== - ==- {{anchor name="item19|19. Graphics mode doesn't work (freeze / black screen / garbage output)!"}}== - ==- {{anchor name="item20|20. Mouse trouble! Mouse doesn't work at all in DOS / arrow 'jumps' / etc. ..."}}== - ==- {{anchor name="item21|21. What about the 64 KiB and 640 KiB problems / how much memory is supported by FB in DOS?"}}== - ==- {{anchor name="item22|22. My program crashes when I try to use more than cca 1 MiB RAM! Is this a bug in FreeBASIC?"}}== - ==- {{anchor name="item23|23. Threading functions are disallowed in DOS? Help!"}}== - ==- {{anchor name="item24|24. Executables made with FB DOS are bloated!"}}== - ==- {{anchor name="item25|25. Compilation is very slow with FB!"}}== - ==- {{anchor name="item26|26. SLEEP doesn't work! How can I cause a delay?"}}== - ==- {{anchor name="item27|27. The performance is very bad in DOS!"}}== - ==- {{anchor name="item28|28. Can I access disk sectors with FB?"}}== - -{{anchor name="item999|See also"}} + - Graphisme en mode fenêtré ou en utilisant OpenGL + - Réglage de ##[[KeyPgScreenres ScreenRes]]## à une taille ne correspondant à aucune résolution prise en charge par la carte graphique + - Unicode n'est pas supporté sous DOS, ##[[KeyPgWstring WString]]## sera le même que ##[[KeyPgZstring ZString]]##, les jeux de caractères autres que latins ne sont pas pris en charge. (faites-le vous-même) +
  • Les bibliothèques partagées (DLL) ne peuvent être créées/utilisées (du moins pas "facilement"), la quantité de bibliothèques externes statiques disponibles et utilisables avec DOS est limitée + +**Questions relatives à FreeBASIC DOS:** + + **- [[#item1">1. FB est un compilateur 32-bit - ai-je besoin d'un DOS 32 bits?]]** + **- [[#item2">2. 2. Qu'en est-il FreeDOS-32? Est-ce que FB fonctionne/era, y-a/aura-t-il une version?]]** + **- [[#item3">3. Quand j'utilise FreeBASIC sous DOS, j'obtiens un message d'erreur 'Error: No DPMI'!]]** + **- [[#item4">4. Est-il possible se débarrasser de ces CWSDPMI.EXE et CWSDPMI.SWP et comment?]]** + **- [[#item5">5. Puis-je utiliser d'autres DOS "extenders", comme DOS/4GW, Causeway, DOS/32A?]]** + **- [[#item6">6. Où est le bel écran bleu avec tous les ... / Où est l'IDE?]]** + **- [[#item7">7. Comment puis-je consulter la documentation au format CHM ou PDF sous DOS?]]** + **- [[#item8">8. Comment puis-je écrire/modifier mon code source?]]** + **- [[#item9">9. Comment puis-je jouer des sons sous DOS?]]** + **- [[#item10">10. Comment puis-je utiliser un port USB sous DOS?]]** + **- [[#item11">11. Comment puis-je utiliser les graphiques sous DOS?]]** + **- [[#item12">12. DEF SEG est manquant dans FB! Comment puis-je contourner ceci dans mon code?]]** + **- [[#item13">13. Comment puis-je réécrire CALL INTERRUPT de QB / l'accès aux interruptions DOS et BIOS?]]** + **- [[#item14">14. Comment puis-je réécrire la gestion XMS/EMS de QB?]]** + **- [[#item15">15. FBC gives me a 'cannot find lsupcxx' error!]]** + **- [[#item16">16. Comment puis-je utiliser le port série ou parallèle?]]** + **- [[#item17">17. Comment puis-je utiliser une imprimante?]]** + **- [[#item18">18. Comment puis-je faire une copie d'écran d'un programme DOS fonctionnant en FreeBASIC?]]** + **- [[#item19">19. Le mode graphique ne fonctionne pas (bloquage écran/écran noir/données incorrectes en sortie )!]]** + **- [[#item20">20. Des ennuis de souris! La souris ne fonctionne pas du tout sous DOS/"sauts" de la flèche/etc...]]** + **- [[#item21">21. Qu'en est-il des problèmes des 64K et 640K / quelle quantité de mémoire FB peut-il gérer sous DOS?]]** + **- [[#item22">22. Mon programme se bloque lorsque je tente d'utiliser plus cca 1 MiB de mémoire RAM! Est-ce un bogue dans FreeBASIC?]]** + **- [[#item23">23. Les fonctions de Threading sont invalides dans DOS? A l'aide!]]** + **- [[#item24">24. Les exécutables faits avec FB DOS sont "gonflés"!]]** + **- [[#item25">25. La compilation est très lente avec FB!]]** + **- [[#item26">26. SLEEP ne fonctionne pas! Comment puis-je provoquer un délai?]]** + **- [[#item27">27. Les performances sont très mauvaises sous DOS!]]** + **- [[#item28">28. Puis-je accéder à des secteurs de disque avec FB?]]** + [[#item999">Voir aussi]] + +
    **Questions relatives à FreeBASIC DOS** + +**1. FB est un compilateur 32-bit - ai-je besoin d'un DOS 32 bits?** +Non, la version DOS de FreeBASIC utilise une extension DOS, vous permettant d'exécuter du code 32 bits sur un noyau 16 bits DOS. Vous pouvez utiliser FreeDOS (16-bit), Enhanced-Dr-DOS, l'ancien D--DOS, ou même MS-DOS jusqu'à la version cca 4. + +**2. Qu'en est-il FreeDOS-32? Est-ce que FB fonctionne/era, y-a/aura-t-il une version?** + +FreeDOS-32 est expérimental au moment de l'écriture, mais il doit exécuter FreeBASIC et les applications génèrées sans aucun changement. Alors que le support de FB DOS fonctionne déjà sur FreeDOS(16), il devrait être prêt aussi pour FreeDOS-32. + **3. Quand j'utilise FreeBASIC sous DOS, j'obtiens un message d'erreur 'Error: No DPMI'!** + +Vous avez besoin d'un hôte DPMI (DPMI noyau, DPMI serveur), cela signifie "CWSDPMI.EXE" (cca 20 KiB) ou HDPMI32.EXE (cca 34 KiB). Voir les exigences et la FAQ 4 pour plus de détails. + **4. Est-il possible se débarrasser de ces CWSDPMI.EXE et CWSDPMI.SWP et comment?** + +Oui, il existe 2 possibilités. Pour vous débarrasser de CWSDPMI.EXE et créez un exécutable DOS autonome embarquant CWSDPMI, vous avez besoin du CWSDPMI paquet et du fichier "EXE2COFF.EXE". En utilisant EXE2COFF, vous supprimez le chargeur CWSDPMI.EXE (le fichier perd 2 Kio de taille, il en résulte en un fichier "COFF" sans extension), puis collez le fichier "CWSDSTUB.EXE" avant ce COFF. Le nouvel exécutable est "cca 21 Kio" plus grand que celui d'origine, mais il est autonome, aucun fichier supplémentaire n'est nécessaire. Débarrassez-vous de CWSDPMI.SWP, vous pouvez ensuite modifier votre exécutable avec CWSPARAM.EXE, et désactiver le "swap" (appelé aussi parfois - à tort - "paging"). Notez, cependant, que cela va limiter la mémoire qui peut être attribuée à la quantité de mémoire physique qui est installée dans le système. Ce travail peut être fait à la fois avec le fichier FBC.EXE et tous les exécutables créés par la FBC. La méthode est également décrite dans les docs du le paquet CWSDPMI. Alternativement, vous pouvez utiliser **WDOSX** ou **D3X** extendeur. Ils n'ont pas de swap et de créeent des exécutables autonomes. Puisque qu'ils exécutent votre exécutable dans "Ring 0", leur gestion de "crash" n'est pas très bonne et peut causer des bloquages ou des redémarrages lors des bogues, où d'autres hôtes quitter façon "civile" avec un vidage de registre. De plus, le "spawning" pourrait ne pas bien/pas du tout fonctionner avec WDOSX ou D3X. Enfin, vous pouvez utiliser **HDPMI**. Téléchargez le "HXRT.ZIP" fichier (ici: [[http://japheth.de/HX japheth.de / HX.html ]]), extrayez de "HDPMI32.EXE" (cca 34 Kio) et "HDPMI.TXT" (non requis par le code, juste pour votre information), et incluez-le à votre démarrage DOS ("HDPMI32-r"). Cela rendra HDPMI résident et évitera que tous les programmes FreeBASIC (également FreePASCAL et DJGPP) ne protestent du manque de DPMI et "swapping". HDPMI **ne peut pas** être inclus (facilement/encore) dans vos exécutables. L'exécution d'un exécutable contenant D3X, CWSDPMI ou certains hôtes DPMI sous HDPMI ou d'autres hôtes externes est très correcte - l'hôte interne sera tout simplement ignoré. Utiliser DPMI est définitivement nécessaire pour FreeBASIC, car il ne peut pas générer le code 16 bits en mode réel, et il n'y a pas d'autre moyen valable d'exécuter du code 32 bits en mode DOS. + **5. Puis-je utiliser d'autres DOS "extenders", comme DOS/4GW, Causeway, DOS/32A?** + +Aucun "extender". Les soi-disant "WATCOM-like extender" ne peut pas être utilisé en raison de différences importantes dans la gestion de la mémoire et la structure exécutable. WDOSX et D3X doivent fonctionner, car ils ont des "extenders" multi-standard, pas que "WATCOM-like". Vous pouvez aussi utiliser PMODE/DJ (pas "original" Tran's PMODE, ni PMODE/W (!), sauve "cca 5 KiB" comparé à CWSDPMI, peut être inclus dans les EXE, mais peut affecter la sensibilité ou les performances) ou comme le susmentionné, HDPMI. + **6. Où est le bel écran bleu avec tous les ... / Où est l'IDE?** + +Le projet FreeBASIC se concentre sur le compilateur, générant des exécutables à partir de vos sources BAS. Il semble peu spectaculaire, mais le plus important c'est la qualité des logiciels que vous développez. TLe projet ne comprend pas un IDE. Il existe plusieurs IDE pour FreeBASIC, mais probablement aucune ne dispose actuellement d'une version DOS. Si vous en avez vraiment besoin, vous pouvez essayer "Rhide", mais notez qu'il est compliqué et "buggé", donc utilisez-le à vos propres risques. Voir aussi les FAQ 7 et 8. + **7. Comment puis-je consulter la documentation au format CHM ou PDF sous DOS?** + +Il n'y a pas actuellement de bonne façon d'afficher les fichiers CHM ou PDF sous DOS. Mais, néanmoins, vous pouvez consulter la documentation FreeBASIC. Un des dévellopeurs FreeBASIC, coderJeff fournit une visionneuse de documentation FreeBASIC avec les docs incluses dans un format spécial, il y a aussi une version DOS. Elle est semblable à la visionneuse de documentation d'aide intégrée de QB, mais ne contient pas d'éditeur ou d'IDE. Téléchargement: [[http://www.execulink.com/~coder/FreeBASIC/docs Downloads coderJeff's Home Page]] + **8. Comment puis-je écrire/modifier mon code source?** + +Il y a de nombreux éditeurs pour DOS, mais seulement peu d'entre eux sont bons - quelques possibilités sont FreeDOS EDIT (utiliser la version 0.7d (!!), limite de 64 Kio, stabilité sous-optimale (enregistrez votre travail régulièrement)), SETEDIT, INFOPAD (livré avec le compilateur CC386, peut éditer aussi les grands textes, a la coloration syntaxique pour le C et ASM, mais pas pour BASIC). + **9. Comment puis-je jouer des sons sous DOS?** + +Il y a 2 manières de jouer du son sous DOS: soit le haut-parleur PC ("archaïque"), célèbre pour son bip si quelque chose se passe mal ou une carte son. Le haut-parleur est facile à contrôler, il a plus de possibilités que l'on pourrait le penser, même de lire des fichiers audio (WAV, avec code de décompression aussi OGG Vorbis, MP3, etc...), vous pouvez ré-utiliser facilement la plupart des codes QB existants (exemple: [[http://www.o-bizz.de/qbdown/qbsound/speaker.zip">o-bizz.de/qb...speaker.zip]]) ou du code ASM via inline ASM, mais fournit seulement un canal et 6 bits, et bien sûr une qualité nettement moins bonne que la carte son, et, sur certains PC plus récents (P4) la qualité du haut-parleur est très mauvaise ou il n'y a pas du tout de haut-parleurs. Pour les anciennes cartes son ISA, il y a beaucoup d'exemples de code, une carte son PCI plus récente peut être utilisée (supposant "bare DOS" dans cette catégorie) soit en utilisant un pilote ("émulation" SB16 compatible), si disponible pour votre carte (malheureusement, ce devient de plus en plus un problème, les pilotes DOS sont pauvres, voire inexistantes), ou accéder à la carte directement (ce qui est de la programmation de bas niveau, liée au matériel, l'assembleur est également nécessaire, et vous avez besoin des docs techniques sur la carte). Il y a quelques sources d'inspiration comme le lecteur audio DOS MPXPLAY (écrit en C avec un peu d'ASM), soutenir les deux méthodes (natif + "emu" pilotes), voir une liste à jour ici: [[http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.SoundCardChip">drdos.org/...wiki...SoundCardChip]]. La prise en charge du son sous DOS **n'est pas** l'affaire du portage FB DOS, actuellement FB ne supporte pas le son sur Win32 ni sous Linux - les jeux "se connectent à l'API" plutôt que d'utiliser les commandes ou bibliothèques de FreeBASIC. Pour jouer des fichiers compressés (MP3, OGG Vorbis, FLAC, ...) , vous avez besoin en plus du code décompressé, les portages DJGPP existants de ces bibliothèques devraient être utilisables à cet effet. + **10. Comment puis-je utiliser un port USB sous DOS?** + +Encore une fois, ce n'est pas le but de FB, vous avez besoin d'un pilote, FB n'a pas de "support" USB sur Win32 et sur Linux non plus, voir d'autres Wiki: [[http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.USB">drdos.org/...wiki...USB]] sur les possibilités d'utilisation de l'USB sous DOS. + **11. Comment puis-je utiliser les graphiques sous DOS?** + +Les GUI ou les graphiques en mode DOS sont tout à fait possibles, il existe plusieurs approches: +
  • Utilisation de la bibliothèque graphique de FB. Elle utilise VESA (préférence linéaire, mais supporte également "banked") pour accéder à la carte vidéo et supporte toutes les résolutions VESA rapportées par le pilote VESA VBE de la carte, en plus des modes VGA standard. + +Note: utilisez de préférence FB version **0.20** ou plus récente, les graphiques FB DOS ne sont pas très bons sur la version **0.17** et **ne fonctionnent pas du tout** dans les versions précédentes. +
  • mode VGA 320x200x8bpp: très simple, une fiabilité et une compatibilité maximales, mais faible résolution et 256 couleurs uniquement, voir exemple. +
  • VGA "ModeX" 320x240x8bpp: similaire à ci-dessus, moins facile, une bonne fiabilité et de compatibilité, mais faible résolution et 256 couleurs uniquement, voir exemple. +
  • VGA "planed" mode 640x480x4bpp: difficile d'établir les pixels, une fiabilité et une compatibilité maximales, mais faible résolution et 16 couleurs seulement, encore aucun exemple public (?). +
  • Quelques autres modes "odd" VGA "ModeX" (comme 360x240x8bpp): possible, mais seulement pour les fous ;-) +
  • Écrire votre propre code VESA: Plus difficile, bonne compatibilité, haute résolution et couleur vraie possibles, il pourrait y avoir des problèmes de fiabilité si cela n'est pas mis en oeuvre avec soin. +
  • Utiliser une bibliothèque externe (DUGL, Allegro, MGL, WxWidgets): Permet de créer des graphiques et GUI "couteux", gonflement de la taille des EXE, obligation de respecter les licences des bibliothèques, perte potentielle de fiabilité. + **12. DEF SEG est manquant dans FB! Comment puis-je contourner ceci dans mon code?** + DEF SEG est lié à l'adressage 16-bits RM et a été retiré à cause de cela. L'accès "direct" l'accès à VGA ou d'autres zones de mémoire basse n'est pas possible, parce que le modèle de mémoire de FreeBASIC's (identique à celui de DJGPP) n'est pas basé sur zéro. Pour accéder à la mémoire basse du DOS, utilisez DOSMEMGET et DOSMEMPUT , voir l'exemple "vga13h.bas" ou "_dos_ds" sélecteur pour "inline ASM", voir exemple: + %%(""FreeBASIC"") + '' DOS only example of inline ASM accessing low memory -{{fbdoc item="back" value="DocToc|Table of Contents"}} ----- - -@@**""FreeBASIC"" DOS related questions**@@ - -{{anchor name="item1"}}==1. FB is a 32-bit compiler - do I need a 32-bit DOS?== - No, the DOS version of ""FreeBASIC"" uses a **DOS extender**, allowing you to execute 32-bit code on top of a 16 bit DOS kernel. You can use ""FreeDOS"" (16-bit), Enhanced-Dr-DOS, old closed Dr-DOS, or even MS-DOS down to version cca 4. - -{{anchor name="item2"}}==2. What about ""FreeDOS-32""? Does/will FB work, is/will there be a version?== - ""FreeDOS-32"" is experimental at time of writing, but it should execute ""FreeBASIC"" and applications generated by it with no change. While FB DOS support already works on ""FreeDOS"" (16), it should be ready for ""FreeDOS-32"" as well. - -{{anchor name="item3"}}==3. When running ""FreeBASIC"" in DOS, I get a 'Error: No DPMI' message!== - You need a DPMI host (DPMI kernel, DPMI server), means the file "CWSDPMI.EXE" (cca 20 ""KiB"") or HDPMI32.EXE (cca 34 ""KiB""). See requirements, and FAQ 4 for more details. - -{{anchor name="item4"}}==4. Is there a possibility how to get rid of this CWSDPMI.EXE and CWSDPMI.SWP?== - Yes, 2 possibilities. To get rid of CWSDPMI.EXE and create a standalone DOS executable embedding CWSDPMI, you need the CWSDPMI package and the "EXE2COFF.EXE" file. Using EXE2COFF, you remove the CWSDPMI.EXE loader (file loses 2 ""KiB"" of size, resulting in a "COFF" file without extension), and then glue the file "CWSDSTUB.EXE" before this COFF. The new executable is cca 21 ""KiB"" bigger than the original one, but it is standalone, no additional files are needed. To get rid of CWSDPMI.SWP, you can then edit your executable with CWSPARAM.EXE, and disable the swapping (occasionally also - incorrectly - referred as paging). Note, however, that this will limit the memory that can be allocated to the amount of physical memory that is installed in a system. This work can be done both with the FBC.EXE file and all executables created by FBC. The method is also described in the CWSDPMI docs in the package. Alternatively, you can use the **WDOSX** or **D3X** extender. They don't swap and create standalone executables. Since they run your executable in Ring 0, the crash handling of them is not very good and can cause freezers or reboots on bugs where other hosts exit the "civil" way with a register dump. Also, spawning might not work well / at all with WDOSX or D3X. Finally, you can use **HDPMI** . Download the "HXRT.ZIP" file (here: [[http://japheth.de/HX.html japheth.de/HX.html]]), extract "HDPMI32.EXE" (cca 34 ""KiB"") and "HDPMI.TXT" (not required by the code, just for your information), and include it to your DOS startup ("HDPMI32 -r"). This will make HDPMI resident and prevent all ""FreeBASIC"" (also ""FreePASCAL"" and DJGPP) programs from both crying about missing DPMI and swapping. HDPMI can **not** (easily / yet) be included into your executables. Running an executable containing D3X, CWSDPMI or some DPMI host inside under HDPMI or other external host is fine - the built-in host will be simply skipped. Using DPMI is definitely required for ""FreeBASIC"", since it can't generate 16-bit real mode code, and there is no other good way to execute 32-bit code in DOS. - -{{anchor name="item5"}}==5. Can I use other DOS extenders, like DOS/4GW, Causeway, DOS/32A?== - Not any extender around. So-called WATCOM-like extenders can't be used because of important differences in memory management and executable structure. WDOSX and D3X do work, since they are a multi-standard extenders, not only WATCOM-like. You also can use PMODE/DJ (not "original" Tran's PMODE, nor PMODE/W (!), saves cca 5 ""KiB"" compared to CWSDPMI, can be included into the EXE, but might affect stability or performance) or, as aforementioned, HDPMI. - -{{anchor name="item6"}}==6. Where is the nice blue screen with all the ... / where is the IDE?== - The ""FreeBASIC"" project focuses on the compiler, generating the executables from your BAS sources. It looks unspectacular, but is most important for the quality of software developed by you. The project does not include an IDE. There are several external IDEs for ""FreeBASIC"", but probably none does have a DOS version by now. If you really need one, you could try Rhide, but note that it is complicated and buggy, so use it at your own risk. See also FAQ 7 and 8. - -{{anchor name="item7"}}==7. How can I view the documentation in CHM or PDF format in DOS?== - There is no good way to view CHM or PDF files in DOS by now. But you can view the ""FreeBASIC"" documentation nevertheless. One of the ""FreeBASIC"" developers, ""coderJeff"" provides a ""FreeBASIC"" documentation viewer with the docs included in a special format, and having also a DOS version. It looks similar the QB's built-in help viewer, but does not contain an editor or IDE. Download here: [[http://www.execulink.com/~coder/FreeBASIC/docs.html]] - -{{anchor name="item8"}}==8. How can I write/edit my source code?== - There are many editors for DOS around, but only few of them are **good** - some possibilities are ""FreeDOS"" EDIT (use version 0.7d (!!), 64 ""KiB"" limit, suboptimal stability (save your work regularly) ), SETEDIT, INFOPAD (comes with CC386 compiler, can edit big texts also, has syntax highlighting for C and ASM, but not for BASIC). - -{{anchor name="item9"}}==9. How can I play sound in DOS?== - There are 2 ways how to play sound in DOS: either the ("archaic") PC speaker, famous for beeping if something goes wrong, or a soundcard. The speaker is easy to control, allows more than one might think, even to play audio files (WAV, with decompression code also OGG Vorbis, MP3 etc.), you can re-use most of existing QB code easily (example: [[http://www.o-bizz.de/qbdown/qbsound/speaker.zip o-bizz.de/qb...speaker.zip]]) or ASM code via inline ASM, but provides one channel and 6 bits only, and of course significantly worse quality than a soundcard, and, on some newest (P4) PC's the speaker quality is **very** bad or there is no speaker at all. For old ISA soundcards, there is much example code around, a newer PCI soundcard can be accessed (supposing bare DOS in this category) either using a ( "emulation" SB16 compatible) driver, if it is available for your card (unfortunately, this is becoming more and more a problem, the DOS drivers are poor or even inexistent), or access the card directly (this is low-level programming, hardware-related, assembler is also needed, and you need technical docs about the card). There are a few sources of inspiration like the DOS audio player MPXPLAY (written in C with some ASM), supporting both methods (native + "emu" drivers), see an up-to-date list here: [[http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.SoundCardChip drdos.org/...wiki...SoundCardChip]]. Support of sound in DOS is **not** business FB DOS port, actually FB doesn't "support" sound on ""Win32"" and Linux either - the games "connect to the API" rather than use ""FreeBASIC"" commands or libraries. To play compressed files (MP3, OGG Vorbis, FLAC, ...) , you additionally need the decompressing code, existing DJGPP ports of those libraries should be usable for this. - -{{anchor name="item10"}}==10. How can I use USB in DOS?== - Again, not business of FB, you need a driver, FB doesn't "support" USB on ""Win32"" or Linux either, see other Wiki: [[http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.USB drdos.org/...wiki...USB]] about possibilities of USB usage in DOS. - -{{anchor name="item11"}}==11. How can I use graphics in DOS?== - GUI or graphics in DOS is definitely possible, there are several approaches: - -Use the FB graphics library. It uses VESA (preferably linear, but also supports banked) to access the video card and supports any resolution reported by the card's VESA VBE driver, in addition to standard VGA modes. - Note: use preferably FB version **0.20** or newer, the FB DOS graphics works not as good on **0.17**, and does **not work at all** in previous releases. - -VGA mode 320x200x8bpp: very simple, maximum reliability and compatibility, but low resolution and 256 colours only, see example. - -VGA """ModeX""" 320x240x8bpp: similar to above, less easy, good reliability and compatibility, but low resolution and 256 colours only, see example. - -VGA "planed" mode 640x480x4bpp: difficult to set pixels, maximum reliability and compatibility, but low resolution and 16 colours only, no public example yet (?). - -Some other "odd" VGA """ModeX""" modes (like 360x240x8bpp) : possible, but for freaks only ;-) - -Write your own VESA code: More difficult, good compatibility, high-res and true color possible, there might be reliability problems if not implemented carefully. - -Use an external library (DUGL, Allegro, MGL, ""WxWidgets""): Allows to create "expensive" graphics & GUI's, bloats EXE size, need to respect library license, potential loss of reliability. - -{{anchor name="item12"}}==12. DEF SEG is missing in FB! How can I workaround this in my code?== - DEF SEG is related to 16-bit RM addressing and was removed because of this. "direct" access to VGA or other low memory areas is not possible, because ""FreeBASIC""'s memory model (same as DJGPP's) is not zero-based. For accessing low DOS memory, use DOSMEMGET and DOSMEMPUT , see "vga13h.bas" example, or "_dos_ds" selector for inline ASM, see example: - -{{fbdoc item="filename" value="examples/manual/faq/dos/lowmemas.bas"}}%%(""FreeBASIC"") -'' DOS only example of inline ASM accessing low memory '' Run in text mode 80x25 only -'' + '' '' Including dos/go32.bi will define "_dos_ds" '' "pointing" into GO32 block - -#include "dos/go32.bi" +#include "dos/go32.bi" Dim As UInteger DDS - DDS=_dos_ds ? : ? "Hello world !" -? "_dos_ds=$";Hex$(DDS) + +? "_dos_ds=$";Hex$(DDS) + ? "This is just a tEst - abcd ABCD XYZ xyz @[`{ - press any key ..." Do - Sleep 1000 - If Inkey$<>"" Then Exit Do - Asm - mov eax,[DDS] '' Directly using "_dos_ds" won't work here !!! - push eax - pop gs '' Just to get sure, it is usually set anyway +Sleep 1000 +If Inkey$<>"" Then Exit Do + +Asm + mov eax,[DDS] '' Directly using "_dos_ds" won't work here !!! + push eax + pop gs '' Just to get sure, it is usually set anyway Xor ebx,ebx aa3: mov al,[gs:0xB8000+2*ebx] cmp al,65 '' "a" jb aa1 cmp al,122 '' "z" - ja aa1 + ja aa1 cmp al,90 '' "Z" jbe aa2 - cmp al,97 '' "a" - jb aa1 - aa2: + cmp al,97 '' "a" + jb aa1 + aa2: Xor al,32 '' Swap case aa1: mov [gs:0xB8000+2*ebx],al inc ebx cmp ebx,2000 jne aa3 - End Asm -Loop -? : ? "Bye" -End + End Asm + Loop + ? : ? "Bye" + End %% +**13. Comment puis-je réécrire CALL INTERRUPT de QB / l'accès aux interruptions DOS et BIOS?** +Ces interruptions sont accessibles seulement en utilisant la version/cible DOS de FB. +L'accès aux interruptions est plus lent que dans QB: avec FB l'hôte DPMI devra faire deux changements de contexte, passer en mode réel et en revenir. Tout cela va "manger" des centaines de cycles d'horloge dans le DOS "raw" et des milliers de cycles d'horloge si emm386 est chargé ou est à l'intérieur d'une "box DOS de Windows". Le ralentissement pourrait être négligeable ou perceptible, ça dépend. Vous devriez essayer de minimiser le nombre de ces appels, et traiter plus de données par appel - au moins plusieurs Kio, et pas seulement un octet ou quelques octets. -{{anchor name="item13"}}==13. How can I rewrite QB's CALL INTERRUPT / access the DOS and BIOS interrupts?== - Those interrupts can be accessed only using the DOS version/target of FB. +Utilisation du "wrapper DPMI de DJGPP": + %%(""FreeBASIC"") - The access to interrupts is slower than in QB: with FB the DPMI host will have to do 2 context switches, going to real-mode and coming back. All of that will eat hundreds of clocks in raw DOS and thousands of clocks if emm386 is loaded or if inside a Windows' DOS box. The slow down might be negligible or relevant, it depends. You should try to minimize the number of such calls, and process more data per call - at least several ""KiB"", not just one byte or a few bytes. + #include "dos/dpmi.bi" - Use DJGPP's DPMI wrapper: - -{{fbdoc item="filename" value="examples/manual/faq/dos/call-int.bas"}}%%(""FreeBASIC"") -#include "dos/dpmi.bi" - -type RegTypeX as __dpmi_regs + type RegTypeX as __dpmi_regs #define INTERRUPTX(v,r) __dpmi_int( v, @r ) %% - Alternatively you can call INT's via inline ASM, 2 important things you have to care about are the fact that FB's memory model is not zero-based (see also FAQ 12, "DEF SEG" issues), and additionally "direct" passing of addresses (like DS:[E]DX) to an INT will not work except you have a DPMI host with "DOS API translation". +Sinon, vous pouvez appeler les INT via "inline ASM", 2 choses importantes auxquelles vous devez faire attention sont le fait que le modèle dde mémoire de FB n'est pas basé sur zéro (voir aussi FAQ 12, questions sur "DEF SEG"), et de plus passer "directement" des adresses (comme DS:[E]DX) à une INT will ne fonctionnera pas, sauf que vous avez un hôte DPMI avec "DOS API translation". + +**14. Comment puis-je réécrire la gestion XMS/EMS de QB?** +Cela dépend pourquoi le code original l'utilise. Si c'est juste pour contourner les limites de la mémoire basse, il suffit de la retirer et d'utiliser des types de données FB "ordinaires"/fonctions de gestion de la mémoire à la place. Si elle est utilisée pour le DMA (son), vous n'avez pas de chance et devez de refondre complètement le code, sur le son voir FAQ 9. Pour le DMA utiliser de préférence la mémoire basse (cela ne devrait pas être un gros problème, puisque le code d'application et la plupart des tampons sont dans la mémoire DPMI), le DMA dans la mémoire DPMI est possible mais plus difficile. -{{anchor name="item14"}}==14. How can I rewrite QB's XMS/EMS handling?== - Depends why original code uses it. If it's just to bypass low memory limits, simply remove it and use "ordinary" FB's data types / memory handling features instead. If it is used for (sound) DMA, you are out of luck and have to redesign the code completely, about sound see FAQ 9. For DMA use preferably the low memory (should be no big problem, since the application code and most buffers are in DPMI memory instead), DMA in DPMI memory is possible but more difficult. + **15. FBC me donne un ne peut pas trouver "lsupcxx' error"!** -{{anchor name="item15"}}==15. FBC gives me a 'cannot find lsupcxx' error!== - The source of this problem is the **libsupcxx.a** file in **LIB\DOS\** directory, having 9 characters in the name. Your fault is to have extracted the ZIP with long file names enabled, usually in Windows, and then using FB in DOS with no LFN support, resulting in this file looks **LIBSUP~1.A** and can't be found. Rename the file in **LIBSUPCX.A** (one **X** only) or extract the ZIP again in DOS. Note: changes in FB 0.18, retest needed. +L'origine de ce problème est le fichier **libsupcxx.a** dans le répertoire **LIB\DOS\**, il a 9 caractères dans son nom. Votre faute est d'avoir extrait le fichier ZIP avec la permission des noms de fichiers longs, généralement sous Windows et puis vous utilisez FB dans le DOS sans prise en charge des noms de fichiers longs, il en résulte que ce fichier apparaît **LIBSUP~1.A** et ne peut être trouvé. Renommez le fichier **LIBSUPCX.A** (un seul **X**) ou extrayez à nouveau le fichier ZIP en DOS. Note: change dans FB 0.18, il est nécessaire de re-tester. + **16. Comment puis-je utiliser le port série ou parallèle?** -{{anchor name="item16"}}==16. How can I use the serial or parallel port?== - The DOS INT14 is not very useful/efficient as it sends/reads a single char in each call. So it's better to use an external DOS32 comms library. /* does someone know a good one ? */ FB up to 0.18.2 doesn't support OPEN COM on DOS target, ""coderJeff"" has an experimental library/driver available, included with FB since 0.18.3. +L'interruption DOS INT14 n'est pas très utile/efficace car elle envoie/lit un seul caractère à chaque appel. Il est donc préférable d'utiliser une bibliothèque externe "DOS32 comms". /* quelqu'un en connaît-il une bonne? */ FB jusqu'à 0.18.2 ne supporte pas OPEN COM sur la cible DOS, coderJeff a un(e) bibliothèque/pilote expérimental(e) de disponible, inclus(e) dans FB version 0.18.3 et versions suivantes. + **17. Comment puis-je utiliser une imprimante?** -{{anchor name="item17"}}==17. How can I use a printer?== - DOS kernel won't help you here, so you have to prepare the text (trivial) or bitmap data (acceptably easy for printers compatible with the "ESC/P" standard) yourself and send in to the printer via the parallel port or USB using an additional driver (see FAQ 10). So-called "GDI" or "Windows" printers can't be made working in DOS with reasonable effort. +Le noyau DOS ne vous aidera pas ici, donc vous avez à préparer vous-même le texte (trivial) ou des données "bitmap" ( facilement acceptable pour les imprimantes compatibles avec le standar "ESC/P") et les envoyer à l'imprimante via le port parallèle ou USB en utilisant un pilote supplémentaire (voir FAQ 10). On ne peut pas faire fonctionner sous DOS, avec un effort raisonnable, les imprimantes dites "GDI" ou "Windows". + **18. Comment puis-je faire une copie d'écran d'un programme DOS fonctionnant en FreeBASIC?** -{{anchor name="item18"}}==18. How can I make a screenshot of a ""FreeBASIC"" program running in DOS?== - Ideally include this feature into your own code. DOS TSR based screenshooters like SNARF mostly will work with text based screens, but probably none of them with ""FreeBASIC""'s GFX library. It's not really a bug on one or other side, it's a problem "by design". +L'idéal est inclure cette fonctionnalité dans votre propre code. Les copieurs d'écran DOS basés sur TSR, comme SNARF, pour la plupart vont fonctionner avec des écrans en mode texte, mais probablement aucun d'entre eux avec la bibliothèque FreeBASIC de GFX. Ce n'est pas vraiment un bug sur un côté ou un autre, c'est un problème "de par leur conception" (by design). + **19. Le mode graphique ne fonctionne pas (bloquage écran/écran noir/données incorrectes en sortie )!** -{{anchor name="item19"}}==19. Graphics mode doesn't work (freeze / black screen / garbage output)!== - Place a bug report into the forum. To make it as useful and productive as possible, please beware of the following, proceed given steps and provide all related information: - - The graphics might not work well / at all on very old PC's. If your CPU has less than cca 500 MHz, provide exact info about it, if you don't know, use ""RayeR""'s CPUID or similar program to test. - - Exact info about your graphics card is needed. Test on DOS using [[DrV DrV]]'s VBEDIAG (reports info only) and ""RayeR's"" VESATEST (also tries to set mode, allows visual inspection of the result). Find out what "useful" modes (640x480, 800x600) are supported and with what bitdepths (8, 16, 24, 32 bpp), and whether they can be set and look correctly. - - Find out and describe exactly what's wrong ("mode works with VESATEST but not with FB", "no graphics but no error either", "black screen and freezer", "graphics is messy/incomplete", ...). - - If some sophisticated program doesn't work, try also a minimal test like placing a circle in middle of the screen. - - Try without a mouse driver (this reduces the CPU "cost"). - - Find out what modes are affected. If a mode doesn't work, reduce the resolution or bitdeph, make sure to test the "cheapest"/safest modes 640x480 with 32/24/16/8 bpp, 640x480 with 4 bpp, and 320x200 with 8bpp. - - For some old cards there are VESA drivers available (S3VBE/UVIVBE). Test both with and without, and include this info into your report. - - Remove potentially problematic content (memory managers, drivers) from DOS startup files. Nothing of such is required for FB, except a DPMI host (see also FAQ 4.). - - Post info about your graphics card, CPU (if old), DOS type and version, bug symptoms, and a simple example code. - ""RayeR""'s VESATEST and CPUID can be downloaded here: [[http://rayer.ic.cz/programm/programe.htm rayer.ic.cz/programm/programe.htm]] , VBEDIAG here [[http://drv.nu/vbediag/ drv.nu/vbediag/]]. +Placez un rapport de bogue dans le forum. Pour le rendre aussi utile et productif que possible, s'il vous plaît méfiez-vous de ce qui suit, suivez les étapes données et de fournissez toutes les informations relatives: + - Les graphiques pourraient ne pas bien (ne pas) fonctionner (du tout) sur de très anciens PC. Si votre CPU a moins de 500 MHz de cca, fournissez des informations exactes à son sujet, si vous ne savez pas, utilisez le programme "RayeR's CPUID" ou similaire pour tester. -{{anchor name="item20"}}==20. Mouse trouble! Mouse doesn't work at all in DOS / arrow 'jumps' / etc. ...== - To use a mouse in DOS, you need a compatible driver, recognizing your mouse, and recognized by ""FreeBASIC"" library. For optimal results, you need a **good** driver and a **suitable** mouse. +- Des informations exactes sur votre carte graphique sont nécessaires. Testez sur DOS en utilisant VBEDIAG de [[DrV DrV]] (ne rapportez que les informations) et VESATEST de RayeR (essayer aussi de définir le mode, permet l'inspection visuelle du résultat). Déterminez si les modes "utiles" (640x480, 800x600) sont supportés et avec quelles profondeur (8, 16, 24, 32 bpp), et si cela peut être réglé et est visible correctement. + - Déterminez et décrivez exactement ce qui est faux ("mode fonctionne avec VESATEST mais pas avec FB", "aucun graphique mais aucune erreur non plus", "écran noir et bloquage écran", "graphismes mauvais/incomplets", ...). + - Si certains programmes sophistiqués ne fonctionnent pas, essayez aussi un test minimal comme placer un cercle au milieu de l'écran. + - Essayez sans pilote de la souris (ce qui réduit le "coût" CPU). + - Déterminez quels modes sont touchés. Si un mode ne fonctionne pas, réduisez la résolution ou la profondeur, veillez à tester les modes les plus sûrs / les moins "lourds" 640x480 avec 32/24/16/8 bpp, 640x480 avec 4 bpp et 320x200 avec 8bpp. + - Pour certaines cartes anciennes il y a des pilotes VESA disponibles (S3VBE/UVIVBE). Testez avec et sans, et incluez cette information dans votre rapport. + - Retirez le contenu potentiellement problématique (gestionnaires de mémoire, les pilotes) des fichiers DOS de démarrage. Rien de tel n'est nécessaire pour FB, à l'exception d'un hôte DPMI (voir aussi FAQ 4.). + - Postez l'info sur votre carte graphique, processeur (si ancien), le type et la version du DOS, les symptômes de bugs et un exemple de code simple. + VESATEST et CPUID de RayeR peuvent être téléchargés ici: [[http://rayer.ic.cz/programm/programe.htm">rayer.ic.cz/programm/programe.htm]] et VBEDIAG ici [[http://drv.nu/vbediag/">drv.nu/vbediag/]]. + **20. Des ennuis de souris! La souris ne fonctionne pas du tout sous DOS/"sauts" de la flèche/etc...** + Pour utiliser une souris dans le DOS, vous avez besoin d'un pilote compatible, reconnaissant votre souris et reconnu par une bibliothèque FreeBASIC. Pour des résultats optimaux, il vous faut un **bon** pilote et une souris **adaptée**. + Souris: le choix optimal et aujourd'hui facilement disponible, est une souris PS/2. L'ancien type d'une souris série devrait fonctionner lui aussi. Le plus récent est la souris USB - mais n'est pas très approprié pour une utilisation en mode DOS, car serait nécessaire pour la compatibilité un pilote (INT33) de haute qualité natif de souris USB (non disponible à ce jour, seuls quelques expérimentaux), ou compter sur l'émulation du BIOS (pas toujours disponible, ou "imprécise"). - Mouse: the optimal choice, and pretty well available nowadays, is a PS/2 mouse. The old type would be a serial mouse, also this one should work. The newest is USB mouse - but is not very suitable for use in DOS, since it would need a compatible (INT33) high quality native USB mouse driver (none available by now, only some experimental), or rely on BIOS emulation (not always available, or "unprecise"). +Pilote: le choix préféré est CTMOUSE du projet FreeDOS. Les versions 1.9a1, 2.0a4 et 2.1b4 de Juillet 2008 sont disponibles. Inclus avec (mais non limité à) FreeDOS ou télécharger une version ici: [[http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/mouse/">ibiblio.org/pub/...mouse]]. Aucun d'eux n'est parfait, mais ils sont encore très utilisables et meilleurs que la plupart des concurrents. 1.9xx and 2.1xx will collabore avec BIOS, permettant l'émulation USB, 2.0xx ignore le BIOS et ainsi l'émulation USB **NE fonctionne PAS**.Les pilotes de souris Logitech également fonctionnent souvent correctement, à télécharger ici: [[http://www.uwe-sieber.de/util_e uwe-sieber.de/util_e.html]] - la version 6.50 est un bon début. Connus pour des problèmes il y a DRMOUSE et certaines versions (anciennes?) de MSMOUSE. + Si la souris ne fonctionne pas du tout, alors très probablement le pilote n'est pas chargé, ne reconnaît pas la souris (voir les messages du pilote) ou n'est pas compatible avec l'INT33 "standard". Pour la souris USB, l'activation de "l'émulation de la souris USB" dans les paramètres du BIOS peut vous aider. - Driver: the preferred choice is CTMOUSE from ""FreeDOS"" project. There are versions 1.9a1, 2.0a4, and 2.1b4 from 2008-July available. It is included with (but not limited to) ""FreeDOS"", or download a version from here: [[http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/mouse/ ibiblio.org/pub/...mouse]] . None of them is perfect, but still they are well usable and better than most competitors. 1.9xx and 2.1xx will cooperate with BIOS, allowing USB emulation, 2.0xx bypasses BIOS and thus USB emulation will **NOT** work. Also Logitech mouse drivers usually do a good job, download from here: [[http://www.uwe-sieber.de/util_e.html uwe-sieber.de/util_e.html]] - version 6.50 is a good start. Known for problems are DRMOUSE and some (old ?) versions of MSMOUSE. + Si le contrôle de la souris est "imprécis", la flèche "saute", alors soit vous avez un mauvais pilote - utilisez-en un meilleur ou l'émulation du BIOS est mauvaise - alors, la solution est d'acheter une souris PS/2. - If the mouse does not work at all, then most likely the driver is not loaded, doesn't recognize the mouse (see driver messages), or is not compatible with the INT33 "standard". For USB mouse, activating the "USB mouse emulation" in BIOS settings can help. + **21. Qu'en est-il des problèmes des 64K et 640K / quelle quantité de mémoire FB peut-il gérer sous DOS?** - If the mouse control is "unprecise", the arrow "jumps" , then you either have a bad driver - use a better one, or the BIOS emulation is bad - the solution is to buy a PS/2 mouse then. + La gestion de la mémoire est l'affaire de l'hôte DPMI, plutôt que du compilateur. FreeBASIC et les exécutables qu'il génère **ne** souffre **pas** de ce problème, car du code 32 bits DPMI est utilsé, plutôt que le mode réel. Vous pouvez utiliser presque toute la mémoire de votre PC, avec quelques limitations, mais on est largement **au-dessus** des 64 ou 640 Kio. CWSDPMI **r5** est vérifiée pour bien fonctionner jusqu'à 512 MiB seulement, toute la mémoire supplémentaire ne plante pas le système (contrairement à certaines anciennes versions), mais est tout simplement ignorée. HDPMI est censé gérer plus: jusqu'à 4 Gio (la limite de l'adressage 32 bits), mais il n'y a pas eu beaucoup d'essais sur ces énormes machines - vérifié jusqu'à cca 1,5 Gio. FreeBASIC et le code généré **ne** nécessitent **pas** les classiques gestionnaires DOS de mémoire (HIMEM / XMS et EMM386/EMS), mais sont censés coexister avec eux s'ils sont présents. Tout cela s'applique bien sûr seulement au vrai DOS, des choses comme "Dos Box" garderont le contrôle sur la gestion de la mémoire et de fourniront seulement un petit morceau de la mémoire (cela dépend, jusqu'à cca 64 MiB) à votre code DOS. -{{anchor name="item21"}}==21. What about the 64 ""KiB"" and 640 ""KiB"" problems / how much memory is supported by FB in DOS?== - Memory management is business of the DPMI host, rather than the compiler. ""FreeBASIC"" and executables generated by it do **not** suffer from this problem, since they use 32-bit DPMI code, rather than real mode. You can use almost all the memory of your PC, with some limitations, but they are **far** above 64 or 640 ""KiB"". CWSDPMI **r5** is verified to work well up to 512 ""MiB"" only, additional memory does not crash it (unlike some older versions), but is silently ignored. HDPMI is supposed to support more: up to 4 ""GiB"" (the limit of 32-bit addressing), but there was not much testing on such huge machines - verified up to cca 1.5 ""GiB"". ""FreeBASIC"" and code generated by it do **not** require classical DOS based memory managers (HIMEM/XMS and EMM386/EMS), but are supposed to coexist with them if they are present. All this of course applies to true DOS only, things like "Dos Box" will keep the control over the memory management and provide only a small piece of memory (depends, up to cca 64 ""MiB"") to your DOS code. + **22. Mon programme se bloque lorsque je tente d'utiliser plus cca 1 MiB de mémoire RAM! Est-ce un bogue dans FreeBASIC?** -{{anchor name="item22"}}==22. My program crashes when I try to use more than cca 1 ""MiB"" RAM! Is this a bug in ""FreeBASIC""?== - No, it's not a bug in ""FreeBASIC"" and it's not really DOS specific, see also [[CompilerFAQ Compiler FAQ]]. For a beginner, the easy solution is to use ##[[KeyPgShared Shared]]## for arrays. More advanced users could consider using memory management functions like ##[[KeyPgAllocate Allocate]]##. This is even more important in DOS, since it allows the application to run on low memory PCs (and still edit at least small texts for example), as well as to use all huge RAM if available (and edit huge texts for example). +Non, ce n'est pas un bogue dans FreeBASIC et ce n'est pas vraiment spécifique au DOS, voir aussi [[CompilerFAQ FAQ du Compilateur]]. Pour un débutant, la meilleure solution est d'utiliser ##[[KeyPgShared Shared]]## pour les tableaux. Les utilisateurs plus avancés peuvent envisager d'utiliser les fonctions de gestion de la mémoire, comme ##[[KeyPgAllocate Allocate]]##. Ceci est encore plus important dans le DOS, car cela permet d'exécuter l'application sur les ordinateurs ayant peu de mémoire (tout en permettant au moins d'éditer petits textes, par exemple), ainsi que d'utiliser toute la RAM énorme si disponibles (et éditer des textes énormes, par exemple). + **23. Les fonctions de Threading sont invalides dans DOS? A l'aide!** -{{anchor name="item23"}}==23. Threading functions are disallowed in DOS? Help!== - The [[CatPgThreading Threading Support Functions]] are not supported for DOS target, and most likely won't be soon/ever. The reason is simple: neither the DOS kernel, nor the DPMI host/standard, nor "GO32" DOS Extender support threading, unlike the ""Win32"" or Linux kernel. However nothing is impossible in DOS: you can set up your threading on the top of DPMI. There are multiple possibilities, two of which are: - - Set up an ISR, see "ISR_TIMER.BAS" example. This is not a "full" replacement, but sufficient in some cases. - - There is a **pthreads** library for DJGPP allowing to "emulate" Linux-like threading to some degree. It works acceptably for [P]7-ZIP DJGPP port (written in C+ + ), no tests with FB yet. +Les [[CatPgThreading fonctions de gestion du Threading]] ne sont pas prises en charge pour la cible, pour le moment, et très probablement ne le seront pas bientôt/jamais. La raison est simple: ni le noyau DOS, ni le DPMI host/standard, ni "GO32" DOS Extender ne les gèrent, contrairement au noyau Win32 ou Linux. Comme d'habitude, DOS ne vous alertera pas ici, mais d'autre part rien n'est impossible d'autre part dans le DOS: vous pouvez configurer votre "threading" en haut de DPMI, il y a de multiples possibilités: + - Mettez en place un ISR, voir l'exemple "ISR_TIMER.BAS". Ce n'est pas un de remplacement "complet", mais suffisant dans certains cas. -{{anchor name="item24"}}==24. Executables made with FB DOS are bloated!== - This is true but there is no easy/fast way to fix. FB is a 32-bit HLL compiler, and most of the size is imported from DJGPP. !writeme! ( see forum: [[http://freebasic.net/forum/viewtopic.php?t=11757 freebasic.net/forum/viewtopic.php?t=11757]] ) +- Il y a une bibliothèque **pthreads** pour DJGPP permettant d'"émuler" un certain degré de threading comme-dans-Linux-like. Il fonctionne de façon acceptable pour le portage [P]7-ZIP DJGPP (écrit en C++), pas encore de tests avec FB. + **24. Les exécutables faits avec FB DOS sont "gonflés"!** + C'est vrai, mais il n'y a pas de moyen facile/rapide de correction. FB est un compilateur 32 bits HLL et la plupart de la taille est importée de DJGPP. !à écrire! ( voir le forum: [[http://freebasic.net/forum/viewtopic.php?t=11757">freebasic.net/forum/viewtopic.php?t=11757]] ) + **25. La compilation est très lente avec FB!** -{{anchor name="item25"}}==25. Compilation is very slow with FB!== - Problem: "FBC takes 10 seconds to compile a "Hello world" program ! ""TurboBASIC"" / QBASIC / VBDOS / ""PowerBASIC"" do take < 1 second for the same job ..." +Problème: "FBC prend 10 secondes pour compiler un programme "Hello world" program"! TurboBASIC/QBASIC/VBDOS/PowerBASIC mettent < 1 seconde pour cela..." + C'est vrai, mais cela est un problème de conception ("by design"): FB compile vos sources en 3 étapes, enregistrement des fichiers intermédiaires, tel que décrit dans CompilerCmdLine, alors que de nombreux compilateurs plus anciens ne font qu'une seule passe en mémoire. Ceci est lié essentiellement aux performances E/S fichiers, voir FAQ 27 ci-dessous sur les possibilités d'améliorations, deplus une petite amélioration peut être obtenue ici en rendant l'hôte DPMI résident (**HDPMI32 -r** ou **CWSDPMI -p** , voir FAQ 4 ci-dessus). Notez que le délai est de essentiellement "additif", de sorte qu'il ne sera pas trop "douloureux" avec les grands projets. - True, but this is "by design" : FB compiles your sources in 3 steps, saving the intermediate files, as described in [[CompilerCmdLine]] , while many older compilers do just 1 pass in memory. This is related mostly to file I/O performance, see FAQ 27 below about possibilities of improvements, additionally a small improvement can be achieved here by making the DPMI host resident ( **HDPMI32 -r** or **CWSDPMI -p** , see FAQ 4 above). Note that the delay is mostly "additive" , so it won't hurt too much with bigger projects. +**26. SLEEP ne fonctionne pas! Comment puis-je provoquer un délai?** + ##[[KeyPgSleep Sleep]]## fonctionne ... mais il a seulement une résolution de cca 55ms = 1/18s, ainsi "SLEEP 500" est très bien, tandis que par exemple en utilisant "SLEEP 2" pour 2 millisecondes ne fonctionnera pas. !à écrire! / !à corriger! -{{anchor name="item26"}}==26. SLEEP doesn't work! How can I cause a delay?== - ##[[KeyPgSleep Sleep]]## does work ... but has a resolution of cca 55ms = 1/18s only, thus "SLEEP 500" is fine, while for example using "SLEEP 2" for 2 milliseconds won't work. !writeme! / !fixme! - - PIT / BIOS timer (runs at 18.2 Hz by default), peek the BIOS timer or set your own, see "ISR_TIMER.BAS" example, raise PIT frequency (use with care) - - Poll the BIOS timer + PIT counter, method from TIMERHLP.ASM from DKRNL32, allows to enhance precision of above without raising the PIT frequency - - RDTSC instruction (Pentium and newer) - - RTC clock - - Delay loops + - Le "timer PIT/BIOS" (tourne à 18.2 Hz par défaut), PEEK le timer BIOS ou définissez le votre propre, voir l'exemple "ISR_TIMER.BAS", augmentez la fréquence PIT (à utiliser avec précaution) -{{anchor name="item27"}}==27. The performance is very bad in DOS!== - Problem: "The performance in DOS is poor compared to ""Win32"" / Linux binary compiled from the very same source !" or "Even worse, the very same DOS binary runs much faster in NTVDM than in DOS !" +- Sonder le "timer BIOS + PIT counter", méthode de TIMERHLP.ASM à partir de DKRNL32, permet d'améliorer la précision de ce qui précède, sans élever la fréquence PIT + - L'iinstruction RDTSC (Pentium et plus récents) + - L'horloge RTC + - Les boucles de délai + **27. Les performances sont très mauvaises sous DOS!** + Problème: "Les performances sous DOS sont médiocres par rapport aux binaires Win32/Linux compilés à partir de la même source!" ou "Pire encore, le même binaire DOS fonctionne beaucoup plus rapidement dans NTVDM que dans DOS!" + Les deux effet peuvent arriver, néanmoins, DOS n'est rien prédestiné à être lent, les inefficacités peuvent être corrigées. Vous devez d'abord identifier la zone où le code affaiblit les performanCan I access disk sectors with FBces. - Both indeed can happen, nevertheless, DOS is no way predestined to be slow, the inefficiencies can be fixed. First you have to identify the area where you code looses performance. +**E/S fichier** : DOS utilise par défaut très peu de mémoire pour ses tampons, tandis que d'autres systèmes en utilisent beaucoup plus et sont "agressifs" avec la mise en cache de fichiers. Lorsque vous traitez beaucoup de petits fichiers, il en résulte les performances se dégradent sérieusement. La solution est d'installer un cache de fichiers, par exemple, **LBACache**, ou vous pouvez installer un RAMDISK (un bon: **SRDISK** ) et copier les fichiers "fautifs" à l'intérieur (par exemple l'installation FreeBASIC) et travailler dessus (veillez à sauvegarder votre travail sur un support plus durable régulièrement). Les deux nécessitent un hôte XMS (utilisez **HIMEMX** ). En outre DOS utilise par défaut le BIOS pour accéder aux disques durs, tandis que les autres systèmes s'efforcent de trouver et d'utiliser DMA. Un test utile: IDECHECK de Japheth (Téléchargement: [[http://www.japheth.de/Download/IDECheck.zip">japheth.de/Download/IDECheck.zip]]) - lancez-le en modes "I13" et "DMA" et comparez les résultats. Si "DMA" est plus rapider (peut être 1 ... 10 fois, dépend du modèle de PC), puis installer un pilote DOS DMA (par exemple **XDMA 3.1** vaut la peine d're essayé) peut apporter une grande accélération sur de gros fichiers. Assurez-vous également de lire et d'écrire les données par gros fragments (16 Kio au moins), pas seulement quelques octets. Les autres systèmes d'exploitation sont plus indulgents ici, mais sous DOS chaque appel d'E/S fichier provoque un petit délai "additif", donc une conception efficace du code avec mise en tampon mémoire bonne est cruciale. + **Graphiques** : Pentium 2 et les CPU plus récents ont une fonction cache similaire appelée "MTRR" pour accélérer l'écriture sur la RAM vidéo. Les pilotes des autres systèmes d'exploitation l'active généralement. Ni DOS (car il ne traite pas des graphismes), ni FB GFX ne le font. Utilisez l'outil "VESAMTRR" de Japheth (contenu dans le paquet "HXGUI.ZIP"), il permettra à l'accélération, survivant aussi aux commutateurs de mode et à la plupart des plantages "non-fatal" d'applications, jusqu'à un redémarrage. Le facteur d' accélération possible varie beaucoup en fonction du modèle de PC, jusqu'à cca 20 fois. En outre la manipulation de la souris mobilise des performances du processeur (trop) sous DOS, c'est un point faible connu (la conception du DOS FB GFX n'est pas "très mauvaise", c'est juste le "standard" commun - ce qui n'est pas très bon), la correction est théoriquement possible mais pas facile, vous pouvez seulement essayer plusieurs pilotes de la souris (voir FAQ 20). - **File I/O** : DOS by default uses very little memory for its buffers, while other systems use much more and are "aggressive" with file caching. When dealing with many small files, this results in serious performance degrade. The solution is to install a filecache, for example **LBACache**, or you can install a RAMDISK (a good one: **SRDISK** ) and copy the "offending" files (for example ""FreeBASIC"" installation) there in and work there (make sure to backup your work to a more durable media regularly). Both will need an XMS host (use **HIMEMX** ). Also DOS by default uses BIOS to access the hard drives, while other systems try hard to find and use DMA. Test util: IDECHECK by Japheth (Download: [[http://www.japheth.de/Download/IDECheck.zip japheth.de/Download/IDECheck.zip]]) - run it in "I13" and "DMA" modes and compare results. If "DMA" is much faster (can be 1...10 times, depends from PC model), then installing a DOS DMA driver (for example **XDMA 3.1** is worth to try) can bring a big speedup on large files. Also make sure to read and write data in large pieces (16 ""KiB"" at least), not just single bytes. Other OSes are more forgiving here, but on DOS every single file I/O call causes a small "additive" delay, thus an efficient code design with good buffering is crucial. + **28. Puis-je accéder à des secteurs de disque avec FB?** - **Graphics** : Pentium 2 and newer CPU's have a cache related feature called "MTRR" to speed up writes to video RAM. Drivers of other OSes usually do enable it. DOS doesn't (since it doesn't deal with graphics at all), neither does FB GFX. Use "VESAMTRR" tool by Japheth (contained in "HXGUI.ZIP" package), it will enable the speedup, surviving also mode switches and most "non-fatal" application crashes, up to a reboot. The possible speedup factor varies much depending from the PC model, up to cca 20 times. Also the mouse handling eats some (too much) CPU performance on DOS, this is a known weak point (the design of DOS FB GFX is not "very bad", it's just the common "standard" - which is not very good), fixing is theoretically possible but not easy, you just can try several mouse drivers (see FAQ 20). + Vous pouvez ... mais FreeBASIC ne vous aidera pas trop ici: pas de solution "portable", utilisez une méthode de faible niveau spécifique à l'OS. Pour DOS, 3 méthodes sont possibles: -{{anchor name="item28"}}==28. Can I access disk sectors with FB?== - You can ... but ""FreeBASIC"" won't help you too much here: no "portable" solution, use OS specific low level way. For DOS 3 methods are possible - - Use logical disk access features of DOS for sector access bypassing the filesystem, see example in the forum: [[http://freebasic.net/forum/viewtopic.php?t=11830 freebasic.net/forum/viewtopic.php?t=11830]] - - Use physical disk BIOS INT 13, bypassing DOS - - Use CPU ports, lowest level, bypassing both DOS and BIOS (no FB example yet, see source of IDECHECK from FAQ 27 above, FASM forum or some OS development resources) - Note that such experiments are a bit "dangerous" - you can easily loose data or make your PC unbootable if something goes wrong. + - Utilisez les fonctionnalités logiques d'accès au disque du DOS pour l'accès du secteur en contournant le système de fichiers, voir par exemple dans le forum: [[http://freebasic.net/forum/viewtopic.php?t=11830">freebasic.net/forum/viewtopic.php?t=11830]] + +- Utilisez l'interruption BIOS INT 13 sur les disques physiques, contournant le DOS + - Utilisez les ports CPU, de niveau le plus bas, contournant à la fois DOS et BIOS (encore aucun exemple FB, voir le source de IDECHECK de la FAQ 27 ci-dessus, le forum FASM ou des ressources de développement des OS) + Notez que ces expériences sont quelque peu "dangereuses" - vous pouvez facilement perdre des données ou rendre votre PC indémarrable, si quelque chose fonctionne mal. + {{fbdoc item="see"}} + - [[CompilerFAQ FAQ du compilateur]]. + - [[FaqPgrtlib FAQ de la bibliothèque d'exécution de FB]]. + +- [[FaqPggfxlib2 Questions Fréquemment Posées sur la bibliothèque graphique de FreeBASIC]] + You can ... but SSE2 and above need to get enabled before. This is usually considered as business of the DPMI host, HDPMI32 and CWSDPMI 7 will do that, most other hosts won't. Make sure to properly CPUID for such instructions before using them. It's a good idea to provide a code branch compatible with older CPU's (early Pentium, 80386) besides supporting latest instructions, and to avoid CMOV in those too. {{anchor name="item999"}}{{fbdoc item="see"}} - [[CompilerFAQ Compiler FAQ]]. - [[FaqPgrtlib FB Runtime Library FAQ]]. - [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]] -{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file +{{fbdoc item="back" value="DocToc|Table of Contents"}} diff --git a/fbdocs/manual/cache/FaqPgLinux.wakka b/fbdocs/manual/cache/FaqPgLinux.wakka index 2bf112c2a5..85fc2de865 100644 --- a/fbdocs/manual/cache/FaqPgLinux.wakka +++ b/fbdocs/manual/cache/FaqPgLinux.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="Linux Related FAQ"}}---- -{{anchor name="item0"}} -**FreeBASIC Linux questions:** + +**Questions sur Linux et FreeBASIC:** - ==- {{anchor name="item1|FreeBASIC gives me an error 'ld: can't find -lX11' or something similar!"}}== - ==- {{anchor name="item2|How do I install FreeBASIC in Ubuntu?"}}== + **- [[#item1">FreeBASIC me donne une erreur 'ld: can't find -lX11' ou quelque chose de similaire!]]** + **- [[#item2">Comment puis-je installer FreeBASIC sous Ubuntu?]]** -{{fbdoc item="back" value="DocToc|Table of Contents"}} +
    **Questions sur Linux et FreeBASIC** ----- +**FreeBASIC me donne une erreur 'ld: can't find -lX11' ou quelque chose de similaire!** -@@**FreeBASIC Linux questions**@@ +FreeBASIC utilise "ld" pour lier les fichier sous Linux. Ce programme exige que toute les bibliothèques que vous utilisez aient leur version de développement d'installée (-dev). Par exemple, pour le message d'erreur ci-dessus, vous devez installer "xlib-dev" de votre distribution. Les autres erreurs courantes sont pour "glibc" qui nécessite "glibc-dev" et "sdl" qui nécessite "sdl-dev". Vous les trouverez facilement sur le média d'installation de la plupart des distributions. -{{anchor name="item1"}}==FreeBASIC gives me an error 'ld: can't find -lX11' or something similar!== - FreeBASIC uses ld to link it's files under linux. This program requires that any libraries you use have the '-dev' versions installed. For example, for the above error message, you'd want to install xlib-dev for your distribution. Other common errors are for glibc, which requires glibc-dev, and sdl, which requires sdl-dev. Most distributions make these easily available on your install media. +[[#item0">Retour en haut de la page]] + **Comment puis-je installer FreeBASIC sous Ubuntu?** -{{anchor name="item0|Back to top"}} +Voir [[http://www.freebasic.net/forum/viewtopic.php?t=3991&postdays=0&postorder=asc&highlight=install+ubuntu&start=0">ce "fil" dans les forums de FB]] -{{anchor name="item2"}}==How do I install FreeBASIC in Ubuntu?"== - See [[http://www.freebasic.net/forum/viewtopic.php?t=3991&postdays=0&postorder=asc&highlight=install+ubuntu&start=0 This thread in the FB forums]] +[[#item0">Retour en haut de la page]] + Voir aussi: -{{anchor name="item0|Back to top"}} +[[CompilerFAQ FAQ du compilateur]]. -See also: +[[FaqPgrtlib FAQ de la bibliothèque d'exécution de FB]]. [[CompilerFAQ Compiler FAQ]]. [[FaqPgrtlib FB Runtime Library FAQ]]. diff --git a/fbdocs/manual/cache/FaqPgWin32.wakka b/fbdocs/manual/cache/FaqPgWin32.wakka index e98d31a31c..4f76987292 100644 --- a/fbdocs/manual/cache/FaqPgWin32.wakka +++ b/fbdocs/manual/cache/FaqPgWin32.wakka @@ -1,95 +1,94 @@ {{fbdoc item="title" value="Windows Related FAQ"}}---- -{{anchor name="item0"}} + **Windows:** - ==- {{anchor name="item01|Which IDEs are available for Windows?"}}== - ==- {{anchor name="item02|Can I get rid of the console / 'DOS' screen in a graphics application?"}}== - ==- {{anchor name="item03|My GUI program does nothing when run / The program compiles but I get a permission denied error in the linker"}}== - ==- {{anchor name="item04|How to debug ?"}}== - ==- {{anchor name="item05|Why Windows refuses to run my code using OUT and/or INP?"}}== - ==- {{anchor name="item06|I get the error 'Cannot start blah.exe because xxxx.dll was not found.' or similar. What is missing?"}}== - ==- {{anchor name="item07|Does FreeBASIC work with Windows Vista ?"}}== - ==- {{anchor name="item08|Where can I find some tutorials on programming the Windows GUI ?"}}== - ==- {{anchor name="item09|Are there Windows GUI code builders for FB?"}}== + **- [[#item01">Quel IDE est disponible pour Windows?]]** + **- [[#item02">Puis-je me débarrasser de l'écran console/DOS dans une application graphique?]]** + **- [[#item03">Mon programme de GUI ne fait rien lorsque je lance/compile le programme mais je reçois une erreur de permission refusée dans le linkeur]]** + **- [[#item04">Comment faire pour déboguer?]]** + **- [[#item05">Pourquoi Windows refuse d'exécuter mon code en utilisant OUT et/ou INP?]]** + **- [[#item06">J'obtiens l'erreur 'Cannot start blah.exe because xxxx.dll was not found.' ou similaire. Qu'est-ce qui manque?]]** + **- [[#item07">FreeBASIC fonctionne-t-il sous Windows Vista?]]** + **- [[#item08">Où puis-je trouver des tutoriaux sur la programmation GUI sous Windows?]]** + **- [[#item09">Y a-t-il des constructeurs de code Windows GUI pour FB?]]** -{{fbdoc item="back" value="DocToc|Table of Contents"}} +
    **Questions FreeBASIC et Windows ** ----- +**Quel IDE est disponible pour Windows?** -@@**""FreeBASIC"" Windows questions**@@ +A l'heure actuelle, trois IDE complets en vogue ont été développés spécifiquement pour FB: [[http://fbide.freebasic.net/">FBIde]] (pas mis à jour, éviter d'utiliser d'anciennes versions de FBC livrées avec lui), [[http://fbedit.freebasic.net/">FbEdit]] et [[http://www.planetsquires.com/jellyfishpro_freebasic.htm">JellyFishPro]].Ces IDE nécessitent une configuration minimale -comme le chemin vers le compilateur- pour travailler. -{{anchor name="item01"}}==Which IDEs are available for Windows?== +Vous pouvez également télécharger [[http://fbide.freebasic.net/">FBIde]] et [[http://fbedit.freebasic.net/">FbEdit]] dans un ensemble (Editeur + Compilateur) qui installe tout en une seule opération. Mais la version embarquée du compilateur peut être périmée. - At the moment three full featured IDEs have been developed specifically for FB: [[http://fbide.freebasic.net/ FBIde]] (not being updated, avoid using of old versions of FBC bundled with it), [[http://fbedit.freebasic.net/ FbEdit]] and [[http://www.planetsquires.com/jellyfishpro_freebasic.htm JellyFishPro]]. These IDEs require a minimum configuration -as path to the compiler- to work. - You can also download [[http://fbide.freebasic.net/ FBIde]] and [[http://fbedit.freebasic.net/ FbEdit]] as bundles (Editor + Compiler) that install in a single operation. But the bundled version of the compiler may be out of date. - Commercial "general use" IDEs can be used with ""FreeBASIC"" but may require an extensive setup. They are handy for multi language programming, as they provide a unified user interface. - Instructions for installing FB JFish Pro, FBIde, and ""FbEdit"" can be found here: - - [[http://www.freebasic.net/forum/viewtopic.php?t=10350 IDE Installation guide for Windows]] + Des IDE commerciaux d'"utilisation générale" peuvent être utilisés avec FreeBASIC mais peuvent nécessiter une extension de configuration. Ils sont pratiques pour la programmation multi-langage, car ils fournissent une interface utilisateur unifiée. + Les instructions d'installation de FB JFish Pro, FBIde et FbEdit sont disponibles: + - [[http://www.freebasic.net/forum/viewtopic.php?t=10350">Guide d'installation d'un IDE pour Windows]] + [[#item0">Retour en haut de la page]] + **Puis-je me débarrasser de l'écran console/DOS dans une application graphique?** -{{anchor name="item0|Back to top"}} +Oui. Vous devez fournir à FreeBASIC la bonne commande lorsque vous compilez votre programme. -{{anchor name="item02"}}==Can I get rid of the console / 'DOS' screen in a graphics application?== - Yes. You have to give ""FreeBASIC"" the right command for it when you compile your program. - - If you compile from a command prompt, simply add ##"-s gui"## to the end, like ##"fbc myprg.bas -s gui"## - - If you compile in a specific IDE, you have to edit the "Compiler Defaults". - - In Jelly-Fish Pro, its "Compiler->Set Compiler Defaults->Compiler Options". Add "-s gui" (NO QUOTES) in that box. - - In ""FbEdit"" select Windows GUI in the targets dropdown list in the right of the tool bar. +- Si vous compilez à partir d'une invite de commande, il suffit d'ajouter ##"-s gui"## à la fin, comme ceci ##"fbc myprg.bas -s gui"## + - Si vous compilez dans un IDE spécifique, vous devez modifier "Compiler Defaults" (valeurs par défaut du compilateur). + - Dans Jelly-Fish Pro, "Compiler->Set Compiler Defaults->Compiler Options". Add "-s gui" (NO QUOTES). + - Dans FbEdit sélectionnez Windows GUI dans la liste déroulante des objectifs à droite de la barre d'outils. + [[#item0">Retour en haut de la page]] + **Mon programme de GUI ne fait rien lorsque je lance/compile le programme mais je reçois une erreur de permission refusée dans le linkeur** -{{anchor name="item0|Back to top"}} +Le problème peut être lié à la question précédente. Si un programme tente un PRINT et qu'il a été compilé avec ##"-s gui"## il se bloquera, car aucune console n'est disponible. Si le PRINT est émis avant que la première fenêtre ne soit enregistrée/ouverte, rien n'apparaîtra à l'écran ou dans la barre des tâches. Le programme en cours ne peut qu'être vu dans (et tué à partir du) le gestionnaire des tâches de l'onglet du processus. Si une nouvelle compilation est essayée avant de tuer le processus, vous aurez "Permission denied" car le compilateur tente de modifier un "programme .exe" en cours d'exécution. -{{anchor name="item03"}}==My GUI program does nothing when run / The program compiles but I get a permission denied error in the linker== - The problem may be related with the previous question. If a program tries to PRINT and it was compiled with ##"-s gui"## it will freeze because no console is available. If the PRINT is issued before the first window is registered/opened, nothing will show in the screen or in the taskbar. The running program can only be seen in (and killed from) the task manager's processes tab. If a new compilation is tried before killing the process it will give a "Permission denied" error when the compiler tries to modify a still running .exe. - In Windows GUI programs do not use console commands. Use ""MessageBox"" or print to a log file to issue any error message to the user. Be sure any PRINT to console you used for debugging is not compiled in the final version. +Dans les programmes GUI Windows n' utilisez pas les commandes de la console. Utilisez "MessageBox" ou "print" vers un fichier "log" pour émettre un message d'erreur vers l'utilisateur. Vérifiez qu'aucun PRINT vers la console, utilisé pour le débogage, n'est pas compilé dans la version finale. + [[#item0">Retour en haut de la page]] + **Comment faire pour déboguer?** -{{anchor name="item0|Back to top"}} +FreeBASIC peut utiliser n'importe quel débogueur compatible avec GNU GDB. Le débogueur Insight Win32 est un "wrapper" convivial pour GDB. -{{anchor name="item04"}}==How to debug ?== - ""FreeBASIC"" can use any debugger compatible with GNU GDB. Insight ""Win32"" debugger is an user friendly wrapper for GDB. - - Get Insight from [[http://prdownloads.sourceforge.net/dev-cpp/Insight_Binary.DevPak?download Dev-C++]] - - Rename the file to Insight.tar.bz2, and decompress it to an empty folder - - Compile your program with the -g switch - - Run \bin\usr\bin\Insight.exe - - Do File>Open to load your program into Insight - - From there you can watch, set breakpoints, step, examine memory and registers. Check Insight's help +- Téléchargez Insight à partir de [[http://prdownloads.sourceforge.net/dev-cpp/Insight_Binary.DevPak?download">Dev-C++]] + - Renommez le fichier Insight.tar.bz2 et décompressez-le dans un dossier vide. + - Compilez votre programme avec l'optio -g + - Lancez \bin\usr\bin\Insight.exe + - Utilisez File>Open pour charger votre programme dans Insight + - A partir de là, vous pouvez "watch" = examiner, "set breakpoints" = placer des points d'arrêt, "step" = avancer pas à pas, examiner la mémoire et les registres. Lisez l'aide d'Insight. + [[#item0">Retour en haut de la page]] + **Pourquoi Windows refuse d'exécuter mon code en utilisant OUT et/ou INP?** -{{anchor name="item0|Back to top"}} +Windows requiert qu'un pilote soit installé pour accéder aux ports matériels. Les programmes FB-Win32 qui utilisent INP et OUT incluent un pilote interne qui s'installe temporairement pour la session. Windows ne permet uniquement qu'aux utilisateurs avec des droits administrateur d'exécuter des installations de pilote. Cela signifie que si habituellement vous exécutez vos sessions Windows sans droits d'administrateur, vous aurez à utiliser la commande Windows RUNAS, sur la ligne de commande, pour exécuter votre programme pour la première fois, lors de chaque session afin que Windows permette l'installation du pilote. -{{anchor name="item05"}}==Why Windows refuses to run my code using OUT and/or INP?== - Windows requires a driver to be installed to access the hardware ports. ""FB-Win32"" programs using INP and OUT include a built-in driver that installs temporarily for a session. Windows allows only users with Admin rights to run driver installations. This means if you usually run your windows sessions without Admin rights, you will have to use the windows command line command RUNAS to run your program for the first time in each session so Windows allows it to install the driver. - If this behavior is not acceptable you can use an external library as [[http://www.winfordeng.com/products/portio32/ PortIO32]] that installs a permanent port driver. +Si ce comportement n'est pas acceptable, vous pouvez utiliser une bibliothèque externe [[http://www.winfordeng.com/products/portio32/">PortIO32]] qui installe un pilote de port permanent. + [[#item0">Retour en haut de la page]] + **J'obtiens l'erreur 'Cannot start blah.exe because xxxx.dll was not found.' ou similaire. Qu'est-ce qui manque?** -{{anchor name="item0|Back to top"}} +Vous essayez d'exécuter un programme utilisant une bibliothèque tierce partie qui réside dans une DLL qui n'est pas installée sur votre système. -{{anchor name="item06"}}==I get the error 'Cannot start blah.exe because xxxx.dll was not found.' or similar. What is missing?== - You are trying to run a program using a third party library that resides in a dll not installed in your system. - ""FreeBASIC"" comes with headers and wrappers required to code for a lot of third party libraries but does not provide the actual runtime dll files. - You have to download and install these from their home page. Find in [[http://www.freebasic.net/forum/viewtopic.php?t=788 the Links thread in the Libraries subforum]] the URL's of the home pages of the libraries provided. You need the binaries for ""Win32"" of the libraries. If you want to develop programs with the libs you will need the documentation too. - When releasing compiled code it's good etiquette to provide the third party dll's required to run it. +FreeBASIC est livré avec les en-têtes et les "wrappers" nécessaires pour coder pour un grand nombre de librairies tierces, mais ne fournit pas les fichiers réels des dll d'exécution. + Vous devez les télécharger et installer à partir de leur page d'accueil. Rechercher dans [[http://www.freebasic.net/forum/viewtopic.php?t=788">le sous-forum des bibliothèques]] l'URL des pages d'accueil des bibliothèques fournies. Vous avez besoin des binaires pour les bibliothèques Win32. Si vous voulez développer des programmes avec les "libs" vous aurez aussi besoin des la documentation. + Lors de la publication du code compilé c'est une bonne pratique que de fournir les dll tierce partie nécessaires à son fonctionnement. + [[#item0">Retour en haut de la page]] + **FreeBASIC fonctionne-t-il sous Windows Vista?** -{{anchor name="item0|Back to top"}} +Oui. (Ecrivez-moi!!!) -{{anchor name="item07"}}==Does ""FreeBASIC"" work with Windows Vista ?== - Yes. (Write me!!!) +[[#item0">Retour en haut de la page]] + **Où puis-je trouver des tutoriaux sur la programmation GUI sous Windows?** -{{anchor name="item0|Back to top"}} +Voir les réponses à cette question dans ce [[http://www.freebasic.net/forum/viewtopic.php?p=89225">thread du forum]] -{{anchor name="item08"}}==Where can I find some tutorials on programming the Windows GUI ?== - See the answers to this question in this [[http://www.freebasic.net/forum/viewtopic.php?p=89225 thread in the forum]] - More advanced use requires a frequent consultation of the reference at the [[http://msdn2.microsoft.com/en-us/library/aa139672.aspx Microsoft Developers Network]]. A local install of the API reference is possible, search Microsoft for the Platform SDK (a huge download) and install just the documentation. +Une utilisation plus avancée requiert une consultation fréquente de [[http://msdn2.microsoft.com/en-us/library/aa139672.aspx">Microsoft Developers Network]]. Une installation locale de la référence de l'API est possible, recherche de Microsoft pour la "Platform SDK" (un téléchargement énorme) et installez simplement la documentation. + [[#item0">Retour en haut de la page]] + **Y a-t-il des constructeurs de code Windows GUI pour FB? ** -{{anchor name="item0|Back to top"}} +Oui, il y a des développements 3ème partie générant le code API Windows à partir d'un concepteur de fenêtres Visual Basic. Aucun d'entre eux n'est Open source: -{{anchor name="item09"}}==Are there Windows GUI code builders for FB?== - Yes there are some 3rd party developments generating Windows API code from a windows designer la Visual Basic. None of them is Open source: - [[http://www.freewebs.com/fielden/ Jerry Fielden' Ezeegui]] uses a "graphical" textmode interface to let you build your code. - [[http://mrhx.ucoz.com/load/ mrhx Software's VISG]] has a more classical user interface. - Less helpful may be the graphical resource editors generating scripts for the resource compiler. Any editor generating scripts compatible with ""GoRC"" can be used, as the one included with [[http://fbedit.freebasic.net/index.php FbEdit]]. Graphical resource editors are a great help in designing dialogs and menus, but they leave to you the task of writing the window procedures required to make them active. - - -{{anchor name="item0|Back to top"}} +[[http://www.freewebs.com/fielden/">Jerry Fielden' Ezeegui]] utilise une interface "graphique" en mode texte pour vous permettre de construire votre code. + [[http://mrhx.ucoz.com/load/">mrhx Software's VISG]] a une interface utilisateur plus classique. + Moins utile peut être les éditeurs de ressources graphiques générant des scripts pour le compilateur de ressources. N'importe quel éditeur de générant des scripts compatible avec GoRC peut être utilisé, comme celui fourni avec [[http://fbedit.freebasic.net/index.php">FbEdit]]. Les éditeurs de ressources graphiques sont d'une grande aide dans la conception de dialogues et de menus, mais ils vous laissent le soin d'écrire les procédures fenêtres nécessaires pour les rendre actifs. + [[#item0">Retour en haut de la page]] + {{fbdoc item="see"}} -{{fbdoc item="see"}} +[[CompilerFAQ FAQ du compilateur]]. + +[[FaqPgrtlib FAQ de la bibliothèque d'exécution de FB]]. [[CompilerFAQ Compiler FAQ]]. [[FaqPgrtlib FB Runtime Library FAQ]]. diff --git a/fbdocs/manual/cache/FaqPgbloadworkaround.wakka b/fbdocs/manual/cache/FaqPgbloadworkaround.wakka index bd156ca8b0..9b5ed81d77 100644 --- a/fbdocs/manual/cache/FaqPgbloadworkaround.wakka +++ b/fbdocs/manual/cache/FaqPgbloadworkaround.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BLOAD/BSAVE text mode work-around"}}---- -These functions allow you to use BSAVE and BLOAD in a text mode. +Ces fonctions vous permettent d'utiliser BSAVE et BLOAD en mode texte. {{fbdoc item="filename" value="examples/manual/faq/gfxlib2/bload-workaround.bas"}}%%(freebasic) Sub _bsave( file As String, p As Any Ptr, sz As Integer ) @@ -24,4 +24,4 @@ Sub _bload( file As String, p As Any Ptr ) Close -End Sub%% \ No newline at end of file +End Sub \ No newline at end of file diff --git a/fbdocs/manual/cache/FaqPggetputstructure.wakka b/fbdocs/manual/cache/FaqPggetputstructure.wakka index 95ca48f2a9..d1e9ca8266 100644 --- a/fbdocs/manual/cache/FaqPggetputstructure.wakka +++ b/fbdocs/manual/cache/FaqPggetputstructure.wakka @@ -1,6 +1,6 @@ {{fbdoc item="title" value="GET/PUT image header example"}}---- -Example showing the two different headers used for image buffers. -Note: ##[[KeyPgImageInfo ImageInfo]]## is provided as a simpler alternative to reading the image structures directly. +Exemple montrant les deux en-têtes différentes utilisées pour les tampons d'image. +Note: ##[[KeyPgImageInfo ImageInfo]]## est fourni comme une alternative plus simple pour lire directement les structures image. {{fbdoc item="filename" value="examples/manual/faq/gfxlib2/image-header.bas"}}%%(freebasic) '' fbgfx.bi contains the necessary structures and constants for working @@ -60,9 +60,9 @@ imagedestroy picture sleep%% -NOTE: To use this code with an array, pass your array to the function, like this: +NOTE: Pour utiliser ce code avec un tableau, passez votre tableau à la fonction, comme ceci: %%(freebasic) show_image_info( varptr( myarray( L ) ) ) %% -where L is the lower bound of myarray(). \ No newline at end of file +où Lest la borne inférieure de myarray(). \ No newline at end of file diff --git a/fbdocs/manual/cache/FaqPggfxlib2.wakka b/fbdocs/manual/cache/FaqPggfxlib2.wakka index 147f0d6bbe..fb5242cf13 100644 --- a/fbdocs/manual/cache/FaqPggfxlib2.wakka +++ b/fbdocs/manual/cache/FaqPggfxlib2.wakka @@ -1,95 +1,102 @@ {{fbdoc item="title" value="Frequently Asked FreeBASIC Graphics Library Questions"}}---- -{{anchor name="item0"}} + -**FreeBASIC Graphics Library questions:** - ==- {{anchor name="item1|How can I link/use Gfxlib?"}}== - ==- {{anchor name="item2|What about the fbgfx.bi header file?"}}== - ==- {{anchor name="item3|How are GET/PUT arrays managed?"}}== - ==- {{anchor name="item4|Why is BSAVE/BLOAD crashing?"}}== - ==- {{anchor name="item5|How can I get the red, green, blue, or alpha component of a colour?"}}== - ==- {{anchor name="item6|How can I make the 'x' button in the window header close my application?"}}== - ==- {{anchor name="item7|Can't run programs using SCREEN 13 or 14 in fullscreen !"}}== +**Questions sur la bibliothèque graphique de FreeBASIC:** + **- [[#item1">Comment puis-je lier/utiliser Gfxlib?]]** + **- [[#item2">Qu'en est-il du fichier d'en-tête ##fbgfx.bi##?]]** + **- [[#item3">Comment sont managés les tableaux GET/PUT?]]** + **- [[#item4">Pourquoi BSAVE/BLOAD se plantent-ils?]]** + **- [[#item5">Comment puis-je obtenir les composantes rouge, vert, bleu ou alpha d'une couleur?]]** + **- [[#item6">Comment puis-je faire pour que le bouton "x" dans l'en-tête la fenêtre ferme mon application?]]** + **- [[#item7">Impossible d'exécuter des programmes en utilisant SCREEN 13 ou 14 en mode plein écran!]]** +
    **Questions sur la bibliothèque graphique de FreeBASIC** -{{fbdoc item="back" value="DocToc|Table of Contents"}} +**Comment puis-je lier/utiliser Gfxlib?** ----- +Gfxlib est "intégrée" dans le langage, il n'est pas nécessaire d'inclure n'importe quel fichier .bi ou de lier n'importe quelle bibliothèque de façon explicite. FreeBASIC détecte que vous voulez utiliser Gfxlib quand il trouve l'instruction [[KeyPgScreengraphics Screen]] or [[KeyPgScreenres ScreenRes]]. Donc, pour utiliser Gfxlib, il suffit de commencer par un mode d'écran graphique et d'utiliser les commandes graphiques. -@@**FreeBASIC Graphics Library questions**@@ +[[#item0">Retour en haut de la page]] -{{anchor name="item1"}}==How can I link/use Gfxlib?== - Gfxlib is "built in" into the language, it is not necessary to include any .bi file or to link any library explicitly. FreeBASIC detects you want to use Gfxlib when it finds a [[KeyPgScreengraphics SCREEN]] or [[KeyPgScreenres SCREENRES]] instruction. So to use Gfxlib, just start a graphics screen mode and use the graphics commands. +**Qu'en est-il du fichier d'en-tête ##fbgfx.bi##?** + Le fichier en-tête ##fbgfx.bi## est disponible pour être inclus dans un programme et contient des définitions de constantes et de type qui peuvent être utiles pour le programmeur lors de l'utilisation Gfxlib. Cependant vous n'avez pas à inclure explicitement ce fichier pour utiliser Gfxlib; l'en-tête est uniquement disponible comme une aide. Le contenu inclut constantes indicateurs de mode de [[KeyPgScreengraphics Screen]] / [[KeyPgScreenres ScreenRes]], les définitions des [[GfxScancodes scancodes clavier]] et plus encore. -{{anchor name="item0|Back to top"}} +[[#item0">Retour en haut de la page]] -{{anchor name="item2"}}==What about the ##fbgfx.bi## header file?== - The ##fbgfx.bi## header file is available for inclusion by your program, and contains constant and type definitions that may be helpful to the programmer when using Gfxlib. You do not have to explicitly include this file to use Gfxlib however; the header is only available as an aid. Contents include [[KeyPgScreengraphics SCREEN]] / [[KeyPgScreenres SCREENRES]] mode flag constants, definitions of [[GfxScancodes Keyboard scancodes]] and more. +**Comment sont managés les tableaux GET/PUT?** + Dans FreeBasic, les images peuvent être utilisées comme des tableaux (comme dans QB) ou en tant que pointeurs. De toute façon, les données d'image sont contenues dans un seul bloc continu. La partie principale se compose d'une en-tête suivie par les données image. L'en-tête peut être de deux types (ancien style et nouveau style) et détermine le format des données d'image suivants, pour les détails voir [[GfxInternalFormats Formats graphiques internes]]. -{{anchor name="item0|Back to top"}} +[[#item0">Retour en haut de la page]] -{{anchor name="item3"}}==How are GET/PUT arrays managed?== - In FreeBASIC, images can be used as arrays (as in QB) or as pointers. Either way, the image data is contained in one continuous chunk. The chunk consists of an header followed by the image data. The header can be of two types (old-style and new-style) and determines the format of the following image data, for details see [[GfxInternalFormats]] . +**Pourquoi BSAVE/BLOAD se plantent-ils?** + BSAVE/BLOAD ne peuvent être utilisés que pour charger et enregistrer des écrans graphiques sous FreeBASIC. Ils ne peuvent pas être utilisés pour enregistrer un écran en mode texte. Pour charger et sauvegarder un tableau voyez cet [[FaqPgbloadworkaround extrait de fichier utilisant GET/PUT]] . -{{anchor name="item0|Back to top"}} +[[#item0">Retour en haut de la page]] -{{anchor name="item4"}}==Why is BSAVE/BLOAD crashing?== - BSAVE/BLOAD can only be used to load and save graphics screens in FreeBASIC. It can't be used to save a text mode screen. To load and save an array check this [[FaqPgbloadworkaround snippet using file GET/PUT]] . +**Comment puis-je obtenir les composantes rouge, vert, bleu ou alpha d'une couleur?** + Chaque octet dans un attribut de couleur correspond aux composantes rouge, vert, bleu et alpha. L'exemple suivant montre comment extraire les valeurs des composantes à partir d'un attribut de couleur 16, 24 ou 32 bits. {{anchor name="item0|Back to top"}} -{{anchor name="item5"}}==How can I get the red, green, blue, or alpha component of a color?== +#define rgb_a(x) ((x) Shr 24) - Each byte in a color attribute corresponds with the red, green, blue, and alpha components. The following example shows how to extract the component values from a 16, 24, or 32 bit color attribute. + #define rgb_r(x) ((x) Shr 16 And 255) -{{fbdoc item="filename" value="examples/manual/faq/gfxlib2/RGB-component.bas"}}%%(freebasic) -#define rgb_a(x) ((x) Shr 24) -#define rgb_r(x) ((x) Shr 16 And 255) #define rgb_g(x) ((x) Shr 8 And 255) #define rgb_b(x) ((x) And 255) - -dim as uinteger c -dim as integer x, y -dim as ubyte red, green, blue, alpha +Dim As UInteger c +Dim As Integer x, y +Dim As UByte red, green, blue, Alpha '' Assume a 16, 24, or 32 bit screen mode has been set c = Point(x, y) red = rgb_r(c) + green = rgb_g(c) blue = rgb_b(c) Alpha = rgb_a(c) %% +[[#item0">Retour en haut de la page]] +**Comment puis-je faire pour que le bouton "x" dans l'en-tête la fenêtre ferme mon application?** +En mode graphique fenêtré, vous pouvez tester pour l'appui sur le bouton "X" (fermer) de la fenêtre avec ##[[KeyPgInkey Inkey]]##. Ceci s'applique à Win32 et Linux, sous DOS il n'y a pas de bouton "X". -{{anchor name="item0|Back to top"}} +Voici un petit exemple: {{anchor name="item6"}}==How can I make the 'x' button in the window header close my application?== - In windowed graphics mode you can test for the press of the window's X (close) button with ##[[KeyPgInkey Inkey]]##. This applies to Win32 and Linux, in DOS there is no "X" button. + '' "X" close button example , Win32 and Linux only - Here is a small example: + Dim As String key -{{fbdoc item="filename" value="examples/manual/faq/gfxlib2/check-for-close.bas"}}%%(freebasic) -'' "X" close button example , Win32 and Linux only -Dim as String key Screen 13 Do - Print "Click the 'x' to close this app." - Sleep - key = Inkey -Loop Until key = Chr(27) Or key = Chr(255, 107) 'escape or x-button -%% +Print "Click the 'x' to close this app." +Sleep +key = Inkey + Loop Until key = Chr(27) Or key = Chr(255, 107) 'escape or x-button + %% + NOTE: Si vous utilisez une ancienne version de FreeBASIC, vous pouvez avoir à utiliser Chr(255)+"X" +[[#item0">Retour en haut de la page]] +**Impossible d'exécuter des programmes en utilisant SCREEN 13 ou 14 en mode plein écran!** - NOTE: If you use an old version of FreeBASIC, you may have to use Chr( 255 ) + "X" + Il s'agit d'une limitation matérielle/pilote (Win32 et Linux seulement?). Les cartes vidéo, de nos jours, ne gèrent pas ces modes à faible résolution graphique. Si le mode plein écran est nécessaire vous devez réécrire en utilisant au moins SCREEN 17 ou 18, ou une résolution de 640x480 ou supérieure, pour être sûr que du matériel moderne puisse la gérer. -{{anchor name="item0|Back to top"}} +[[#item0">Retour en haut de la page]] -{{anchor name="item7"}}==Can't run programs using SCREEN 13 or 14 in fullscreen !== - It's a hardware/driver limitation (Win32 and Linux only ?). Video cards don't implement those low resolution graphic modes nowadays. If fullscreen is required you should rewrite it using at least SCREEN 17 or 18, or a resolution of 640x480 or higher to be sure modern hardware can handle it. +{{fbdoc item="see"}} + - [[CompilerFAQ FAQ du compilateur]]. + +- [[FaqPgrtlib FAQ de la bibliothèque d'exécution de FB]]. + +- [[FaqPggfxlib2 FAQ de la bibliothèque graphique de FreeBASIC]] + [[KeyPgImagecreate Imagecreate]] needs to create an image buffer that fits the current screen's pixel format, and it cannot do so if there is no screen mode setup yet, so it returns NULL, very likely resulting in a NULL pointer access later on that crashes the program. + + This is known to happen when Imagecreate is called //before// the graphics library was initialized with a call to [[KeyPgScreengraphics Screen]] or [[KeyPgScreenres Screenres]], as may happen when Imagecreate is called in a global constructor that is invoked before the Screen or Screenres call in the main part of the program. In such a case it is necessary to move the screen initialization into a constructor too, and have it execute before the image-creating constructors. {{anchor name="item0|Back to top"}} {{fbdoc item="see"}} - - [[CompilerFAQ Compiler FAQ]]. - - [[FaqPgrtlib FB Runtime Library FAQ]]. + - [[CompilerFAQ Compiler FAQ]] + - [[FaqPgrtlib FB Runtime Library FAQ]] - [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]] -{{fbdoc item="back" value="DocToc|Table of Contents"}} - +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/FaqPgrtlib.wakka b/fbdocs/manual/cache/FaqPgrtlib.wakka index d79da2969c..5cc487d842 100644 --- a/fbdocs/manual/cache/FaqPgrtlib.wakka +++ b/fbdocs/manual/cache/FaqPgrtlib.wakka @@ -1,69 +1,69 @@ {{fbdoc item="title" value="Frequently Asked FB Runtime Library Questions"}}---- -{{anchor name="item0"}} -**FreeBASIC Runtime Library questions:** + +**Questions sur la bibliothèque d'exécution de FreeBASIC:** - ==- {{anchor name="item1|How do I play sound?"}}== - ==- {{anchor name="item2|How do I access the serial ports?"}}== - ==- {{anchor name="item3|How do I print?"}}== - ==- {{anchor name="item4|How do I access the hardware ports?"}}== - ==- {{anchor name="item5|What is the behavior of strings passed byval?"}}== + **- [[#item1">Comment puis-je jouer des sons?]]** + **- [[#item2">Comment puis-je accéder aux ports série?]]** + **- [[#item3">Comment puis-je imprimer?]]** + **- [[#item4">Comment puis-je accéder aux ports matériels?]]** + **- [[#item5">Quel est le comportement de chaînes passées "byval"?]]** -{{fbdoc item="back" value="DocToc|Table of Contents"}} +
    **Questions sur la bibliothèque d'exécution de FreeBASIC** ----- +** Comment puis-je jouer des sons?** -@@**FreeBASIC Runtime Library questions**@@ +Des mots-clés sonores de QB seul BEEP est géré dans FB. -{{anchor name="item1"}}== How do I play sound?== - Of the QB's sound keywords only BEEP is implemented in FB. - If PC speaker sound is required, it should be programmed using IN and OUT. See the example in the OUT keyword for a replacement of SOUND. - There is a library called QBSound that allows to emulate qb's ability to PLAY in the background tunes encoded in strings, it uses the soundcard's synthesizer. - If what's required is to play .wav or .mp3 files thru a soundcard, external libraries as FMOD or BASS can be used in Linux and Windows. For DOS see the [[FaqDOS DOS FAQ section]]. +Si le haut-parleur PC est nécessaire, il doit être programmé en utilisant IN et OUT. Voir l'exemple dans le mot-clé OUT pour un remplacement de SOUND. + Il existe une bibliothèque appelée QBSound qui permet d'émuler la capacité de QB d'utiliser PLAY en fond sonore, pour des airs dans des chaînes codées, en utilisant la carte son de synthétiseur. + Si c'est de jouer des fichiers .wav ou .mp3 grâce à une carte son, des bibliothèques externes comme FMOD ou BASS peut être utilisées sous Linux et Windows. Pour DOS voir la [[FaqDOS FAQ DOS]]. + [[#item0">Retour en haut de la page]] + **Comment puis-je accéder aux ports série?** -{{anchor name="item0|Back to top"}} +**DOS** -{{anchor name="item2"}}==How do I access the serial ports?== +Voir la [[FaqDOS FAQ DOS]]. - **DOS** - See [[FaqDOS DOS FAQ section]]. + **Windows et Linux** + Voir [[KeyPgOpenCom Open Com]]. - **Windows and Linux** - See [[KeyPgOpenCom Open Com]]. + [[#item0">Retour en haut de la page]] + **Comment puis-je imprimer?** -{{anchor name="item0|Back to top"}} +Depuis la version 0.15, FB accepte la sortie de caractères vers l'imprimante. -{{anchor name="item3"}}==How do I print?== - Since version 0.15 FB supports character output to printer. - To print graphics two approaches are possible: - - Preprocess the graphics, program the printer and send the pixels in FB. This is OS-portable but depends on the printer model. The only way for DOS, see also [[FaqDOS DOS FAQ section]]. - - In Windows and Linux there are specific API calls. This is not OS-portable but the OS's printer driver makes it printer-independent +Pour imprimer des graphiques deux approches sont possibles: + - Prétraiter les graphismes, programmer l'imprimante et envoyer les pixels dans FB. Ceci est portable côté OS mais dépend du modèle d'imprimante. La seule façon pour DOS, voir aussi [[FaqDOS FAQ DOS]]. + - Dans Windows et Linux il existe des appels d'API spécifiques. Ceci n'est pas portable côté OS mais le pilote OS de l'imprimante rend l'imprimante independante. + [[#item0">Retour en haut de la page]] + **Comment puis-je accéder aux ports matériels?** -{{anchor name="item0|Back to top"}} +INP, OUT et WAIT V0.15 QB sont implémentés. -{{anchor name="item4"}}==How do I access the hardware ports?== +GfxLib intercepte les appels à certains ports VGA pour émuler la large utilisation de la manipulation de la Palete dans QB et les méthodes de vsync. Ainsi les ports &H3DA, &H3C7, &H3C8 et &H3C9 ne sont pas accessibles si GfxLib est utilisé. Tous les autres ports sont accessibles. - As of V0.15 QB's INP, OUT and WAIT are implemented. - The GfxLib intercepts the calls to some VGA ports to emulate the widely used QB's palete manipulation and vsync methods. So ports &H3DA, &H3C7, &H3C8 and &H3C9 can't be accessed it GfxLib is used. All other ports are accessible. - No further care is required to use INP and OUT in Linux or DOS. For the Windows version the required device driver is installed each first time the program is run in a windows session; this requires Administrator rights for this first run or the program will end with an error. + Aucun soin supplémentaire n'est nécessaire pour utiliser INP et OUT sous Linux ou DOS. Pour que la version Windows le pilote de périphérique requis est installé à chaque fois que le premier programme est exécuté dans une session Windows; cela nécessite des droits d'administrateur pour cette première exécution ou le programme se terminera avec une erreur. + [[#item0">Retour en haut de la page]] + **Quel est le comportement de chaînes passées "byval"?** -{{anchor name="item0|Back to top"}} +Cet article a été écrit le 30.01.2007. -{{anchor name="item5"}}==What is the behavior of strings passed byval?== +Une [[KeyPgString String]] FreeBASIC est essentiellement un type intégré défini par l'utilisateur qui, entre autres choses, contient un pointeur vers les données chaîne et sa longueur. Ce type est appelé un "descripteur" en interne, et c'est ce descripteur qui est passé aux procédures quand les paramètres sont passés par référence. -~&This item is written as of 01.30.2007. +Lorsqu'ils sont passés par valeur, cependant, ce sont les données réelles de la chaîne qui sont passées, et non pas le descripteur. En interne, la chaîne de données est terminée par le caractère NULL (chr(0)). Lorsqu'une [[KeyPgString String]] temporaire est créée pour une procédure, FreeBASIC copie les données de la chaîne transmise jusqu'au premier caractère NULL. Si l'argument passé [[KeyPgString String]] contient des caractères NULL dans la chaîne, alors le reste de la chaîne de données après le premier NULL n'est pas copié et la chaîne est tronquée. Vous courez également le risque d'écrire en dehors des limites de la mémoire allouée. - A FreeBASIC [[KeyPgString String]] is essentially a built-in user-defined type that, among other things, contains a pointer to the string data and it's length. This type is called a 'descriptor' internally, and it is this descriptor that is passed to procedures when it's parameters are passed by reference. - When passed by value, however, the actual string data is passed, not the descriptor. Internally, the string data is terminated with the NULL character (chr(0)). When the temporary [[KeyPgString String]] is created for the procedure, FreeBASIC copies the string data passed up until the first NULL character. If the [[KeyPgString String]] argument passed contained NULL characters within the string, then the rest of the string data after the first NULL is not copied, and the string is truncated. You also run the risk of writing outside the bounds of the allocated memory. - This behavior will eventually be fixed to act as it should: a temporary descriptor will be created for the procedure and a 'deep copy' of it's fields will be made (notably, the entire string data itself will be copied into new memory, and the new descriptor will point to that memory). - To be safe, pass [[KeyPgString Strings]] by reference. If you need to simulate the correct behavior of passing a [[KeyPgString String]] by value, either 1) create a temporary [[KeyPgString String]], initialize it with the [[KeyPgString String]] you want to pass and pass the temporary by reference, or 2) pass the [[KeyPgString String]] by reference and have the procedure create and initialize a temporary [[KeyPgString String]] and work with the temporary. + Ce comportement sera corrigé et agira comme il se doit: un descripteur temporaire sera créé pour la procédure et une "copie en profondeur" de ses champs sera effectuée (notamment, les données de la chaîne entière se seront copiées dans la nouvelle mémoire et le nouveau descripteur pointera vers cette mémoire). + Pour plus de sécurité, passez les [[KeyPgString String]] par référence. Si vous voulez simuler le comportement correct de passer une [[KeyPgString String]] par valeur, soit 1) créer une [[KeyPgString String]] temporaire, l'initialiser avec la [[KeyPgString String]] que vous désirez passer et passer la [[KeyPgString String]] temporaire par référence, ou 2) passer la [[KeyPgString String]] par référence et créer la procédure et l'initialiser avec une [[KeyPgString String]] temporaire et travailler avec la [[KeyPgString String]] temporaire. + [[#item0">Retour en haut de la page]] + Voir aussi: -{{anchor name="item0|Back to top"}} +- [[CompilerFAQ FAQ du compilateur]] -See also: - - [[CompilerFAQ Compiler FAQ]] - - [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]] -and +- [[FaqPggfxlib2 FAQ de la bibliothèque graphique de FreeBASIC]] + et + - [[FaqPgWin32 FAQ Win32]] +- [[FaqDOS FAQ DOS]] - [[FaqPgWin32 Win32 related FAQ]] - [[FaqDOS DOS related FAQ]] diff --git a/fbdocs/manual/cache/FaqPgxbox.wakka b/fbdocs/manual/cache/FaqPgxbox.wakka index 1317d181bc..a13c8ad26b 100644 --- a/fbdocs/manual/cache/FaqPgxbox.wakka +++ b/fbdocs/manual/cache/FaqPgxbox.wakka @@ -1,135 +1,135 @@ {{fbdoc item="title" value="Frequently Asked Questions"}}---- -**FreeBASIC on Xbox general questions** - ==- {{anchor name="item1|Can FreeBASIC really make Xbox games?"}}== - ==- {{anchor name="item2|How was the FreeBASIC Xbox port made?"}}== - ==- {{anchor name="item3|How about a port for Xbox 360?"}}== - ==- {{anchor name="item4|How about a port for PlayStation or another console?"}}== - ==- {{anchor name="item5|Why don't you use an emulator until a developer gets a modded Xbox?"}}== - ==- {{anchor name="item6|Why don't you use the Microsoft XDK?"}}== - ==- {{anchor name="item7|Why don't you use the Microsoft debugger to fix it?"}}== - ==- {{anchor name="item8|Isn't this illegal? Can't Microsoft sue you?"}}== +**Questions générales sur FreeBASIC et la Xbox** + **- [[#item1">Peut-on vraiment faire des jeux pour la Xbox avec FreeBASIC?]]** + **- [[#item2">Comment a été fait le portage de la Xbox sous FreeBASIC?]]** + **- [[#item3">Que diriez-vous d'un port pour la Xbox 360?]]** + **- [[#item4">Que diriez-vous d'un portage pour la PlayStation ou une autre console?]]** + **- [[#item5">Pourquoi n'utilisez-vous pas un émulateur jusqu'à ce qu'un développeur obtienne une "modded Xbox"?]]** + **- [[#item6">Pourquoi n'utilisez-vous pas XDK de Microsoft?]]** + **- [[#item7">Pourquoi ne pas utiliser le débogueur de Microsoft pour résoudre ce problème?]]** + **- [[#item8">N'est-ce pas illégal? Microsoft ne peut pas vous poursuivre?]]** -**Getting Started with FreeBASIC on Xbox questions** - ==- {{anchor name="item21|What do I need to compile Xbox games with FreeBASIC?"}}== - ==- {{anchor name="item22|How would you get input?"}}== - ==- {{anchor name="item23|Does it only run on certain Xboxes?"}}== - ==- {{anchor name="item24|Is another language (eg C or ASM) needed for the job?"}}== - ==- {{anchor name="item25|Do you need a special lib?"}}== - ==- {{anchor name="item26|Can you use premade functions (inkey, line etc)?"}}== - ==- {{anchor name="item27|What else should I know?"}}== +**Questions sur comment débuter avec FreeBASIC sur Xbox** + **- [[#item21">De quoi ai-je besoin pour compiler les jeux Xbox avec FreeBASIC?]]** + **- [[#item22">Comment voulez-vous obtenir ??input??]]** + **- [[#item23">Ne fonctionnera-t-il que sur certaines Xbox?]]** + **- [[#item24">Un autre langage (par exemple C ou ASM) est-il nécessaire?]]** + **- [[#item25">Avez-vous besoin d'une lib spéciale?]]** + **- [[#item26">Pouvez-vous utiliser des fonctions préfabriquées (inkey, line etc)?]]** + **- [[#item27">Que dois-je savoir?]]** -{{fbdoc item="back" value="DocToc|Table of Contents"}} ----- -@@**FreeBASIC on Xbox general questions**@@ +
    **Questions générales sur FreeBASIC et la Xbox** +**Peut-on vraiment faire des jeux pour la Xbox avec FreeBASIC?** +En théorie, oui. Une copie de FreeBASIC 0.13 a été portée sur la Xbox en Juillet 2005, et a produit des exécutables qui fonctionnaient. Toutefois, les modifications du compilateur pour la version 0,14 ont cassé la compatibilité. -{{anchor name="item1"}}==Can FreeBASIC really make Xbox games?== +Le portage Xbox est actuellement en mode "zombie"; personne dans l'équipe du projet n'a la console pour le moment - le portage d'origine a été fait par SJ Zero, mais il a été cassé avec les modifications de bibliothèque d'exécution apportées dans la version 0.14. -In theory, yes. A copy of FreeBASIC 0.13 was ported to the Xbox in July 2005, and produced working executables. However, changes to the compiler for the 0.14 release broke compatiblity. +Le portage est en attente jusqu'à ce que le portage principal de GCC soit complet, parce qu'on estime que ce portage corrigera celui de la Xbox. -The Xbox port is currently in zombie mode; nobody in the project team has the console at the moment - the original port was done by SJ Zero, but it got broken with the runtime library modifications done in v0.14. +**Comment a été fait le portage de la Xbox sous FreeBASIC?** -The port is on hold until the GCC backend port is complete, because it is believed that this port will fix the Xbox port. +FreeBASIC pour la Xbox, c'est possible grâce aux efforts des développeurs Open Source qui ont créé OpenXDK, le kit logiciel légal de développement pour la Xbox. OpenXDK est créé pour un environnement de type Unix, qui est tout à fait compatible avec les sources FreeBASIC. -{{anchor name="item2"}}==How was the FreeBASIC Xbox port made?== +Le portage a été créé en forçant la bibliothèque d'exécution FreeBASIC à utiliser la version OpenXDK de Glibc au lieu de la version mingw32. Lors d'une compilation avec les options correctes, ce qui est créé ressemble à un fichier .EXE standard. CXBE enlève l'en-tête Windows PE sur ce fichier exécutable et la remplace par une en-tête de Xbox. -FreeBASIC for Xbox is possible because of the efforts of Open Source developers who created OpenXDK, the legal software development kit for Xbox. OpenXDK is created for a unixish environment, which is quite compatible with the FreeBASIC source. +En réalité, ce que tous les portages font réellement, c'est de changer de la bibliothèque d'exécution et de lier d'une certaine manière pour permettre à l'utilitaire CXBE de créer un exécutable Xbox. -The port was created by forcing the FreeBASIC runtime library to use the OpenXDK version of Glibc instead of the mingw32 version. When compiled with the correct flags, this creates what looks like a standard EXE file. CXBE then strips the Windows PE header on this executable file and replaces it with an Xbox header. +**Que diriez-vous d'un portage pour la Xbox 360?** -In effect, all the port really does is change the runtime library and link in a certain way to allow the CXBE utility to create an Xbox executable. +La Xbox est un Intel Pentium 3 éxécutant un dérvé du chipset NVIDIA nForce, avec une puce vidéo NVIDIA et une carte sonore NVIDIA SoundStorm. C'est pourquoi le portage Xbox était possible et relativement simple à faire. -{{anchor name="item3"}}==How about a port for Xbox 360?== +La Xbox 360, d'autre part, utilise un CPU exotique et il en est de même pour le matériel. FreeBASIC ne peut actuellement produire des exécutables pour la Xbox 360. -The Xbox is an Intel Pentium 3 running a derivative of the NVIDIA nForce chipset, with an NVIDIA video chip and an NVIDIA ""SoundStorm"" sound card. This is why the Xbox port was possible and relatively straightforward to do. +Un autre problème est l'absence d'un équivalent à OpenXDK pour la Xbox 360. Cela forcerait n'importe quel portage à utiliser XDK Xbox 360, un morceau de logiciel sous copyright créé par Microsoft. Ce serait illégal, immoral et mettrait FreeBASIC en danger légal. -The Xbox 360, on the other hand, uses an alien CPU, and similarly alien hardware. FreeBASIC cannot presently be made to produce executables for the Xbox 360. +Par conséquent, un portage pour la Xbox 360 doit être considéré comme impossible à l'heure actuelle. -Another problem is the lack of an equivilent to OpenXDK for the Xbox 360. This would force any port to use the Xbox 360 XDK, a copyrighted piece of software created by Microsoft. This would be illegal, immoral, and would put FreeBASIC in legal jeparody. +**Que diriez-vous d'un portage pour la PlayStation ou une autre console?** -Therefore, a port to the Xbox 360 is to be considered impossible at this time. +La Xbox est un Intel Pentium 3 éxécutant un dérvé du chipset NVIDIA nForce, avec une puce vidéo NVIDIA et une carte sonore NVIDIA SoundStorm. C'est pourquoi le portage Xbox était possible et relativement simple à faire. -{{anchor name="item4"}}==How about a port for ""PlayStation"" or another console?== +La PlayStation, en revanche, utilise une puce RISC, pour laquelle FreeBASIC ne actuellement produire de code. Presque toutes les consoles utilisent des processeurs non x86, interdisant un développement à l'aide de FreeBASIC. -The Xbox is an Intel Pentium 3 running a derivative of the NVIDIA nForce chipset, with an NVIDIA video chip and an NVIDIA ""SoundStorm"" sound card. This is why the Xbox port was possible and relatively straightforward to do. +Un autre problème est l'absence d'un équivalent à OpenXDK pour de nombreuses consoles. Cela forcerait n'importe quel portage à utiliser un kit commercial de développement de logiciels, un morceau de logiciel sous copyright créé par le fabricant de la console. Ce serait illégal, immoral et mettrait FreeBASIC en danger légal. -The ""PlayStation"", on the other hand, uses a RISC chip, which FreeBASIC cannot currently produce code for. Almost all consoles utilize non x86 processors, stopping development using FreeBASIC from being possible. +Par conséquent, des portages pour les autres consoles doivent être considérés comme impossibles à l'heure actuelle. Toutefois, de nombreux portages de consoles et autres plates-formes avec des kits de développement légalement disponibles seront possibles quand le portage principal de GCC backend sera complet. -Another problem is the lack of an equivilent to OpenXDK for many consoles. This would force any port to use the commercial software development kit, a copyrighted piece of software created by the console manufacturer. This would be illegal, immoral, and would put FreeBASIC in legal jeparody. +**Pourquoi n'utilisez-vous pas un émulateur jusqu'à ce qu'un développeur obtienne une "modded Xbox"?** -Therefore, a port to other consoles are to be considered impossible at this time. However, many ports to consoles and other platforms with legally available development kits will be possible when the GCC backend port is complete. +Aucun émulateur Xbox connu n'est capable de faire fonctionner du code FreeBASIC. Une console de matériel légitime est nécessaire pour exécuter les programmes réalisés. Cela rend un émulateur complètement inutile pour le développement. -{{anchor name="item5"}}==Why don't you use an emulator until a developer gets a modded Xbox?== +**Pourquoi n'utilisez-vous pas XDK de Microsoft?** -No known Xbox emulator is capable of running FreeBASIC code. A legitimate hardware console is required to run the programs made. This makes an emulator completely useless for development. +Il y a deux raisons principales de ne pas utiliser XDK de Microsoft. -{{anchor name="item6"}}==Why don't you use the Microsoft XDK?== +1) XDK de Microsoft est un morceau de logiciel sous copyrightet il l'utiliser serait illégal et immoral, avec le risque d'une action judiciaire contre FreeBASIC. En outre, aucun membre de l'équipe FreeBASIC n'a jamais eu aucun accès à l'XDK Microsoft, afin d'éviter "une contamination" légale de FreeBASIC. -There are two main reasons not to use the Microsoft XDK. +2) OpenXDK est développé autour de gcc et les systèmes de type UNIX tels que MinGW ou Cygwin. Cela signifie qu'il peut être intégré dans FreeBASIC avec très peu d'effort. XDK de Microsoft, d'autre part, est développé autour de compilateurs basés sur Microsoft, et ne serait donc pas facile à intégrer dans le code source de FreeBASIC. -1) Microsoft's XDK is a piece of copyrighted software, and utilizing it would be illegal and immoral, putting FreeBASIC at risk of legal action. Furthermore, no member of the FreeBASIC team has ever had any access to the Microsoft XDK, to prevent "tainting" FreeBASIC legally. +REMARQUE: LA PROTECTION DES DROITS D'AUTEUR DE MICROSOFT, ET PAR LA MEME DE FREEBASIC, EST DE PREMIERE IMPORTANCE DANS CE PROJET, NOUS NE VOULONS AUCUNE AIDE, DE QUICONQUE, SUR LE XDK; PAS PLUS D'UNE AIDE, DE QUICONQUE, SUR LE DEBOGUEUR XBOX. TOUTE TENTATIVE DE PROCURER LE XDK OU DE L'AIDE RELATIVE A CELUI-CI SERA ENVOYEE AUX ORGANISMES DE BONNE APPLICATION DE LA LOI. -2) OpenXDK is developed around gcc and UNIX-style systems such as MinGW or Cygwin. This means that it can be integrated into FreeBASIC with very little effort. Microsoft's XDK, on the other hand, is developed around Microsoft based compilers, and thus would not easily integate into the source code of FreeBASIC. +**Pourquoi ne pas utiliser le débogueur de Microsoft pour résoudre ce problème?** -__NOTE: PROTECTION OF MICROSOFT'S COPYRIGHT, AND BY PROXY OF FREEBASIC, IS OF PRIMARY IMPORTANCE IN THIS PROJECT. WE DO NOT WANT HELP FROM ANYONE WITH THE XDK, NOR DO WE WANT HELP FROM ANYONE WITH A DEBUGGER XBOX. ANY ATTEMPT TO OFFER THE XDK OR XDK RELATED HELP SHALL BE FORWARDED TO THE PROPER LAW ENFORCEMENT AGENCIES.__ +Il y a deux très bonnes raisons de ne pas utiliser le débogueur de Microsoft. -{{anchor name="item7"}}==Why don't you use the Microsoft debugger to fix it?== +1) XDK de Microsoft est un morceau de logiciel sous copyrightet il l'utiliser serait illégal et immoral, avec le risque d'une action judiciaire contre FreeBASIC. En outre, aucun membre de l'équipe FreeBASIC n'a jamais eu aucun accès à l'XDK Microsoft, afin d'éviter "une contamination" légale de FreeBASIC. -There are two very good reasons not to use the Microsoft debugger. +2) Le débogueur de Microsoft nécessite une Xbox spécialement modifiée que ni SJ Zero ni aucun membre de lééquipe de développement n'a, et franchement, personne qui a travaillé sur le portage estime que le débogueur fonctionnera avec des exécutables FreeBASIC -- tout comme le débogueur de Microsoft ne peut pas lire les fichiers du débogueur FreeBASIC, nous doutons que le débogueur Xbox puisse lire des fichiers du débogueur FreeBASIC. Peu importe, le point 1) l'emporte sur toute tentative. -1) Microsoft's XDK is a piece of copyrighted software, and utilizing it would be illegal and immoral, putting FreeBASIC at risk of legal action. Furthermore, no member of the FreeBASIC team has ever had any access to the Microsoft XDK, to prevent "tainting" FreeBASIC legally. +REMARQUE: LA PROTECTION DES DROITS D'AUTEUR DE MICROSOFT, ET PAR LA MEME DE FREEBASIC, EST DE PREMIERE IMPORTANCE DANS CE PROJET, NOUS NE VOULONS AUCUNE AIDE, DE QUICONQUE, SUR LE XDK; PAS PLUS D'UNE AIDE, DE QUICONQUE, SUR LE DEBOGUEUR XBOX. TOUTE TENTATIVE DE PROCURER LE XDK OU DE L'AIDE RELATIVE A CELUI-CI SERA ENVOYEE AUX ORGANISMES DE BONNE APPLICATION DE LA LOI. -2) Microsoft's debugger requires a specially modified Xbox which neither SJ Zero nor any development team member has, and frankly, nobody who has worked on the port believes the debugger would work with FreeBASIC executables -- just as Microsoft's debugger can't read FreeBASIC debugger files, we doubt the Xbox debugger could read FreeBASIC debugger files. Regardless, point #1 trumps any attempt. +**N'est-ce pas illégal? Microsoft ne peut pas vous poursuivre?** -__NOTE: PROTECTION OF MICROSOFT'S COPYRIGHT, AND BY PROXY OF FREEBASIC, IS OF PRIMARY IMPORTANCE IN THIS PROJECT. WE DO NOT WANT HELP FROM ANYONE WITH THE XDK, NOR DO WE WANT HELP FROM ANYONE WITH A DEBUGGER XBOX. ANY ATTEMPT TO OFFER THE XDK OR XDK RELATED HELP SHALL BE FORWARDED TO THE PROPER LAW ENFORCEMENT AGENCIES.__ +Les droit d'auteur (copyright) sont importants aussi bien pour la protection des firmes commerciales comme Microsoft et que pour celle des petits projets tels que FreeBASIC. Sans droits d'auteur, nous ne pouvons faire valoir aucun droit sur notre code (Dans notre cas, comme la GPL). De manière générale, il est des questions de copyright qui sont le plus souvent la cause des problèmes pour les projets open source qui tentent de faire des choses comme ça. -{{anchor name="item8"}}==Isn't this illegal? Can't Microsoft sue you?== +Parce que le portage de la Xbox FreeBASIC est créé en utilisant des outils logiciels dont la légalité a déjà été établie, souvent eux-mêmes provenant d'autres sources dont la légalité a été établie, FreeBASIC pour Xbox n'est pas illégal.Because the FreeBASIC Xbox port is created using software tools whose legality has already been established, themselves often derived from other sources whose legality has been established, FreeBASIC for Xbox is not illegal. Un soin attentif a été pris pour empêcher FreeBASIC d'utiliser n'importe quel code Microsoft sous copyright et on est et on sera vigilants pour empêcher l'accès à du code sous copyright. -Copyright is important for the protection of both commercial firms like Microsoft, and for small projects such as FreeBASIC. Without copyright, neither could enforce any rights over the code (In our case, such as the GPL). Generally speaking, it is copyright issues which are most often the cause of problems for open source projects attempting to do things like this. +
    **Questions sur comment débuter avec FreeBASIC sur Xbox** -Because the FreeBASIC Xbox port is created using software tools whose legality has already been established, themselves often derived from other sources whose legality has been established, FreeBASIC for Xbox is not illegal. Careful care has been taken to protect FreeBASIC from using any Microsoft copyrighted code, and diligence is and will be followed to prevent access to copyrighted code. +**De quoi ai-je besoin pour compiler les jeux Xbox avec FreeBASIC?** ----- -@@**Getting Started with FreeBASIC on Xbox questions**@@ +Le portage ne fonctionne pas actuellement, mais quand il sera prêt, vous aurez seulement besoin d'une copie de FreeBASIC pour Xbox. +**Comment voulez-vous obtenir ??input??** -{{anchor name="item21"}}==What do I need to compile Xbox games with FreeBASIC?== +Initialement, ??input?? sera acquise par SDL, tant que portage de la gfxlib n'est pas encore terminé. Cependant, l'un des développeurs travaille sur une version SDL générique de gfxlib, et cela fournira la fonctionnalité complète de la gfxlib au portage Xbox. -The port isn't currently working, but when it is ready, you will only need a copy of FreeBASIC for Xbox. +**Ne fonctionnera-t-il que sur certaines Xbox?** -{{anchor name="item22"}}==How would you get input?== +FreeBASIC pour les exécutables Xbox ne fonctionnera que sur Xbox "modded". Cependant, "modder" une Xbox est souvent aussi simple que de charger un "savegame" dans certains jeu. Plus d'informations sont disponibles sur le site [[http://www.xbox-linux.org/wiki/Main_Page">Xbox-Linux]]. -Initially, input will be acquired through SDL, as a gfxlib port is not yet complete. One of the developers is working on a generic SDL version of gfxlib, however, and it will provide full gfxlib functionality to the Xbox port. +**Un autre langage (par exemple C ou ASM) est-il nécessaire?** -{{anchor name="item23"}}==Does it only run on certain Xboxes?== +Non. FreeBASIC pour Xbox est la seule chose nécessaire -FreeBASIC for Xbox executables will only run on modded Xboxes. However, modding an Xbox is often as simple as loading a savegame in a certain game. More information is available on the [[http://www.xbox-linux.org/wiki/Main_Page Xbox-Linux]] website. +**Avez-vous besoin d'une lib spéciale?** -{{anchor name="item24"}}==Is another language (eg C or ASM) needed for the job?== +Non. FreeBASIC pour Xbox est fourni avec toutes les bibliothèques supportées. -No. FreeBASIC for Xbox is the only thing needed. +**Pouvez-vous utiliser des fonctions préfabriquées (inkey, line etc)?** -{{anchor name="item25"}}==Do you need a special lib?== +Actuellement, les commandes d'entrée et de sortie comme "inkey" et "line" ne sont pas disponibles, mais toutes les autres fonctions, y compris les E/S fichiers, le sont. L'un des développeurs travaille sur une version générique de SDL gfxlib, cependant, et si elle fonctionne, elle fournira la fonctionnalité complète gfxlib au portage xbox. -No. FreeBASIC for Xbox will come with all supported libraries. +**Que dois-je savoir?** -{{anchor name="item26"}}==Can you use premade functions (inkey, line etc)?== +Les exécutables créés par FreeBASIC pour la Xbox sont exempts de droits d'auteur de code Microsoft, ce qui les rend légaux pour la distribution. -Currently, input and output commands such as inkey and line aren't available, but all other functions, including file I/O, are. One of the developers is working on a generic SDL version of gfxlib, however, and if it functions, it will provide full gfxlib functionality to the xbox port. +Les fichiers source Windows et Linux qui sont conçus pour utiliser SDL et rtlib seront compilables pour Xbox hors de la "box". Tandis que la Xbox doit supporter le clavier à travers les ports du "gamepad" (connexion USB propriétaire), le schéma d'entrée devra être modifié pour tenir compte d'un "gamepad". {{anchor name="item27"}}==What else should I know?== diff --git a/fbdocs/manual/cache/FbGrammar.wakka b/fbdocs/manual/cache/FbGrammar.wakka new file mode 100644 index 0000000000..5a2a805591 --- /dev/null +++ b/fbdocs/manual/cache/FbGrammar.wakka @@ -0,0 +1,579 @@ + {{fbdoc item="section" value="Grammar Notation"}} + +**Format of a production** +//left hand side//: right hand side; + +: should be read as 'is defined as'. + +The right hand side of a production is terminated by a ;. + +A word in //italics// represent the name of a production (the left +hand side of the production). + +Few operators are used to describe the ""FreeBASIC"" grammar. + +{{table columns="2" cellpadding="5" cells="operator;meaning;.;any character;*;0 or more (repetition);+;1 or more (repetition);?;optional (choice);();grouping;|;separator (separates alternatives);semicolon;end of production"}} + +Any symbol that appears on the right hand side of a production +that is not an operator and does not appear in //italics// +represents itself and appears **bold**. +A symbol at the right hand side of a rule can refer to a production. +Such references are in //italics//. + +For navigational purposes a reference is a link to the production +being referenced. + +When reading the grammar be aware that ""FreeBASIC"" is a case insensitive +language. + +The grammar presented is not an exact statement of the ""FreeBASIC"" language. + +Go straight to: +//{{anchor name="program|program"}}// +//{{anchor name="expression|expression"}}// + +{{fbdoc item="section" value="Tokens"}} + +//{{anchor name="white"}}white//: **\t** | +//{{anchor name="any_char"}}any_char//:   **any valid character**;--- +//{{anchor name="eol"}}eol//:    **\n**|**\r**|**\n\r**;--- +//{{anchor name="statement_separator"}}statement_separator//: ( **:** | //{{anchor name="eol|eol"}}// )+;--- +//{{anchor name="dot"}}dot//:         **.**;--- +//{{anchor name="sign"}}sign//:        **+**|**-**;--- +//{{anchor name="alpha"}}alpha//:      **a**|**b**|**c**|**d**|**e**|**f**|**g**|**h**|**i**|**j**|**k**|**l**|**m**|**n**|**p**|**q**|**r**|**s**|**t**|**v**|**w**|**x**|**y**|**z**;--- +//{{anchor name="digit"}}digit//:       **0**|**1**|**2**|**3**|**4**|**5**|**6**|**7**|**8**|**9**;--- +//{{anchor name="hexdigit"}}hexdigit//:   **a**|**b**|**c**|**d**|**e**|**f**|//{{anchor name="digit|digit"}}//;--- +//{{anchor name="octdigit"}}octdigit//:   **0**|**1**|**2**|**3**|**4**|**5**|**6**|**7**;--- +//{{anchor name="bindigit"}}bindigit//:   **0**|**1**;--- +//{{anchor name="alphadigit"}}alphadigit//:  //{{anchor name="alpha|alpha"}}//| //{{anchor name="digit|digit"}}//;--- +//{{anchor name="integer_suffix"}}integer_suffix//:     **%**|**&**|**l**|**u**|**ul**|**ll**|**ull**;--- +//{{anchor name="floating_point_suffix"}}floating_point_suffix//:     **!**|**#**|**f**;--- +//{{anchor name="suffix"}}suffix//:      //{{anchor name="integer_suffix|integer_suffix"}}//|//{{anchor name="floating_point_suffix|floating_point_suffix"}}//|**$**;--- +//{{anchor name="expchar"}}expchar//:  **d**|**e**;--- +//{{anchor name="operator"}}operator// +~: **=** | **<** | **>** |**<>** |**+** | **-** | **""*""** | **@** +~| **""&""** | **->** | **/** | **\** | **^** | **andalso** +~| **orelse** | **and** | **or** | **xor** | **eqv** | **imp** +~| **+=** | **-=** | **""*=""** | **/=** | **\=** | **^=** | **&=** | +~| **and=** | **or=** | **xor=** | **eqv=** | **imp=** +~| **new** | **delete** | **delete[]** | **cast** | **procptr** +~| **varptr** | **strptr** | **sizeof** | **[]** | **()** +~; + +//{{anchor name="binary_operator"}}binary_operator// +~: **=** | **<** | **>** |**<>** |**+** | **-** | +~| **""&""** | **->** | **/** | **\** | **^** +~| **+=** | **-=** | **""*=""** | **/=** | **\=** | **^=** | **&=** | +~| **and=** | **or=** | **xor=** | **eqv=** | **imp=** +~| **andalso** | **orelse** +~; + +//{{anchor name="identifier"}}identifier// +~:  (//{{anchor name="alpha|alpha"}}//)(//{{anchor name="alphadigit|alphadigit"}}//|**_**)* +~|  **_**(//{{anchor name="alphadigit|alphadigit"}}//|**_**)+ +~; + +//{{anchor name="literal"}}literal// +~: //{{anchor name="sign|sign"}}// //{{anchor name="integer_literal|integer_literal"}}// //{{anchor name="integer_suffix|integer_suffix"}}// +~| //{{anchor name="sign|sign"}}// //{{anchor name="floating_literal|floating_literal"}}// //{{anchor name="floating_point_suffix|floating_point_suffix"}}// +~| //{{anchor name="string_literal|string_literal"}}// +~; + +//{{anchor name="integer_literal"}}integer_literal// +~: //{{anchor name="decimal_integer|decimal_integer"}}// +~| //{{anchor name="hexadecimal_integer|hexadecimal_integer"}}// +~| //{{anchor name="octal_integer|octal_integer"}}// +~| //{{anchor name="binary_integer|binary_integer"}}// +~; + +//{{anchor name="decimal_integer"}}decimal_integer//: //{{anchor name="digit|digit"}}//+; +//{{anchor name="hexadecimal_integer"}}hexadecimal integer//: **&h**//{{anchor name="hexdigit|hexdigit"}}//+; +//{{anchor name="octal_integer"}}octal_integer//: **&o**//{{anchor name="octdigit|octdigit"}}//+; +//{{anchor name="binary_integer"}}binary_integer//: **&b**//{{anchor name="bindigit|bindigit"}}//+;--- + +//{{anchor name="floating_literal"}}floating_literal// +~: //{{anchor name="digit|digit"}}//+(//{{anchor name="dot|dot"}}//(//{{anchor name="digit|digit"}}//+)?)?(//{{anchor name="exp_char|exp_char"}}//?(//{{anchor name="sign|sign"}}//?//{{anchor name="digit|digit"}}//+)?)?//{{anchor name="suffix|suffix"}}//? +~| (//{{anchor name="dot|dot"}}//(//{{anchor name="digit|digit"}}//+)?)?(//{{anchor name="exp_char|exp_char"}}//?(//{{anchor name="sign|sign"}}//?//{{anchor name="digit|digit"}}//+)?)?//{{anchor name="suffix|suffix"}}//? +~; + +//{{anchor name="string_literal"}}string_literal// +~: (**!**|**$**)?**"**(//{{anchor name="escape_sequence|escape_sequence"}}//|**""**|//{{anchor name="any_char|any_char"}}//)***"** (//{{anchor name="white|white"}}//*//{{anchor name="string_literal|string_literal"}}//)* +~; + +//{{anchor name="escape_sequence"}}escape_sequence// +~: //{{anchor name="simple_escape_sequence|simple_escape_sequence"}}// +~| //{{anchor name="unicode_escape_sequence|unicode_escape_sequence"}}// +~| //{{anchor name="decimal_escape_sequence|decimal_escape_sequence"}}// +~| //{{anchor name="hexadecimal_escape_sequence|hexadecimal_escape_sequence"}}// +~| //{{anchor name="octal_escape_sequence|octal_escape_sequence"}}// +~| //{{anchor name="binary_escape_sequence|binary_escape_sequence"}}// +~; + +//{{anchor name="simple_escape_sequence"}}simple_escape_sequence// +~: **\a**|**\b**|**\f**|**\l**|**\n**|**\r**|**\t**|**\v**|**\\**|**\'**|**\"** +~; + +//{{anchor name="unicode_escape_sequence"}}unicode_escape_sequence// +~: **\u**//{{anchor name="hexdigit|hexdigit"}} {{anchor name="hexdigit|hexdigit"}} {{anchor name="hexdigit|hexdigit"}} {{anchor name="hexdigit|hexdigit"}}// +~; + +//{{anchor name="decimal_escape_sequence"}}decimal_escape_sequence// +~: **\**//{{anchor name="digit|digit"}} {{anchor name="digit|digit"}} {{anchor name="digit|digit"}}// +~; + +//{{anchor name="hexadecimal_escape_sequence"}}hexadecimal_escape_sequence// +~: **\&h**//{{anchor name="hexdigit|hexdigit"}} {{anchor name="hexdigit|hexdigit"}}// +~; + +//{{anchor name="octal_escape_sequence"}}octal_escape_sequence// +~: **\&o**//{{anchor name="octdigit|octdigit"}} {{anchor name="octdigit|octdigit"}} {{anchor name="octdigit|octdigit"}}// +~; + +//{{anchor name="binary_escape_sequence"}}binary_escape_sequence// +~: **\&b**//{{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}} {{anchor name="bindigit|bindigit"}}// +~; + + +{{fbdoc item="section" value="Comment"}} + +//{{anchor name="comment"}}comment// +~: ( **""'""** | **rem**) ((**$**//directive//) | (**any_char_but_eol**""*"")) +~; +//{{anchor name="multiline_nested_comment"}}multiline_nested_comment// +~: **/'** ( . | //{{anchor name="multiline_nested_comment|multiline_nested_comment"}}//)* **'/**;--- + +{{fbdoc item="section" value="Toplevel"}} + +//{{anchor name="program"}}program// +~: //{{anchor name="line|line"}}//* EOF? +~; +//{{anchor name="line"}}line// +~: //{{anchor name="label|label"}}// (//{{anchor name="statement|statement"}}//|//{{anchor name="namespace_statement|namespace_statement"}}//)? //{{anchor name="comment|comment"}}//? //{{anchor name="eol|eol"}}// +~; + +//{{anchor name="label"}}label// +~: //{{anchor name="identifier|identifier"}}// **:** +~; + +//{{anchor name="statement"}}//statement +~: //{{anchor name="statement_separator|statement_separator"}}//? +(//{{anchor name="declaration|declaration"}}// | //{{anchor name="procedure_call_or_assign|procedure_call_or_assign"}}// | //{{anchor name="compound_statement|compound_statement"}}// | //{{anchor name="quirk_statement|quirk_statement"}}// | //{{anchor name="assembler_block|assembler_block"}}// | //{{anchor name="assignment|assignment"}}// )? +(//{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//)* +~; + +//{{anchor name="declaration"}}declaration// +~:(**public**|**private**)? +~~( +~~~(**static** +~~~~( //{{anchor name="function_definition|function_definition"}}// +~~~~| //{{anchor name="sub_definition|sub_definition"}}// +~~~~| //{{anchor name="operator_definition|operator_definition"}}// +~~~~| //{{anchor name="constructor_definition|constructor_definition"}}// +~~~~| //{{anchor name="destructor_definition|destructor_definition"}}// +~~~~| //{{anchor name="property_definition|property_definition"}}// +~~~~| //{{anchor name="variable_declaration|variable_declaration"}}// +~~~~) +~~~) +~~| //{{anchor name="function_definition|function_definition"}}// +~~| //{{anchor name="sub_definition|sub_definition"}}// +~~| //{{anchor name="destructor_definition|destructor_definition"}}// +~~| //{{anchor name="property_definition|property_definition"}}// +~~| //{{anchor name="constructor_definition|constructor_definition"}}// +~~| //{{anchor name="operator_definition|operator_definition"}}// +~~| //{{anchor name="const_declaration|const_declaration"}}// +~~| //{{anchor name="type_or_union_declaration|type_or_union_declaration"}}// +~~| //{{anchor name="variable_declaration|variable_declaration"}}// +~~| //{{anchor name="enumeration_declaration|enumeration_declaration"}}// +~~| //{{anchor name="auto_variable_declaration|auto_variable_declaration"}}// +~~) +~| **declare** //{{anchor name="procedure_declaration|procedure_declaration"}}// +~; + +//{{anchor name="procedure_call_or_assign"}}procedure_call_or_assign// +~: **call** //{{anchor name="identifier|identifier"}}// (**(**//procedure_parameter_list//**)**)? +~| //{{anchor name="identifier|identifier"}}// //procedure_parameter_list//? +~| (//{{anchor name="identifier|identifier"}}// | **function** | **operator** | **property**) **=** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="compound_statement"}}compound_statement// +~: //{{anchor name="namespace_statement|namespace_statement"}}// +~| //{{anchor name="scope_statement|scope_statement"}}// +~| //{{anchor name="if_statement|if_statement"}}// +~| //{{anchor name="for_statement|for_statement"}}// +~| //{{anchor name="do_statement|do_statement"}}// +~| //{{anchor name="while_statement|while_statement"}}// +~| //{{anchor name="select_statement|select_statement"}}// +~; + +//{{anchor name="namespace_statement"}}namespace_statement// +~: **namespace** //{{anchor name="identifier|identifier"}}// (**alias** //{{anchor name="string_literal|string_literal"}}//)? (//{{anchor name="declaration|declaration"}}// | //{{anchor name="namespace_statement|namespace_statement"}}//)* **end** **namespace** +~; + +//{{anchor name="scope_statement"}}scope_statement//: **scope** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//* **end** **scope** +~; + +//{{anchor name="if_statement"}}if_statement// +~: //{{anchor name="short_if_statement|short_if_statement"}}// | //{{anchor name="long_if_statement|long_if_statement"}}// +~; + + +//{{anchor name="short_if_statement"}}short_if_statement// +~: **if** //{{anchor name="expression|expression"}}// **then** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}// +**else** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//* +(//{{anchor name="eol|eol"}}//| **end if** | **endif**) +~; + +//{{anchor name="long_if_statement"}}long_if_statement// +~: **if** //{{anchor name="expression|expression"}}// **then** //{{anchor name="statement_separator|statement_separator"}}// +//{{anchor name="statement|statement"}}//* +//{{anchor name="elseif_block|elseif_block"}}//* +(**else** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//*)? +(**end** **if**|**endif**) +~; + +//{{anchor name="elseif_block"}}elseif_block// +~: **elseif** //{{anchor name="expression|expression"}}// **then** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//* +~; + +//{{anchor name="for_statement"}}for_statement// +~: **for** //{{anchor name="identifier|identifier"}}// (**as** //{{anchor name="scalar|scalar"}}//)? **=** //{{anchor name="expression|expression"}}// **to** //{{anchor name="expression|expression"}}// (**step** //{{anchor name="expression|expression"}}//)? +(//{{anchor name="statement|statement"}}//|**exit for**(**,** **for**)* | **continue for** (**,** **for**)*)* **next** //{{anchor name="identifier|identifier"}}// (**,** //{{anchor name="identifier|identifier"}}//)* //{{anchor name="statement_separator|statement_separator"}}// +~; + +//{{anchor name="do_statement"}}do_statement// +~: **do** (**until**|**while**) //{{anchor name="expression|expression"}}// (//{{anchor name="statement|statement"}}//|**exit do** (**,** **do**)* | **continue do** (**,** **do**)*)* **loop** +~| **do** (//{{anchor name="statement|statement"}}//|**exit do** (**,** **do**)* | **continue do** (**,** **do**)*)* **loop** (**until**|**while**) //{{anchor name="expression|expression"}}// //{{anchor name="statement_separator|statement_separator"}}// +~; + +//{{anchor name="while_statement"}}while_statement// +~: **while** //{{anchor name="expression|expression"}}// //{{anchor name="statement_separator|statement_separator"}}// +(//{{anchor name="statement|statement"}}// | **exit while** (**,** **while**)* | **continue while** (**,** **while**)*)* +**wend** +~; + +//{{anchor name="select_statement"}}select_statement// +~: **select case** (**as** **const**) //{{anchor name="expression|expression"}}// //{{anchor name="case_statement|case_statement"}}//* **case else** //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="statement|statement"}}//* **end select** +~; +//{{anchor name="case_statement"}}case_statement// +~: **case** //{{anchor name="case_expression|case_expression"}}// (**,** //{{anchor name="case_expression|case_expression"}}//)* +~; +//{{anchor name="case_expression"}}case_expression// +~: //{{anchor name="expression|expression"}}// | //{{anchor name="expression|expression"}}// **to** //{{anchor name="expression|expression"}}// | **is** (**>** | **<** | **>=** | **<=** | **=** | **<>**) //{{anchor name="expression|expression"}}//; + +//{{anchor name="assembler_block"}}assembler_block// +~: **asm** //{{anchor name="comment|comment"}}//? //{{anchor name= "statement_separator"}}// (//asm_code// //{{anchor name="comment|comment"}}//? //{{anchor name="eol|eol"}}//)+ **end asm** +~; + +//{{anchor name="assignment"}}assignment// +~: **let**? //{{anchor name="variable|variable"}}// //{{anchor name="binary_operator|binary_operator"}}// **=** //{{anchor name="expression|expression"}}// +~| //{{anchor name="variable|variable"}}// **(**//{{anchor name="procedure_parameter_list|procedure_parameter_list"}}//**)** +~; + +//{{anchor name="variable"}}variable// +~: //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}//; + +//{{anchor name="const_declaration"}}const_declaration// +~: **const** (**as** //{{anchor name="symbol_type|symbol_type"}}//)? //const_assign// (**,** //const_assign//)* +~; + +//{{anchor name="type_or_union_declaration"}}type_or_union_declaration// +~: //{{anchor name="type_declaration|type_declaration"}}// | //{{anchor name="union_declaration|union_declaration"}}// +~; + +//{{anchor name="type_declaration"}}type_declaration// +~: **type** //{{anchor name="identifier|identifier"}}// (**alias** //{{anchor name="string_literal|string_literal"}}//)? (**field** **=** //{{anchor name="expression|expression"}}//)? (//{{anchor name="comment|comment"}}//)? //{{anchor name="statement_separator|statement_separator"}}// +~~//{{anchor name="type_member_declaration|type_member_declaration"}}//+ +~**end** **type** +~; + +//{{anchor name="union_declaration"}}union_declaration// +~: **union** //{{anchor name="identifier|identifier"}}// (**alias** //{{anchor name="string_literal|string_literal"}}//)? (**field** **=** //{{anchor name="expression|expression"}}//)? (//{{anchor name="comment|comment"}}//)? //{{anchor name="statement_separator|statement_separator"}}// +~~//union_member_declaration//+ +~**end** **union** +~; + +//{{anchor name="type_member_declaration"}}type_member_declaration// +~: ( (**union**|**type**) //{{anchor name="comment|comment"}}//? //{{anchor name="statement_separator|statement_separator"}}// //{{anchor name="element_declaration|element_declaration"}}//+ +~**end** (**union**|**type**) +~) +~| //{{anchor name="element_declaration|element_declaration"}}// +~| **as** as_element_declaration +~; + + +//{{anchor name="variable_declaration"}}variable_declaration// +~: (**redim** **preserve**?|**dim**|**common**) **shared**? //{{anchor name="symbol_type|symbol_type"}}// +~| **extern** **import**? //{{anchor name="symbol_type|symbol_type"}}// **alias** //{{anchor name="string_literal|string_literal"}}// +~| **static** //{{anchor name="symbol_type|symbol_type"}}// +~; + +//{{anchor name="symbol_type"}}symbol_type// +~: **const**? **unsigned**? +~( +~ //{{anchor name="scalar|scalar"}}// +~| **string** (**""*""** //{{anchor name="integer_literal|integer_literal"}}//)? +~| **wstring** (**""*""** //{{anchor name="integer_literal|integer_literal"}}//)? +~| //{{anchor name="user_defined_type|user_defined_type"}}// +~| **function** (**(** //{{anchor name="parameters|parameters"}}// **)**) (**as** //{{anchor name="symbol_type|symbol_type"}}//) +~| **sub** (**(** //{{anchor name="parameters|parameters"}}// **)**) +~)(**const**? (**ptr**|**pointer**))* +~; + +//{{anchor name="scalar"}}scalar// +~: **byte** +~| **ubyte** +~| **short** +~| **ushort** +~| **integer** +~| **uinteger** +~| **longint** +~| **ulongint** +~| **long** +~| **ulong** +~| **single** +~| **double** +~; + +//{{anchor name="parameters"}}parameters// +~: //{{anchor name="parameter|parameter"}}// (**,** //{{anchor name="parameter|parameter"}}//)* +~; + +//{{anchor name="parameter"}}parameter// +~: (**byval**|**byref**)? (//{{anchor name="identifier|identifier"}}// (**(** **)**)?)? **as** //{{anchor name="symbol_type|symbol_type"}}// (**=** //{{anchor name="literal|literal"}}//)? +~; + + +//{{anchor name="user_defined_type"}}user_defined_type// +~: //{{anchor name="identifier|identifier"}}// +~; + + +//{{anchor name="procedure_declaration"}}procedure_declaration// +~: **static**? (//{{anchor name="sub_declaration|sub_declaration"}}//|//{{anchor name="function_declaration|function_declaration"}}//|//{{anchor name="constructor_declaration|constructor_declaration"}}//|//{{anchor name="destructor_declaration|destructor_declaration"}}//|//{{anchor name="operator_declaration|operator_declaration"}}//) +~; + + +//{{anchor name="procedure_parameter_list"}}procedure_parameter_list// +~: //{{anchor name="procedure_parameter|procedure_parameter"}}// (**,** //{{anchor name="procedure_parameter|procedure_parameter"}}//)* +~; + + +//{{anchor name="procedure_parameter"}}procedure_parameter// +~: **byval**? (//{{anchor name="identifier|identifier"}}//(**(** **)**)? | //{{anchor name="expression|expression"}}// ) +~; + + +{{fbdoc item="section" value="expressions"}} + +//{{anchor name="expression"}}expression// +~: //{{anchor name="boolean_expression|boolean_expression"}}// +~; + +//{{anchor name="boolean_expression"}}boolean_expression// +~: //{{anchor name="logical_expression|logical_expression"}}//( ( **andalso** | **orelse** ) //{{anchor name="logical_expression|logical_expression"}}//)* +~; + +//{{anchor name="logical_expression"}}logical_expression// +~: //{{anchor name="logical_or_expression|logical_or_expression"}}// ( (**xor** | **eqv** | **imp**) //{{anchor name="logical_or_expression|logical_or_expression"}}// )* +~; + +//{{anchor name="logical_or_expression"}}logical_or_expression// +~: //{{anchor name="logical_and_expression|logical_and_expression"}}//( **or** //{{anchor name="logical_and_expression|logical_and_expression"}}// )* +~; + +//{{anchor name="logical_and_expression"}}logical_and_expression// +~: //{{anchor name="relational_expression|relational_expression"}}// ( **and** //{{anchor name="relational_expression|relational_expression"}}// )* +~; + +//{{anchor name="relational_expression"}}relational_expression// +~: //{{anchor name="concatenation_expression|concatenation_expression"}}// ( (**=**|**>**|**<**|**<>**|**<=**|**>=**) //{{anchor name="concatenation_expression|concatenation_expression"}}// )* +~; + +//{{anchor name="concatenation_expression"}}concatenation_expression// +~: //{{anchor name="add_expression|add_expression"}}//( **&** {{anchor name="add_expression|add_expression"}}//)* +~; + +//{{anchor name="add_expression"}}add_expression// +~: //{{anchor name="shift_expression|shift_expression"}}//( ( **+** | **-** ) //{{anchor name="shift_expression|shift_expression"}}// )* +~; + +//{{anchor name="shift_expression"}}shift_expression// +~: //{{anchor name="mod_expression|mod_expression"}}// ( (**shl** | **shr**) //{{anchor name="mod_expression|mod_expression"}}// )* +~; + +//{{anchor name="mod_expression"}}mod_expression// +~: = //{{anchor name="integer_division_expression|integer_division_expression"}}//( **mod** //{{anchor name="integer_division_expression|integer_division_expression"}}// )* +~; + +//{{anchor name="integer_division_expression"}}//integer_division_expression// +~: //{{anchor name="multiplication_expression|multiplication_expression"}}// ( **\** //{{anchor name="multiplication_expression|multiplication_expression"}}// )* +~; + +//{{anchor name="multiplication_expression"}}multiplication_expression// +~: //{{anchor name="exponentiation_expression|exponentiation_expression"}}// ( (**""*""** | **/**) //{{anchor name="exponentiation_expression|exponentiaton_expression"}}// )* +~; + +//{{anchor name="exponentiation_expression"}}exponentiation_expression// +~: //{{anchor name="prefix_expression|prefix_expression"}}// ( **^** //{{anchor name="prefix_expression|prefix_expression"}}// )* +~; + +//{{anchor name="prefix_expression"}}prefix_expression// +~: (**-**|**+**) //{{anchor name="exponentiation_expression|exponentiation_expression"}}// +~| **not** //{{anchor name="relational_expression|relational_expression"}}// +~| //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}// +~; + +//{{anchor name="highest_precedence_expression"}}highest_precedence_expression// +~: //{{anchor name="address_of_expression|address_of_expression"}}// +~| ( //{{anchor name="dereference_expression|dereference_expression"}}// | //{{anchor name="casting_expression|casting_expression"}}// | //{{anchor name="pointer_type_casting_expression|pointer_type_casting_expression""}}// | //{{anchor name="parenthesised_expression|parenthesised_expression"}}// ) //{{anchor name="function_pointer_or_member_dereference"}}// +~| //{{anchor name="anonymous_udt|anonymous_udt"}}// +~| //{{anchor name="atom|atom"}}// +~; + +//{{anchor name="address_of_expression"}}address_of_expression// +~: **varptr** **(** highest_precedence_expression **)** +~| **procptr** **(** //{{anchor name="identifier|identifier"}}// (**(****)**)? **)** +~| **@** (//{{anchor name="identifier|identifier"}}// (**(****)**)? | //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}//) +~| **sadd**|**strptr** **(** //{{anchor name="expression|expression"}}// **)** +~; + +//{{anchor name="dereference_expression"}}dereference_expression// +~: **""*""**+ //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}// +~; + +//{{anchor name="casting_expression"}}casting_expression// +~: **cast** **(** //{{anchor name="symbol_type|symbol_type"}}// **,** //{{anchor name="expression|expression"}}// **)** +~; + + +//{{anchor name="quirk_function"}}quirk_function// +~: //{{anchor name="quirk_function_name|quirk_function_name"}}// //{{anchor name="procedure_parameter_list|procedure_parameter_list"}}// +~; + +//{{anchor name="quirk_function_name"}}quirk_function_name// +~: **mkd** | **mki** | **mkl** | **mklongint** | **mkshort** +~| **cvd** | **cvi** | **cvl** | **cvlongint** | **cvs** | **cvshort** +~| **asc** | **chr** | **instr** | **instrev** | **lcase** | **left** | **len** | **lset** | **ltrim** | **mid** | **right** | **rset** | **rtrim** | **space** | **string** | **ucase** | **wchr** | **wstr** | **wstring** +~| **abs** | **sgn** | **fix** | **frac** | **len** | **sizeof**,**sin** | **asin** | **cos** | **acos** | **tan** | **atn** | **sqr** | **log** | **exp** | **atan2** | **int** +~| **peek** +~| **lbound** | **ubound** +~| **seek** | **input** | **open** | **close** | **get** | **put** | **name** +~| **err** +~| **iif** +~| **va_first** +~| **cbyte** | **cshort** | **cint** | **clng** | **clngint** | **cubyte** | **cushort** | **cuint** | **culng** | **culngint** | **csng** | **cdbl** | **csign** | **cunsg** +~| **type** +~| **view** | **width** | **color** | **screen** +~; + + + +//{{anchor name="quirk_statement"}}quirk_statement// +~: //{{anchor name="jump_statement|jump_statement"}}// +~| //{{anchor name="print_statement|print_statement"}}// +~| //{{anchor name="data_statement|data_statement"}}// +~| //{{anchor name="array_statement|array_statement"}}// +~| //{{anchor name="line_input_statement|line_input_statement"}}// +~| //{{anchor name="input_statement|input_statement"}}// +~| //{{anchor name="poke_statement|poke_statement"}}// +~| //{{anchor name="file_statement|file_statement"}}// +~| //{{anchor name="write_statement|write_statement"}}// +~| //{{anchor name="error_statement|error_statement"}}// +~| //{{anchor name="on_statement|on_statement"}}// +~| //{{anchor name="view_statement|view_statement"}}// +~| //{{anchor name="mid_statement|mid_statement"}}// +~| //{{anchor name="lrset_statement|lrset_statement"}}// +~| //{{anchor name="width_statement|width_statement"}}// +~| //{{anchor name="color_statement|color_statement"}}// +~| //{{anchor name="gfx_statement|gfx_statement"}}// +~; + +//{{anchor name="jump_statement"}}jump_statement// +~: **goto** //{{anchor name="identifier|identifier"}}// +~; + +//{{anchor name="print_statement"}}print_statement// +~: (**print** | **?**) (**#** //{{anchor name="expression|expression"}}// **,**)? (**using** //{{anchor name="expression|expression"}}// **;**)? (//{{anchor name="expression|expression"}}//? **;** | **,** )*; + +//{{anchor name="data_statement"}}data_statement// +~: **restore** //{{anchor name="identifier|identifier"}}// +~| **read** //{{anchor name="variable|variable"}}// (**,** //{{anchor name="variable|variable"}}//)* +~| **data** //{{anchor name="literal|literal"}}// (**,** //{{anchor name="literal|literal"}}//)* +~; + +//{{anchor name="array_statement"}}array_statement// +~: **erase** //{{anchor name="variable|variable"}}// (**,** //{{anchor name="variable|variable"}}//)* +~| **swap** //{{anchor name="variable|variable"}}// **,** //{{anchor name="variable|variable"}}// +~; + +//{{anchor name="line_input_statement"}}line_input_statement// +~: **line** **input** **;**? (**#** //{{anchor name="expression|expression"}}//| //{{anchor name="expression|expression"}}//?) (**,** | **;** )? //{{anchor name="variable|variable"}}//? +~; + +//{{anchor name="input_statement"}}input_statement// +~: **input** **;**? ((**#** //{{anchor name="expression|expression"}}//| //{{anchor name="string_literal|string_literal"}}//) (**,** | **;**))? //{{anchor name="variable|variable"}}// (**,** //{{anchor name="variable|variable"}}//)* +~; + +//{{anchor name="poke_statement"}}poke_statement// +~: **poke** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="file_statement"}}file_statement// +~: **close** (**#**? //{{anchor name="expression|expression"}}//) (**,** **#**? //{{anchor name="expression|expression"}}//)* +~| **seek** **#**? //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// +~| **put** **#** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}//? **,** //{{anchor name="expression|expression"}}// +~| **get** **#** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}//? **,** //{{anchor name="variable|variable"}}// +~| (**lock**|**unlock**) **#**? //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// (**to** //{{anchor name="expression|expression"}}//)? +~| **name** //{{anchor name="expression|expression"}}// **as** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="write_statement"}}write_statement// +~: **write** (**#** //{{anchor name="expression|expression"}}//)? (//{{anchor name="expression|expression"}}//? **,** )* +~; + +//{{anchor name="error_statement"}}error_statement// +~: **error** //{{anchor name="expression|expression"}}// +~| **err** **=** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="on_statement"}}on_statement// +~: **on** **local**? (**error** | //{{anchor name="expression|expression"}}//) **goto** identifier +~; + +//{{anchor name="view_statement"}}view_statement// +~: **view** (**print** (//{{anchor name="expression|expression"}}// **to** //{{anchor name="expression|expression"}}//)?) +~; + +//{{anchor name="mid_statement"}}mid_statement// +~: **mid** **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// (**,** //{{anchor name="expression|expression"}}//**)** **=** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="lrset_statement"}}lrset_statement// +~: **lset**|**rset** //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}// **,** //{{anchor name="highest_precedence_expression|highest_precedence_expression"}}// +~; + +//{{anchor name="width_statement"}}width_statement// +~: **width** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// +~| **width** **lprint** //{{anchor name="expression|expression"}}// +~| **width** (**#** //{{anchor name="expression|expression"}}//| //{{anchor name="expression|expression"}}//)**,** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="color_statement"}}color_statement// +~: **color** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// +~; + +//{{anchor name="gfx_statement"}}gfx_statement// +~: **pset** ( //{{anchor name="expression|expression"}}// **,** )? **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** (**,** //{{anchor name="expression|expression"}}// )? +~| **line** ( //{{anchor name="expression|expression"}}// **,** )? **step**? (**(** expression **,** //{{anchor name="expression|expression"}}// **)** )? **-** **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** (**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="string_literal|string_literal"}}//? (**,** //{{anchor name="expression|expression"}}// )?)?)? +~| **circle** ( //{{anchor name="expression|expression"}}// **,** )? **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **,** //{{anchor name="expression|expression"}}// ((**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="expression|expression"}}// (**,** //{{anchor name="expression|expression"}}//)? )? )?)?)?)? +~| **paint** ( //{{anchor name="expression|expression"}}// **,** )? **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** (**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="expression|expression"}}//? ) ) +~| **draw** ( expression **,** )? //{{anchor name="expression|expression"}}// +~| **view** (**screen**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **-** **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** (**,** //{{anchor name="expression|expression"}}//? (**,** //{{anchor name="expression|expression"}}//)?)? )? +~| **palette** **get**? ((**using** //{{anchor name="variable|variable"}}//) | (//{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// (**,** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}//)?)?) +~| **put** ( //{{anchor name="expression|expression"}}// **,** )? **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **,** ( **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **-** **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **,**)? //{{anchor name="variable|variable"}}// (**,** //{{anchor name="expression|expression"}}// (**,** //{{anchor name="expression|expression"}}//)?)? +~| **get** ( //{{anchor name="expression|expression"}}// **,** )? **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **-** **step**? **(** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// **)** **,** //{{anchor name="variable|variable"}}// +~| **screen** (//{{anchor name="integer_literal|integer_literal"}}// | ((//{{anchor name="expression|expression"}}// (((**,** //{{anchor name="expression|expression"}}//)? **,** //{{anchor name="expression|expression"}}//)? //{{anchor name="expression|expression"}}//)? **,** //{{anchor name="expression|expression"}}//)) +~| **screenres** //{{anchor name="expression|expression"}}// **,** //{{anchor name="expression|expression"}}// (((**,** //{{anchor name="expression|expression"}}//)? **,** //{{anchor name="expression|expression"}}//)? **,** //{{anchor name="expression|expression"}}//)? +~; + +{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/GfxDefPalettes.wakka b/fbdocs/manual/cache/GfxDefPalettes.wakka index 6545575a18..95dab80981 100644 --- a/fbdocs/manual/cache/GfxDefPalettes.wakka +++ b/fbdocs/manual/cache/GfxDefPalettes.wakka @@ -1,53 +1,53 @@ {{fbdoc item="title" value="Default Palettes"}}---- -Default color values for FreeBASIC graphics and text screen modes. +Valeurs des couleurs par défaut pour les modes écran graphiques et texte de FreeBasic. - FreeBASIC initializes the palette indexes with the colors in the tables below. The colors are the same as in QB. Colors in graphics mode can be changed using the ##[[KeyPgPalette Palette]]## statement. There is no portable way of changing the palette in console mode. + FreeBASIC initialise les indices de palette avec les couleurs dans les tableaux ci-dessous. Les couleurs sont les mêmes que dans QB. Les couleurs en mode graphique peuvent être changées en utilisant la déclaration ##[[KeyPgPalette Palette]]##. Il n'existe aucun moyen portable de changer la palette en mode console. -**{{anchor name="SCRN1|Screen mode 1"}}** - 4 colors: Black and white, and two others -**{{anchor name="SCRN2_10_11|Screen modes 2, 10 and 11"}}** - Monochromatic: black and white. -**{{anchor name="SCRN7_8_9_12_CON|Screen modes 7, 8, 9, 12, and Console"}}** - Two sets of 8 colors: normal and intense (bright) -**{{anchor name="SCRN13_8BIT|Screen 13 and 8-bit modes"}}** - Multiple color and grayscale bands +**[[#SCRN1">Mode écran 1]]** + 4 couleurs: noir et blanc, et deux autres +**[[#SCRN2_10_11">Modes écran 2, 10 et 11]]** + Monochromatique: noir et blanc. +**[[#SCRN7_8_9_12_CON">Modes écran 7, 8, 9, 12, et Console]]** + Deux ensembles de 8 couleurs: normal et intense (clair) +**[[#SCRN13_8BIT">Mode écran 13 et modes 8-bit]]** + Bandes multiples couleurs et en niveaux de gris -<<{{anchor name="SCRN1"}}{{fbdoc item="section" value="Screen mode 1"}} +**Mode écran 1** - {{image title="4 color palette" url="/images/pal4.png"}} +
    - {{table columns="2" cellpadding="2" cells="Value;Name;0;black;1;cyan;2;magenta;3;white"}} + {{table columns="" cellpadding="2" cells="
    Valeur;Nom;0;black = noir;1;cyan;2;magenta;3;white = blanc;
    -{{anchor name="SCRN2_10_11"}}{{fbdoc item="section" value="Screen modes 2, 10 and 11"}} +**Modes écran 2, 10 et 11** - {{image title="2 color palette" url="/images/pal2.png"}} +
    - {{table columns="2" cellpadding="2" cells="Value;Name;0;black;1;white"}} + {{table columns="" cellpadding="2" cells="Valeur;Nom;0;black = noir;1;white = blanc;
    -{{anchor name="SCRN7_8_9_12_CON"}}{{fbdoc item="section" value="Screen modes 7, 8, 9, 12, and Console"}} +**Modes écran 7, 8, 9, 12 et Console** - {{image title="16 color palette" url="/images/pal16.png"}} +
    - {{table columns="4" cellpadding="2" cells="Normal Value;Normal Name;Intense Value;Intense Name;0;black;8;dark grey;1;blue;9;bright blue;2;green;10;bright green;3;cyan;11;bright cyan;4;red;12;bright red;5;pink;13;bright pink;6;yellow;14;bright yellow;7;grey;15;white"}} -<<>>{{anchor name="SCRN13_8BIT"}}{{fbdoc item="section" value="Screen 13 and 8-bit modes"}} + {{table columns="" cellpadding="2" cells="Valeur normale;Nom normal;Valeur intense;Nom intense;0;black = noir;8;dark grey = gris foncé1;blue = bleu;9;bright blue = bleu clair;2;green = vert;10;bright green = vert clair;3;cyan;11;bright cyan = cyan clair;4;red = rouge;12;bright red = rouge clair;5;pink = rose;13;bright pink = rose clair;6;yellow = jaune;14;bright yellow = jaune clair;7;grey = gris;15;white = blanc;
    +;**Modes écran 13 et 8 bits** - {{image title="256 color palette" url="/images/pal256.png"}} +
    - {{fbdoc item="subsect" value="Screen 12 color band"}} + **Ecran 12 bande de couleurs** - Colors 0 through 15 are the same as screen 12 mode. + Les couleurs de 0 à 15 sont les mêmes que l'écran en mode 12. - {{fbdoc item="subsect" value="Grayscale band"}} - Colors 16 through 31 are grayscale from black to white. + **Bande de niveaux de gris** + Les couleurs de 16 à 31 sont en niveaux de gris du noir au blanc. - {{fbdoc item="subsect" value="Brightness/saturation bands"}} - 3 bands of decreasing brightness, each containing 3 bands of decreasing saturation, each containing 24 hues of color starting and ending at blue. + **Bandes luminosité / saturation** + 3 bandes de luminosité décroissante, chacune contenant 3 bandes où la saturation diminue, chacune contenant 24 teintes de couleur commençant et terminant par bleu. - {{table columns="10" cellpadding="2" cells="Name;HB/HS;HB/MS;HB/LS;MB/HS;MB/MS;MB/LS;LB/HS;LB/MS;LB/LS;blue;32;56;80;104;128;152;176;200;224;magenta;36;60;84;108;132;156;180;204;228;red;40;64;88;112;136;160;184;208;232;yellow;44;58;92;116;140;164;188;212;236;green;48;72;96;120;144;168;192;216;240;cyan;52;76;100;124;148;172;194;220;244"}} + {{table columns="" cellpadding="2" cells="Name;HB/HS;HB/MS;HB/LS;MB/HS;MB/MS;MB/LS;LB/HS;LB/MS;LB/LS;blue;32;56;80;104;128;152;176;200;224;magenta;36;60;84;108;132;156;180;204;228;red;40;64;88;112;136;160;184;208;232;yellow;44;58;92;116;140;164;188;212;236;green;48;72;96;120;144;168;192;216;240;cyan;52;76;100;124;148;172;194;220;244;
    - {{fbdoc item="subsect" value="Black band"}} - Colors 248 through 255 are black. + **Bande du noir** + Les couleurs 248 à 255 sont en noir. ->>::c:: +;
    {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/GfxInternalFormats.wakka b/fbdocs/manual/cache/GfxInternalFormats.wakka index 941a79f784..a8692f4fb0 100644 --- a/fbdocs/manual/cache/GfxInternalFormats.wakka +++ b/fbdocs/manual/cache/GfxInternalFormats.wakka @@ -1,46 +1,47 @@ {{fbdoc item="title" value="Internal graphics formats"}}---- -**Pixel formats** +**Formats des pixels** - When a graphics mode is set via the ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres ScreenRes]]## functions, GfxLib creates also a framebuffer in standard system memory and sets an appropriate internal pixel format for the mode. There are basically three internal pixel formats, selected depending on the screen depth, as described in the following table: + Quand un mode graphique est défini par les fonctions ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]##, GfxLib crée également un tampon dans la mémoire système standard et définit un format de pixel interne approprié pour le mode. Il existe essentiellement trois formats internes de pixels, sélectionnés en fonction de la profondeur de l'écran, comme décrit dans le tableau suivant: - {{table columns="4" cellpadding="1" cells="Screen depth;Internal bytes per pixel;Range bitmask;Pixel format;1bpp; 1; &h1;palette color index;2bpp; 1; &h3;palette color index;4bpp; 1; &hF;palette color index;8bpp; 1; &hFF;palette color index;15/16bpp; 2; &hFFFF;RRRRRGGGGGGBBBBB;24/32bpp; 4; &hFFFFFFFF;AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB"}} + {{table columns="" cellpadding="2" cells="Profondeur d'écran;Octets internes par pixel;Masque binaire;Format pixel ;1bpp; 1; &h1;indice de couleur de la palette;2bpp; 1; &h3;palette color index;4bpp; 1; &hF;indice de couleur de la palette;8bpp; 1; &hFF;indice de couleur de la palette;15/16bpp; 2; &hFFFF;RRRRRGGGGGGBBBBB;24/32bpp; 4; &hFFFFFFFF;AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB;
    - All drawing operations work on this RAM framebuffer; when the actual display needs to be updated, ""GfxLib"" copies the contents of the framebuffer to the real display memory, automatically converting in the process from the current internal pixel format to whatever pixel format the real display uses. By limiting the internal pixel formats to 3, the library prevents you having to deal with the plethora of real display formats. + Toutes les opérations de dessin travaillent sur ce tampon vidéo RAM; lorsque l'affichage réel doit être mis à jour, GfxLib copie le contenu du tampon vidéo vers la mémoire d'affichage réelle, effectuant automatiquement dans le processus la conversion du format interne des pixels vers n'importe quel format pixel utilisé par l'affichage réel. En limitant les formats internes de pixel à 3, la bibliothèque vous évite d'avoir à faire face à une pléthore de formats d'affichage réel. -**Color values** +**Les valeurs de couleur** - When calling a graphics primitive that accepts a color, this can be specified in two ways. In 8bpp or less modes, the color value must be a direct 8 bits color index in the current palette, and this matches the internal pixel format for those modes. In higher color depths, the color value should always have the form ##&hAARRGGBB##; this is what the ##[[KeyPgRgb RGB]]## and ##[[KeyPgRgba RGBA]]## macros return, and is equivalent to the 24/32bpp internal pixel format representation. If the current color depth is 24 or 32bpp, this means the color value passes in unaltered. If a 15/16bpp mode is in use, internally each primitive automatically converts the color from the ##&hAARRGGBB## form into the ##RRRRRGGGGGGBBBBB## internal pixel format (note that in this process the alpha channel is lost, as 15/16bpp modes do not support it). Once the color value is in one of the three pixel formats, the primitive limits its range to the range supported by the current color depth, by using a bitwise ##[[KeyPgOpAnd And]]## operation with a range bitmask. So if in 8bpp, the color value passed is ##[[KeyPgOpAnd And]]##ed by ##&hFF## for example. + Lorsque vous appelez une primitive graphique qui accepte une couleur, ceci peut être indiqué de deux façons. Dans les modes 8 bits par pixel ou moins, la valeur de couleur doit être directement un indice de couleur 8 bits dans la palette courante et cela correspond au format interne de pixel pour ces modes. Dans les profondeurs de couleur plus élevées, la valeur de couleur devrait toujours avoir la forme ##&hAARRVVBB##; c'est ce que les macros ##[[KeyPgRgb RGB]]## et ##[[KeyPgRgba RGBA]]## retournent et qui est équivalent à la représentation du format interne de 24/32bpp (24/32 bits par pixel). Si la profondeur de couleur courante est de 24 ou 32bpp (bits par pixel), cela signifie que la valeur de la couleur passe non-modifiée. Si un mode 15/16bpp (15/16 bits par pixel) est en cours d'utilisation, en interne chaque primitive convertit automatiquement la couleur de la forme ##&hAARRVVBB## vers le format interne de pixel ##RRRRRVVVVVVBBBBB## (notez que dans ce processus le canal alpha est perdu, car les modes 15/16bpp (15/16 bits par pixel) ne le supportent pas). Une fois que la valeur de couleur est l'un des trois formats de pixel, la primitive limite sa plage à celle supportée par la profondeur de couleur courante, en utilisant une opération de bits ##[[KeyPgOpAnd And]]## avec un masque de plage. Donc si nous sommes en 8bpp , la valeur de la couleur passée subit un ##[[KeyPgOpAnd And]]## ##&hFF## par exemple. -**Notes on transparency** +**Notes sur la transparence** - For 8bpp or less modes, color index 0 is always treated as the transparent color for the ##[[KeyPgPutgraphics Put]]## modes that support transparency. For higher depths, ##[[KeyPgRgb RGB]](255, 0, 255)## always represents the transparent color. In 15/16bpp modes, this translates to the internal value ##&hF81F##, whereas in 24/32bpp modes it becomes ##&hFFFF00FF##. Note that in 24/32bpp modes, ##[[KeyPgPutgraphics Put]]## identifies the transparent color by looking just at the red, green and blue components of the color value, while the alpha value can assume any value. This means that in 24/32bpp modes, ##&h00FF00FF##, ##&h10FF00FF##, ##&hABFF00FF## and ##&hFFFF00FF## for example all represent the transparent color, since the lower 24 bits are always ##&hFF00FF##. + Pour les modes 8bpp (8 bits par pixel) ou inférieurs, l'indice de couleur 0 est toujours considéré comme la couleur transparente pour les modes ##[[KeyPgPutgraphics Put]]## qui supportent la transparence. Pour des profondeurs supérieures, ##[[KeyPgRgb RGB]](255, 0, 255)## représente toujours la couleur transparente. Dans les modes 15/16bpp (15/16 bits par pixel), cela se traduit par la valeur interne ##&hF81F##, tandis que dans les modes 24/32bpp (24/32 bits par pixel) cela devient ##&hFFFF00FF##. Notez que dans les modes 24/32bpp (24/32 bits par pixel), ##[[KeyPgPutgraphics Put]]## identifie la couleur transparente simplement en regardant les composantes rouge, verte et bleue de la valeur de la couleur, tandis que la valeur alpha peut prendre n'importe quelle valeur. Cela signifie que dans les modes 24/32bpp (24/32 bits par pixel), par exemple, ##&h00FF00FF##, ##&h10FF00FF##, ##&hABFF00FF## et ##&hFFFF00FF## tous représentent la couleur transparente, puisque les 24 bits inférieurs sont toujours ##&hFF00FF##. -**Buffer formats** +**Formats tampon** - In ""FreeBASIC"", images can be used as arrays (as in QB) or as pointers. Either way, the image data is contained in one continuous chunk. The chunk consists of an header followed by the image data. The header can be of two types (old-style and new-style) and determines the format of the following image data. + Dans FreeBasic, les images peuvent être utilisées comme des tableaux (comme dans QB) ou comme des pointeurs. Quoi qu'il en soit, les données image sont contenues dans un seul segment continu. Le bloc est constitué d'un en-tête suivi par les données image. L'en-tête peut être de deux types (ancien et nouveau style) et détermine le format des données image qui suivent. - **Old-style** chunk header consists of 4 bytes (32 bits, or 4 bytes). The first 3 bits contain the image color depth in bytes per pixel (8-bit color depth -> 1; 16-bit color depth -> 2; 32-bit color depth -> 4). The next 13 bits contain the image width. The last 16 bits contain the image's height. Please note the intrinsic nature of the header allows only for sizes up to ##8191 * 65535## pixels. The actual pixel data follows the header, and is compacted one row of pixels after another; no data alignment is assumed. The final size of the chunk can then be computed using the formula: + Un en-tête de bloc **ancien style** est constitué de 4 octets (32 bits, ou 4 octets). Les 3 premiers bits contiennent la profondeur de la couleur image en octets par pixel (profondeur de couleur de 8 bits -> 1; profondeur de couleur de 16 bits -> 2; profondeur de couleur de 32 bits -> 4). Les 13 bits suivants contiennent la largeur de l'image. Les 16 derniers bits contiennent la hauteur de l'image. S'il vous plaît, notez que le caractère intrinsèque de l'en-tête permet seulement des tailles allant jusqu'à ##8191 * 65535## pixels. Les données pixel réelles suivent l'en-tête, et sont compactées une rangée de pixels après l'autre; aucun alignement des données n'est prévu. La taille finale du bloc peut alors être calculée en utilisant la formule: - ##size = 4 + ( width * height * bytes_per_pixel )## + ##taille = 4 + (largeur * hauteur * octets_par_pixel )## - **New-style** chunk header consists of 32 bytes. The first dword (32 bits) must be equal to the value 7, allowing ""GfxLib"" to identify the new type of chunk. The second dword contains the image color depth in bytes per pixel. The third and fourth dwords contain the image width and height respectively, effectively removing the image size limit enforced by the old-style image chunks. The fifth dword contains the pixel row pitch in bytes; this tells how many bytes a row of pixels in the image takes up. The pitch in new-style chunks is always padded to a multiple of 16, to allow pixels' row data to be aligned on the paragraph boundary. The remaining 3 dwords (total 12 bytes) of the header are currently unused and reserved for future use. The final size of the image is: + Un en-tête de bloc **nouveau style** est constitué de 32 octets. Le premier "dword" = double- word = 4 octets (32 bits) doit être égal à la valeur 7, permettant à GfxLib d'identifier un nouveau type de bloc. Le second "dword" contien la profondeur de couleur de l'image, en octets par pixel. Les troisième et le quatrième "dword" contiennent respectivement la largeur et la hauteur de l'image, ce qui élimine effectivement la limite de taille de l'image imposée par l'**ancien style** de bloc. Le cinquième "dword" contient le nombre de pixels par ligne ("pitch"), en octets; cela indique combien d'octets prend une rangée de pixels dans l'image. Le "pitch" (nombre de pixels par ligne, en octets) dans le **nouveau style** de bloc est toujours complété pour en faire un multiple de 16, pour permettre aux données de la ligne de pixels d' être alignées sur la limite du paragraphe. Les 3 autres "dword" (total 12 octets) de l'en-tête sont actuellement inutilisés et réservés pour une utilisation future. La taille finale de l'image est: - ##size = 32 + ( ( ( ( width * bytes_per_pixel ) + &hF ) and not &hF ) * height )## + ##taille = 32 + ( ( ( ( largeur * octets_par_pixel ) + &hF ) and not &hF ) * hauteur )## - The format of images created by ##[[KeyPgImagecreate ImageCreate]]## and ##[[KeyPgGetgraphics Get]]## depend on the dialect used. In the //[[CompilerOptlang -lang fb]]// dialect, images will be created with the new-style header. In the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects, the old-style image header is created. + Le format des images créées par ##[[KeyPgImagecreate ImageCreate]]## et ##[[KeyPgGetgraphics Get]]## dépend du dialecte utilisé. Dans le dialecte //[[CompilerOptlang -lang fb]]//, les images seront créées avec l'en-tête nouveau style. Dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//, l'en-tête image de style ancien sera créée. - All graphics primitives can work with both old-style and new-style image chunks. For easy access to image information, ##[[KeyPgImageInfo ImageInfo]]## can be used to obtain useful properties of an image buffer - such as its dimensions, color depth, pitch, and a pointer to the pixel data - whichever format is used. - It is also possible to access the image header directly to access this information. For more information on acessing the header structure, please refer to [[FaqPggetputstructure this example]]. + Toutes les primitives graphiques peuvent travailler aussi bien avec des blocs image de style ancien que de style nouveau. Pour accéder facilement aux informations image, ##[[KeyPgImageInfo ImageInfo]]## peut être utilisé pour obtenir des propriétés utiles d'un tampon image - telles que ses dimensions, sa profondeur de couleur, le "pitch" t un pointeur vers les données pixel - quel que soit le format utilisé. + Il est également possible d'accéder directement à l'en-tête de l'image pour obtenir ces informations. Pour plus d'informations sur comment accéder à la structure de l'en-tête, voyez [[FaqPggetputstructure cet exemple]]. {{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + - ##[[KeyPgScreengraphics Screen (Graphique)]]## - ##[[KeyPgScreenres ScreenRes]]## - - ##[[KeyPgGetgraphics Get (Graphics)]]## - - ##[[KeyPgPutgraphics Put (Graphics)]]## + - ##[[KeyPgGetgraphics Get (Graphique)]]## + - ##[[KeyPgPutgraphics Put (Graphique)]]## - ##[[KeyPgImagecreate ImageCreate]]## - ##[[KeyPgImageInfo ImageInfo]]## - ##[[KeyPgTransGfx Trans]]## - ##[[KeyPgAlphaGfx Alpha]]## +{{fbdoc item="back" value="DocToc|Table of Contents"}} {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} diff --git a/fbdocs/manual/cache/GfxLib.wakka b/fbdocs/manual/cache/GfxLib.wakka index 64e2b740ed..f94d00213c 100644 --- a/fbdocs/manual/cache/GfxLib.wakka +++ b/fbdocs/manual/cache/GfxLib.wakka @@ -1,57 +1,56 @@ {{fbdoc item="title" value="GfxLib - FreeBASIC graphics library overview"}}---- -""GfxLib"" is the built-in graphics library included in FreeBASIC. As well as re-creating every QuickBASIC graphics command, ""GfxLib"" has built-in commands to handle input from the keyboard and mouse. Major contributors of the library are Lillo, ""CoderJeff"" and DrV. +GfxLib est la bibliothèque graphique intégrée dans FreeBASIC. En plus de re-créer toutes les commandes graphiques de QuickBASIC, GfxLib a intégré des commandes pour gérer les entrées du clavier et de la souris. Les principaux contributeurs de la bibliothèque sont Lillo, CoderJeff et DrV. -The library supports various drivers depending on the platform: +La bibliothèque prend en charge des pilotes différents en fonction de la plate-forme: - - All: - - **##Null##** Does nothing. Purpose = ??? [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/libfb_gfx_driver_null.c?view=markup (SVN libfb_gfx_driver_null.c)]] + - Toutes: + - **##Null##** Ne fait rien. But = ??? [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/libfb_gfx_driver_null.c?view=markup">(SVN libfb_gfx_driver_null.c)]] - - ""Win32"" and ""Linux"": + - Win32 et Linux: - **##OpenGL##** + - Win32: + - **##DirectX##** La sélection par défaut de la FB GfxLib. Peut ne pas être disponible sur les anciennes installations Windows. [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/win32/libfb_gfx_driver_ddraw.c?view=markup">(SVN libfb_gfx_driver_ddraw.c)]] Bug note: broken in FB versions 0.20 and (some ?) 0.18.x (crash if not available), fixed in 0.21 SVN. [[http://www.freebasic.net/forum/viewtopic.php?p=106600#106600">(forum discussion: p=106600)]] - - ""Win32"": - - **##DirectX##** The default selection of FB ""GfxLib"". May not be available on old Windows installations. [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/win32/libfb_gfx_driver_ddraw.c?view=markup (SVN libfb_gfx_driver_ddraw.c)]] Bug note: broken in FB versions 0.20 and (some ?) 0.18.x (crash if not available), fixed in 0.21 SVN. [[http://www.freebasic.net/forum/viewtopic.php?p=106600#106600 (forum discussion: p=106600)]] - - **##GDI##** The "safest" one, available in all ""Win32"" versions. [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/win32/libfb_gfx_driver_gdi.c?view=markup (SVN libfb_gfx_driver_gdi.c)]] Bug note: broken in FB versions 0.20 and (some ?) 0.18.x ("banding effects"), not fixed in 0.21 SVN. [[http://www.freebasic.net/forum/viewtopic.php?p=106600#106600 (forum discussion: p=106600)]] - - - ""Linux"": + - **##GDI##** Le "plus sûr" , disponible dans toutes les versions Win32. [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/win32/libfb_gfx_driver_gdi.c?view=markup">(SVN libfb_gfx_driver_gdi.c)]] Bug note: broken in FB versions 0.20 and (some ?) 0.18.x ("banding effects"), not fixed in 0.21 SVN. [[http://www.freebasic.net/forum/viewtopic.php?p=106600#106600">(forum discussion: p=106600)]] + - Linux: - **##???##** + - DOS: - - DOS: - - **##BIOS##** [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_bios.c?view=markup (SVN libfb_gfx_driver_bios.c)]] - - **##""ModeX""##** "tuned" 320x240x8bpp VGA mode [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_modex.c?view=markup (SVN libfb_gfx_driver_modex.c)]] - - **##VESA banked##** compatible with very old VESA 1.x implementations [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vesa_bnk.c?view=markup (SVN libfb_gfx_driver_vesa_bnk.c)]] - - **##VESA linear##** needs VESA version at least 2.0, usually faster than banked VESA [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vesa_lin.c?view=markup (SVN libfb_gfx_driver_vesa_lin.c)]] - - **##VGA##** [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vga.c?view=markup (SVN libfb_gfx_driver_vga.c)]] - - Bug note: [[KeyPgPalette Palette]] doesn't work well [[http://freebasic.net/forum/viewtopic.php?t=12691 (forum discussion: t=12691)]] + - **##BIOS##** [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_bios.c?view=markup">(SVN libfb_gfx_driver_bios.c)]] + - **##ModeX##** "tuned" 320x240x8bpp VGA mode [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_modex.c?view=markup">(SVN libfb_gfx_driver_modex.c)]] + - **##VESA banked##** compatible avec de très vieilles implémentations VESA 1.x [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vesa_bnk.c?view=markup">(SVN libfb_gfx_driver_vesa_bnk.c)]] + - **##VESA linear##** a besoin de la version VESA au moins 2.0, généralement plus rapide que "banked VESA" [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vesa_lin.c?view=markup">(SVN libfb_gfx_driver_vesa_lin.c)]] + - **##VGA##** [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/gfxlib2/dos/libfb_gfx_driver_vga.c?view=markup">(SVN libfb_gfx_driver_vga.c)]] + - Bug note: [[KeyPgPalette Palette]] ne fonctionne pas bien [[http://freebasic.net/forum/viewtopic.php?t=12691">(forum discussion: t=12691)]] -##[[KeyPgScreencontrol Screencontrol]]## can be used (SET_DRIVER_NAME 103) to override the default driver preferences. +##[[KeyPgScreencontrol ScreenControl]]## peut être utilisé (SET_DRIVER_NAME 103) pour remplacer les préférences par défaut du pilote. -{{fbdoc item="target"}} - - In DOS, ""GfxLib"" will create and "manage" a mouse arrow if a mouse driver is detected. There is no "official" way to disable this. Also the arrow doesn't react to mouse movements while the screen is locked. - - In DOS, Windowing and OpenGL related commands and switches are not available (they exist but do nothing, or return some values with no meaning) - - In DOS, the resolution must match one supported by the graphics card. ""GfxLib"" will try to find an appropriate mode from VGA modes, ""ModeX"" or VESA, preferring VESA LFB interface if available, or banked VESA otherwise. Unsupported resolutions may currently crash the program, though in future ""GfxLib"" may try to find a close match instead. For optimal compatibility, you should support "safe" resolutions like 640x480 and 800x600, and maybe 1024x768. There are various additional modes like 768x576 around, but they are vendor specific and lacking on many other cards. Also modes 1024x768 and above are not available on older cards and laptops. +{{fbdoc item="section" value="Différences plate-forme + - Sous DOS, GfxLib permettra de créer et de "gérer" une flèche de la souris si un pilote de la souris est détectée. Il n'y a pas de moyen "officiel" pour désactiver ceci. Également la flèche ne réagit pas pour des mouvements de la souris pendant que l'écran est verrouillé. + - Sous DOS, les commandes Windowing et OpenGL connexes et les commutateurs ne sont pas disponibles (ils existent, mais ne font rien ou retournent des valeurs sans signification) + - Sous DOS, la résolution doit correspondre à une, prise en charge par la carte graphique. GfxLib va essayer de trouver un mode VGA approprié de modes, ModeX ou VESA, preferring VESA LFB interface si disponible, ou "banked" VESA autrement. Les résolutions non prises en charge peuvent actuellement planter le programme, même si à l'avenir GfxLib peut essayer de trouver une correspondance proche. Pour une compatibilité optimale, vous devriez utiliser des résolutions "sécurité" comme 640x480 et 800x600, et peut-être 1024x768. Il existe différents modes supplémentaires comme 768x576, mais ils sont spécifiques à un fournisseur et n'existent pas sur de nombreuses autres cartes. Également, les modes de 1024x768 et plus, ne sont pas disponibles sur les cartes plus anciennes et les ordinateurs portables. {{fbdoc item="diff"}} - - Graphics support was internally redesigned. QB used VGA graphics modes, and wrote directly into the VGA RAM. Multiple pages were available as long as the card supported them. FB uses backbuffers, one per defined page, and copies them to the video RAM (VGA (DOS), VESA (DOS), DirectX (""Win32""), ...) in the background. Graphics commands do work as they used to in QB, but a few notable differences are present: - - The background screen updating eats a considerable amount of CPU performance. - - There is a thread (""Win32"" and ""Linux"") or ISR (DOS, uses the PIT) active for this. - - Mixing FB's graphics support with low-level screen accesses (VGA) is not supported, even in DOS. However direct screen memory access is possible using Screenptr and Screenlock and is fully portable. In DOS VGA and VESA are still available, but can't be mixed with FB's graphics support. + - Le support graphique a été remanié en interne. QB utilisait les modes graphiques VGA et écrivait directement dans la RAM VGA. Plusieurs pages étaient disponibles pour autant que la carte les admettait. FB utilisait des "backbuffers", un par page définie, et les copiait dans la RAM vidéo (VGA (DOS), VESA (DOS), DirectX (Win32), ...) en arrière-plan. Les commandes graphiques doivent travailler comme elles le faisaient dans QB, mais quelques différences notables sont présentes: + - La mise à jour de l'écran en arrière-plan "mange" une quantité considérable des ressources du processeur. + - Il y a un "thread" (Win32 et Linux) ou ISR (DOS, utilise le PIT) actif pour ceci. + - Mélanger le support graphique de FB avec avec des accès écran de bas niveau (VGA) n'est pas supporté, même sous DOS. Cependant, des accès directs à la mémoire sont possibles en utilisant Screenptr et Screenlock et sont pleinement portables. Sous DOS, VGA et VESA sont encore disponibles, mais ne peuvent pas être mélangés avec le support graphique de FB. {{fbdoc item="see"}} - - [[CatPgGfx GFX Functions Index]] - - ##[[KeyPgScreengraphics Screen]]## The QB-like way to set graphics mode - - ##[[KeyPgScreenres Screenres]]## More flexible alternative to ##**Screen**## - - ##[[KeyPgScreenlist Screenlist]]## Check display modes available for FB ""GfxLib"" to use - - ##[[KeyPgScreencontrol Screencontrol]]## Select driver and more + - [[CatPgGfx Index des fonctions GFX]] + - ##[[KeyPgScreengraphics Screen]]## La façon QB-like pour définir le mode graphique + - ##[[KeyPgScreenres ScreenRes]]##L'alternative la plus flexible à ##**Screen**## + - ##[[KeyPgScreenlist ScreenList]]## Vérification des modes d'affichage disponibles et utilisables pour FB GfxLib + - ##[[KeyPgScreencontrol ScreenControl]]## Sélectionner le pilote et plus - ##[[KeyPgScreenlock Screenlock]]## - ##[[KeyPgScreenunlock Screenunlock]]## - - ##[[KeyPgScreenptr Screenptr]]## Semi-low level access + - ##[[KeyPgScreenptr ScreenPtr]]## Accès au niveau semi-bas - ##[[KeyPgScreenset Screenset]]## - ##[[KeyPgScreencopy Screencopy]]## - ##[[KeyPgScreeninfo Screeninfo]]## - ##[[KeyPgScreenglproc Screenglproc]]## - - ##[[GfxInternalFormats Internal pixel formats]]## + - ##[[GfxInternalFormats Formats internes des pixels]]## {{fbdoc item="back" value="DocToc|Table of Contents"}} {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} diff --git a/fbdocs/manual/cache/GfxScancodes.wakka b/fbdocs/manual/cache/GfxScancodes.wakka index c5f01fad93..b368c086ea 100644 --- a/fbdocs/manual/cache/GfxScancodes.wakka +++ b/fbdocs/manual/cache/GfxScancodes.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="DOS Keyboard Scancodes"}}---- -Listing of keyboard scancodes. +Liste des scancodes clavier. {{fbdoc item="desc"}} -Here follows a list of hardware keyboard scancodes accepted by the ##[[KeyPgMultikey Multikey]]## function. These are equal to DOS scancodes, and are guaranteed to be always recognized on all platforms. +Voici une liste de scancodes clavier acceptés par la fonction ##[[KeyPgMultikey MultiKey]]##. Ceux-ci sont égaux aux scancodes DOS et sont garantis d'être toujours reconnus sur toutes les plate-formes. -These constants are also defined in the ##fbgfx.bi## include file you can use in your programs. If you are using the //[[CompilerDialects lang fb]]// dialect then everything inside ##fbgfx.bi## is enclosed in the ##FB## ##[[KeyPgNamespace Namespace]]##. To use these constants in //[[CompilerDialects lang fb]]//, either prepend "##FB.##" to the constant name, or put "##[[KeyPgUsing Using]] FB##" after the ##[[KeyPgInclude #Include]]## line. -The hexadecimal code is not required and provided only for reference. +Ces constantes sont également définis dans le fichier d'inclusion ##fbgfx.bi## que vous pouvez utiliser dans vos programmes. Si vous utilisez le dialecte //[[CompilerDialects lang fb]]// alors tout à l'intérieur de ##fbgfx.bi## est enfermé dans le ##FB## ##[[KeyPgNamespace Namespace]]## FB. Pour utiliser ces constantes dans //[[CompilerDialects lang fb]]//, soit ajouter le préfixe "##FB.##" au nom de la constante ou mettre "##[[KeyPgUsing Using]] FB##" après la ligne ##[[KeyPgInclude #include]]##. +Le code hexadécimal est pas nécessaire et est fourni seulement pour la référence. %%(freebasic) SC_ESCAPE &h01 diff --git a/fbdocs/manual/cache/Git.wakka b/fbdocs/manual/cache/Git.wakka new file mode 100644 index 0000000000..9ccf11237a --- /dev/null +++ b/fbdocs/manual/cache/Git.wakka @@ -0,0 +1,49 @@ +{{fbdoc item="title" value="Tips on how to use Git"}}---- + +{{fbdoc item="section" value="Git on Linux"}} + + Install the ##git## and ##git-gui## packages (might be called different depending on the distro), then clone the repository, resulting in a new fbc/ directory containing the source code: + + %%cd ~ +ls +git clone git://fbc.git.sourceforge.net/gitroot/fbc/fbc +cd fbc/ +gitk --all +git gui & +%% + + To get nice anti-aliased fonts in git-gui and gitk on Debian/Ubuntu, you might need to install [[http://www.tcl.tk/ Tcl/Tk]] version 8.5 and enable it explicitly: + + %%apt-get install tcl8.5 tk8.5 +update-alternatives --config wish +%% + + +{{fbdoc item="section" value="Linux file explorer integration"}} + + [[http://rabbitvcs.org/ RabbitVCS]] is a useful tool that acts as GUI frontend for several programs such as Git. It can integrate into the Nautilus file explorer much like ""TortoiseSVN"" on Windows. Install the ##rabbitvcs-nautilus## package on Debian/Ubuntu to get it. + + +{{fbdoc item="section" value="MsysGit on Windows"}} + + Download the latest ##Git-*-preview*.exe## installer from https://code.google.com/p/msysgit/, and install it. The recommended setting for ##core.autocrlf## is ##true##, so that the FB source code in the working tree will have CRLF line endings. By default ""MsysGit"" will add some useful context-menu (right-click menu) entries for directories in the Explorer (it's the git-cheetah shell extension actually). + + After the installation, right click on your Desktop or somewhere in the Explorer and select "Git Gui" to bring up the Git Clone window. Here you can enter the Git clone URL of the fbc repository and the directory in which the clone should go. Note: Right-clicking and selecting //Git Gui// on directories that already //are// Git repositories will bring up the git-gui commit tool known from Linux. + + Alternatively, you can use the //Git Bash// terminal that comes with ""MsysGit"" and provides a Unixy shell environment based on MSYS, allowing you to work with Git much like you would on Linux. For example, open Git Bash, then: + + %%cd /c +ls +git clone git://fbc.git.sourceforge.net/gitroot/fbc/fbc +cd fbc/ +gitk --all +git gui & +%% + + +{{fbdoc item="section" value="TortoiseGit on Windows"}} + + Download the latest version from https://code.google.com/p/tortoisegit/ and install it. It works like ""TortoiseSVN"", i.e. all interaction is done through the Explorer right-click menu. + + +{{fbdoc item="back" value="DevToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/GlossaryIndex.wakka b/fbdocs/manual/cache/GlossaryIndex.wakka index 2a35e2bf06..361a1e80c3 100644 --- a/fbdocs/manual/cache/GlossaryIndex.wakka +++ b/fbdocs/manual/cache/GlossaryIndex.wakka @@ -1,482 +1,485 @@ {{fbdoc item="title" value="Glossary"}}---- -Brief definitions and explanations for words and phrases used in the ""FreeBASIC"" manual. +De brèves définitions et des explications pour les mots et expressions utilisés dans le manuel FreeBASIC. -{{anchor name="Index"}}Index: {{anchor name="A|A"}} - {{anchor name="B|B"}} - {{anchor name="C|C"}} - {{anchor name="D|D"}} - {{anchor name="E|E"}} - {{anchor name="F|F"}} - {{anchor name="G|G"}} - {{anchor name="H|H"}} - {{anchor name="I|I"}} - {{anchor name="J|J"}} - {{anchor name="K|K"}} - {{anchor name="L|L"}} - {{anchor name="M|M"}} - {{anchor name="N|N"}} - {{anchor name="O|O"}} - {{anchor name="P|P"}} - {{anchor name="Q|Q"}} - {{anchor name="R|R"}} - {{anchor name="S|S"}} - {{anchor name="T|T"}} - {{anchor name="U|U"}} - {{anchor name="V|V"}} - {{anchor name="W|W"}} - {{anchor name="X|X"}} - {{anchor name="Y|Y"}} - {{anchor name="Z|Z"}} +]]Index: [[#A">A]] - [[#B">B]] - [[#C">C]] - [[#D">D]] - [[#E">E]] - [[#F">F]] - [[#G">G]] - [[#H">H]] - [[#I">I]] - [[#J">J]] - [[#K">K]] - [[#L">L]] - [[#M">M]] - [[#N">N]] - [[#O">O]] - [[#P">P]] - [[#Q">Q]] - [[#R">R]] - [[#S">S]] - [[#T">T]] - [[#U">U]] - [[#V">V]] - [[#W">W]] - [[#X">X]] - [[#Y">Y]] - [[#Z">Z]] -======----{{anchor name="A"}} A----====== +
    A -**access rights** - The level of access associated with ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## members. Public members are accessible to any code; protected members are accessible to member functions and any derived ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## member functions; private members are accessible only to member functions of that ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. By default, ##[[KeyPgType Type]]## members have public access rights, while ##[[KeyPgClass Class]]## members are private. +**access rights = droits d'accès** + Le niveau d'accès associé aux membres d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##. Les membres "Public" (publiques) sont accessibles par n'importe quel code; les membres "Protected" (protégés) sont accessibles accessible aux fonctions membres et tout fonctions membres du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## dérivé; les membres "Private" (privés) sont accessibles uniquement aux fonctions membre de ce ##[[KeyPgType Type]]## ou de cette ##[[KeyPgClass Class]]##. Par défaut, les membres d'un ##[[KeyPgType Type]]## ont un accès "Public" et ceux d'une ##[[KeyPgClass Class]]## sont "Private". -**any pointer** - A variable or expression that points to a memory address where it is not known, at least from the compiler's point of view, what type of data is stored at that address. In C this would be the same as a void pointer or (void *). See ##[[KeyPgPtr ptr]]##. +**any pointer = pointeur indéfini** + Une variable ou une expression qui pointe vers une adresse mémoire où le contenu n'est pas encore défini, du moins, du point de vue du compilateur, quel type de données est stockée à cette adresse. En C ce serait identique à un pointeur invalide ou (void *). Voir ##[[KeyPgPtr Ptr]]##. **archive** - An archive is a group or files or a single file packed into a container format and usually compressed before or afterward. Typical container formats are GNU Tar and Zip. Typical compression formats are Gzip and Zip. + Une archive est un groupe de fichiers (ou un seul fichier) empaqueté(s) dans un format de conteneur et le plus souvent compressés avant ou après. Formats de conteneurs sont typiques GNU tar et zip. Formats de compression typiques sont gzip et zip.An archive is a group or files or a single file packed into a container formaté et généralement compressé(s) avant ou après. Les formats de conteneurs classiques sont GNU Tar et Zip. Les formats de compression typiques sont Gzip et Zip. **argument** - Data that is passed to a procedure. The procedure refers to this data using the parameter(s) in it's parameter list. + Les données qui sont passés à une procédure. La procédure se réfère à ces données en utilisant le paramètre(s) dans sa liste de paramètres. -**argument passing convention** - The method in which arguments are passed to procedures, being either ##[[KeyPgByref by reference]]## or ##[[KeyPgByval by value]]##. See [[ProPgPassingArguments Passing Arguments to Procedures]]. +**argument passing convention = convention de passage d'arguments** + La méthode de passage des arguments à une procédure, c'est à dire, ##[[KeyPgByref Par Référence]]## ou ##[[KeyPgByval Par Valeur]]##. Voir [[ProPgPassingArguments Passage d'arguments aux procédures]]. -**array (container)** - A collection of data whose elements are stored contiguously in memory (one after the other, in increasing order). Because of this, an array offers random-access to it's elements (any element can be accessed at any time). Insertion or removal of elements anywhere but at the back of the container requires that those elements that follow be relocated, so a linked-list is typically preferred when insertion or removal needs to be efficient. +**array (container) = tableau (conteneur)** + Une collection de données dont les éléments sont stockés de manière contiguë en mémoire (l'un après l'autre, dans l'ordre croissant). Pour cette raison, un tableau offre un accès aléatoire à ses éléments (un élément peut être consulté à tout moment). Insertion ou suppression d'éléments n'importe où, mais l'arrière du conteneur exige que les éléments qui suivent (l'nsertion ou la suppression) seront relocalisés, alors une liste chaînée est généralement préférée lorsque l'insertion ou le retrait doivent être efficaces. -**assembler** - A component in the tool chain for translating source code in to executable programs. The assembler converts the low level assembly instruction mnemonics emitted by the compiler to object code. +**assembler = assembleur** + Un composant de la chaîne d'outils pour traduire le code source en programme exécutable. L'assembleur convertit les mnémoniques de bas niveau des instructions du code émis par le compilateur en code objet. -**assignment** - Assignment is one of the fundamental operations of computing. All it means is copying a value into the memory location pointed at by a variable. The value might be a literal, another variable, or the result of some expression. For an instance of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, this involves calling one of it's assignment operators. Not to be confused with initialization. +**assignment = affectation** + L'affectation est l'une des opérations fondamentales de l'informatique. Cela signifie tout simplement la copie d'une valeur dans l'emplacement mémoire pointé par une variable. La valeur peut être un littéral, une autre variable ou le résultat d'une expression. Pour une instance d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##, cela implique l'appel d'un des opérateurs d'affectation. A ne pas confondre avec l'initialisation. -**automatic storage** - Refers to storage on the call stack. Local procedure variables, objects and arrays with automatic storage are allocated when the procedure is called, initialized when defined, destroyed (in the case of objects) when leaving the scope they're declared in and deallocated when returning from the procedure. +**automatic storage = stockage automatique** + Fait référence au stockage sur la pile des appels. Les variables locales de la procédure, les objets et tableaux avec stockage automatique sont attribués lorsque la procédure est appelée, initialisés lorsqu'elle est définie, détruits (dans le cas d'objets) au moment de quitter le bloc de portée dans lesquels ils sont déclarés et libérés lors du retour de la procédure. -**automatic variable/object/array** - A variable, object or array with **automatic storage**. +**automatic variable/object/array = variable / objet / tableau automatique** + Une variable, objet ou tableau avec **stockage automatique**. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="B"}} B----====== +
    B **byref** - ##[[KeyPgByref Byref]]## specifies passing arguments to procedures by reference. Arguments passed by reference can be modified by the procedure and the changes seen by the caller. + ##[[KeyPgByref ByRef]]## spécifie le passage d'arguments aux procédures par référence. Les arguments passés par référence peuvent être modifiés par la procédure et changements constatés par l'appelant. **byval** - ##[[KeyPgByref Byval]]## specifies passing arguments to procedures by value. Procedures receive a copy of the argument passed. With ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## instances, this involves instantiating temporary objects by calling their copy constructor. These temporaries are destroyed upon procedure exit. + ##[[KeyPgByref ByVal]]## spécifie le passage d'arguments aux procédures par valeur. Les procédures reçoivent une copie de l'argument passé. Avec les instances de ##[[KeyPgType Type]]## ou de ##[[KeyPgClass Class]]##, cela implique l'instanciation des objets temporaires en appelant leur constructeur de copie. Ces copies temporaires sont détruites à la sortie de la procédure. -**binaries** - Binaries are the end result of source code. Binaries include executable files (.exe on windows), static library files (.a), dynamic library files (.dll on windows, .so on Linux), and relocatable object files. (.o) +**binaries = binaires** + Les binaires sont le résultat final du code source. Les binaires incluent les fichiers exécutables (.exe sur Windows), les fichiers de bibliothèques statiques (.a), les fichiers de bibliothèques dynamiques (.dll sur Windows, .so sur Linux), et les fichiers objets réadressables (.o). **.BSS section** - The part of the executable program that will contain zero bytes only when the program starts. Since all of the bytes are zero, the final size of the executable can often be reduced by placing uninitialized data, or zero initialized data in this section. + La partie du programme exécutable qui contient zéro octet seulement quand le programme démarre. Comme tous les octets sont à zéro, la taille finale de l'exécutable peut souvent être réduite en plaçant des données initialisées ou zéro données initialisées dans cette section. -**buffer** - A region of memory that allows data to be saved or manipulated before being copied somewhere else. In a communications device this may hold incoming or outgoing data yet to be processed. In graphics, a buffer may contain an image before being copied to the screen. +**buffer = tampon mémoire** + Une région de la mémoire qui permet aux données d'être sauvegardées ou manipulées avant d'être copiées ailleurs. Dans un dispositif de communication on peut y conserver les données qui entrent ou sortent avant d'être traitées. Dans les graphiques, un tampon peut contenir une image avant sa copie à l'écran. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="C"}} C----====== +
    C **call back** - A control mechanism where a caller lets a procedure call another procedure (the call back) provided by the caller typically through a function pointer. + Un mécanisme de contrôle où un appelant permet à une procédure d'appeler une autre procédure (le call back) fournie par l'appelant généralement à travers un pointeur de fonction. **call stack** - A chunk of memory reserved for a process or thread that is used as a stack for storing various information needed by procedures when they are called. Among the information stored on the call stack are all of the local automatic variables, objects and array data and usually whatever parameters are passed to the procedure. These items are allocated (//pushed// onto the call stack) when the procedure is called and deallocated (//popped// from the call stack) when the procedure returns, either by the caller or the callee, depending on the calling convention used. The initial and maximum sizes of this reserved memory vary by platform. + Un morceau de la mémoire réservée pour un processus ou un "thread" et qui est utilisée comme une pile pour stocker des informations diverses dont ont besoin les procédures quand elles sont appelées. Parmi les informations stockées sur la pile d'appel il y a toutes des variables locales automatiques, des objets et des tableaux de données et généralement tout les paramètres qui sont passés à la procédure. Ces éléments sont affectés (//pushed//) sur la pile d'appel lorsque la procédure est appelée et libérés (//popped// de la pile d'appel lorsque la procédure revient (return), soit par l'appelant ou l'appelé, selon la convention d'appel utilisée. Les tailles initiale et maximale de cette mémoire réservée varient selon la plate-forme. -**caller** - A misnomer used to refer to the point in code in which a procedure is called. +**caller = l'appelant** + Un abus de langage utilisé pour désigner le point du code sous lequel une procédure est appelée. -**cast** - A cast operation changes one data type to another using specified rules. A ##[[KeyPgType Type]]## structure can implement a custom ##[[KeyPgCast Cast]]## for any intrinsic data type, and/or other TYPEs, See ##[[KeyPgCast Cast]]##. +**cast = transtypage** + Une opération de transtypage change un type de données en un autre en utilisant les règles spécifiées. Une structure de ##[[KeyPgType Type]]## peut mettre en œuvre un ##[[KeyPgCast Cast]]## personnalisé pour tout type de données intrinsèques, et/ou d'autres types, consultez ##[[KeyPgCast Cast]]##. **code block** Several lines of source code grouped together all sharing at least one common scope. For example a procedure's code block will be all the lines of code between ##[[KeyPgSub Sub]]## and ##[[KeyPgEnd End Sub]]##. **com port** - A short name for serial communications port. A program can communicate with an external device, such as modem or another computer through a com port. See ##[[KeyPgOpenCom Open Com]]##. + Une abréviation pour le port de communication série. Un programme peut communiquer avec un périphérique externe, comme un modem ou un autre ordinateur via un port COM. Voir ##[[KeyPgOpenCom Open Com]]##. -**compiler** - A compiler is a computer program which takes source code and transforms it into machine or object code. +**compiler = compilateur** + Un compilateur est un programme informatique qui transforme le code source en code machine ou code objet. -**compiler directives** - These are instructions included in the text of the program that affect the way the compiler behaves. For instance the compiler might be directed to include one section of code or another of depending on the target operating system. +**compiler directives = directives du compilateur** + Ce sont les instructions incluses dans le texte du programme et qui affectent la façon dont se comporte le compilateur. Par exemple, le compilateur peut être forcé d'inclure une section de code ou une autre de fonction du système d'exploitation cible. -**compound statement** - A statement composed one or more additional statements. Typically, a compound statement has a beginning (opening statement), a middle (a statement block) and an end (closing or ending statement), while some have additional parts. Examples of compound statements would be ##[[KeyPgIfthen IF]]## and ##[[KeyPgFunction FUNCTION]]##. +**compound statement = instruction composée** + Une instruction composée d'un ou plusieurs instructions supplémentaires. Typiquement, une instruction composée a un début (déclaration d'ouverture), un milieu (un bloc d'instructions) et une fin (fermeture fin de déclaration), alors que certains ont des parties supplémentaires. Des exemples de instructions composées: ##[[KeyPgIfthen If]]## et ##[[KeyPgFunction Function]]##. -**constant** - A symbol that retains a consistent value throughout the execution of the program. See ##[[KeyPgConst Const]]##. +**constant = constante** + Un symbole qui conserve une valeur constante tout au long de l'exécution du programme. Voir ##[[KeyPgConst Const]]##. -**constructor (module)** - A special type of module-level procedure that is automatically called prior to the module-level code flow. See ##[[KeyPgModuleConstructor Constructor (Module)]]##. +**constructor (module) = constructeur (module)** + Un type spécial de procédure au niveau du module qui est automatiquement appelée avant le flux de code au niveau du module. Voir ##[[KeyPgModuleConstructor Constructor (Module)]]##. -**constructor (TYPE or CLASS)** - A special member function of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## that is called when an object is instantiated. +**constructor (TYPE or CLASS) = constructeur (TYPE ou CLASS)** + Une fonction membre spéciale d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## qui est appelée quand un objet est instancié. **CVS** - Concurrent Versions System. The file manager implemented at Sourceforge where sources are stored, it keeps the history of the changes introduced by the developers. Used by FB in the past. (see also SVN) + Concurrent Versions System. Le gestionnaire de fichiers mis en œuvre sur Sourceforge où les sources sont stockées, il conserve l'historique des modifications introduites par les développeurs. Utilisé par FB dans le passé. (voir aussi SVN)) -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="D"}} D----====== +
    D **.DATA section** - The part of the executable program that will data that can be changed while to program is running. + La partie du programme exécutable qui correspond aux données qui peuvent être modifiées pendant que le programme est exécuté. -**debugger** - A program that allows controlled execution of compiled code. The values of variables can be tracked, execution can be paused, stepped or accelerated, etc. A debugger is typically used to help find the source of programmer errors in source code, called 'bugs'. +**debugger = débogueur** + Un programme qui permet l'exécution contrôlée du code compilé. Les valeurs des variables peuvent être vériifiées, l'exécution peut être suspendue, accélérée ou en pas à pas, etc... Un débogueur est généralement utilisé pour aider à trouver l'origine des erreurs de programmation, appelées 'bugs', dans le code source. -**declaration** - A source code statement that introduces a symbol, constant, variable, procedure, data type, or similar, to the compiler but not necessarily allocate any space for it. See ##[[KeyPgDim Dim]]##, ##[[KeyPgDeclare Declare]]##, ##[[KeyPgExtern Extern]]##, ##[[KeyPgType Type]]##. +**declaration = déclaration** + Une instruction de code source qui introduit un symbole, une constante, une variable, une procédure, un type de données, ou similaire pour le compilateur, mais sans nécessairement allouer de l'espace pour cela. Voir ##[[KeyPgDim Dim]]##, ##[[KeyPgDeclare Declare]]##, ##[[KeyPgExtern Extern]]##, ##[[KeyPgType Type]]##. -**definition** - A source code statement (or statements) that allocates space for data or code. For example, ##[[KeyPgSub Sub]]## defines a procedure by allocating space for the program code it will contain. Some statements can be both a declaration and a definition. For example, ##[[KeyPgDim Dim]]## both declares and defines a variable. +**definition = définition** + Une instruction de code source (ou instructions) qui alloue de l'espace pour des données ou du code. Par exemple, ##[[KeyPgSub Sub]]## définit une procédure en allouant un espace pour le code du programme qu'elle contient. Certaines déclarations peuvent être à la fois une déclaration et une définition. Par exemple, ##[[KeyPgDim Dim]]## déclare et définit une variable. -**dereference** - The act of obtaining a value from memory at a given address. See ##[[KeyPgOpValueOf Operator * (ValueOf)]]##, ##[[ProPgPointers Pointers]]##. +**dereference = déréférencer** + Le fait d'obtenir une valeur de la mémoire à une adresse donnée. Voir ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]##, ##[[ProPgPointers Pointeurs]]##. -**descriptor** - Refers to the internal data structure used by the compiler and runtime library for managing variable length strings and arrays. +**descriptor = descripteur** + Se rapporte à la structure interne des données utilisée par le compilateur et la bibliothèque d'exécution pour la gestion des chaînes de longueur variable et les tableaux. -**destroy (TYPE or CLASS)** - The act of deconstructing and deallocating memory for an object instance. When an object is destroyed, it's destructor is called. This happens automatically when an object goes out of scope, or when ##[[KeyPgOpDelete Delete]]## is called with a pointer to an object. +**destroy (TYPE or CLASS) = détruire (TYPE ou CLASS)** + Action de déconstruction et de désallocation mémoire pour une instance d'objet. Quand un objet est détruit, son destructeur est appelé. Cela se produit automatiquement quand un objet est hors de portée ou lorsque ##[[KeyPgOpDelete Delete]]## (Supprimer) est appelé avec un pointeur vers un objet. -**destructor (module)** - A special type of module-level procedure that is automatically called at program termination. See ##[[KeyPgModuleDestructor Destructor (Module)]]##. +**destructor (module) = destructeur (module)** + Un type spécial de procédure au niveau module qui est automatiquement appelée à la cessation du programme. Voir ##[[KeyPgModuleDestructor Destructor (Module)]]##. -**destructor (TYPE or CLASS)** - A special member function of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## that is called when an object is destroyed. +**destructor (TYPE or CLASS) = destructeur (TYPE or CLASS)** + Une fonction membre spéciale d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## qui est appelée quand un objet est détruit. **dll** - Shorthand for **dynamically linked library**. + Abréviation de **dynamically linked library //= bibliothèque à liaison dynamique//**. **DPMI** - A method / standard allowing to execute protected mode code (mostly also 32-bit) on a 16-bit real mode DOS kernel. Affects only DOS version of FreeBASIC. See also ##[[FaqDOS DOS related FAQ]]## + Une méthode/un standard permettant d'exécuter du code en mode protégé (le plus souvent également 32 bits) sur un noyau 16-bit mode DOS réel. Affecte uniquement la version DOS de FreeBasic. Voir aussi la ##[[FaqDOS FAQ DOS]]##. **DJGPP** - A complete 32-bit C/C""++"" development system for Intel 80386 (and higher) PCs running DOS and includes ports of many GNU development utilities. + Un système complet de développement C/C++ 32-bit pour Intel 80386 (et sup.) Fonctionnement PC sous DOS et inclut le portage de nombreux outils de développement GNU. **dynamically linked library** - A file containing executable code that is loaded by another application when it is started. Also referred to as a **dll** or shared library. See ##[[ProPgSharedLibraries Shared Libraries (DLLs)]]##. + Un fichier contenant du code exécutable qui est chargé au démarrage d'une autre application. On parle aussi d' une **dll** ou une bibliothèque partagée. Voir les ##[[ProPgSharedLibraries bibliothèques partagées (DLL)]]##. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="E"}} E----====== +
    E -**enum** - A data type restricted to a sequence of named values given in a particular order. See ##[[KeyPgEnum Enum]]##. +**enum = énumération** + Un type de données restreint à une séquence de valeurs nommées données dans un ordre particulier. Voir ##[[KeyPgEnum Enum]]##. -**executable** - A binary file that can be run. It consists of libraries and object files bound together by the linker. +**executable = exécutable** + Un fichier binaire qui peut être exécuté. Il se compose des bibliothèques et des fichiers objets liés entre eux par l'éditeur de liens. **exit sub/function** - When called inside a procedure, leaves the procedure and returns control to the calling program. + Lorsqu'elle est appelée dans une procédure, quitte la procédure et le contrôle revient au programme appelant. **expression** - An instruction to execute a statement that will evaluate/return a value. + Une instruction pour exécuter une instruction qui permettra d'évaluer/retourner une valeur. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="F"}} F----====== +
    F -**field** - Commonly refers to a data member in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. +**field = champ** + Se réfère communément à un membre de données dans un ##[[KeyPgType Type]]## ou une ##[[KeyPgClass Class]]##. -**file number** - An integer associated with an open file or device as given in ##[[KeyPgOpen Open]]##. All subsequent operations on the opened file or device must use the same file number. +**file number = numéro de fichier** + Un entier associé à un fichier ouvert ou un périphérique comme indiqué dans ##[[KeyPgOpen Open]]##. Toutes les opérations ultérieures sur le fichier ouvert ou le périphérique doivent utiliser le même numéro (identificateur). -**format string** - A sequence of characters that controls how data should be presented. See ##[[KeyPgFormat Format]]##, ##[[KeyPgPrintusing Print Using]]##. +**format string = chaîne de formatage** + Une séquence de caractères qui contrôle la façon dont les données devraient être présentées. Voir ##[[KeyPgFormat Format]]##, ##[[KeyPgPrintusing Print Using]]##. -**function** - A procedure defined using ##[[KeyPgFunction Function]]##, optionally taking parameters and returning a value. +**function = fonction** + Une procédure définie en utilisant ##[[KeyPgFunction Function]]##, éventuellement avec des paramètres et le retour d'une valeur. -**function pointer** - A variable containing the address of a function. The address (function) to which the variable points can be changed while the program is running allowing for dynamic program flow, such as call back functions. +**function pointer = pointeur de fonction** + Une variable contenant l'adresse d'une fonction. L'adresse (fonction) sur laquelle la variable pointe peut être modifiée pendant l'exécution du programme permettant un flux dynamique programme, telles que les fonctions de rappel (call back). -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="G"}} G----====== +
    G -**get/put buffer** - See: Image Buffer. An image buffer in FreeBASIC's native format. +**get/put buffer = tampon get/put** + Voir: Image Buffer (tampon image). Un tampon d'image dans le format natif de FreeBASIC. -**graphics primitive** - A graphics primitive is another term for common shapes like circles and rectangles. +**graphics primitive = primitives graphiques** + Primitives graphiques est un autre terme pour les formes communes, comme les cercles et les rectangles. -**global variable** - A variable that is visible to all procedures within a module, across multiple modules, or both. See ##[[KeyPgCommon Common]]## and ##[[KeyPgExtern Extern]]##. +**global variable = variable globale** + Une variable qui est visible pour toutes les procédures dans un module, plusieurs modules, ou les deux. Voir ##[[KeyPgCommon Common]]## et ##[[KeyPgExtern Extern]]##. **GNU** - A mass collaboration project with the primary goal to provide a free and non-proprietary Unix-like operating system. + Un projet de collaboration de masse avec pour principal objectif de fournir un système d'exploitation libre et non-propriétaire de type Unix. **GPL** - Short hand for GNU General Public License: a free, copyleft license for software and other kinds of works. - -@@{{anchor name="Index|Back to top"}}@@ + Abréviation de GNU General Public License: une licence libre, copyleft pour les logiciels et autres types de réalisation. -======----{{anchor name="H"}} H----====== +
    [[#Index">Retour en haut de la page]] +
    H **hash table** - A data structure that associates keys with values allowing for efficient look-up of values based on a given key. -**header** - When talking about a collection of data, this is generally the first part of that data that describes the rest. When talking about (header) files, this refers to an include file. In FreeBASIC the file extension '.bi' is usually used. +Une structure de données qui associe des clefs avec des valeurs permettant des recherches efficaces de valeurs fondées sur une clé donnée. -**heap** - The area of memory (free store) provided by the runtime library (and operating system) from which the program can dynamically allocate memory. See ##[[KeyPgAllocate Allocate]]##. +**header = en-tête** + Quand on parle d'une collection de données, c'est généralement la première partie de ces données qui décrit le reste. Quand on parle de fichiers (entêtes), cela fait référence à un fichier à inclure. En FreeBASIC l'extension de fichier '.bi' est généralement utilisée. -@@{{anchor name="Index|Back to top"}}@@ +**heap = le tas** + La zone de mémoire (stockage utilisable) fournie par la bibliothèque d'exécution (et le système d'exploitation) à partir de laquelle le programme peut allouer dynamiquement de la mémoire. Voir ##[[KeyPgAllocate Allocate]]##. -======----{{anchor name="I"}} I----====== +
    [[#Index">Retour en haut de la page]] +
    I -**image buffer** - A collection of data used to describe an image, containing such information as width, height, color depth and pixel data. +**image buffer = tampon image** -**include file** - A kind of source file that typically contains type definitions and declarations for variables and procedures that one or more other source files refer to. In general, these files provide a public interface to some module or modules, although a file that is [[KeyPgInclude #include]]d can contain any text whatsoever. +Un ensemble de données utilisées pour décrire une image, contenant des informations telles que la largeur, la hauteur, la profondeur des couleurs et les données de pixels. -**initialization** - The act of giving a variable a value at the point of it's creation. For object instances, this involves calling one of it's constructors. Not to be confused with assignment, which gives an already existing variable another value. +**include file = fichier à inclure** + Une sorte de fichier source qui contient généralement des définitions de type, des déclarations de variables et de procédures, auxquels un ou plusieurs autres fichiers sources pourront se référer. En général, ces fichiers fournissent une interface publique à certains modules ou des modules, bien qu'un fichier qui est [[KeyPgInclude #include]] peut contenir n'importe quel texte que ce soit. + +**initialization = initialisation** + L'acte de donner une valeur à une variable au moment de sa création. Pour les instances d'objet, cela implique d'appeler l'un de ses constructeurs. A ne pas confondre avec l'affectation qui donne une autre valeur à une variable déjà existante. **instance** - An instantiated object of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + Un objet instancié d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##. -**instantiate** - The act of creating an object of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, either directly with ##[[KeyPgDim Dim]]##, or indirectly by, for example, passing an object to a procedure by value. +**instantiate = instancier** + L'acte de créer un objet d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##, soit directement avec ##[[KeyPgDim Dim]]##, ou indirectement, par exemple, en passant un objet par valeur à une procédure. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    J -======----{{anchor name="J"}} J----====== +
    [[#Index">Retour en haut de la page]] -@@{{anchor name="Index|Back to top"}}@@ +
    K -======----{{anchor name="K"}} K----====== +
    [[#Index">Retour en haut de la page]] -@@{{anchor name="Index|Back to top"}}@@ +
    L -======----{{anchor name="L"}} L----====== +**library = bibliothèque** -**library** - Compiled code stored in a single file that can be used when making other programs. A library typically has one or more headers (or include files) to provide all the needed declarations for using the library. +Code compilé stocké dans un fichier unique qui peut être utilisé au moment de l'élaboration d'autres programmes. Une bibliothèque a généralement une ou plusieurs en-têtes (ou fichiers include) afin de fournir toutes les déclarations nécessaires à l'utilisation de la bibliothèque. -**linked list (container)** - A collection of data whose elements are typically stored on the heap. The linked list's elements store the addresses of their adjacent elements, and so only sequential access (an element is accessed by following the links from adjacent elements) is possible. This scheme does provide constant-time insertion of elements anywhere into the container, however, and because of this is often preferred over the array. +**linked list (container) = liste chaînée (conteneur)** + Une collection de données dont les éléments sont généralement stockés sur le tas. Les éléments de la liste chaînée stockent l'adresse des éléments qui leur sont adjacents et ainsi seul un accès séquenciel (un élément est accessible en suivant les liens à partir des éléments adjacents) est possible. Ce schéma fournit en temps constant une insertion des éléments n'importe où dans le conteneur et de ce fait est souvent préféré à un tableau. -**linker** - A program which combines a number of programs to form a complete set of instructions which can be loaded into the computer's memory and followed by the computer. +**linker = éditeur de liens** + Un programme qui combine un certain nombre de programmes pour former un ensemble complet d'instructions qui peuvent être chargées dans la mémoire de l'ordinateur et suivies par l'ordinateur. **LGPL** - Shorthand for GNU Lesser General Public License. Like the GNU GPL, but more permissive allowing non-(L)GPL'd works to be statically linked to the LGPL'd work, provided that the new work can have the LGPL'd portion relinked or replaced. + Raccourci pour GNU Lesser General Public License. Comme la GNU GPL, mais plus permissive permet lestravaux non-(L)GPL d'être liés statiquement à un travail LGPL, à condition que le nouveau travail puisse avoir la partie sous licence LGPL rééditée ou remplacée. -**local variable** - A variable that is visible only within the scope in which it is declared, and that is destroyed when program execution leaves that scope. +**local variable = variable locale** + Une variable qui n'est visible que dans la portée dans laquelle elle est déclarée, et qui est détruite lorsque l'exécution du programme quitte cette portée. -**lock** - A synchronization mechanism such that only one thread or process can have access to a shared object, for example a global variable, a device, or a file. +**lock = verrouillage** + Un mécanisme de synchronisation qui agit de telle sorte que seulement un thread ou un processus peut avoir accès à un objet partagé, par exemple une variable globale, un périphérique ou un fichier. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    M -======----{{anchor name="M"}} M----====== +**member = membre** -**member** - A data field, procedure, enumeration, type alias or anything else declared within a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition. +Un champ de données, une procédure, une énumération, un alias de type ou toute autre chose déclarée dans la définition d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##. -**member data** - Variables associated with a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. Member data can be static or non-static. +**member data = données membres** + Variables associées à un ##[[KeyPgType Type]]## ou une ##[[KeyPgClass Class]]##. Un membre de données peut être statique ou non-statique. -**member function** - A procedure associated with a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. Member functions have full access rights to the members of it's type or class, and can be static or non-static. +**member function = fonction membre** + Une procédure associée à un ##[[KeyPgType Type]]## ou une ##[[KeyPgClass Class]]##. Les fonctions membres ont des droits d'accès complet aux des membres de ce type ou de cette classe, et peuvent être statiques ou non-statiques. -**method** - See **member function**. +**method = méthode** + Voir **member function //= fonction membre//**. **module** - A source file in it's entirety, including any ##include files## that may be present as well. Typically, a module is a logical unit of code, containing parts of a program that relate to one another. For example, if making a game, one may separate the procedures needed for error logging from the procedures that control graphics into their own modules. + Un fichier source dans son intégralité, y compris tout ##fichier include## qui peut aussi bien être présent. Typiquement, un module est une unité logique de code, qui contient des parties d'un programme qui se rapportent à un autre. Par exemple, si on fait un jeu, on peut séparer les procédures nécessaires à l'enregistrement des erreurs de procédures qui contrôlent les graphiques dans leurs propres modules. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    N -======----{{anchor name="N"}} N----====== +**non-static member data = données membres non statiques** -**non-static member data** - Member data that each instance of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## gets their own copy of. +Données membres dont chaque instance d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## reçoit sa propre copie. -**non-static member function** - A **member function** that has an implicit ##[[KeyPgThis This]]## reference as an argument. +**non-static member function = fonction membre non statique** + Une **fonction membre** qui a une réference ##[[KeyPgThis This]]## implicite comme un argument. **null** - A constant usually associated with pointers denoting a 'nothing' value. This value is typically an integer '0' (zero) - the 'NULL terminator' appended to zstrings is chr(0), or asc(!"\0") - but can also be defined as a pointer type, like ##[[KeyPgCast Cast]](any ptr, 0)##. + Une constante habituellement associée avec des pointeurs désignant la valeur "rien".Cette valeur est généralement un entier '0' (zéro) - l'indicateur de fin 'NULL ' placé à la fin des "zstrings" est chr(0), ou asc(!"\0") - mais peut aussi être défini comme un type pointeur, comme ##[[KeyPgCast Cast]](any ptr, 0)##. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    O -======----{{anchor name="O"}} O----====== +**object code = code objet** -**object code** - Code in machine-readable form that can be executed by your computer's CPU and operating system, usually linked with libraries to create an executable file. +Code en format lisible par la machine qui peut être exécuté par le processeur de votre ordinateur et le système d'exploitation généralement lié avec les bibliothèques afin de créer un fichier exécutable. -**operand** - One of the arguments passed to an operator. For example, in the expression ##a = b + c##, the operands are ##a##, ##b## and ##c##, while the operators are ##=## and ##+##. +**operand = opérande** + L'un des arguments passés à un opérateur. Par exemple, dans l'expression ##a = b + c##, les opérandes sont ##a##, ##b## et ##c##, tandis que les opérateurs sont ##=## et ##+##. -**operator** - A function taking one or more operands (arguments) and returning a value. Operators can work on built-in data types, or can be overloaded to work on user defined types. See ##[[CatPgOperators Operators]]##. +**operator = opérateur** + Une fonction ayant un ou plusieurs opérandes (arguments) et retournant une valeur. Les opérateurs peuvent travailler sur les types intégrés de données ou peuvent être surchargés pour fonctionner sur des types définis par l'utilisateur. Voir ##[[CatPgOperators Opérateurs]]##. -**overload** - To declare a procedure having the same name as another, but with different parameters. Free functions, or module-level functions, can be overloaded using the ##[[KeyPgOverload Overload]]## keyword. ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## member functions can be overloaded by default. +**overload = surcharge** + Pour déclarer une procédure ayant le même nom qu'une autre, mais avec des paramètres différents. Les fonctions libres ou au niveau du module des fonctions, peuvent être surchargées en utilisant le mot-clé ##[[KeyPgOverload Overload]]##. Les ##[[KeyPgType Type]]##s ou les membres de fonctions de ##[[KeyPgClass Class]]## peuvent être surchargés par défaut. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    P -======----{{anchor name="P"}} P----====== +**page buffer = tampon de page** -**page buffer** - A buffer used for holding the contents of the screen before being displayed on screen. Where multiple page buffers are allowed, one page will be visible to the users while all others are hidden. Also the active page (the one to which changes are made) need not be the visible one allowing changes to one page while showing another. +Un tampon utilisé pour la maintenance des contenus de l'écran avant leur affichage sur l'écran. Lorsque de multiples tampons de pages sont admis, une page sera visible pour les utilisateurs tandis que toutes les autres seront cachées. Donc la page active (celle sur laquelle des modifications sont apportées) ne doit pas être la page visible pour permettre des changements sur cette page pendant l'affichage d'une autre. -**parameter** - The name used by a procedure that corresponds to the argument that is passed to it. +**parameter = paramètre** + Le nom utilisé par une procédure et qui correspond à l'argument qui est lui transmis. -**parameter list** - The parenthesized comma-separated list of parameters in a procedure declaration or definition. +**parameter list = liste des paramètres** + La liste des paramètres, entre parenthèses et séparés par des virgules, dans une déclaration de procédure ou de définition. -**PDS** - Professional Development System. Sometimes referred to as QB7.1. +**PDS = Système Professionnel de Développement** + Professional Development System. Parfois appelé QB7.1. -**pitch** - The number of bytes per row, in an image or screen buffer. If there is no padding between rows, then this can be calculated by ##width * bytes_per_pixel##, but this is not necessarily safe to assume. The screen's pitch can be found using ##[[KeyPgScreeninfo Screeninfo]]##, and an image buffer's pitch can be found by checking the ##pitch## value in the image's header. +**pitch = longueur** + Le nombre d'octets par ligne, dans un tampon image ou un écran. S'il n'y a pas de "remplissage" (padding) entre les lignes, alors on peut évaluer ceci ##largeur * octets_par_pixel##, mais ce n'est pas forcément certain. La largeur de l'écran (pitch) peut être trouvée en utilisant ##[[KeyPgScreeninfo ScreenInfo]]##, et la largeur (pitch) du tampon image peut être trouvée en vérifiant sa valeur dans l'en-tête de l'image. -**pointer** - A data type used to hold addresses. The kind of pointer determines how the data at the address is interpreted when the pointer is dereferenced, or when used with ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]##. See ##[[ProPgPointers Pointers]]##. +**pointer = pointeur** + Un type de données utilisé pour stocker des adresses. Le genre de pointeur qui détermine comment les données à l'adresse sont interprétées lorsque le pointeur est déréférencé, ou lorsqu'il est utilisé avec ##[[KeyPgOpPtrMemberAccess Opérateur -> (Accès membre par pointeur)]]##. Voir ##[[ProPgPointers Pointeurs]]##. -**preprocessor** - The FreeBASIC preprocessor is responsible for expanding Macros and replacing Defined values with their values. +**preprocessor = préprocesseur** + Le préprocesseur FreeBASIC est responsable de l'expansion des macros et en remplaçant les valeurs définies par leurs valeurs. -**procedure** - A generic name for any block of code that can be called from somewhere else in a program. See ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##. +**procedure = procédure** + Un nom générique pour tout bloc de code qui peut être appelé d'un autre endroit dans un programme. Voir ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##. **property** - A property is a special sort of type/class members, intermediate between a field (or data member) and a method. See ##[[KeyPgProperty Property]]##. + Une "property" (propriété) est une sorte de membre spécial de type/classe, intermédiaire entre un champ (ou un membre de données) et une méthode. Voir ##[[KeyPgProperty Property]]##. **ptr** - Shorthand for pointer. See **pointer**. + Abréviation pour pointeur. Voir **pointeur**. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    Q -======----{{anchor name="Q"}} Q----====== +**queue (container) = file d'attente (conteneur)** -**queue (container)** - A collection of data that offers first-in first-out (FIFO) storage and retrieval. Typically, elements can only be inserted at the back and removed from the front but can be accessed from either end. +Une collection de données qui permet le stockage et la récupération des données du genre FIFO ( = First In First Out = premier entré premier sorti). Ce qui signifie que les éléments sont insérés à l'arrière et retirés à l'avant, mais accessibles à partir de chaque extrémité. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    R -======----{{anchor name="R"}} R----====== +**ragged array (container) = tableau non-rectangulaire (conteneur)** -**ragged array (container)** - A ragged array is an array having rows of differing lengths. +Un tableau non-rectangulaire est un tableau ayant des lignes de longueurs différentes (donc le côté droit n'est pas rectiligne, donc non-rectangulaire. -**real number** - Any positive or negative number including fractions, irrational and transcendental numbers (like ##pi## or ##e##) and zero. Variables containing a real number have a limited range and precision depending on the number of bits used to represent the number. See: ##[[KeyPgSingle Single]]## and ##[[KeyPgDouble Double]]##. +**real number = nombre réel** + Tout nombre positif ou négatif, y compris les fractions, les nombres irrationnels et transcendantaux (comme ##pi## ou ##e##) et zéro. Les variables contenant un nombre réel ont une portée limitée et une précision fonction du nombre de bits utilisés pour représenter le nombre. Voir: ##[[KeyPgSingle Single]]## et ##[[KeyPgDouble Double]]##. -**registers** - Places inside the CPU for data storage. 80386 and compatible 32-bit models have EAX, EBX, ECX, EDX, ESI, EDI, EBP and ESP, plus some special (control/test/debug) registers. **NOT** related to "Windows registry". - -@@{{anchor name="Index|Back to top"}}@@ +**registers = registres** + Emplacements à l'intérieur du processeur (CPU) pour le stockage de données. 80386 et les modèles compatibles 32-bit ont les registres EAX, EBX, ECX, EDX, ESI, EDI, EBP et ESP, plus quelques registres spéciaux (contrôle/test/debug). **AUCUN** rapport avec le "registre de Windows". -======----{{anchor name="S"}} S----====== +
    [[#Index">Retour en haut de la page]] +
    S + +**scope = portée** -**scope** - Refers to the life-time and visibility of some component of the program, like a variable or a procedure. For example, a variable defined inside a procedure would have procedure scope: it is visible throughout the procedure, but not outside the procedure's code block. When the procedure ends, the variable goes out of scope and no longer exists. +Fait référence à la durée de vie et la visibilité de certains composantes du programme, comme les variables ou une procédures. Par exemple, une variable définie dans une procédure a la portée de la procédure: elle est visible dans toute la procédure, mais pas en-dehors du bloc de code de la procédure. Lorsque la procédure se termine, la variable est hors de portée et n'existe plus. -**scope block** - A code block where all the lines of source have the same scope. An explicit scope block can be indicated with the ##[[KeyPgScope Scope]]## statement. Scope blocks may also be implicit with the usage of ##[[KeyPgIfthen If..Then]]##, ##[[KeyPgFornext For..Next]]##, and other compound statements. +**scope block = bloc de portée** + Un bloc de code où toutes les lignes de source ont la même portée. La portée d'un bloc peut être indiquée explicitement avec l'instruction ##[[KeyPgScope Scope]]##. La portée des blocs peut aussi être implicite lors de l'utilisation de ##[[KeyPgIfthen If..Then]]##, ##[[KeyPgFornext For..Next]]##, et autres déclarations composées. -**shared library** - A library that exists once on a system that multiple executables can link to at runtime. See ##[[ProPgSharedLibraries Shared Libraries (DLLs)]]##. +**shared library = bibliothèque partagée** + Une bibliothèque qui existe de façon unique sur un système et qui peut être liée à plusieurs exécutables lors de leur exécution. Voir ##[[ProPgSharedLibraries Les bibliothèques partagées (DLL)]]##. -**source code** - Code written by the programmer, in a human-readable form, not yet compiled. +**source code = code source** + Le code écrit par le programmeur, sous une forme lisible par l'homme, pas encore compilé. -**stack (container)** - A collection of data that offers last-in first-out (LIFO) storage and retrieval. Typically, elements can only be inserted, accessed and removed from the top of the stack. +**stack (container) = pile (conteneur)** + Une collection de données qui permet le stockage et la récupération des données du genre LIFO ( = Last In First Out = dernier entré premier sorti). Ce qui signifie que les éléments ne sont insérés, consultés et retirés que par le haut de la pile. -**statement block** - One or more lines of code bookended by a compound statement. +**statement block = bloc d'instructions** + Une ou plusieurs lignes de code enchâssées dans une instruction composée. -**static library** - A library that is linked into a program at link time. There is one copy of the library for each executable that links to it. All data is executable specific. See ##[[ProPgStaticLibraries Static Libraries]]##. +**static library = bibliothèque statique** + Une bibliothèque qui est liée à un programme au moment de la compilation (liens). Il y a une copie de la bibliothèque pour chaque exécutable qui la lie à eux. Toutes les données sont spécifiques à l'exécutable. Voir les ##[[ProPgStaticLibraries bibliothèques statiques]]##. **static member data** Member data that each instance of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## shares. This data is defined outside of any ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, and takes up no space in the resulting object instance. -**static member function** - A **member function** without an implicit ##this## reference as an argument. Static member functions can be called normally through a variable, or directly using the type's name and the scope resolution operator See ##[[KeyPgStaticMember Static (Member)]]##. +**static member function = fonction membre statique** + Une **fonction membre** sans la référence implicite ##this## comme un argument. Les fonctions membres statiques peuvent être appelées normalement par l'intermédiaaire d'une variable ou directement en utilisant le nom du type et de l'opérateur de résolution de portée. Voir ##[[KeyPgStaticMember Static (Membre)]]##. -**static storage** - Refers to storage in the ##.BSS## or ##.DATA## sections of an executable. Variables, objects and arrays with static storage are allocated and initialized at compile-time and destroyed (in the case of objects) and deallocated at program-termination. Explicitly initialized variables, objects and arrays are allocated in the ##.DATA## section. +**static storage = stockage statique** + Fait référence au stockage dans les sections ##.BSS## ou ##.DATA## d'un exécutable. Variables, objets et tableaux avec stockage statique sont alloués et initialisés au moment de la compilation et détruits (dans le cas d'objets) et désalloués à la fin de l'exécution du programme. les variables explicitement initialisées, les objets et les tableaux sont attribués à la section ##.DATA##. -**static variable/object/array** - A variable, object or array with **static storage**. +**variable/objet/tableau statique** + Une variable, objet ou un tableau avec **stockage statique**. **sub** - A procedure defined using ##[[KeyPgSub Sub]]##, optionally taking parameters and not returning a value. + Une procédure définie à l'aide de ##[[KeyPgSub Sub]]##, ayant éventuellement des paramètres mais ne retournant pas de valeur. **SVN** - Subversion. A version control system that allows users to keep track of changes made to sources and documents. All the users can browse and download sources here: [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/ fbc.svn.sf.net/viewvc/fbc/trunk]] , but only developers have write access as well. (see also CVS) + Subversion. Un système de contrôle de version qui permet aux utilisateurs de garder une trace des changements apportés aux sources et aux documents. Tous les utilisateurs peuvent consulter et télécharger les sources ici: [[http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/">fbc.svn.sf.net/viewvc/fbc/trunk]], mais seuls les développeurs y ont accès en écriture. (voir aussi CVS) **SWIG** - A tool that automatically translates C headers to FreeBASIC (although not always perfectly). - -**symbol** - Used to refer to variables, labels, functions, methods, procedures, or other programmatic constructs in a program. + Un outil qui traduit automatiquement les en-têtes C pour FreeBASIC (mais pas toujours parfaitement). -@@{{anchor name="Index|Back to top"}}@@ +**symbol= symbole** + Utilisé pour se référer à des variables, des étiquettes, des fonctions, desméthodes, des procédures ou d'autres constructions de programmation dans un programme. -======----{{anchor name="T"}} T----====== +
    [[#Index">Retour en haut de la page]] +
    T **.TEXT section** - The part of the executable program that will contain program instructions and constant data. -**this reference** - A reference to an instance of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## that is passed as a hidden argument to non-static member functions of that type or class. Throughout the member function, this instance is referred to using the ##this## keyword, See ##[[KeyPgThis This]]##. +La partie du programme exécutable qui va contenir les instructions du programme et des données constantes. + +**this reference = la référence "this"** + Une référence à une instance d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## qui est passé comme un argument caché aux fonctions membres non statiques de ce type ou de cette classe. Tout au long de la fonction membre, cette instance est appelée à l'aide de du mot-clé ##this##. Voir ##[[KeyPgThis This]]##. **thread** - A thread of execution within a process (running program) that shares execution time with other threads in the same process. See [[CatPgThreading Threading]]. + Un thread d'exécution dans un processus (exécution du programme) que le temps d'exécution partage avec d'autres threads du même processus. Voir[[CatPgThreading Threading]]. **trace** - To follow the execution of a program step-by-step either manually by examining the source code, or more practically with a debugger. - -@@{{anchor name="Index|Back to top"}}@@ + Pour suivre l'exécution d'un programme étape par étape, soit manuellement en examinant le code source ou plus pratiquement avec un débogueur. -======----{{anchor name="U"}} U----====== +
    [[#Index">Retour en haut de la page]] +
    U **union** - A structure that can be used to store different types of variables, such as integers, doubles and fixed-length strings in the same location, but only one at a time. See ##[[KeyPgUnion Union]]##. -**user defined data type** - A ##[[KeyPgType Type]]##, ##[[KeyPgUnion Union]]##, ##[[KeyPgEnum Enum]]##, or ##[[KeyPgClass Class]]## data type. +Une structure qui peut être utilisé pour stocker différents types de variables, tels que les entiers, doubles et chaînes de longueur fixe dans le même endroit, mais un seul à la fois. Voir ##[[KeyPgUnion Union]]##. -@@{{anchor name="Index|Back to top"}}@@ +**user defined data type = type de données défini par l'utilisateur** + Un type de données ##[[KeyPgType Type]]##, ##[[KeyPgUnion Union]]##, ##[[KeyPgEnum Enum]]## ou ##[[KeyPgClass Class]]##. -======----{{anchor name="V"}} V----====== +
    [[#Index">Retour en haut de la page]] +
    V **variable** - A symbol representing data in memory. + +Un symbole représentant de données en mémoire. **VBDOS** - Visual BASIC for DOS, a historical BASIC compiler by M$ from 1992, following after QBASIC. DOS platform dropped very soon, VBDOS never became popular. + Visual BASIC pour DOS, un compilateur BASIC historique par M$ en 1992, après QBASIC. La plate-forme DOS a chuté très vite, VBDOS n'est jamais devenu populaire. -**vector** - A series of data items in memory that can be accessed by an index number. Similar to an array except that vector elements are not necessarily all contained within a single block of memory. +**vector = vecteur** + Une série d'éléments de données en mémoire qui sont accessibles par un numéro d'index. Semblable à un tableau, sauf que les éléments vectoriels ne sont pas nécessairement tous contenus dans un seul bloc de mémoire. -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] +
    W -======----{{anchor name="W"}} W----====== +**warning = avertissement** -**warning** - A message displayed by the compiler during compilation that suggests there may be potential problems with the current code. - -**wiki** - An on-line system that provides a set of pages containing information that can be viewed and modified by the public. In this context, it is typically used to refer to the FreeBASIC on line documentation. - -@@{{anchor name="Index|Back to top"}}@@ +Un message affiché par le compilateur lors de la compilation suggérant qu'il peut y avoir des problèmes potentiels avec le code courant. -======----{{anchor name="X"}} X----====== +**wiki** + Un système en ligne qui fournit un ensemble de pages contenant des informations qui peuvent être consultées et modifiées par le public. Dans ce contexte, il est généralement utilisé pour consulter la documentation en ligne sur FreeBASIC. + +
    [[#Index">Retour en haut de la page]] +
    X **x86** - Refers to the instruction set compatible with the 80386 (and later) CPU architecture. -@@{{anchor name="Index|Back to top"}}@@ +Désigne le jeu d'instruction compatible avec l'architecture 80386 (et suivants) du processeur. -======----{{anchor name="Y"}} Y----====== +
    [[#Index">Retour en haut de la page]] +
    Y -@@{{anchor name="Index|Back to top"}}@@ +
    [[#Index">Retour en haut de la page]] -======----{{anchor name="Z"}} Z----====== +
    Z **zstring** + +Une "zstring" est par essence une chaîne de style C standard se terminant par un caractère nul embarqué. Ce type de donnée est prévu pour une plus grande compatibilité avec les bibliothèques C. + +
    [[#Index">Retour en haut de la page]] A zstring is in essence a standard C style string ending with an embedded null character. This data type is provided for greater compatibility with C libraries. @@{{anchor name="Index|Back to top"}}@@ ---- -{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file +{{fbdoc item="back" value="DocToc|Table of Contents"}} diff --git a/fbdocs/manual/cache/GnuLicenses.wakka b/fbdocs/manual/cache/GnuLicenses.wakka index ac495f9b24..9b7252eed2 100644 --- a/fbdocs/manual/cache/GnuLicenses.wakka +++ b/fbdocs/manual/cache/GnuLicenses.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Licenses"}}---- -==Compiler== +**Compiler** The FreeBASIC compiler (fbc) is released under the [[LicenseGPL GPL]] license. -==Libraries== +**Libraries** The runtime library (libfb) is released under the [[LicenseLGPL LGPL]] license, for both the single-threaded and multi-threaded versions, with this extension to allow linking to it statically: "As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version." - The Gfx library (libfbgfx) is released under the [[LicenseLGPL LGPL]] license (???) [[http://www.freebasic.net/forum/viewtopic.php?t=17962]] + The Gfx library (libfbgfx) is released under the [[LicenseLGPL LGPL]] license (???) http://www.freebasic.net/forum/viewtopic.php?t=17962 -==Documentation== - The documentation is released under the [[LicenseGFDL GFDL]] license. +**Documentation** + The documentation is released - Mixing FB's graphics support with low-level screen accesses (VGA) is not supported, even in DOS. However direct screen memory access is possible using Screenptr and Screenlock and is fully portable. In DOS VGA and VESA are still available, but can't be mixed with FB's graphics support. -{{fbdoc item="back" value="FBWiki|Main Page"}} +under the [[LicenseGFDL GFDL]] license. diff --git a/fbdocs/manual/cache/JasonFirth.wakka b/fbdocs/manual/cache/JasonFirth.wakka index 6df47ec19d..e602268bd6 100644 --- a/fbdocs/manual/cache/JasonFirth.wakka +++ b/fbdocs/manual/cache/JasonFirth.wakka @@ -1,11 +1,11 @@ +{{fbdoc item="title" value="SJ Zero"}}---- Jason K. Firth, SJ Zero -http://www.qbxl.net +http://www.qbxl.net **Who I Am** -I am a hobbyist software developer whose tool of choice is FreeBASIC. I have Quest for a King, Nietzsche, Star Phalanx, and Rambo vs. Kitty Cat under my belt. +Je suis un développeur de logiciel amateur dont l'outil de choix est FreeBASIC. I have Quest for a King, Nietzsche, Star Phalanx, and Rambo vs. Kitty Cat under my belt. **What I Do** -I'm an instrumentation engineering technologist, not a programmer. -**Contact Me** -Don't. \ No newline at end of file +I'm an instrumentation engineering technologist, not a programmer. +**Contact Me** \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAbs.wakka b/fbdocs/manual/cache/KeyPgAbs.wakka index 7ad2e2bcf8..a13bd18c17 100644 --- a/fbdocs/manual/cache/KeyPgAbs.wakka +++ b/fbdocs/manual/cache/KeyPgAbs.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ABS"}}---- -Calculates the absolute value of a number +Calcule la valeur absolue d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Abs** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -11,15 +11,15 @@ Calculates the absolute value of a number ## {{fbdoc item="param"}} ##//number//## - Value to find the absolute value of. + Valeur pour laquelle on évalue la valeur absolue. -{{fbdoc item="ret"}} - The absolute value of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + La valeur absolue de ##//number//##. {{fbdoc item="desc"}} - The absolute value of a number is its unsigned magnitude. For example, ##Abs(-1)## and ##Abs(1)## both return ##1##. The required ##//number//## argument can be any valid numeric expression. + La valeur absolue d'un nombre est sa grandeur non signée. Par exemple, ##Abs(-1)## et ##Abs(1)## retournent tous les deux ##1##. L'argument requis ##//number//## peut être n'importe quelle expression numérique. - The ##**Abs**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types. + L'##[[KeyPgOperator Operator]]## unaire ##**Abs**## peut être surchargé avec des types définis par l'utilisateur.. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/abs.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ n = -69 print Abs( n ) %% -Output: +Affiche: %% 1 3.1415 @@ -44,10 +44,10 @@ Output: %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgSgn Sgn]]## diff --git a/fbdocs/manual/cache/KeyPgAccess.wakka b/fbdocs/manual/cache/KeyPgAccess.wakka index 07c835c6f6..6d93173bba 100644 --- a/fbdocs/manual/cache/KeyPgAccess.wakka +++ b/fbdocs/manual/cache/KeyPgAccess.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ACCESS"}}---- -Clause of the ##[[KeyPgOpen Open]]## statement to specify requested privileges +Clause de l'instruction ##[[KeyPgOpen Open]]## pour spécifier les privilèges demandés {{fbdoc item="syntax"}}## [[KeyPgOpen open]] //filename// for [[KeyPgBinary binary]] **Access** {**Read** | **Write** | **Read Write**} as [#]//filenum// @@ -11,18 +11,18 @@ Clause of the ##[[KeyPgOpen Open]]## statement to specify requested privileges ## {{fbdoc item="param"}} ##Read## - Open the file with only read privileges. + Ouvrir le fichier en lecture seulement. ##Write## - Open the file with only write privileges. + Ouvrir le fichier en écriture seulement. ##Read Write## - Open the file with read and write privileges. + Ouvrir le fichier en lecture et écriture. {{fbdoc item="desc"}} - ##Access## is used with the ##[[KeyPgOpen Open]]## statement to request read, write, or read and write privileges. If the ##Access## clause is not specified, ##Read Write## is assumed. + ##Access## est utilisé avec l'instruction ##[[KeyPgOpen Open]]## pour obtenir l'ouverture d'un fichier en lecture, en écriture ou en lecture et en écriture. Si la clause ##Access## n'est pas spécifiée, ##Read Write## est utilisé. {{fbdoc item="ex"}} -This example shows how to open the file "data.raw" with ##[[KeyPgReadFile read]]## and then "data.out" with ##[[KeyPgWriteFile write]]## access, in ##[[KeyPgBinary Binary]]## mode, in an open file number returned by ##[[KeyPgFreefile FreeFile]]##. +Cet exemple montre comment ouvrir le fichier "data.raw" avec un accès ##[[KeyPgReadFile Read (lecture)]]## et puis "data.out" avec un accès en ##[[KeyPgWriteFile Write (écriture)]]##, en mode ##[[KeyPgBinary Binary (binaire)]]##, dans un certain nombre de fichiers ouverts retournés par ##[[KeyPgFreefile FreeFile]]##. {{fbdoc item="filename" value="examples/manual/fileio/access.bas"}}%%(freebasic) Dim As Integer o @@ -57,7 +57,7 @@ Dim As Integer o %% {{fbdoc item="diff"}} - - None known. + - Aucune de connue. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgAcos.wakka b/fbdocs/manual/cache/KeyPgAcos.wakka index 846a3adf25..a14d6f6e1b 100644 --- a/fbdocs/manual/cache/KeyPgAcos.wakka +++ b/fbdocs/manual/cache/KeyPgAcos.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="ACOS"}}---- -Finds the arccosine of an angle +Détermine l'arc cosinus d'un angle {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Acos""** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Acos** ( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgDouble Double]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## //result// = Acos( //number// ) ## {{fbdoc item="param"}} ##//number//## - A cosine value in the range [-1..1]. + Une valeur de cosinus dans l'intervalle [-1..1]. -{{fbdoc item="ret"}} - The arccosine of ##//number//## in radians, in the range [0..Pi]. +{{fbdoc item="section" value="Valeur retournée + L'arc cosinus de ##//number//## en radians, dans l'intervalle [0..Pi]. {{fbdoc item="desc"}} - ##Acos## returns the arccosine of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of 0 to [[TutMathAngles Pi]]. The arccosine is the inverse of the ##[[KeyPgCos Cos]]## function. The returned angle is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). + ##Acos## renvoie l'arc cosinus de l'argument ##//number//## dans une valeur ##[[KeyPgDouble Double]]## dans l'intervalle de 0 à [[TutMathAngles Pi]]. L'arc cosinus est l'inverse de la fonction ##[[KeyPgCos Cos]]##. L'angle renvoyé est mesuré en [[TutMathAngles radians]] (non pas en [[TutMathAngles degrés]]). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/acos.bas"}}%%(freebasic) @@ -27,7 +27,7 @@ PRINT "" PRINT "The angle between the sides is"; ACOS ( a / h ) SLEEP %% -The output would look like: +L'affichage sera: %% Please enter the length of the hypotenuse of a triangle: 5 Please enter the length of the adjacent side of the triangle: 4 @@ -36,13 +36,13 @@ The angle between the sides is 0.6435011087932843 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Acos""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Acos**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCos Cos]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAddGfx.wakka b/fbdocs/manual/cache/KeyPgAddGfx.wakka index e63530062a..9be8ef0c2b 100644 --- a/fbdocs/manual/cache/KeyPgAddGfx.wakka +++ b/fbdocs/manual/cache/KeyPgAddGfx.wakka @@ -1,51 +1,51 @@ {{fbdoc item="title" value="ADD"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects addition as the blitting method +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui choisit l'addition comme méthode de transformation {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Add**[ ,//multiplier// ] ## {{fbdoc item="param"}} ##**Add**## - Required. + Obligatoire. ##//multiplier//## - Optional value between 0 and 255. The source pixels are premultiplied by ##(//multiplier// / 256)## before being added. If omitted, this value defaults to 255. + Valeur facultative entre 0 et 255. Les pixels source sont multipliés par ##(//multiplier// / 256)## avant d'être additionnés. Si omise, la valeur par défaut est 255. {{fbdoc item="desc"}} - ##**Add**## selects addition as the method for blitting an image buffer. For each source and target pixel, the values of each respective component are added together to produce the result. - The addition is saturated - i.e. if the sum of the two values is 256 or more, then it will be cropped down to 255. + ##**Add**## sélectionne l'addition comme méthode de transformation d'un buffer image. Pour chaque pixel source et cible, les valeurs respectives de chaque composant sont additionnées pour donner le résultat. + L'addition est saturée - par exemple, si la somme des 2 valeurs dépasse 255, elle est ramenée à cette valeur de 255. - This method will work in all color modes. Mask colors (color 0 for indexed images, magenta (##[[KeyPgRgb RGB]](255, 0, 255)##) for full color images) will be skipped, though full color values of 0 (##[[KeyPgRgba RGBA]](0, 0, 0, 0)##) will have also have no effect. + Cette méthode fonctionne dans tous les modes de couleur. Les masques de couleur (color 0 pour les images indexées, magenta (##[[KeyPgRgb RGB]](255, 0, 255)##) pour les images pleine couleur) seront écartés, cependant des valeurs 0 en pleine couleur (##[[KeyPgRgba RGBA]](0, 0, 0, 0)##) n'auront aussi aucun effet. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/gfx/put-add.bas"}}%%(freebasic) -''open a graphics window + %%(freebasic) +''ouvre une fenetre graphique screenres 320, 200, 16 -''create a sprite containing a circle +''cree un sprite contenant un cercle const as integer r = 32 dim c as any ptr = imagecreate(r * 2 + 1, r * 2 + 1, 0) circle c, (r, r), r, rgb(255, 255, 192), , , 1, f -''put the sprite at three different multipier -''levels, overlapping each other in the middle +''place le sprite avec trois niveaux differents de multiplieurs +''se recouvrant au milieu put (146 - r, 108 - r), c, add, 64 put (174 - r, 108 - r), c, add, 128 put (160 - r, 84 - r), c, add, 192 -''free the memory used by the sprite +''libere la memoire utilisee par le sprite imagedestroy c -''pause the program before closing +''pause du programme avant fermeture sleep %% -{{image class="center" title="Put Add example output" url="/images/add.png"}} +
    {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveauté FreeBASIC {{fbdoc item="see"}} - -##[[KeyPgTransGfx Trans]]## - -##[[KeyPgAlphaGfx Alpha]]## - -##[[KeyPgCustomgfx Custom]]## +
  • ##[[KeyPgTransGfx Trans]]## +
  • ##[[KeyPgAlphaGfx Alpha]]## +
  • ##[[KeyPgCustomgfx Custom]]## - ##[[KeyPgPutgraphics Put (Graphics)]]## {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAlias.wakka b/fbdocs/manual/cache/KeyPgAlias.wakka index 6ca77fdd98..2b1afdb5e9 100644 --- a/fbdocs/manual/cache/KeyPgAlias.wakka +++ b/fbdocs/manual/cache/KeyPgAlias.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="ALIAS"}}---- -Clause of the ##[[KeyPgSub Sub]]## and ##[[KeyPgFunction Function]]## statements that provides an alternate internal name +Clause de ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]## qui donne un autre nom interne {{fbdoc item="syntax"}}## [[[KeyPgDeclare declare]]] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //usablename// **Alias "//alternatename//"** (...) ## {{fbdoc item="usage"}}## declare sub //usablename// Alias "//alternatename//" ( ... ) - ##//or//## + ##//ou//## declare function //usablename// Alias "//alternatename//" ( ... ) - ##//or//## + ##//ou//## sub //usablename// Alias "//alternatename//" ( ... ) ... end sub - ##//or//## + ##//ou//## function //usablename// Alias "//alternatename//" ( ... ) ... end function ## {{fbdoc item="desc"}} - ##Alias## gives an alternate name to a procedure. This alternate name cannot be used within the program to call the procedure, but it is visible (if the function is not private) to the linker when linking with code written in other languages. + ##**Alias**## donne un autre nom à une procédure. Ce nom de remplacement ne peut pas être utilisé dans le programme pour appeler la procédure, mais il est visible (si la fonction n'est pas privée (private)) à l'éditeur de liens lors de la liaison avec le code écrit dans d'autres langues. - ##Alias## is commonly used for procedures in libraries written in other languages when such procedure names are valid in the other language but invalid in BASIC. When using ##Alias## with ##[[KeyPgDeclare Declare]]##, only the alternate name is used by the linker. + ##**Alias**## est couramment utilisé pour les procédures dans les bibliothèques écrites dans d'autres langages lorsque les noms de ces procédures sont valables dans l'autre langage, mais non-valides dans le BASIC. En utilisant ##Alias## avec ##[[KeyPgDeclare Declare]]##, seul le nom de remplacement est utilisé par l'éditeur de liens. - Differently from normal procedure names, ##Alias## does not change the case of the alternate name, so it is useful when external code requires an exported function with a particular name or with a particular case. + A la différence des noms normaux de procédure, ##**Alias**## ne change pas la casse de l'autre nom, c'est donc très utile lorsque le code externe nécessite une fonction exportée avec un nom particulier ou un cas particulier. {{fbdoc item="ex"}} -If there is a sub called ##xClearScreen## in an external library and you want to reference it with the name ##""ClearVideoScreen""##, here is sample code to do so: +Si il y a un sous-programme appelé ##//xClearScreen//## dans une bibliothèque externe et que vous souhaitez la référencer avec le nom ##//ClearVideoScreen//##, voici un exemple de code pour le faire: {{fbdoc item="filename" value="examples/manual/procs/alias.bas"}}%%(freebasic) DECLARE SUB ClearVideoScreen ALIAS "xClearScreen" () %% -A procedure meant to be used by external C code, exported as ##""MyExportedProc""##: +Une procédure destinée à être utilisée par du code C externe, exportée sous forme de ##//MyExportedPro//c##: {{fbdoc item="filename" value="examples/manual/procs/alias2.bas"}}%%(freebasic) FUNCTION MultiplyByFive CDECL ALIAS "MyExportedProc" (BYVAL Parameter AS INTEGER) AS INTEGER EXPORT RETURN Parameter * 5 @@ -39,7 +39,7 @@ END FUNCTION %% {{fbdoc item="diff"}} - - In QB, ##Alias## only worked with ##[[KeyPgDeclare Declare]]##. + - Dans QB, ##**Alias**## ne fonctionne qu'avec ##[[KeyPgDeclare Declare]]##. {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgAllocate.wakka b/fbdocs/manual/cache/KeyPgAllocate.wakka index d65bb50654..78e3187f7f 100644 --- a/fbdocs/manual/cache/KeyPgAllocate.wakka +++ b/fbdocs/manual/cache/KeyPgAllocate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ALLOCATE"}}---- -Allocates a block of memory from the free store +Alloue un bloc de mémoire à partir de la mémoire libre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Allocate** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -9,92 +9,96 @@ Allocates a block of memory from the free store ## {{fbdoc item="param"}} ##//count//## - The size, in bytes, of the block of memory to allocate. + La taille, en octets du bloc de mémoire à allouer. -{{fbdoc item="ret"}} - If successful, the address of the start of the allocated memory is returned. Otherwise, if the requested block size could not be allocated, or if ##//count// < 0##, then the null pointer (##0##) is returned. +{{fbdoc item="section" value="Valeur retournée + En cas de succès, l'adresse du début de la mémoire allouée est retournée. Sinon, si la taille demandée du bloc ne peut être attribuée ou si ##//count// < 0##, alors le pointeur (##0##) est retourné. {{fbdoc item="desc"}} - Attempts to allocate, or reserve, ##//count//## number of bytes from the free store (heap). The initial value of newly allocated memory is unspecified. The pointer that is returned is an [[KeyPgAny any]] [[KeyPgPtr ptr]] and points to the start of the allocated memory. This pointer is guaranteed to be unique, even if ##//count//## is zero. + Tente d'attribuer, ou de réserver, ##//count//## octets à partir de la mémoire libre (heap = tas). La valeur initiale de la mémoire nouvellement allouée n'est pas spécifiée. Le pointeur retourné est un [[KeyPgAny Any]] [[KeyPgPtr Ptr]] et pointe sur le début de la mémoire allouée. Ce pointeur est garanti comme étant unique, même si ##//count//## est zéro. - Allocated memory must be deallocated, or returned back to the free store, with ##[[KeyPgDeallocate Deallocate]]## when no longer needed. + La mémoire occupée doit être libérée, ou retourner au "tas"" libre, avec ##[[KeyPgDeallocate Deallocate]]## quand elle n'est plus utlisée. + + {{fbdoc item="ex"}} + + %%(freebasic) -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/memory/allocate.bas"}}%%(freebasic) '' This program uses the ALLOCATE(...) function to create a buffer of 15 integers that is '' then filled with the first 15 numbers of the Fibonacci Sequence, then output to the '' screen. Note the call to DEALLOCATE(...) at the end of the program. +Const integerCount As Integer = 15 +'' Try allocating memory for a number of integers. - const integerCount as integer = 15 - - '' Try allocating memory for a number of integers. '' - dim buffer as integer ptr - buffer = allocate(integerCount * sizeof(integer)) - if (0 = buffer) then - print "Error: unable to allocate memory, quitting." - end -1 - end if + Dim buffer As Integer Ptr + buffer = Allocate(integerCount * SizeOf(Integer)) + If (0 = buffer) Then + Print "Error: unable to allocate memory, quitting." - '' Prime and fill the memory with the fibonacci sequence. + End -1 + End If + '' Prime and fill the memory with the fibonacci sequence. '' + buffer[0] = 0 buffer[1] = 1 - for i as integer = 2 to integerCount - 1 - buffer[i] = buffer[i - 1] + buffer[i - 2] - next - - '' Display the sequence. + For i As Integer = 2 To integerCount - 1 + buffer[i] = buffer[i - 1] + buffer[i - 2] + Next + '' Display the sequence. '' - for i as integer = 0 to integerCount - 1 - print buffer[i] ; - next - - deallocate(buffer) - end 0 -%% - Output is: - <<## 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377##>> - ::c:: - It is important to free allocated memory if it's not going to be used anymore. Unused memory that isn't freed is simply wasting memory, and if the address of that memory is somehow overwritten or forgotten, that memory can never be freed. This condition is known as a memory leak, and should be avoided at all costs. Note that leaked memory is always completely freed when the application terminates, either by an "ordinary" exit or crash, so the leak "persists" only as long as the application runs, nevertheless it's a good habit to free any allocated memory inside your application. The following example demonstrates a function with a memory leak, where the address of allocated memory is lost and isn't and can't be freed anymore. If such a function is called frequently, the total amount of memory wasted can add up quickly. + For i As Integer = 0 To integerCount - 1 + Print buffer[i] ; + Next + Deallocate(buffer) + End 0 -{{fbdoc item="filename" value="examples/manual/memory/allocate2.bas"}}%%(freebasic) -'' Bad example of Allocate usage, causing memory leaks + %% + Affichage: +## 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377##;
    + Il est important de libérer la mémoire allouée si elle ne sera plus utilisée. La mémoire non utilisée non-libérée est simplement une perte de mémoire, et si son adresse est d'une certaine façon écrasée ou oubliée, cette mémoire ne pourra jamais être libérée. Ceci est une perte de mémoire et doit être évité à tout prix. Notez que la mémoire perdue est toujours entièrement libérée lorsque l'application se termine, soit par une sortie "ordinaire" ou un "crash", donc la fuite "persiste" tant que l'application s'exécute; malgré tout c'est une bonne habitude de libérer toute la mémoire allouée à l'intérieur de votre application . L'exemple suivant montre une fonction avec une fuite de mémoire, où l'adresse de mémoire allouée est perdue et n'est pas et ne peut pas être libérée. Si une telle fonction est appelée souvent, le montant total de la mémoire perdue peut augmenter rapidement. + %%(freebasic) + '' Bad example of Allocate usage, causing memory leaks -sub BadAllocateExample() + Sub BadAllocateExample() - dim p as byte ptr +Dim p As Byte Ptr +p = Allocate(420) '' assign pointer to new memory - p = allocate(420) '' assign pointer to new memory +p = Allocate(420) '' reassign same pointer to different memory, - p = allocate(420) '' reassign same pointer to different memory, - '' old address is lost and that memory is leaked + '' old address is lost and that memory is leaked - deallocate(p) + Deallocate(p) -end sub + End Sub + '' Main - '' Main BadAllocateExample() '' Creates a memory leak - print "Memory leak!" - BadAllocateExample() '' ... and another - print "Memory leak!" - end -%% -{{fbdoc item="target"}} - - This procedure is not guaranteed to be thread-safe. +Print "Memory leak!" + + BadAllocateExample() '' ... and another + Print "Memory leak!" + End + %% + ; + {{fbdoc item="target"}} +- Cette procédure n'est pas garantie d'être "thread-safe". {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Allocate""**## + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Allocate**## {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgCallocate Callocate]]## + - ##[[KeyPgCallocate CAllocate]]## + +- ##[[KeyPgReallocate Reallocate]]## + - ##[[KeyPgDeallocate Deallocate]]## - ##[[KeyPgReallocate Reallocate]]## - ##[[KeyPgDeallocate Deallocate]]## diff --git a/fbdocs/manual/cache/KeyPgAlphaGfx.wakka b/fbdocs/manual/cache/KeyPgAlphaGfx.wakka index ebfe4aaa23..f07e3802f3 100644 --- a/fbdocs/manual/cache/KeyPgAlphaGfx.wakka +++ b/fbdocs/manual/cache/KeyPgAlphaGfx.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ALPHA"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects alpha blending as the method +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui sélectionne //alpha blending// comme méthode. {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Alpha** @@ -7,87 +7,87 @@ Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects a ## {{fbdoc item="param"}} ##**Alpha**## - Required. + Obligatoire. ##//alphaval//## - Optional alpha parameter in the range [0..255]. Overrides alpha values in individual pixels. + Paramètre alpha facultatif de 0 à 255. Remplace les valeurs alpha en pixels individuels. {{fbdoc item="desc"}} - ##**Alpha**## selects alpha blending as the method for ##[[KeyPgPutgraphics Put]]##ting an image. If the ##//alphaval//## parameter is specified, it overrides the alpha value of each pixel, and the mask color (magenta) will be treated as transparent. This works in 15, 16, 24, or 32-bit color depths. + ##**Alpha**## sélectionne //alpha blending// comme méthode pour ##[[KeyPgPutgraphics Put]]## une image. Si le paramètre ##//alphaval//## est spécifié, il remplace la valeur alpha de chaque pixel, et le masque de couleur (magenta) sera considéré comme transparent. Ceci fonctionne en profondeurs de couleur de 15, 16, 24, ou 32-bit. - If ##//alphaval//## is not specified, ##**Alpha**## will only work in 32-bit color depth, and ##[[KeyPgPutgraphics Put]]## will use the alpha value embedded within each pixel. Pixels using the mask color will be treated as normal, and drawn with their given alpha value. + Si ##//alphaval//## n'est pas spécifié, ##**Alpha**## ne fonctionnera que pour une profondeur de couleur de 32-bit et ##[[KeyPgPutgraphics Put]]## utilisera la valeur alpha embarquée dans chaque pixel. Les pixels utilisant le masque de couleur seront traîtés normalement et dessinés avec leur valeur alpha. - ##**Alpha**## also has another mode which allows an 8-bit image to be ##[[KeyPgPutgraphics Put]]## on top of a 32-bit image. In this case, it will replace the alpha channel of the 32-bit image with the contents of the 8-bit image. + ##**Alpha**## a aussi un autre mode qui permet de ##[[KeyPgPutgraphics Put]]##er une image 8-bit au-dessus d'une image 32-bit. Dans ce cas, le canal alpha de l'image 32-bit sera remplacé par le contenu de l'image 8-bit. - Alpha values range between 0 and 255. An alpha value of 0 will not draw the image at all. All other alpha values are incremented by 1 to get a range between 2 and 256, and the result is then divided by 256 to get a value between 1/128 and 1, which is used to calculate the exact value of each pixel from the source and destination pixels. Thus, 255 is practically equivalent to drawing using Put with Trans blitting mode, 0 is equivalent to doing nothing at all, and all the other alpha values blend is expected. + Les valeurs Alpha sont comprises entre 0 et 255. Une valeur alpha de 0 ne modifiera pas l'image. Toutes les autres valeurs seront augmentées de 1 pour obtenir une fourchette de 2 à 256, puis le résultat sera divisé par 256 pour obtenir une valeur entre 1/128 et 1, qui sera utilisée pour calculer la valeur exacte de chaque pixel, à partir des pixels de la source et de la destination. Ainsi, 255 est pratiquement équivalent à dessiner en utilisant ##[[KeyPgPutgraphics Put]]## avec le mode ##Transparence##, 0 ne faisant rien, et toutes les autres valeurs donnant des résultats échelonnés entre les deux. {{fbdoc item="ex"}} - This example compares the two different ##**Alpha**## modes, including how they react to the mask color + Cet exemple compare les deux modes ##**Alpha**##, incluant leur réaction au masque de couleur {{fbdoc item="filename" value="examples/manual/gfx/put-alpha.bas"}}%%(freebasic) -'' Set up a 32-bit screen +'' Valide un ecran 32-bit screenres 320, 200, 32 -'' Draw checkered background +'' Dessine un fond a damier for y as integer = 0 to 199 for x as integer = 0 to 319 pset (x, y), iif((x shr 2 xor y shr 2) and 1, rgb(160, 160, 160), rgb(128, 128, 128)) next x next y -'' Make image sprite for Putting +'' Fabrique image sprite a placer(Put) dim img as any ptr = imagecreate(32, 32, rgba(0, 0, 0, 0)) for y as single = -15.5 to 15.5 for x as single = -15.5 to 15.5 dim as integer r, g, b, a if y <= 0 then if x <= 0 then - r = 255: g = 0: b = 0 '' red + r = 255: g = 0: b = 0 '' rouge else - r = 0: g = 0: b = 255 '' blue + r = 0: g = 0: b = 255 '' bleu end if else if x <= 0 then - r = 0: g = 255: b = 0 '' green + r = 0: g = 255: b = 0 '' vert else - r = 255: g = 0: b = 255 '' magenta (transparent mask color) + r = 255: g = 0: b = 255 '' magenta (masque transparent de couleur) end if end if a = 255 - (x ^ 2 + y ^ 2) - if a < 0 then a = 0': r = 255: g = 0: b = 255 + If a < 0 Then a = 0': r = 255: g = 0: b = 255 pset img, (15.5 + x, 15.5 - y), rgba(r, g, b, a) next x next y -'' Put with single Alpha value, Trans for comparison +'' Place avec valeur Alpha unique, Trans pour comparaison draw string (32, 10), "Single alpha" put (80 - 16, 50 - 16), img, alpha, 64 put (80 - 16, 100 - 16), img, alpha, 192 put (80 - 16, 150 - 16), img, trans -'' Put with full Alpha channel +'' Place avec plein canal Alpha draw string (200, 10), "Full alpha" put (240 - 16, 100 - 16), img, alpha -'' Free the image memory +'' Libere la memoire image imagedestroy img -'' Wait for a keypress +'' Attend touche appuyee sleep %% -{{image class="center" title="Put Alpha example output" url="/images/AL0.PNG"}} +
    - This example shows the special method for setting a 32-bit alpha channel using an 8-bit image + Cet exemple montre l'utilisation d'une image 8-bit pour valider un canal alpha 32-bit {{fbdoc item="filename" value="examples/manual/gfx/put-alpha-8bit.bas"}}%%(freebasic) dim as any ptr img8, img32 dim as integer x, y, i -'' Set up an 8-bit graphics screen +'' Valide un ecran graphique 8-bit screenres 320, 200, 8 for i = 0 to 255 palette i, i, i, i next i color 255, 0 -'' Create an 8-bit image +'' Cree une image 8-bit img8 = imagecreate(64, 64, 0, 8) for y = 0 to 63 for x = 0 to 63 @@ -102,7 +102,7 @@ put (16, 16), img8 sleep -'' Set up a 32-bit graphics screen +'' Valide un ecran graphique 32-bit screenres 320, 200, 32 for y = 0 to 199 for x = 0 to 319 @@ -110,7 +110,7 @@ for y = 0 to 199 next x next y -'' Create a 32-bit, fully opaque sprite +'' Cree un sprite 32-bit entierement opaque img32 = imagecreate(64, 64, 0, 32) for y = 0 to 63 for x = 0 to 63 @@ -121,21 +121,21 @@ next y draw string (16, 4), "Original Alpha channel" put (16, 16), img32, alpha -'' Put a new alpha channel using the 8-bit image +'' Place un nouveau canal alpha utilisant une image 8-bit put img32, (0, 0), img8, alpha draw string (16, 104), "New Alpha channel" put (16, 116), img32, alpha -''Free the memory for the two images +''Libere la memoire pour les deux images imagedestroy img8 imagedestroy img32 sleep%% -{{image class="center" title="Put Alpha example 2 output" url="/images/AL1.PNG" }} +
    {{fbdoc item="diff"}} - - New to Freebasic + - Nouveauté Freebasic {{fbdoc item="see"}} - ##[[KeyPgPutgraphics Put (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgAndGfx.wakka b/fbdocs/manual/cache/KeyPgAndGfx.wakka index fdd1f205cb..8d2ad5d8da 100644 --- a/fbdocs/manual/cache/KeyPgAndGfx.wakka +++ b/fbdocs/manual/cache/KeyPgAndGfx.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="AND"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which uses a bit-wise ##[[KeyPgOpAnd And]]## as the blitting method +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui utilise ##[[KeyPgOpAnd And]]## comme méthode de manipulation de bits. {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **And** ## {{fbdoc item="param"}} ##**And**## - Required. + Obligatoire. {{fbdoc item="desc"}} - The ##**And**## method combines each source pixel with the corresponding destination pixel, using the bit-wise ##[[KeyPgOpAnd And]]## function. The result of this is output as the destination pixel. - This method works in all graphics modes. There is no mask color, although color values with all bits set (##255## for 8-bit palette modes, or ##[[KeyPgRgba RGBA]](255, 255, 255, 255)## in full-color modes) will have no effect, because of the behavior of ##[[KeyPgOpAnd And]]##. + La methode ##**And**## combine chaque pixel source avec le pixel destination correspondant, en utilisant la fonction ##[[KeyPgOpAnd And]]##. Le résultat de cette manipulation est le pixel de destination. + Cette méthode fonctionne dans tous les modes graphiques. Il n'y a pas de masque de couleur, bien que les valeurs de couleur avec tous leurs bits validés (##255## pour les modes palette 8-bit, ou ##[[KeyPgRgba RGBA]](255, 255, 255, 255)## pour les modes pleine-couleur) n'auront aucun effet, en raison du fonctionnement de ##[[KeyPgOpAnd And]]##. - In full-color modes, each component (red, green, blue and alpha) is kept in a discrete set of bits, so the operation can be made to only affect some of the channels, by making sure the all the values of the other channels are set to ##255##. + Dans les modes pleine-couleur, chaque composant (rouge, vert, bleu et alpha) est conservé dans un ensemble discret de bits, aussi l'opération peut être effectuée pour n'affecter que certains canaux, en s'assurant que les valeurs de tous les autres canaux sont fixées à ##255##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/put-and.bas"}}%%(freebasic) -''open a graphics window +''Ouvre une fenetre graphique ScreenRes 320, 200, 16 line (0, 0)-(319, 199), RGB(255, 255, 255), bf -''create 3 sprites containing cyan, magenta and yellow circles +''Cree 3 sprites contenant circles cyan, magenta et jaune Const As Integer r = 32 dim as any ptr cc, cm, cy cc = ImageCreate(r * 2 + 1, r * 2 + 1, RGBA(255, 255, 255, 255)) @@ -30,22 +30,22 @@ Circle cc, (r, r), r, RGB(0, 255, 255), , , 1, f Circle cm, (r, r), r, RGB(255, 0, 255), , , 1, f Circle cy, (r, r), r, RGB(255, 255, 0), , , 1, f -''put the three sprites, overlapping each other in the middle +''Place les trois sprites, se chevauchant au milieu Put (146 - r, 108 - r), cc, and Put (174 - r, 108 - r), cm, and Put (160 - r, 84 - r), cy, and -''free the memory used by the sprites +''Libere la memoire utilisee par les sprites ImageDestroy cc ImageDestroy cm ImageDestroy cy -''pause the program before closing +''Pause le programme avant fermeture Sleep %% -{{image class="center" title="Put And example output" url="/images/put-and.png"}} +
    {{fbdoc item="diff"}} - - None +
  • Aucune {{fbdoc item="see"}} - ##[[KeyPgOpAnd And]]## diff --git a/fbdocs/manual/cache/KeyPgAny.wakka b/fbdocs/manual/cache/KeyPgAny.wakka index 98cc0d917b..0d1f6460e9 100644 --- a/fbdocs/manual/cache/KeyPgAny.wakka +++ b/fbdocs/manual/cache/KeyPgAny.wakka @@ -1,88 +1,88 @@ {{fbdoc item="title" value="ANY"}}---- -##**Any**## is not a real type, but it's used as a placeholder in various ways. +##**Any**## n'est pas un type réel, mais il est utilisé comme un espace réservé de diverses manières. {{fbdoc item="syntax"}}## //identifier// [[KeyPgAs as]] **Any** [[KeyPgPointer Pointer]]|[[KeyPgPtr ptr]] -//or// +//ou// [[KeyPgDeclare declare]] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //identifier// ( [ ..., ] [[KeyPgByref byref]] //identifier// [[KeyPgAs as]] **Any** [ , ... ] ) -//or// +//ou// [[KeyPgDim Dim]] //identifier// [[KeyPgAs as]] [[DataType datatype]] = **Any** ## {{fbdoc item="usage"}}## **##1)**## Dim //identifier// as **Any** ptr -//or// +//ou// **##1)**## Declare Sub //identifier// ( [ byval | byref ] //identifier// as **Any** ptr ) -//or// +//ou// **##2)**## Dim //identifier// As //datatype// = **Any** -//or// +//ou// **##3)**## Declare Sub //identifier// ( byref //identifier// as **Any** ) ## {{fbdoc item="desc"}} - ##**1)**## A special pointer type called the ##**Any [[KeyPgPtr Pointer]]**## allows pointing to any variable type. If you cast it to an ##[[KeyPgInteger Integer]] [[KeyPgPtr Pointer]]##, it will operate on the subject as though it were an ##[[KeyPgInteger Integer]]##, etc. + ##**Any**## peut être utilisé dans trois contextes: pointeurs, initialiseur de variable, arguments pointeur de fonctions et déclarations de fonction pour indiquer un type de données inconnu. - You may not create variables of the type ##**Any**##. It is illegal to dereference an ##**Any Pointer**##, but an ##**Any Pointer Pointer**## may be dereferenced, because doing so will result in an ##**Any Pointer**##. Trying to dereference that resulting ##**Any Pointer**## would be illegal. + ##**1)**## Un type pointeur spécial appelé le ##**[[KeyPgPtr Pointer]] Any**## permet de pointer vers n'importe quel type de variable. Si vous le convertissez (cast) en un ##[[KeyPgInteger Integer]] [[KeyPgPtr Pointer]]##, il fonctionnera sur le sujet comme s'il s'agissait d'un ##[[KeyPgInteger Integer]]##, etc. - This should not be confused with ##Variant##, a Visual Basic data type which can contain any type of variable. ""FreeBASIC"" does not natively support the ##Variant## type. + Vous ne pouvez pas créer des variables de type ##**Any**##. Il est illégal de déréférencer un ##**Any Pointer**##, mais un ##**Any Pointer Pointer**## peut être déréférencé, parce que cela se traduira par un ##**Any Pointer**##. Essayer de déréférencer ce ##**Any Pointer**## qui en résulte serait illégal. - ##**2) **## ##**Any**## can be used as a fake initializer to disable the default initialization to ##0## of the variables. This may save time in critical sections of the programs. It is up to the program to fill the variables with significant data. You may recognize this as the default behavior of C. + Cela ne doit pas être confondu avec ##**Variant**##, un type de données Visual Basic qui peut contenir tout type de variable. FreeBASIC ne supporte pas nativement le type ##**Variant**##. - ##**3) **## **##Any##** can be used in function prototypes (in a ##[[KeyPgDeclare Declare]]## statement) with ##[[KeyPgByref ByRef]]## arguments to disable the compiler checking for the correct type of the variable passed. This use of ##**Any**## is deprecated and it is only there for compatibility with QB, where it was the only way of passing arrays as arguments. + ##**2) **## ##**Any**## peut être utilisé comme un faux initialiseur pour désactiver l'initialisation par défaut à ##0## des variables. Cela peut faire gagner du temps dans les sections critiques des programmes. Il appartient au programme de remplir les variables avec des données significatives. Vous pouvez reconnaître que c'est le comportement par défaut du langage C. +##**3) **## **##Any##** peut être utilisé dans les prototypes de fonctions (dans une déclaration ##[[KeyPgDeclare Declare]]##) avec des arguments ##[[KeyPgByref ByRef]]## pour désactiver la vérification du compilateur du bon type de variable passée. Cette utilisation de ##**Any**## est obsolète et n'est là que pour la compatibilité avec QB, où c'était le seul moyen de passer des tableaux comme arguments. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/misc/any.bas"}}%%(freebasic) Declare Sub echo(ByVal x As Any Ptr) '' echo will accept any pointer type +Declare Sub echo(ByVal x As Any Ptr) '' echo will accept any pointer type Dim As Integer a(0 To 9) = Any '' this variable is not initialized + Dim As Double d(0 To 4) Dim p As Any Ptr - Dim pa As Integer Ptr = @a(0) Print "Not initialized "; -echo pa '' pass to echo a pointer to integer +echo pa '' pass to echo a pointer to integer Dim pd As Double Ptr = @d(0) Print "Initialized "; -echo pd '' pass to echo a pointer to double +echo pd '' pass to echo a pointer to double p = pa '' assign to p a pointer to integer + p = pd '' assign to p a pointer to double Sleep - -Sub echo (ByVal x As Any Ptr) + Sub echo (ByVal x As Any Ptr) Dim As Integer i - For i = 0 To 39 + For i = 0 To 39 'echo interprets the data in the pointer as bytes - Print Cast(UByte Ptr, x)[i] & " "; + Print Cast(UByte Ptr, x)[i] & " "; Next - Print +Print End Sub -%% -{{fbdoc item="filename" value="examples/manual/misc/any-param.bas"}}%%(freebasic) +%% +'Example of ANY disabling the variable type checking 'Example of ANY disabling the variable type checking -Declare Sub echo (ByRef a As Any) '' ANY disables the checking for the type of data passed to the function +Declare Sub echo (ByRef a As Any) '' ANY disables the checking for the type of data passed to the function Dim x As Single x = -15 echo x '' Passing a single to a function that expects an integer. The compiler does not complain!! + Sleep + Sub echo (ByRef a As Integer) +Print Hex(a) -Sub echo (ByRef a As Integer) - Print Hex(a) End Sub %% + {{fbdoc item="lang"}} -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. - -{{fbdoc item="diff"}} - - Pointers and initializers are new to ""FreeBASIC"". +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} +- Pointeurs et initialiseurs sont nouveaux pour FreeBASIC. + {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## - - ##[[KeyPgDeclare Declare]]## -{{fbdoc item="back" value="CatPgProcedures|Procedures"}} \ No newline at end of file +- ##[[KeyPgDeclare Declare]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAppend.wakka b/fbdocs/manual/cache/KeyPgAppend.wakka index 5c97583393..a6b8925899 100644 --- a/fbdocs/manual/cache/KeyPgAppend.wakka +++ b/fbdocs/manual/cache/KeyPgAppend.wakka @@ -1,40 +1,40 @@ {{fbdoc item="title" value="APPEND"}}---- -Specifies text file to be opened for append mode +Spécifie un fichier texte qui doit être ouvert pour le mode ajout {{fbdoc item="syntax"}}## [[KeyPgOpen open]] //filename// for **Append** [[[KeyPgEncoding encoding]] //encoding_type//] [[[KeyPgLock lock]] //lock_type//] as [#]//filenum// ## {{fbdoc item="param"}} ##//filename//## - file name to open for append + nom de fichier à ouvrir pour l'ajout ##//encoding_type//## - indicates encoding type for the file + indique le type d'encodage du fichier ##//lock_type//## - locking to be used while the file is open + verrouillage à utiliser pendant que le fichier est ouvert ##//filenum//## - unused file number to associate with the open file + numéro de fichier inutilisé à associer avec le fichier ouvert {{fbdoc item="desc"}} - A file mode used with ##[[KeyPgOpen Open]]## to open a text file for writing. + Un mode de fichier utilisé avec ##[[KeyPgOpen Open]]## pour ouvrir un fichier texte en écriture. - This mode is used to add text to an existing file with ##[[KeyPgPrintPp Print #]]##, or comma separated values with ##[[KeyPgWrite Write#]]##. + Ce mode est utilisé pour ajouter du texte à un fichier existant avec ##[[KeyPgPrintPp Print #]]##, ou des valeurs séparées par des virgules avec ##[[KeyPgWrite Write#]]##. - Text files can't be simultaneously read and written in ""FreeBASIC"", so if both functions are required on the same file, it must be opened twice. + Les fichiers texte ne peuvent pas être lus et écrits simultanément en FreeBasic, si les deux fonctions sont nécessaires sur le même fichier, il doit être ouvert deux fois. - ##//filename//## must be a string expression resulting in a legal file name in the target OS, without wildcards. The file will be sought for in the present directory, unless the ##//filename//## contains a path . If the file does not exist, it is created. The pointer is set after the last character of the file. + ##//filename//## doit être une expression chaîne correspondant à un nom de fichier légal dans le système d'exploitation cible, sans jokers de remplacement. Le fichier sera recherché dans le répertoire courant, sauf si ##//filename//## contient un chemin. Si le fichier n'existe pas, il est créé. Le pointeur est positionné après le dernier caractère du fichier. - ##//Encoding_type//## indicates the Unicode ##[[KeyPgEncoding Encoding]]## of the file, so characters are correctly read. If omitted, "ascii" encoding is defaulted. Only little endian character encodings are supported at the moment. - -##"utf8"## - -##"utf16"## - -##"utf32"## - -##"ascii"## (the default) + ##//Encoding_type//## indique le ##[[KeyPgEncoding Encoding (codage)]]## Unicode du fichier, ainsi les caractères seront lus correctement. S'il est omis, ce sera l'encodage "ascii" par défaut. Seul, les codages de caractères ##//little endian//## sont pris en charge pour le moment. +
  • ##"utf8"## +
  • ##"utf16"## +
  • ##"utf32"## +
  • ##"ascii"## (par défaut) - ##//Lock_type//## indicates the way the file is locked for other processes, it is one of: - - ##**Read**## - the file can be opened simultaneously by other processes, but not for reading - - ##**Write**## - the file can be opened simultaneously by other processes, but not for writing - - ##**Read Write**## - the file cannot be opened simultaneously by other processes (the default) + ##//Lock_type//## indique la façon dont le fichier est verrouillé pour d'autres processus: + - ##**Read**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas pour la lecture + - ##**Write**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas pour l'écriture + - ##**Read Write**## - le fichier ne peut être ouvert simultanément par d'autres processus (par défaut) - ##//filenum//## Is a valid FreeBASIC file number (in the range ##1..255##) not being used for any other file presently open. The file number identifies the file for the rest of file operations. A free file number can be found using the ##[[KeyPgFreefile Freefile]]## function. + ##//filenum//## est un numéro FreeBASIC valide de fichier (dans la gamme ##1..255##) non utilisé à ce moment-là par un autre fichier actuellement ouvert. Le numéro de fichier identifie le fichier pour le reste des opérations. Un numéro de fichier libre peut être trouvé en utilisant la fonction ##[[KeyPgFreefile FreeFile]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/for-append.bas"}}%%(freebasic) @@ -46,7 +46,7 @@ FOR i = 1 to 10 NEXT %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgInputfilemode Input (File Mode)]]## diff --git a/fbdocs/manual/cache/KeyPgAs.wakka b/fbdocs/manual/cache/KeyPgAs.wakka index 5c3d73ec57..0fcc04716c 100644 --- a/fbdocs/manual/cache/KeyPgAs.wakka +++ b/fbdocs/manual/cache/KeyPgAs.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="AS"}}---- -Optional part of a declaration which specifies a data type, or part of the [[KeyPgOpen Open]] statement which specifies a file handle. +Partie facultative d'une déclaration qui spécifie un type de données, ou une partie de l'instruction [[KeyPgOpen Open]], qui spécifie un identificateur de fichier. {{fbdoc item="syntax"}}## //symbolname// **As** [[DataType datatype]] @@ -8,7 +8,7 @@ Optional part of a declaration which specifies a data type, or part of the [[Key [[KeyPgType type]] ... **As** [[DataType datatype]] ## {{fbdoc item="desc"}} - ##**As**## is used to declare the type of variables, fields or arguments and is also used in the ##[[KeyPgOpen Open]]## statement to determine the file handle. ##**As**## is also used with the ##[[KeyPgTypeAlias Type (Alias)]]## syntax, similar to C's typedef statement. + ##**As**## est utilisé pour déclarer le type d'une variable, d'un champ ou d'un argument et est également utilisé dans ##[[KeyPgOpen Open]]## pour déterminer l'identificateur d'un fichier. ##**As**## est aussi utilisé dans la syntaxe de ##[[KeyPgTypeAlias Type (Alias)]]##, similaire à l'instruction ##typedef## du langage C. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/misc/as.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ Open "test" For Input As #1 %% {{fbdoc item="diff"}} - - The [[KeyPgTypeAlias Type (Alias)]] syntax was not supported in QB. + - La syntaxe [[KeyPgTypeAlias Type (Alias)]] n'est pas admise dans QB. {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgAsc.wakka b/fbdocs/manual/cache/KeyPgAsc.wakka index d7b4ec75e6..e9862627a8 100644 --- a/fbdocs/manual/cache/KeyPgAsc.wakka +++ b/fbdocs/manual/cache/KeyPgAsc.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ASC"}}---- -Returns the corresponding ASCII or Unicode integer representation of a character +Retourne l'entier correspondant à la représentation ASCII ou Unicode d'un caractère {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Asc** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //position// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]] @@ -11,52 +11,52 @@ Returns the corresponding ASCII or Unicode integer representation of a character ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne source. ##//position//## - The position in the string of a character. + La position d'un caractère dans une chaîne. -{{fbdoc item="ret"}} - The ASCII or Unicode integer representation of the character at ##//position//## in ##//str//##. +{{fbdoc item="section" value="Valeur retournée + L'entier correspondant à la représentation ASCII ou Unicode d'un caractère situé à ##//position//## dans ##//str//##. {{fbdoc item="desc"}} - If ##//str//## is a ##[[KeyPgString String]]## or a ##[[KeyPgZstring ZString]]##, an [[CptAscii ASCII]] code value is returned. + Si ##//str//## est une ##[[KeyPgString String]]## ou une ##[[KeyPgZstring ZString]]##, un code [[CptAscii ASCII]] est retourné. - If ##//str//## is a ##[[KeyPgWstring WString]]##, a [[CptAscii Unicode]] code value is returned. + Si ##//str//## est une ##[[KeyPgWstring WString]]##, un code [[CptAscii Unicode]] est retourné. - The function returns zero (0) if the string is a zero length string, ##//position//## is less than one (1), or ##//position//## is greater than the number of characters in ##//str//##. + La fonction retourne zéro (0) si la chaîne a une longueur nulle, si ##//position//## est inférieure à (1), ou si ##//position//## est supérieure au nombre de caractères dans ##//str//##. - ##[[KeyPgChr Chr]]## performs the opposite function for ASCII strings, while ##[[KeyPgWchr WChr]]## is the opposite for Unicode strings, returning a string containing the character represented by the code passed as an argument. + ##[[KeyPgChr Chr]]## exécute l'opération inverse pour les chaînes de caractères ASCII, alors que ##[[KeyPgWchr WChr]]## est l'opposé pour les chaînes Unicode, retournant une chaîne de caractères contenant le caractère représenté par le code passé en argument. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/asc.bas"}}%%(freebasic) print "the ascii code of 'a' is:"; asc("a") print "the ascii code of 'b' is:"; asc("abc", 2) %% - will produce the output: + produira la sortie: %%the ascii code of 'a' is: 97 the ascii code of 'b' is: 98 %% -Unicode example (Note to documentation editors: don't put inside ""%%(qbasic)"" markers or the Russian text will disappear!) +ExempleUnicode (Note aux rédacteurs de documentation: ne mettez pas dans %%(qbasic) marqueurs ou le texte russe va disparaître!) -<<##dim a as wstring * 11 +
    ##dim a as wstring * 11 a = "Привет, мир" print "the Unicode of the second char of " & a & " is: " & asc(a) -##<<::c:: will produce the output: -<<##the Unicode of the second char of Привет, мир is: 1088 -##<<::c:: -{{fbdoc item="target"}} - - DOS does not support the wide-character string version of ##**ASC**##. - -{{fbdoc item="diff"}} - - The optional ##//position//## argument is new to ""FreeBASIC"". - - QB does not support the wide-character string version of ##**ASC**## - -{{fbdoc item="see"}} - - [[CptAscii ASCII Character Codes]] +##;
    +produira la sortie: +
    ##the Unicode of the second char of Привет, мир is: 1088 +##;
    + {{fbdoc item="target"}} + +- DOS ne supporte pas la version chaîne avec larges caractères de ##**Asc**##. + {{fbdoc item="diff"}} + - L'argument optionnel ##//position//## est nouveau pour FreeBASIC. + +- QB ne supporte pas la version chaîne avec larges caractères de ##**Asc**## + {{fbdoc item="see"}} + - [[CptAscii Codes ASCII des caractères ]] - ##[[KeyPgChr Chr]]## - ##[[KeyPgStr Str]]## - - ##[[KeyPgVal Val]]## -{{fbdoc item="back" value="CatPgString|String Functions"}} \ No newline at end of file +- ##[[KeyPgVal Val]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAsin.wakka b/fbdocs/manual/cache/KeyPgAsin.wakka index e6ac9ebac8..5bd99e0803 100644 --- a/fbdocs/manual/cache/KeyPgAsin.wakka +++ b/fbdocs/manual/cache/KeyPgAsin.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ASIN"}}---- -Finds the arcsine of a number +Détermine l'arc sinus d'un angle {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Asin** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Finds the arcsine of a number ## {{fbdoc item="param"}} ##//number//## - Sine value in the range [-1..1]. + Une valeur de sinus dans l'intervalle [-1..1]. -{{fbdoc item="ret"}} - The arcsine of ##//number//##, in radians, in the range [-Pi/2..Pi/2]. +{{fbdoc item="section" value="Valeur retournée + L'arc sinus de ##//number//## en radians, dans l'intervalle [-Pi/2..Pi/2]. {{fbdoc item="desc"}} - ##**Asin**## returns the arcsine of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of -[[TutMathAngles Pi]]/2 to [[TutMathAngles Pi]]/2. The arcsine is the inverse of the ##[[KeyPgSin Sin]]## function. The returned angle is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). + ##**Asin**## renvoie l'arc sinus de l'argument ##//number//## dans une valeur ##[[KeyPgDouble Double]]## dans l'intervalle de -[[TutMathAngles Pi]]/2 à [[TutMathAngles Pi]]/2. L'arc sinus est l'inverse de la fonction ##[[KeyPgSin Sin]]##. L'angle renvoyé est mesuré en [[TutMathAngles radians]] (non pas en [[TutMathAngles degrés]]). {{fbdoc item="ex"}} @@ -29,7 +29,7 @@ PRINT "The angle between the sides is"; ASIN ( o / h ) SLEEP %% -The output would look like: +L'affichage sera: %% Please enter the length of the hypotenuse of a triangle: 5 Please enter the length of the opposite side of the triangle: 3 @@ -37,13 +37,13 @@ The angle between the sides is 0.6435011087932844 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Asin""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Asin**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgSin Sin]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAsm.wakka b/fbdocs/manual/cache/KeyPgAsm.wakka index a39a1d4e1c..4ea10d775c 100644 --- a/fbdocs/manual/cache/KeyPgAsm.wakka +++ b/fbdocs/manual/cache/KeyPgAsm.wakka @@ -1,123 +1,123 @@ {{fbdoc item="title" value="ASM"}}---- -Code block that allows the use of architecture-specific instructions. +Bloc de code qui permet l'utilisation d'instructions spécifiques à l'architecture. {{fbdoc item="syntax"}}## **Asm** //architecture-dependent instructions// End **Asm** - ##//Or//## + ##//Ou//## **Asm** //architecture-dependent instructions// ## {{fbdoc item="desc"}} - The ##Asm## block is used to insert specific machine-code instructions in a program in order to perform operations that cannot be carried out using the features of the language or to hand-optimize performance-sensitive sections of code. + Le bloc ##Asm## est utilisé pour insérer dans le programme des instructions en code machine afin d'effectuer des opérations qui ne peuvent l'être en utilisant les caractéristiques du langage ou d'optimiser à la main les performances de sections de code sensibles. - The current ""FreeBASIC"" compiler currently only produces code for Intel [[x86 80x86]]-based machines; however, in the future, the compiler might be ported to a platform which does not support the same instruction set. Therefore, ##Asm## blocks should only be used when necessary, and a ""FreeBASIC""-only alternative should be provided if possible. + Le compilateur FreeBasic actuellement ne produit du code que pour les machines Intel basées sur [[x86 80x86]]; toutefois, à l'avenir, le compilateur sera peut être porté sur une plate-forme qui ne supporte pas le même jeu d'instructions. Par conséquent, les blocs ##Asm## ne devraient être utilisés que lorsque cela est nécessaire et seule une alternative FreeBasic devrait être fournie, si possible. - The return value of a function may be set by using the ##[[KeyPgFunction Function]]## keyword within brackets as shown in the example below. + La valeur retournée par une fonction peut être définie en utilisant le mot-clef ##[[KeyPgFunction Function]]## entre parenthèses tel qu'illustré dans l'exemple ci-dessous. - ##Asm## block comments have the same syntax as usual ""FreeBASIC"" [[KeyPgRem comments]] - use ""FreeBASIC""-like " ##'## " comments, not " ##;## " as usual in ASM. + Les blocs de commentaires ##Asm## ont la syntaxe habituelle des [[KeyPgRem Commentaires]] du FreeBasic FreeBASIC [[KeyPgRem Comments]] - utilisez les commentaires FreeBASIC " ##'## ", et non les commentaires " ##;## " comme d'habitude en ASM. - ==x86 Specific:== + ** Specificités x86:** - ==Syntax== - The syntax of the inline assembler is a simplified form of Intel syntax. Intel syntax is used by the majority of x86 assemblers, such as MASM, TASM, NASM, YASM and FASM. In general, the destination of an instruction is placed first, followed by the source. Variables and functions defined by a program may be referenced in an Asm block. The assembler used by ""FreeBASIC"" is GAS, using the ##.intel_syntax noprefix## directive, and ASM blocks are passed through unmodified, except for the substitution of local variable names for stack frame references, and commenting removal. + **Syntaxe** + La syntaxe de l'assembleur en ligne est une forme simplifiée de la syntaxe Intel. La syntaxe Intel est utilisée par la majorité des assembleurs x86, tels que MASM, TASM, NASM, YASM et FASM. En général, la destination d'une instruction est placée en premier, suivie par la source. Les variables et fonctions définies par un programme doivent être référencées dans un bloc Asm. L'assembleur est utilisé par FreeBASIC est GAS, utilisant la directive ##.intel_syntax noprefix##, et les blocs ASM sont passés non modifiés, sauf pour la substitution des noms de variables locales pour le cadre de la pile références et en commentant l'enlèvement. - Instruction syntax is mostly the same as FASM uses, one important difference is that GAS requires size settings to be followed by the word "ptr". + La syntaxe d'instructions est essentiellement le même que celle qu'utilise FASM, une différence importante est que GAS nécessite des paramètres de taille à suivre par le mot "ptr". %%(freebasic) ' Assuming "blah" is a FB global or local UINTEGER variable mov eax, [blah] ' OK: size is apparent from eax inc [blah] ' Not OK: size is not given inc dword [blah] ' Not OK: size given, but still not accepted by GAS -inc dword ptr [blah] ' OK: "ptr" is needed by GAS here%% - - ==Register Preservation== - When an ASM block is opened, the registers ##ebx##, ##esi##, and ##edi## are pushed to the stack, when the block is closed, these registers are popped back from the stack. This is because these registers are required to be preserved by most or all OS's using the x86 CPU. You can therefore use these registers without explicitly preserving them yourself. You should not change ##esp## and ##ebp##, since they are usually used to address local variables. - - ==Register Names== - ~The names of the registers for the x86 architecture are written as follows in an ##Asm## block: - ~- 4-byte integer registers: ##eax##, ##ebx##, ##ecx##, ##edx,## ##ebp##, ##esp##, ##edi##, ##esi## - ~- 2-byte integer registers: ##ax##, ##bx##, ##cx##, ##dx##, ##bp##, ##sp##, ##di##, ##si## (low words of 4-byte ##e##- registers) - ~- 1-byte integer registers: ##al##, ##ah##, ##bl##, ##bh##, ##cl##, ##ch##, ##dl##, ##dh## (low and high bytes of 2-byte -##x## registers) - ~- Floating-point registers: ##st(0)##, ##st(1)##, ##st(2)##, ##st(3)##, ##st(4)##, ##st(5)##, ##st(6)##, ##st(7)## - ~- MMX registers (aliased onto floating-point registers): ##mm0##, ##mm1##, ##mm2##, ##mm3##, ##mm4##, ##mm5##, ##mm6##, ##mm7## - ~- SSE registers: ##xmm0##, ##xmm1##, ##xmm2##, ##xmm3##, ##xmm4##, ##xmm5##, ##xmm6##, ##xmm7## +inc dword Ptr [blah] ' OK: "ptr" is needed by GAS here + + %% + **Préservation des registres** + + Quand un bloc ASM est ouvert, les registres ##ebx##, ##esi## et ##edi## sont poussés sur la pile, quand le bloc est fermé, ces registres sont récupérés sur la pile. C'est parce que ces registres doivent être préservés par la plupart ou la totalité des systèmes d'exploitation utilisant le processeur x86. Vous pouvez donc utiliser ces registres sans les préserver explicitement, vous-même. Vous ne devez pas modifier ##esp## et ##ebp##, car ils sont généralement utilisés pour traiter les variables locales. + **Noms des registres** + Les noms des registres pour l'architecture x86 sont rédigés comme suit dans un bloc ##Asm##: + - registres entiers de 4 octets: ##eax##, ##ebx##, ##ecx##, ##edx,## ##ebp##, ##esp##, ##edi##, ##esi## + - registres entiers de 2 octets: ##ax##, ##bx##, ##cx##, ##dx##, ##bp##, ##sp##, ##di##, ##si## (low words of 4-byte ##e##- registers) + - registres entiers de 1 octets: ##al##, ##ah##, ##bl##, ##bh##, ##cl##, ##ch##, ##dl##, ##dh## (low and high bytes of 2-byte -##x## registers) + - registres à virgule flottante: ##st(0)##, ##st(1)##, ##st(2)##, ##st(3)##, ##st(4)##, ##st(5)##, ##st(6)##, ##st(7)## + - registres MMX (alias sur les registres à virgule flottante): ##mm0##, ##mm1##, ##mm2##, ##mm3##, ##mm4##, ##mm5##, ##mm6##, ##mm7## - ==Instruction Set== + - registres SSE: ##xmm0##, ##xmm1##, ##xmm2##, ##xmm3##, ##xmm4##, ##xmm5##, ##xmm6##, ##xmm7## - See these external references: - ~- [[http://board.flatassembler.net/download.php?id=3093 Original Intel 80386 manual from 1986]] - ~- [[http://developer.intel.com/design/Pentium4/documentation.htm Latest Intel Pentium 4 manuals]] - ~- [[http://home.comcast.net/~fbkotler/nasmdocb.html NASM x86 Instruction Reference]] (Please note that NASM is not the assembler used by ""FreeBASIC"", but this page provides a good overview of x86 instructions) + **Ensemble des instructions** + Voir ces références externes: + - [[http://board.flatassembler.net/download.php?id=3093">Original Intel 80386 manual from 1986]] + - [[http://developer.intel.com/design/Pentium4/documentation.htm">Latest Intel Pentium 4 manuals]] - ==Unsafe instructions== - ~Note that the ""FreeBASIC"" compiler produces 32-bit protected-mode code for the x86 which usually runs in an unprivileged user level; therefore, privileged and sensitive instructions will assemble fine, but possibly won't work correctly or cause a runtime "General Protection Fault", "Illegal instruction", or SIGILL error. The following are the privileged and sensitive instructions as of the Intel Pentium 4 and Xeon: + - [[http://home.comcast.net/~fbkotler/nasmdocb NASM x86 Instruction Reference]] (S'il vous plaît notez que NASM n'est pas l'assembleur utilisé par FreeBasic, mais cette page donne un bon aperçu des instructions x86) + **Instructions à risque** - ~- ##cli## *1 - ~- ##clts## - ~- ##hlt## - ~- ##in## *1 - ~- ##ins## *1 - ~- ##int## *1 - ~- ##into## *1 - ~- ##invd## - ~- ##invlpg## - ~- ##lgdt## - ~- ##lidt## - ~- ##lldt## - ~- ##lmsw## - ~- ##ltr## - ~- ##mov## to/from ##CR##n, ##DR##n, ##TR##n - ~- ##out## *1 - ~- ##outs## *1 - ~- ##rdmsr## - ~- ##rdpmc## *2 - ~- ##rdtsc## *2 - ~- ##sti## *1 - ~- ##str## - ~- ##wbinvd## - ~- ##wrmsr## - ~- all SSE2 and higher instructions *2 - - ~ *1: sensitive to IOPL, fine in DOS - ~ *2: sensitive to permission bits in CR4, see below + Notez que le compilateur FreeBASIC produit du code 32-bit en mode protégé pour les architectures x86 qui fonctionne habituellement dans un niveau utilisateur non privilégié; cependant, les instructions privilégiés et sensibles seront assemblées correctement, mais ne fonctionneront peut-être pas correctement ou provoqueront une ereur du type "General Protection Fault", "Illegal instruction" ou SIGILL. Voici les instructions privilégiées et sensibles des processeurs Intel Pentium 4 et Xeon: + - ##cli## *1 + - ##clts## + - ##hlt## + - ##in## *1 + - ##ins## *1 + - ##int## *1 + - ##into## *1 + - ##invd## + - ##invlpg## + - ##lgdt## + - ##lidt## + - ##lldt## + - ##lmsw## + - ##ltr## + - ##mov## vers/depuis ##CR##n, ##DR##n, ##TR##n + - ##out## *1 + - ##outs## *1 + - ##rdmsr## + - ##rdpmc## *2 + - ##rdtsc## *2 + - ##sti## *1 + - ##str## + - ##wbinvd## + - ##wrmsr## + + - all SSE2 and higher instructions *2 + *1: sensible à IOPL, très bien sous DOS - The privileged instructions will work "correctly" in DOS when running on a Ring 0 DPMI kernel, like the (non-default) Ring 0 version of CWSDPMI, WDOSX or D3X, nevertheless most of them are not really useful and dangerous when executed from DPMI code. RDTSC (Read Time Stamp Counter) has been shown to be allowed by most, or all OS'es. - However the usefulness of RDTSC has been diminished with the advent of multi-core and hibernating CPUs. SSE2 and higher instructions are disabled "by default" after CPU initialization, Windows and Linux usually do enable them, in DOS it is business of the DPMI host: HDPMI32 will enable them, CWSDPMI won't. The INT instruction is usable in the DOS version/target only, note that it works slightly differently from real mode DOS, see also [[FaqDOS]]. - The segment registers (##cs##, ##ds##, ##es##, ##fs##, ##gs##) should not be changed from an ##Asm## block, except in certain cases with the DOS port (note that they do NOT work the same way as in real-mode DOS, see also [[FaqDOS]]). The operating system or DPMI host is responsible for memory management; the meaning of segments (selectors) in protected mode is very different from real-mode memory addressing. - Note that those "unsafe" instructions are not guaranteed to raise a "visible" crash even when ran with insufficient privilege - the OS or DPMI host can decide to "emulate" them, either functionally (reading from some CRx works under HDPMI32), or "dummy" (nothing happens, instruction will pass silently, like a NOP). + *2: sensible aux bits d'autorisation dans CR4, voir ci-dessous + Les instructions privilégiées fonctionnent "correctement" sous DOS lors de l'exécution sur un "noyau Ring 0 DPMI", comme la (non-défaut) version Ring 0 de CWSDPMI, WDOSX ou D3X, cependant la plupart d'entre eux ne sont pas vraiment utiles et dangereux lorsqu'ils sont exécutés à partir de code DPMI. RDTSC (Read Time Stamp Counter) a été exposé à être autorisé par la plupart ou la totalité OS. + Cependant l'utilité de RDTSC a été diminué avec l'avènement du multi-core et des processeurs à hibernation. SSE2 et instructions supérieures sont désactivées "par défaut" après l'initialisation du CPU, Windows et Linux en général les permettent, sous DOS, c'est l'affaire de l'hôte DPMI: HDPMI32 les permettra, CWSDPMI ne le permettra pas. L'instruction INT est utilisable sous DOS version/cible uniquement, noter qu'il fonctionne un peu différemment du mode réel DOS, voir aussi FaqDOS. + Les registres de segment (##cs##, ##ds##, ##es##, ##fs##, ##gs##) ne devrait pas être modifiés à partir d'un bloc ##Asm##, sauf dans certains cas de portage DOS, (notez qu'ils NE fonctionnent PAS de la même façon qu'en mode réel DOS, voir aussi FaqDOS). Le système opératoire ou l'hôte DPMI est responsable de la gestion de la mémoire; la signification des sègments (sélecteurs) en mode protégé est très différente du mode d'adressage réel de la mémoire. +Notez que ces instructions "dangereuses" ne sont pas garanties pour faire apparaìtre un crash "visible" même quand a fonctionné avec les privilèges suffisants - l'OS ou l'hôte DPMI peut décider de les "émuler", soit fonctionnellement (en lisant à partir de certains CRx sous HDPMI32), ou "factices" (rien ne se passe, l'instruction passera en silence, comme un NOP). {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/misc/asm.bas"}}%%(freebasic) '' This is an example for the x86 architecture. -Function AddFive(ByVal num As Integer) As Integer - Asm +'' This is an example for the x86 architecture. + Function AddFive(ByVal num As Integer) As Integer + Asm mov eax, [num] add eax, 5 - mov [Function], eax - End Asm + mov [Function], eax +End Asm + End Function Dim i As Integer = 4 - Print "4 + 5 ="; AddFive(i) -%% -##%%4 + 5 = 9%%## +%% - ""FreeBASIC""'s Assembler is AS / GAS, the assembler of GCC, so an external program. Some quirks apply: - - The error lines returned by FBC for ASM blocks are not related the FB source file. As FBC simply displays the errors returned by AS , the lines are related to the assembly file. To make ""FreeBASIC"" preserve them, the compiler must be invoked with the //[[CompilerOptrupp -R]]// option ("don't delete ASM files"). - - The label names are case sensitive inside ASM blocks. + ##%%4 + 5 = 9%%## + L'assembleur de FreeBASIC's est AS / GAS, l'assembleur de GCC, donc un programme externe. Certaines bizarreries s'appliquent: + - Les lignes d'erreur renvoyées par FBC pour les blocs ASM ne sont pas liés au fichier source FB. Comme FBC affiche simplement les erreurs renvoyées par AS, les lignes sont liées au fichier assembleur. Pour que FreeBASIC les préserve, le compilateur doit être appelé avec l'option //[[CompilerOptrupp -R]]// ("ne pas supprimer les fichiers ASM"). -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Asm""**##. +- Les noms d'étiquettes sont sensibles à la casse à l'intérieur des blocs ASM. + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**__Asm**##. + {{fbdoc item="lang"}} -{{fbdoc item="see"}} - - ##[[KeyPgFunction Function]]## +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="back" value="DocToc|Table of Contents"}}{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file +- ##[[KeyPgFunction Function]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAssert.wakka b/fbdocs/manual/cache/KeyPgAssert.wakka index b243fbedd2..00232c1496 100644 --- a/fbdocs/manual/cache/KeyPgAssert.wakka +++ b/fbdocs/manual/cache/KeyPgAssert.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ASSERT"}}---- -Debugging macro that halts program execution if an expression is evaluated to ##0## (false). +Macro de débogage qui arrête l'exécution du programme si une expression est évaluée à ##0## (false = faux). {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **ASSERT**(//expression//) [[KeyPgIfthen if]] (expression) = 0 [[KeyPgThen then]] : fb_Assert( [[KeyPgDdfile __FILE__]], [[KeyPgDdline __LINE__]], [[KeyPgDdfunction __FUNCTION__]], [[KeyPgOpPpStringize #]]expression ) : [[KeyPgEndif end if]] @@ -9,16 +9,16 @@ Debugging macro that halts program execution if an expression is evaluated to ## ## {{fbdoc item="param"}} ##//expression//## - Any valid conditional/numeric expression. If ##//expression//## evaluates to ##0## (i.e. "false"), execution is halted. + Toute expression conditionnelle/numérique valide. Si ##//expression//## est évaluée à ##0## (par exemple "false"), l'exécution est interrompue. {{fbdoc item="desc"}} - The ##**ASSERT**## macro is intended for use in debugging and works only if the ##-g## option is selected in the FBC command line. In this case it prints an error message and stops the program execution if ##//expression//## evaluates to ##0##. + La macro ##**Assert**## est prévue pour être utilisée lors du débogage et ne fonctionne que si l'option ##-g## est sélectionnée dans la ligne de commande de FBC. Dans ce cas, elle affiche un message d'erreur et arrête l'exécution du programme si ##//expression//## est évaluée à ##0##. - Its normal use is to check the correct value of the variables during debugging. + Son utilisation normale est de vérifier la valeur correcte des variables pendant le débogage. - If ##-g## is not passed to fbc, the macro does not generate any code, and has no effect. + Si ##//-g//## n'est pas passé à fbc, la macro ne génère pas de code, et n'a aucun effet. - Note: If an ##**ASSERT**## fails while the program is in a graphics ##[[KeyPgScreengraphics Screen]]##, the error message will not be visible as it will be printed to the graphics screen, which will be closed immediately after. + Note: Si un ##**Assert**## échoue lorsque le programme est dans un ##[[KeyPgScreengraphics Screen]]## graphique, le message d'erreur ne sera pas visible car il sera affiché sur l'écran graphique, qui sera fermé immédiatement après. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/debug/assert.bas"}}%%(freebasic) @@ -34,10 +34,10 @@ foo %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__ASSERT""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__ASSERT**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAssertwarn ASSERTWARN]]## diff --git a/fbdocs/manual/cache/KeyPgAssertwarn.wakka b/fbdocs/manual/cache/KeyPgAssertwarn.wakka index 8f13a50ca3..4d1d074dc5 100644 --- a/fbdocs/manual/cache/KeyPgAssertwarn.wakka +++ b/fbdocs/manual/cache/KeyPgAssertwarn.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ASSERTWARN"}}---- -Debugging macro that prints a warning if an expression evaluates to 0. +Macro de débogage qui affiche un avertissement si une expression est évaluée à ##0## (false = faux). {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **ASSERTWARN**(//expression//) [[KeyPgIfthen if]] (expression) = 0 [[KeyPgThen then]] : fb_AssertWarn( [[KeyPgDdfile __FILE__]], [[KeyPgDdline __LINE__]], [[KeyPgDdfunction __FUNCTION__]], [[KeyPgOpPpStringize #]]expression ) : [[KeyPgEndif end if]] @@ -9,14 +9,14 @@ Debugging macro that prints a warning if an expression evaluates to 0. ## {{fbdoc item="param"}} ##//expression//## - Any valid expression. If ##//expression//## evaluates to 0, a warning message is printed to stdout (console). + Toute expression valide. Si ##//expression//## est évaluée à ##0##, un message d'avertissement est affiché sur la sortie standard (console). {{fbdoc item="desc"}} - The ##**ASSERTWARN**## macro is intended for use in debugging and works only if the ##-g## option is selected in the FBC command line. In this case it prints a warning message if ##//expression//## evaluates to 0. It doesn't stop the program execution like [[KeyPgAssert ASSERT]] does. + La macro ##**AssertWarn**## est prévue pour être utilisée lors du débogage et ne fonctionne que si l'option ##-g## est sélectionnée dans la ligne de commande FBC. Dans ce cas elle affiche un message d'avertissement si ##//expression//## est évaluée à 0. Elle n'arrêtera pas l'exécution du programme comme le fait [[KeyPgAssert Assert]]. - Its normal use is to check the correct value of the variables during debugging. + Son utilisation normale est de vérifier la valeur correcte des variables pendant le débogage. - If ##-g## is not passed to fbc, the macro does not generate any code. + Si ##//-g//## n'est pas passé à fbc, la macro ne génère pas de code et n'a aucun effet. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/debug/assertwarn.bas"}}%%(freebasic) @@ -32,10 +32,10 @@ foo %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__ASSERTWARN""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__ASSERTWARN**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAssert ASSERT]]## diff --git a/fbdocs/manual/cache/KeyPgAtan2.wakka b/fbdocs/manual/cache/KeyPgAtan2.wakka index ebf69c3aa4..9ac6ac050a 100644 --- a/fbdocs/manual/cache/KeyPgAtan2.wakka +++ b/fbdocs/manual/cache/KeyPgAtan2.wakka @@ -1,43 +1,43 @@ {{fbdoc item="title" value="ATAN2"}}---- -Returns the arctangent of a ratio +Renvoie l'arc tangente du rapport de deux composantes {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""ATan2""** ( [[KeyPgByval byval]] //y// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByval byval]] //x// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Atan2** ( [[KeyPgByval ByVal]] //y// [[KeyPgAs As]] [[KeyPgDouble Double]], [[KeyPgByval ByVal]] //x// [[KeyPgAs As]] [[KeyPgDouble Double]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## - //result// = ""ATan2""( //y//, //x// ) + //result// = ATan2( //y//, //x// ) ## {{fbdoc item="param"}} ##y## - Vertical component of the ratio. + Composante verticale du rapport. ##x## - Horizontal component of the ratio. + Composante horizontale du rapport. -{{fbdoc item="ret"}} - The angle whose tangent is ##//y/////x//##, in radians, in the range [-Pi..Pi]. +{{fbdoc item="section" value="Valeur retournée + L'angle dont la tangente est ##//y/////x//##, en radians, dans l'intervalle [-Pi .. Pi]. {{fbdoc item="desc"}} - ##""ATan2""## returns the arctangent of the ratio ##//y/////x//## as a ##[[KeyPgDouble Double]]## within the range of -[[TutMathAngles Pi]] to [[TutMathAngles Pi]]. The arctangent is the inverse of the ##[[KeyPgTan Tan]]## function. The returned angle is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). + ##ATan2## renvoie l'arc tangente du rapport ##//y/////x//## comme un ##[[KeyPgDouble Double]]## dans l'intervalle de -[[TutMathAngles Pi]] à [[TutMathAngles Pi]]. L'arc tangente est l'inverse de la fonction ##[[KeyPgTan Tan]]##. L'angle renvoyé est mesuré en [[TutMathAngles radians]] (non en [[TutMathAngles degrés]]). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/atan2.bas"}}%%(freebasic) PRINT ATAN2 ( 4, 5 ) 'this is the same as PRINT ATN ( 4 / 5 ) %% -The output would be: +L'affichage sera: %% 0.6747409422235527 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Atan2""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Atan2**##. {{fbdoc item="see"}} - ##[[KeyPgTan Tan]]## - ##[[KeyPgAtn Atn]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgAtn.wakka b/fbdocs/manual/cache/KeyPgAtn.wakka index 975379d655..f9d9c0302b 100644 --- a/fbdocs/manual/cache/KeyPgAtn.wakka +++ b/fbdocs/manual/cache/KeyPgAtn.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ATN"}}---- -Returns the arctangent of a number +Renvoie l'arc tangente d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Atn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Returns the arctangent of a number ## {{fbdoc item="param"}} ##//number//## - A number. + Un nombre. -{{fbdoc item="ret"}} - The angle, in radians, whose tangent is ##//number//##, in the range [-Pi/2..Pi/2]. +{{fbdoc item="section" value="Valeur retournée + L'angle, en radians, dont la tangente est ##//number//##, dans l'intervalle [-Pi/2..Pi/2]. {{fbdoc item="desc"}} - ##Atn## returns the arctangent of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of -[[TutMathAngles Pi]]/2 to [[TutMathAngles Pi]]/2. The arctangent is the inverse of the ##[[KeyPgTan Tan]]## function. The returned angle is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). + ##**Atn**## renvoie l'arc tangente de l'argument ##//number//## comme un ##[[KeyPgDouble Double]]## dans l'intervalle de -[[TutMathAngles Pi]]/2 à [[TutMathAngles Pi]]/2. L'arc tangente est l'inverse de la fonction ##[[KeyPgSin Tan]]##. L'angle renvoyé est mesuré en [[TutMathAngles radians]] (non pas en [[TutMathAngles degrés]]). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/atn.bas"}}%%(freebasic) @@ -23,18 +23,18 @@ PRINT "Pi ="; ATN ( 1.0 ) * 4 PRINT ATN ( 4 / 5 ) %% -The output would be: +Affichera: %% Pi = 3.141592653589793 0.6747409422235527 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgTan Tan]]## - ##[[KeyPgAtan2 ATan2]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgBeep.wakka b/fbdocs/manual/cache/KeyPgBeep.wakka index bbd3540ba7..841b25aef8 100644 --- a/fbdocs/manual/cache/KeyPgBeep.wakka +++ b/fbdocs/manual/cache/KeyPgBeep.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BEEP"}}---- -Produces a beep sound. +Émet un signal sonore. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Beep** ( ) @@ -8,7 +8,7 @@ Produces a beep sound. Beep ## {{fbdoc item="desc"}} - ##Beep## tells the system to sound a beep noise. Note that this might not work on some platforms. Since this command is not reliable and there is no way to specify the frequency and duration, you might want to avoid it in favor of other / better solutions, for example: [[http://www.freebasic.net/forum/viewtopic.php?p=20441#20441]] by yetifoot. + ##**Beep**## appelle le système pour qu'il émette un bruit de bip. Notez que cela ne fonctionne pas sur certaines plates-formes. Cette commande n'est pas efficace car il n'y a aucun moyen de spécifier la fréquence et la durée, vous pouvez l'éviter en faveur d'autres/meilleures solutions, par exemple: ##[[http://www.freebasic.net/forum/viewtopic.php?p=20441#20441">Son par Yetifoot]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/beep.bas"}}%%(freebasic) @@ -16,9 +16,9 @@ Beep %% {{fbdoc item="diff"}} - - In QB, this was a single tone noise generated through the PC speaker. Now this might not be the case. + - Dans QB, c'était un bruit de tonalité unique généré par le haut-parleur PC. Maintenant, cela pourrait ne pas être le cas. {{fbdoc item="see"}} - - [[KeyPgOut]] - producing sound using CPU ports +
  • ##[[KeyPgOut Produire un son en utilisant les ports du CPU]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgBin.wakka b/fbdocs/manual/cache/KeyPgBin.wakka index 231b82aa4e..6b7076e741 100644 --- a/fbdocs/manual/cache/KeyPgBin.wakka +++ b/fbdocs/manual/cache/KeyPgBin.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BIN"}}---- -Returns a binary (base 2) string representation of an integer +Retourne une chaîne binaire (base 2) représentation d'un entier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Bin** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -17,21 +17,21 @@ Returns a binary (base 2) string representation of an integer ## {{fbdoc item="param"}} ##//number//## - A number or expression evaluating to a number. A floating-point number will be converted to a ##[[KeyPgLongint longint]]##. + Un nombre ou une expression transformé en nombre. Un nombre en virgule flottante sera converti en ##[[KeyPgLongint LongInt]]##. ##//digits//## - Desired number of digits in the returned string. + Nombre de chiffres de la chaîne renvoyée. -{{fbdoc item="ret"}} - A string containing the unsigned binary representation of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Une chaîne contenant la représentation binaire non-signée de ##//number//##. {{fbdoc item="desc"}} - Returns a string representing the unsigned binary value of the integer ##//number//##. Binary digits range from 0 to 1. + Retourne une chaîne binaire représentation de la valeur binaire non-signée de l'entier ##//number//##. Chiffres binaires de 0 à 1. - If you specify ##//digits//## > 0, the result string will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, la chaîne résultat aura exactement cette longueur. Elle sera tronquée ou complètée par des zéros sur la gauche, si nécessaire. - The length of the string will not go longer than the maximum number of digits required for the type of ##//number//## (32 for an ##[[KeyPgInteger integer]]##, 64 for a ##[[KeyPgLongint Longint]])##. + La longueur de la chaîne ne dépassera pas le nombre de bits maximum requis pour le type de ##//number//## (32 pour un ##[[KeyPgInteger Integer (entier)]]##, 64 pour un ##[[KeyPgLongint LongInt (entier long)]])##. - If you want to do the opposite, i.e. convert an binary string back into a number, the easiest way to do it is to prepend the string with ##"&B"##, and convert it using ##[[KeyPgValint Valint]]## or ##[[KeyPgVallng Vallng]]##, similarly to a normal numeric string. E.g. ##[[KeyPgValint Valint]]("&B101")## + Si vous désirez l'opposé, par exemple convertir une chaîne binaire vers un nombre, la meilleure façon de le faire est d'ajouter ##"&B"## au début de la chaîne, et la convertir en utilisant ##[[KeyPgValint ValInt]]## ou ##[[KeyPgVallng ValLng]]##, de façon similaire à une chaîne numérique normale. Par exemple ##[[KeyPgValint ValInt]]("&B101")## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/bin.bas"}}%%(freebasic) @@ -39,17 +39,17 @@ Print Bin(54321) Print Bin(54321, 5) Print Bin(54321, 20) %% - will produce the output: + produira la sortie: %%1101010000110001 10001 00001101010000110001 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Bin""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Bin**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgOct Oct]]## diff --git a/fbdocs/manual/cache/KeyPgBinary.wakka b/fbdocs/manual/cache/KeyPgBinary.wakka index af563e3fec..6b96455c31 100644 --- a/fbdocs/manual/cache/KeyPgBinary.wakka +++ b/fbdocs/manual/cache/KeyPgBinary.wakka @@ -1,43 +1,43 @@ {{fbdoc item="title" value="BINARY"}}---- -Specifies file or device to be opened for binary mode +Spécifie que le fichier ou le périphérique doit être ouvert en mode binaire {{fbdoc item="syntax"}}## [[KeyPgOpen Open]] //filename// for **Binary** [[[KeyPgAccess Access]] //access_type//] [[[KeyPgLock Lock]] //lock_type//] as [#]//filenum// ## {{fbdoc item="param"}} ##//filename//## - file name to open + nom de fichier à ouvrir ##//access_type//## - indicates whether the file may be read from, written to or both + indique si on lit le fichier, si on écrit sur le fichier ou les deux ##//lock_type//## - locking to be used while the file is open + verrouillage utilisé pendant que le fichier est ouvert ##//filenum//## - unused file number to associate with the open file + numéro de fichier à associer au fichier ouvert {{fbdoc item="desc"}} - Opens a file or device for reading and/or writing binary data in the file ##//filenum//##, with free format. - If the file does not exist, a new file will be created. The file pointer is initialized by ##[[KeyPgOpen Open]]## at byte no. 1. - ##[[KeyPgGetfileio Get #]]## and ##[[KeyPgPutfileio Put #]]## file operations move the file pointer according to the size of the data, the pointer can be set to any byte in the file. - The data existing in the file is preserved by ##[[KeyPgOpen Open]]##. - This file mode can use any buffer variable to read/write data in the file. - The data is saved in binary mode, in the same internal format ""FreeBASIC"" uses, by means of ##[[KeyPgGetfileio Get #]]## and ##[[KeyPgPutfileio Put #]]##. + Ouvre un fichier ou un pérphérique en lecture et/ou écriture de données binaires dans ##//filenum//##, avec un format libre. + Si le fichier n'existe pas, un nouveau fichier sera créé. Le pointeur de fichier est initialisé par ##[[KeyPgOpen Open]]## à l'octet numéro 1. + Les opérations sur les fichiers ##[[KeyPgGetfileio Get #]]## et ##[[KeyPgPutfileio Put #]]## déplacent le pointeur de fichier en fonction de la taille des données, le pointeur peut être déplacé sur n'importe quel octet du fichier. + Les données existantes dans le fichier sont conservées par ##[[KeyPgOpen Open]]##. + Ce mode fichier peut utiliser n'importe quel tampon variable pour lire/écrire des données dans le fichier. + Les données sont sauvegardées en mode binaire, dans le même format interne utilisé par FreeBasic, par le biais de ##[[KeyPgGetfileio Get #]]## et ##[[KeyPgPutfileio Put #]]##. - ##//filename//## must be a string expression resulting in a legal file name in the target OS, without wildcards. The file will be sought for in the present directory, unless a path is given. + ##//filename//## doit être une expression chaîne correspondant à un nom de fichier légal dans le système d'exploitation cible, sans jokers de remplacement. Le fichier sera recherché dans le répertoire courant, sauf si ##//filename//## contient un chemin. - ##//Access_type//## By default ##**Binary**## mode allows to both read and write the file, unless an ##[[KeyPgAccess Access]]## type is specified, it mus be one of: - - ##**Read**## - the file is opened for input only - - ##**Write**## - the file is opened for output only - - ##**Read Write**## - the file is opened for input and output (the default) + ##//Access_type//## par défaut le mode ##**Binary**## permet à la fois de lire et écrire dans le fichier, sauf si un type d'##[[KeyPgAccess Access]]## est spécifié, il doit être l'un de ceux-ci: + - ##**Read**## - le fichier est ouvert en entrée seulement + - ##**Write**## - le fichier est ouvert en sortie seulement + - ##**Read Write**## - le fichier est ouvert en entrée et sortie (par défaut) - ##//Lock_type//## indicates the way the file is locked for other processes (users or threads), it is one of: - - ##**Shared**## - The file can be freely accessed by other processes - - ##**Lock Read**## - The file can't be opened simultaneously for reading - - ##**Lock Write**## - The file can't be opened simultaneously for writing - - ##**Lock Read Write**## - The file cannot be opened simultaneously by other processes. - If no lock type is stated, the file will be ##**Shared**## for other threads of the program and ##**Lock Read Write**## for other programs. - ##[[KeyPgLock Lock]]## and ##[[KeyPgUnlock Unlock]]## can be used to restrict temporally access to parts of a file. + ##//Lock_type//## indique la façon dont le fichier est verrouillé pour les autres processus (utilisateurs ou fils), il est l'un de ceux-ci: + - ##**Shared**## - Le fichier peut être librement consulté par d'autres processus + - ##**Lock Read**## - Le fichier ne peut pas être ouvert en même temps pour la lecture + - ##**Lock Write**## - Le fichier ne peut pas être ouvert en même temps pour l'écriture + - ##**Lock Read Write**## - Le fichier ne peut pas être ouvert simultanément par d'autres processus. + Si aucun type de verrouillage n'est indiqué, le fichier sera ##**Shared**## pour les autres "threads" du programme et ##**Lock Read Write**## pour les autres programmes. + ##[[KeyPgLock Lock]]## et ##[[KeyPgUnlock Unlock]]## peut être utilisé pour restreindre temporairement l'accès à des parties d'un fichier. - ##//filenum//## is a valid file number (in the range ##1..255##) not being used for any other file presently open. The file number identifies the file for the rest of file operations. A free file number can be found using the ##[[KeyPgFreefile FreeFile]]## function. + ##//filenum//## est un numéro de fichier valide (dans la plage ##1..255##) non utilisé par un autre fichier actuellement ouvert. Le numéro de fichier identifie celui-ci pour le reste des opérations. Un numéro de fichier libre peut être trouvé avec la fonction ##[[KeyPgFreefile FreeFile]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/binary-write.bas"}}%%(freebasic) @@ -79,7 +79,7 @@ Print txt %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgBit.wakka b/fbdocs/manual/cache/KeyPgBit.wakka index c5806407a9..aa3b22ca81 100644 --- a/fbdocs/manual/cache/KeyPgBit.wakka +++ b/fbdocs/manual/cache/KeyPgBit.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BIT"}}---- -Gets the state of an individual bit in an integer value. +Obtient l'état individuel d'un bit dans une valeur entière. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Bit**( //value//, //bit_number// ) (((//value//) [[KeyPgOpAnd and]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) <> 0) @@ -9,15 +9,15 @@ Gets the state of an individual bit in an integer value. ## {{fbdoc item="param"}} ##//value//## - The integer value. + La valeur entière. ##//bit_number//## - The index of the bit. + L'indice du bit. -{{fbdoc item="ret"}} - Returns an ##[[KeyPgInteger Integer]]## value of ##-1## if the bit is set, or ##0## if the bit is cleared. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur ##[[KeyPgInteger Integer]]## de ##-1## si le bit est valide (1), ou ##0## si le bit est à 0. {{fbdoc item="desc"}} - This macro expands to an integer value indicating whether or not the bit specified by ##//bit_number//## is set in the integer ##//value//##. Behaves as `##(//value// [[KeyPgOpAnd And]] 1 [[KeyPgOpShiftLeft Shl]] //bit_number//) <> 0##`. + Cette macro se développe en une valeur entière indiquant si oui ou non le bit spécifié par ##//bit_number//## est validé (à 1) dans ##//value//## entière. Se comporte comme `##(//value// [[KeyPgOpAnd And]] 1 [[KeyPgOpShiftLeft Shl]] //bit_number//) <> 0##`. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/bit.bas"}}%%(freebasic) @@ -25,7 +25,7 @@ PRINT BIT(4,2) PRINT BIT(5,1) PRINT BIT(&H8000000000000000ULL,63) %% - will produce the output: + produira la sortie: %% -1 @@ -34,10 +34,10 @@ PRINT BIT(&H8000000000000000ULL,63) %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgBitset Bitset]]## diff --git a/fbdocs/manual/cache/KeyPgBitreset.wakka b/fbdocs/manual/cache/KeyPgBitreset.wakka index 5a84a4d709..528b32653c 100644 --- a/fbdocs/manual/cache/KeyPgBitreset.wakka +++ b/fbdocs/manual/cache/KeyPgBitreset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BITRESET"}}---- -Gets the value of an integer with a specified bit cleared. +Obtient la valeur d'un entier dont on a positionné un certain bit à zéro (0). {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Bitreset**( //value//, //bit_number// ) ((//value//) [[KeyPgOpAnd and]] [[KeyPgOpNot not]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//Value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) @@ -9,37 +9,37 @@ Gets the value of an integer with a specified bit cleared. ## {{fbdoc item="param"}} ##//value//## - The integer value. + La valeur entière. ##//bit_number//## - The index of the bit to clear. + L'indice du bit à mettre à zéro. -{{fbdoc item="ret"}} - Returns the integer value with the specified bit cleared. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur entière avec le bit spécifié mis à zéro. {{fbdoc item="desc"}} - This macro expands to a copy of the integer ##//value//## with the specified ##//bit_number//## cleared (to //off//, or `##0##`). Behaves as `##//value// [[KeyPgOpAnd And]] [[KeyPgOpNot Not]] (1 [[KeyPgOpShiftLeft Shl]] //bit_number//)##`. + Cette macro se développe en une copie de la valeur entière ##//value//## avec le bit ##//bit_number//## "nettoyé" (à //off//, ou `##0##`). Se comporte comme `##//value// [[KeyPgOpAnd And]] [[KeyPgOpNot Not]] (1 [[KeyPgOpShiftLeft Shl]] //bit_number//)##`. - The valid range of values for ##//bit_number//## depends on the size, in bits, of `##[[KeyPgTypeof Typeof]](//value//)##`, which is `##0##` through `##[[KeyPgSizeof Sizeof]](//value//) * 8 - 1##`. See [[TblVarTypes Standard Datatype Limits]] for a table of the standard datatypes and their sizes. + La plage valide de valeurs pour ##//bit_number//## dépend de la taille, en bits, de`##[[KeyPgTypeof TypeOf]](//value//)##`, qui est `##0##` par le biais de `##[[KeyPgSizeof SizeOf]](//value//) * 8 - 1##`. Voir [[TblVarTypes Limites des types de données standard]] pour un tableau des types de données standard et leurs tailles. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/bitreset.bas"}}%%(freebasic) print bitreset(5,0) print hex(bitreset(&h8000000000000001,63)) %% - will produce the output: + produira la sortie: -%% 4 -1 %% +4 +1 -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. +%% + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"". +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} - ##[[KeyPgBit Bit]]## - - ##[[KeyPgBitset Bitset]]## -{{fbdoc item="back" value="CatPgBits|Bit Manipulation"}} \ No newline at end of file +- ##[[KeyPgBitset BitSet]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgBitset.wakka b/fbdocs/manual/cache/KeyPgBitset.wakka index 739eda9bdd..bf2dc78f93 100644 --- a/fbdocs/manual/cache/KeyPgBitset.wakka +++ b/fbdocs/manual/cache/KeyPgBitset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BITSET"}}---- -Gets the value of an integer with a specified bit set. +Obtient la valeur d'un entier dont on a positionné un certain bit à un (1). {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Bitset**( //value//, //bit_number// ) ((//value//) [[KeyPgOpOr or]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//Value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) @@ -9,37 +9,37 @@ Gets the value of an integer with a specified bit set. ## {{fbdoc item="param"}} ##//value//## - The integer value. + La valeur entière. ##//bit_number//## - The index of the bit to set. + L'indice du bit à mettre à zéro. -{{fbdoc item="ret"}} - Returns the integer value with the specified bit set. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur entière avec le bit spécifié mis à 1. {{fbdoc item="desc"}} - This macro expands to a copy of the integer ##//value//## with the specified ##//bit_number//## set (to //on//, or `##1##`). Behaves as `##//value// [[KeyPgOpOr Or]] (1 [[KeyPgOpShiftLeft Shl]] //bit_number//)##`. + Cette macro se développe en une copie de la valeur entière ##//value//## avec le bit ##//bit_number//## "validé" (à //on//, ou `##1##`). Se comporte comme `##//value// [[KeyPgOpOr Or]] (1 [[KeyPgOpShiftLeft Shl]] //bit_number//)##`. - The valid range of values for ##//bit_number//## depends on the size, in bits, of `##[[KeyPgTypeof Typeof]](//value//)##`, which is `##0##` through `##[[KeyPgSizeof Sizeof]](//value//) * 8 - 1##`. See [[TblVarTypes Standard Datatype Limits]] for a table of the standard datatypes and their sizes. + La plage valide de valeurs pour ##//bit_number//## dépend de la taille, en bits, de`##[[KeyPgTypeof TypeOf]](//value//)##`, qui est `##0##` par le biais de `##[[KeyPgSizeof SizeOf]](//value//) * 8 - 1##`. Voir [[TblVarTypes Limites des types de données standard]] pour un tableau des types de données standard et leurs tailles. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/bitset.bas"}}%%(freebasic) print bitset(4, 0) print hex(bitset(1ull, 63)) %% - will produce the output: + produira la sortie: -%% 5 -8000000000000001 %% +5 +8000000000000001 -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. +%% + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"". +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} - ##[[KeyPgBit Bit]]## - - ##[[KeyPgBitreset Bitreset]]## -{{fbdoc item="back" value="CatPgBits|Bit Manipulation"}} \ No newline at end of file +- ##[[KeyPgBitreset BitReset]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgBload.wakka b/fbdocs/manual/cache/KeyPgBload.wakka index 054bc38bfb..432d1411e6 100644 --- a/fbdocs/manual/cache/KeyPgBload.wakka +++ b/fbdocs/manual/cache/KeyPgBload.wakka @@ -1,56 +1,56 @@ {{fbdoc item="title" value="BLOAD"}}---- -Loads arbitrary data from a file created with ##[[KeyPgBsave Bsave]]##, or a compatible BMP image file. +Charge des données arbitraires à partir d'un fichier créé avec ##[[KeyPgBsave BSave]]##, ou un fichier image BMP compatible. {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Bload** ( [[KeyPgByref byref]] //filename// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //dest// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0, [[KeyPgByval byval]] //pal// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **BLoad** ( [[KeyPgByref ByRef]] //filename// [[KeyPgAs As]] [[KeyPgString String]], [[KeyPgByval ByVal]] //dest// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] = 0, [[KeyPgByval ByVal]] //pal// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] = 0 ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## //result// = **Bload**( //filename// [, [ //dest// ] [, //pal// ] ] ) ## {{fbdoc item="param"}} ##//filename//## - the name of the file to load the image from; can include a file path + le nom du fichier de l'image à charger; peut inclure un chemin de fichier ##//dest//## - the memory location to load the image to, or null (##0##) to copy the image to the current graphics screen work page + l'emplacement mémoire où charger l'image, ou nul (##0##) pour copier l'image sur la page de travail de l'écran graphique ##//pal//## - the memory location to load the palette to, or null (##0##) to change the current graphics screen palette, if it uses one + l'emplacement mémoire où charger la palette, ou nul (##0##) pour changer la palette courante de l'écran graphique, s'il y en a une -{{fbdoc item="ret"}} - Returns zero (##0##) if successful, or a non-zero error code to indicate a failure. //[[ProPgErrorHandling (throws a runtime error)]]// +{{fbdoc item="section" value="Valeur renvoyée + Retourne zéro (##0##) si réussite, ou un code d'erreur différent de zéro pour indiquer un échec. //[[ProPgErrorHandling (émission d'une erreur de fonctionnement)]]// {{fbdoc item="desc"}} - ##**Bload**## can be used to load image data or any other data from a file created with ##[[KeyPgBsave Bsave]]##, and store that data in an array or paste it to the screen. If ##//dest//## is absent or null (##0##), the image data is pasted to the current graphics screen work page. Otherwise it is loaded as image data to the address given by ##//dest//##. + ##**BLoad**## peut être utilisé pour charger une image ou tout autre fichier de donneés créé avec ##[[KeyPgBsave BSave]]##, et stocker ces données dans un "array" ou les copier à l'écran. Si ##//dest//## n'est pas nul (##0##), l'image est copiée sur la page active de l'écran graphique. Autrement, elle est copiée à l'adresse mémoire indiquée par ##//dest//##. - ##**Bload**## can load 3 different types of files: - - Old QB-like data files, saved with ##BSAVE## from QB code, containing "raw" data preceded by a 7-byte header, beginning with ##&HFD##, up to 64 ""KiB"" in size - - New FB-like data files, saved with ##[[KeyPgBsave Bsave]]## from FB code, containing "raw" data preceded by a 5-byte header, beginning with ##&HFE##. There is no 64 ""KiB"" limit with this format - - BMP image files, supports a subset of valid ("Windows") .BMP files, beginning with ##"BM"##, saved from FB code with ##[[KeyPgBsave Bsave]]##, or created / saved in a compatible format using a graphics editor / converter. - QB-like data files and BMP files are converted to an FB-compatible image format when opened. + ##**BLoad**## peut charger 3 types différents de fichiers : + - Anciens fichiers QB de données, sauvés avec ##[[KeyPgBsave BSave]]## à partir du code QB, contenant des données "raw" précédées d'un entête 7-byte, commençant par ##&HFD##, jusqu'à 64 KiB de taille + - Nouveaux fichiers FB de données, sauvés avec ##[[KeyPgBsave BSave]]## à partir du code FB, contenant des données "raw" précédées d'un entête 5-byte, commençant par ##&HFE##, sans limite de 64 KiB + - Fichiers image BMP, supportant un sous-ensemble de validité ("Windows") .Fichiers BMP, commençant par "BM", sauvés avec ##[[KeyPgBsave BSave]]## à partir du code FB, ou créés / sauvés dans un format compatible en utilisant un éditeur / convertisseur graphique. + Les fichiers QB-like de données et les fichiers BMP sont convertis en un format image FB-compatible quand ils sont ouverts. - Image files with 8-bit per pixel resolution or lower contain a palette that describes the color values used in the images. If ##//pal//## is not null (##0##), the palette is copied to memory starting at the address specified. Otherwise, if the current graphics screen uses a palette then its palette is changed to match that of the image file. + Fichiers image avec une résolution de 8-bit maxi par pixel contenant une palette décrivant les valeurs de couleurs utilisées dans l'image. Si ##//pal//## est non nul (##0##), la palette est copiée en mémoire à partir de l'adresse spécifiée. Par ailleurs, si l'écran graphique utilise une palette celle-ci est modifiée pour correspondre à celle de l'image. - When using one of the 2 "non-BMP" file formats to save images, the image files must have been created with ##[[KeyPgBsave Bsave]]## in the same graphics screen mode as it is being loaded into. When using the BMP file format, this restriction doesn't apply. + Lors de l'utilisation d'un des 2 formats "non-BMP" de fichiers pour sauver une image, le fichier image doit avoir été créé avec ##[[KeyPgBsave BSave]]## dans le même mode graphique écran utilisé pour son chargement. Cette restriction ne s'applique pas lors de l'utilisation d'un fichier de format BMP. - When loading a BMP file using ##**Bload**##, the images must be true-color (15-, 16-, 24- or 32-bits per pixel) or palettized/indexed (8-bit or lower). The image data will be converted to the proper pixel format for the current color depth, except that true-color can't be reduced to a palettized image. ##**Bload**## doesn't support BMP files using RLE compression or other image file types (PNG, JPG, GIF, ...). ##**Bload**## will load alpha channel information, if available, from 32-bit BMP files with ##BITMAPV4HEADER## or ##BITMAPV5HEADER## file headers. + Lors du chargement d'un fichier BMP en utilisant ##**BLoad**##, l'image doit être true-color (15-, 16-, 24- or 32-bits par pixel) ou palettisée/indexée (8-bit ou moins). Les données de l'image seront converties dans le format pixel approprié pour la profondeur de couleur courante, sauf en cas de true-color pas de réduction à une image palettisée. ##**BLoad**## ne supporte pas les fichiers BMP avec compression RLE ou les autres types de fichiers image (PNG, JPG, GIF, ...). ##**BLoad**## chargera les information du canal alpha, si elles existent, à partir de fichiers BMP 32-bit avec des entêtes de fichier ##BITMAPV4HEADER## ou ##BITMAPV5HEADER##. -**Runtime errors:** - ##**Bload**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de fonctionnement:** + ##**BLoad**## produit une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes : //(##1##) Illegal function call// - - ##//dest//## was not specified or was null (##0##), and no graphics screen was set. - - The Bitmap uses an unsupported BMP file compression type (##BI_RLE4##, ##BI_RLE8##) - - The Bitmap is true-color (16, 24, or 32 bits per pixel) and the current graphics screen uses a palette (8 bits per pixel or lower). + - ##//dest//## n'est pas précisé ou null (##0##), aucun écran graphique n'existe. + - Le Bitmap utilise un type de compression de fichier BMP non supporté (##BI_RLE4##, ##BI_RLE8##) + - Le Bitmap est true-color (16, 24, or 32 bits per pixel) et l'écran graphique utilise une palette (8 bits par pixel ou moins). //(##2##) File not found// - - The file ##//filename//## could not be found. + - Le fichier ##//filename//## ne peut être trouvé. //(##3##) File I/O error// - - The file doesn't have any of the supported types - - A general read error occurred. + - Le fichier n'est pas d'un type supporté + - Une erreur générale de lecture est survenue. -~&//Note: When you use ##**BLoad**## to load a BMP file into an image buffer, the original dimensions of the image are not changed. If you want the image buffer to have the same dimensions as the BMP file, you have to find out the dimensions beforehand, and create an image of the right size yourself. See {{anchor name="bmp_load|the example below"}} for an example of how to do this.// +//Note: Quand vous utilisez ##**BLoad**## pour charger un fichier BMP dans un tampon image, les dimensions originales de cette image ne sont pas changées. Si vous voulez que le tampon image ait les mêmes dimensions que le fichier BMP, vous devez découvrir celles-ci avant, et créer vous-même une image de la bonne taille. Voir ci-dessous un exemple expliquant comment procéder.// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/bload.bas"}}%%(freebasic) -'Load a graphic to current work page +'Charge un graphique dans page travail courante SCREEN 18, 32 cls bload "picture.bmp" @@ -58,8 +58,8 @@ sleep %% {{fbdoc item="filename" value="examples/manual/gfx/bload2.bas"}}%%(freebasic) -'Load a 48x48 bitmap into an image -screenres 320, 200, 32 +'Charge un bitmap 48x48 dans un array +Screen 18, 32 dim myImage as any ptr = imagecreate( 48, 48 ) bload "picture.bmp", myImage put (10,10), myImage @@ -68,69 +68,69 @@ sleep %% {{anchor name="bmp_load"}} -{{fbdoc item="filename" value="examples/manual/gfx/bload3.bas"}}%%(freebasic) -'' A function that creates an image buffer with the same -'' dimensions as a BMP image, and loads a file into it. +'' Une fonction qui crée un tampon image avec les mêmes +'' dimensions que l' image BMP, et charge un fichier dedans. +Const NULL As Any Ptr = 0 -const NULL as any ptr = 0 +Function bmp_load( ByRef filename As String ) As Any Ptr -function bmp_load( byref filename as const string ) as any ptr +Dim As Integer filenum, bmpwidth, bmpheight - dim as integer filenum, bmpwidth, bmpheight - dim as any ptr img + Dim As Any Ptr img + '' ouvre fichier BMP - '' open BMP file - filenum = freefile() - if open( filename for binary access read as #filenum ) <> 0 then return NULL + filenum = FreeFile() + If Open( filename For Binary Access Read As #filenum ) <> 0 Then Return NULL + '' retrouve dimensions BMP - '' retrieve BMP dimensions - get #filenum, 19, bmpwidth - get #filenum, 23, bmpheight + Get #filenum, 19, bmpwidth + Get #filenum, 23, bmpheight + Close #filenum - close #filenum + '' crée image avec dimensions BMP - '' create image with BMP dimensions - img = imagecreate( bmpwidth, abs(bmpheight) ) + img = ImageCreate( bmpwidth, Abs(bmpheight) ) + If img = NULL Then Return NULL - if img = NULL then return NULL + '' charge fichier BMP dans tampon image - '' load BMP file into image buffer - if bload( filename, img ) <> 0 then imagedestroy( img ): return NULL + If BLoad( filename, img ) <> 0 Then ImageDestroy( img ): Return NULL + Return img - return img + End Function -end function +Dim As Any Ptr img -dim as any ptr img - -screenres 640, 480, 32 +ScreenRes 640, 480, 32 img = bmp_load( "picture.bmp" ) -if img = NULL then - print "bmp_load failed" +If img = NULL Then + +Print "bmp_load failed" + Else -else +Put (10, 10), img - put (10, 10), img + ImageDestroy( img ) - imagedestroy( img ) + End If -end if +Sleep%% -sleep%% {{fbdoc item="diff"}} - - Support for loading BMP files is new to ""FreeBASIC"". - - Support for retrieving the palette from BMP files is new to ""FreeBASIC"". - - ""FreeBASIC"" uses a different file format from QBASIC internally, which doesn't have the 64 ""KiB"" limit, and is unsupported by QBASIC. +- Le support du chargement des fichiers BMP est nouveau pour FreeBASIC. + - La récupération de la palette à partir des fichiers BMP est nouveau pour FreeBASIC. + - Pour les fichiers non-BMP, FB utilise un format de fichier différent, sans limite 64 KiB, et non-supporté par QB. + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgBsave Bsave]]## +- ##[[KeyPgBsave BSave]]## - ##[[KeyPgPalette Palette]]## - ##[[KeyPgImagecreate ImageCreate]]## - ##[[KeyPgImageDestroy ImageDestroy]]## + - [[GfxInternalFormats Formats graphiques internes]] - [[GfxInternalFormats Internal Graphics Formats]] {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgBsave.wakka b/fbdocs/manual/cache/KeyPgBsave.wakka index 8f9cb6b1ae..9856bfc59f 100644 --- a/fbdocs/manual/cache/KeyPgBsave.wakka +++ b/fbdocs/manual/cache/KeyPgBsave.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BSAVE"}}---- -Saves an array of arbitrary data and palette information to a file on disk +Sauve un espace de données arbitraires et d'information palette dans un fichier sur le disque {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Bsave** ( [[KeyPgByref byref]] //filename// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //source// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //size// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByval byval]] //pal// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,52 +9,52 @@ Saves an array of arbitrary data and palette information to a file on disk ## {{fbdoc item="param"}} ##//filename//## - the name of the file to create for storing the pixel and palette data. + le nom du fichier à créer pour stocker les données pixels et palette. ##//source//## - the address of the data to store, or null (##0##) to store pixel data from the current screen work page. + L'adresse des données à stocker, ou nul (##0##) pour stocker les données à partir de la page écran active. ##//size//## - the total number of bytes of data to store. + le nombre total d'octets à stocker. ##//pal//## - the address of a buffer holding palette information, or null (##0##) to use the current screen palette. + l'adresse du buffer contenant l'information palette, ou nul (##0##) pour utiliser la palette de l'écran. -{{fbdoc item="ret"}} - Returns zero (##0##) if successful, or a non-zero error code to indicate a failure. //[[ProPgErrorHandling (throws a runtime error)]]// +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (##0##) si réussite, ou un code d'erreur non-zéro pour indiquer un échec. //[[ProPgErrorHandling (émission d'une erreur de fonctionnement)]]// {{fbdoc item="desc"}} - ##**Bsave**## is used for saving arbitrary data from memory into a file, using a file format specific to FB, or saving images into a standard BMP image file, replacing an existing file if necessary. + ##**BSave**## est utilisé pour sauver, dans un fichier, des données en mémoire, en utilisant un format spécifique à FB, ou sauver des images dans un format standard de fichier image BMP, en remplaçant un fichier existant si nécessaire. - ##**Bsave**## outputs a __total__ of ##//size//## bytes of arbitrary data located at ##//source//## to a specified file. If ##//source//## is null (##0##), then ##**Bsave**## outputs a __maximum__ of ##//size//## bytes from the current work page's pixel buffer, which is structured in the current screen mode's internal pixel format. Palette information is obtained from ##//pal//## if non-null, or if null (##0##), from the current screen palette. + ##**BSave**## extrait un nombre total de ##//size//## octets de données situées dans ##//source//## vers le fichier spécifié. Si ##//source//## est nul (##0##), alors ##**BSave**## extrait un nombre maximum de ##//size//## octets à partir du tampon pixels de la page active, structurée dans le format de pixel du mode écran. L'information palette est obtenue à partir de ##//pal//## si non nul, ou si nul (##0##), à partir de la palette écran courante. - A BMP image file can be created if ##//filename//## has a file extension of """BMP""". ##//source//## is assumed to point to a valid image buffer whose entire pixel data will be stored in the BMP file. If ##//source//## is null (##0##), the entire current work page will be stored instead. Palette information is obtained from ##//pal//## if non-null, or if null (##0##), from the current screen palette. The ##//size//## parameter is ignored when saving BMP files. + Un fichier image BMP est créé si ##//filename//## a l'extension "BMP". ##//source//## est supposé pointer vers un buffer image valide dont toutes les données pixel seront chargées dans le fichier BMP. Si ##//source//## est nul (##0##), la page courante valide sera entièrement chargée dans le fichier. L'information palette est obtenue à partir de ##//pal//## si non-nul, ou si nul (##0##), à partir de la palette courante de l'écran. Le paramètre ##//size//## est ignoré quand on sauvegarde des fichiers BMP. -**Runtime errors:** - ##**Bsave**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de foncionnement:** + ##**BSave**## produit une des [[ProPgErrorHandling erreurs de foncionnement]] suivantes : //(##2##) File not found// - - The file could not be created. - - ##//size//## is less than zero (##0##), or ##//size//## is zero and ##//source//## is non-null. + - Le fichier ne peut être créé. + - ##//size//## est inférieur à zéro (##0##), ou ##//size//## est zéro et ##//source//## est non-nul. //(##3##) File I/O error// - - The file could not be written to. + - Ne peut écrire dans le fichier. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/bsave.bas"}}%%(freebasic) -' Set gfx mode +' Valide mode gfx SCREENRES 320, 200, 32 -' Clear with black on white +' Efface avec noir sur blanc COLOR RGB(0, 0, 0), RGB(255, 255, 255) CLS LOCATE 13, 15: PRINT "Hello world!" -' Save as BMP +' Sauve comme BMP BSAVE "hello.bmp", 0 %% {{fbdoc item="diff"}} - - Support for saving more than 64KiB of arbitrary data is new to ""FreeBASIC"". - - Support for saving BMP files is new to ""FreeBASIC"". - - ""QB"" cannot use ##[[KeyPgBload Bload]]## to load files created with ##**Bsave**## in ""FreeBASIC"", but ""FreeBASIC"" can use ##[[KeyPgBload Bload]]## to load files created with ##**Bsave**## in ""QB"" + - La possibilité de sauvegarder plus de 64KiB de données est nouvelle pour FreeBASIC. + - La possibilité de sauvegarder des fichiers BMP est nouvelle pour FreeBASIC. + - QB ne peut utiliser ##[[KeyPgBload BLoad]]## pour charger des fichiers créés avec ##**BSave**## dans FreeBASIC, mais FreeBASIC peut utiliser ##[[KeyPgBload BLoad]]## pour charger des fichiers créés avec ##**BSave**## dans QB {{fbdoc item="see"}} - ##[[KeyPgBload Bload]]## diff --git a/fbdocs/manual/cache/KeyPgByref.wakka b/fbdocs/manual/cache/KeyPgByref.wakka index 3cb1c18643..716a9a45fc 100644 --- a/fbdocs/manual/cache/KeyPgByref.wakka +++ b/fbdocs/manual/cache/KeyPgByref.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BYREF"}}---- -Declaration specifier to explicitly pass a parameter by reference +Spécificateur de déclaration pour passer explicitement un paramètre par référence {{fbdoc item="syntax"}}## **Byref** //param// [[KeyPgAs as]] [[DataType datatype]] @@ -8,11 +8,11 @@ Declaration specifier to explicitly pass a parameter by reference [ [[KeyPgDeclare declare]] ] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //proc_name// ( **Byref** //param// [[KeyPgAs as]] [[DataType datatype]] ) ## {{fbdoc item="desc"}} - Passes a variable by reference, that is its address, to a subroutine or function. When a variable is passed by reference, the contents of the variable can be changed by the target subroutine or function. + Passe une variable par référence, c'est à dire son adresse, à une sous-routine ou une fonction. Quand une variable est passée par référence, le contenu de la variable peut être modifié par la cible sous-routine ou fonction. - In //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##**Byref**## is the default parameter passing convention, unless ##[[KeyPgOptionbyval Option ByVal]]## is in effect. + Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##**ByRef**## est la convention de passage de paramètre par défaut, sauf si l'##[[KeyPgOptionbyval Option ByVal]]## est active. - Opposite of ##[[KeyPgByval ByVal]]##. + L'opposé de ##[[KeyPgByval ByVal]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/byref.bas"}}%%(freebasic) @@ -31,14 +31,14 @@ end %% {{fbdoc item="lang"}} - - In //[[CompilerOptlang -lang fb]]// dialect, ##**Byval**## is the default parameter passing convention for all built-in types except ##[[KeyPgString String]]##; String and user-defined ##[[KeyPgType Type]]##s are passed ##[[KeyPgByref Byref]]## by default. - - In //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##**Byref**## is the default parameter passing convention. + - Dans le dialecte //[[CompilerOptlang -lang fb]]//, ##**ByVal**## est la convention de passage de paramètre par défaut pour tous les types intégrés à l'exception de ##[[KeyPgString String]]##; Chaîne (String) et les ##[[KeyPgType Type]]##s définis par l'utilisateur sont passés ##[[KeyPgByref ByRef]]## par défaut. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##**ByRef**## est la convention de passage des paramètres. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - - [[ProPgPassingArguments Passing Arguments to Procedures]] + - [[ProPgPassingArguments Passer des arguments aux procédures]] - ##[[KeyPgDeclare Declare]]## - ##[[KeyPgByval ByVal]]## diff --git a/fbdocs/manual/cache/KeyPgByte.wakka b/fbdocs/manual/cache/KeyPgByte.wakka index 03ab548224..30d90d6732 100644 --- a/fbdocs/manual/cache/KeyPgByte.wakka +++ b/fbdocs/manual/cache/KeyPgByte.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="BYTE"}}---- -Standard data type: 8 bit signed +Type de données standard: 8 bits signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Byte** ## {{fbdoc item="desc"}} - 8-bit signed whole-number data type. Can hold a value in the range of -128 to 127. + type de données: nombre entier 8-bits signé. Peut contenir une valeur dans la plage de -128 à 127. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/byte2.bas"}}%%(freebasic) @@ -19,14 +19,14 @@ Dim x As Byte = Cbyte(&H80) Dim y As Byte = CByte(&H7F) Print "Byte Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%Byte Range = -128 to 127%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Byte""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Byte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgUbyte Ubyte]]## diff --git a/fbdocs/manual/cache/KeyPgByval.wakka b/fbdocs/manual/cache/KeyPgByval.wakka index 9d09bad81d..4fdf413345 100644 --- a/fbdocs/manual/cache/KeyPgByval.wakka +++ b/fbdocs/manual/cache/KeyPgByval.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="BYVAL"}}---- -Declaration specifier to explicitly pass a parameter by value +Spécificateur de déclaration pour passer explicitement un paramètre par valeur {{fbdoc item="syntax"}}## **Byval** //param// [[KeyPgAs as]] [[DataType datatype]] @@ -8,13 +8,13 @@ Declaration specifier to explicitly pass a parameter by value [ [[KeyPgDeclare declare]] ] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //proc_name// ( **Byval** //param// [[KeyPgAs as]] [[DataType datatype]] ) ## {{fbdoc item="desc"}} - ##**Byval**## in a parameter list of a declare statement causes a copy of the variable to be passed to the procedure (for example, a sub or function) by its value. + ##**ByVal**## dans une liste de paramètres d'une instruction de déclaration provoque une copie de la variable à passer par sa valeur à la procédure (par exemple, un sous-programme ou une fonction). - This means that if the value of the variable //##x##// is passed, then the original variable //##x##// will not be modified in any way; however, if the variable were passed ##[[KeyPgByref Byref]]##, the value of the original variable //##x##// could be modified by the called function. + Cela signifie que si la valeur de la variable //##x##// est passée, alors la variable d'origine //##x##// ne sera en aucune façon modifiée; toutefois, si la variable a été passée ##[[KeyPgByref ByRef]]##, la valeur de la variable d'origine //##x##// peut être modifiée par la fonction appelée. - Note: For string arguments, ##**Byval**## currently has a different meaning: instead of passing a copy of the string, it passes a ##[[KeyPgZstring zstring]]## pointer to the string data, while ##[[KeyPgByref Byref]]## passes a pointer to the FreeBASIC string descriptor. This behavior allows passing a ##**Byval**## ##[[KeyPgString String]]## directly to C procedures. The string passed this way should not be changed by the ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]##, as the string descriptor would not be updated. The meaning of passing a ##[[KeyPgString String]]## ##**Byval**## might change in the future; therefore, passing a ##[[KeyPgString String]]## ##**Byval**## should be avoided. ##[[KeyPgZstring Zstring]]## is more suited for the purpose of passing zero-terminated strings to C functions. + Note: Pour arguments de chaîne, ##**ByVal**## a actuellement un sens différent: au lieu de passer une copie de la chaîne, il passe un pointeur ##[[KeyPgZstring ZString]]## vers la chaîne de données, alors que ##[[KeyPgByref ByRef]]## passe un pointeur vers le descripteur de chaîne FreeBASIC. Ce comportement permet de passer ##**ByVal**## ##[[KeyPgString String]]## directement aux procédures C. La chaîne passée de cette manière ne sera pas changée par ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]##, et le descripteur de chaîne ne sera pas mis à jour. La signification du passage d'une ##[[KeyPgString String]]## ##**ByVal**## pourrait changer dans le futur; par conséquent, passer ##[[KeyPgString String]]## ##**ByVal**## doit être évité. ##[[KeyPgZstring ZString]]## est plus adapté dans le but de passer des "chaînes terminées par zéro" (ZString) aux fonctions C. - Opposite of ##[[KeyPgByref ByRef]]##. + L'opposé de ##[[KeyPgByref ByRef]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/byval.bas"}}%%(freebasic) @@ -33,14 +33,14 @@ End %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// dialect, ##**Byval**## is the default parameter passing convention for all built-in types except ##[[KeyPgString String]]##; String and user-defined ##[[KeyPgType Type]]##s are passed ##[[KeyPgByref Byref]]## by default. - - In //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##**Byref**## is the default parameter passing convention. + - Dans le dialecte //[[CompilerOptlang -lang fb]]//, ##**ByVal**## est la convention de passage de paramètre par défaut pour tous les types intégrés à l'exception de ##[[KeyPgString String]]##; Chaîne (String) et les ##[[KeyPgType Type]]##s définis par l'utilisateur sont passés ##[[KeyPgByref ByRef]]## par défaut. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##**ByRef**## est la convention de passage des paramètres. {{fbdoc item="diff"}} - - QB only used ##**Byval**## in declarations to non-Basic subroutines + - QB utilise seulement ##**ByVal**## dans les déclarations aux sous-routines non-Basic {{fbdoc item="see"}} - - [[ProPgPassingArguments Passing Arguments to Procedures]] + - [[ProPgPassingArguments Passer des arguments aux procédures]] - ##[[KeyPgDeclare Declare]]## - ##[[KeyPgByref ByRef]]## diff --git a/fbdocs/manual/cache/KeyPgCall.wakka b/fbdocs/manual/cache/KeyPgCall.wakka index 86284fd4d3..d19d3df59d 100644 --- a/fbdocs/manual/cache/KeyPgCall.wakka +++ b/fbdocs/manual/cache/KeyPgCall.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="CALL"}}---- -Statement to invoke a subroutine +Déclaration pour invoquer un sous-programme {{fbdoc item="syntax"}}## **Call** //procname// ([//parameter list//]) ## {{fbdoc item="desc"}} - Calls a ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]##. + Appelle une ##[[KeyPgSub Sub]]## ou une ##[[KeyPgFunction Function]]##. - This keyword is a holdover from earlier dialects of BASIC, and is mainly deprecated. + Ce mot-clé est un vestige de dialectes antérieurs de BASIC et est principalement obsolète. - In //[[CompilerOptlang -lang qb]]//, it can be used to call ##[[KeyPgSub sub]]##s in code before they are declared. The function will be implicitly ##[[KeyPgDeclare Declare]]##'d, with any parameters passed ##[[KeyPgByref Byref]] As [[KeyPgAny Any]]##. - Note: until the function is declared, no type-checking is done on the parameters, so it is up to the programmer to ensure they are of the correct type. + Dans //[[CompilerOptlang -lang qb]]//, il peut être utilisé pour appeler des ##[[KeyPgSub Sub]]##s dans le code avant qu'ils soient déclarés. La fonction sera implicitement ##[[KeyPgDeclare Declare]]##, avec tous les paramètres passés ##[[KeyPgByref ByRef]] As [[KeyPgAny Any]]##. + Note: jusqu'à ce que la fonction soit déclarée, aucune vérification de type n'est effectuée sur les paramètres, c'est donc au programmeur de s'assurer qu'ils sont du bon type. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/callsub.bas"}}%%(freebasic) @@ -53,12 +53,12 @@ End Sub %% {{fbdoc item="lang"}} - - The use of ##**Call**## is not allowed in the //[[CompilerOptlang -lang fb]]// dialect. - - The //[[CompilerOptlang -lang fblite]]// dialect does not allow you to call functions that have not been previously declared. + - L'utilisation de ##**Call**## n'est pas permise dans le dialecte //[[CompilerOptlang -lang fb]]//. + - Le dialecte //[[CompilerOptlang -lang fblite]]// ne permet pas d'appeler des fonctions qui n'ont pas été préalablement déclarées. {{fbdoc item="diff"}} - - The procedure must have already been declared. - - ##**Call**## in QB will make a copy of all parameters, so changes made to the arguments inside the called ##[[KeyPgSub Sub]]## will not be reflected in the variables in the caller. + - La procédure doit avoir déjà été déclarée. + - Dans QB, ##**Call**## effectue une copie de tous les paramètres, donc les modifications apportées aux arguments de la ##[[KeyPgSub Sub]]## appelée ne seront pas reflétées dans les variables de l'appelant. {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgCallocate.wakka b/fbdocs/manual/cache/KeyPgCallocate.wakka index 2e7ac9544d..cb046f0686 100644 --- a/fbdocs/manual/cache/KeyPgCallocate.wakka +++ b/fbdocs/manual/cache/KeyPgCallocate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CALLOCATE"}}---- -Allocates memory for a certain number of elements from the free store and clears the contents +Alloue de la mémoire pour un certain nombre d'éléments du "tas" de mémoire libre et efface leur contenu {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Callocate** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //num_elements// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //size// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -9,15 +9,15 @@ Allocates memory for a certain number of elements from the free store and clears ## {{fbdoc item="param"}} ##//num_elements//## - The number of elements to allocate memory for. + Le nombre d'éléments de mémoire à allouer. ##//size//## - The size, in bytes, of each element. + La taille, en octets, de chaque élément. -{{fbdoc item="ret"}} - If successful, the address of the start of the allocated memory is returned. Otherwise, the null pointer (##0##) is returned. +{{fbdoc item="section" value="Valeur retournée + En cas de succès, l'adresse du début de la mémoire allouée est retourné. Sinon, le pointeur nul (##0##) est retourné. {{fbdoc item="desc"}} - ##**Callocate**## initializes the allocated memory with zeros. + ##**CAllocate**## initialise la mémoire allouée avec des zéros. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/memory/callocate.bas"}}%%(freebasic) @@ -37,17 +37,17 @@ next ' Free the memory. deallocate(p) %% -Outputs: +Affiche: %% 10 20 30 40 50 60 70 80 90 100%% {{fbdoc item="target"}} - - This procedure is not guaranteed to be thread-safe. + - Cette procédure n'est pas garantie d'être "thread-safe". {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Callocate""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Callocate**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAllocate Allocate]]## diff --git a/fbdocs/manual/cache/KeyPgCase.wakka b/fbdocs/manual/cache/KeyPgCase.wakka index 11d86c3f6c..e61f3639a3 100644 --- a/fbdocs/manual/cache/KeyPgCase.wakka +++ b/fbdocs/manual/cache/KeyPgCase.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="CASE"}}---- -Control flow statement +Déclaration de contrôle de flux {{fbdoc item="syntax"}}## **Case** //expression// ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgSelectcase Select Case]]## diff --git a/fbdocs/manual/cache/KeyPgCast.wakka b/fbdocs/manual/cache/KeyPgCast.wakka index 388b044e55..aff2dc8604 100644 --- a/fbdocs/manual/cache/KeyPgCast.wakka +++ b/fbdocs/manual/cache/KeyPgCast.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="CAST"}}---- -Converts an expression to a specified data type +Convertit une expression dans un type de données spécifié {{fbdoc item="syntax"}}## Cast( [[DataType datatype]], //expression// ) ## {{fbdoc item="desc"}} - Converts ##//expression//## into a different ##[[DataType datatype]]##. Useful to be used in macros when ##[[DataType datatype]]## is unknown and also when converting to [[KeyPgTypeAlias Type Alias]]. + Convertit ##//expression//## dans un ##[[DataType datatype]]## différent. Utile pour être utilisé dans les macros lorsque ##[[DataType datatype]]## est inconnu et aussi lors de la conversion à [[KeyPgTypeAlias Type Alias]]. - Note: this is a general form of conversion operators such as ##[[KeyPgCint Cint]]## or ##[[KeyPgCdbl Cdbl]]##. They are more versatile because they can be used on types that have a ##[[KeyPgOpCast Cast]]## operator, but don't have a built-in keyword for it. e.g. ##**Cast**( //my_type//, //expr//)##. They are also suitable for use in cases where the type of a variable is not fixed in the code - for example, it might be ##[[KeyPgPpdefine Define]]##d earlier, or may be the ##[[KeyPgTypeof Type of]]## a different variable or expression. + Note: Il s'agit d'une forme générale des opérateurs de conversion tels que ##[[KeyPgCint CInt]]## ou ##[[KeyPgCdbl CDbl]]##. Ils sont plus souples, car ils peuvent être utilisés sur des types qui ont un opérateur ##[[KeyPgOpCast Cast]]##, mais n'ont pas de mot-clé intégré. Par exemple, ##**Cast**( //my_type//, //expr//)##. Ils sont également appropriés pour une utilisation dans les cas où le type d'une variable n'est pas fixé dans le code - par exemple, il pourrait être ##[[KeyPgPpdefine Define]]## plus tôt, ou être le ##[[KeyPgTypeof Type Of]]## d'une variable ou expression différente. - Note: If you want to use an operator specifically for converting to different types of ##[[KeyPgPointer Pointer]]##s, consider using ##[[KeyPgCptr Cptr]]## instead. + Note: Si vous voulez utiliser un opérateur en particulier pour la conversion à différents types de ##[[KeyPgPointer Pointer]]##s, pensez plutôt à utiliser ##[[KeyPgCptr CPtr]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cast.bas"}}%%(freebasic) @@ -23,10 +23,10 @@ print cast( integer, 3.1 ) %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cast""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cast**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCptr Cptr]]## diff --git a/fbdocs/manual/cache/KeyPgCbyte.wakka b/fbdocs/manual/cache/KeyPgCbyte.wakka index 0555f1269d..0bab06b547 100644 --- a/fbdocs/manual/cache/KeyPgCbyte.wakka +++ b/fbdocs/manual/cache/KeyPgCbyte.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CBYTE"}}---- -Converts numeric or string expression to ##[[KeyPgByte Byte]]##. +Convertit une expression numérique ou une chaîne en ##[[KeyPgByte Byte]]##. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cbyte** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgByte byte]] @@ -15,19 +15,19 @@ Converts numeric or string expression to ##[[KeyPgByte Byte]]##. ## {{fbdoc item="param"}} ##//expression//## - A numeric, string, or pointer expression to cast to a ##[[KeyPgByte Byte]]## value. + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgByte Byte]]##. ##//datatype//## - Any numeric, string, or pointer data type. + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - A user defined type. + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgByte Byte]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgByte Byte]]##. {{fbdoc item="desc"}} - The ##**Cbyte**## function rounds off the decimal part and returns a 8 bit ##[[KeyPgByte Byte]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger then -128 to 127. The name can be explained as 'Convert to Byte'. + La fonction ##**CByte**## arrondit la partie entière et retourne une valeur ##[[KeyPgByte Byte]]## 8 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à -128 / supérieure à 127. Le nom peut être expliqué par 'Convert to Byte'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValint Valint]]##. + Si l'argument de ##**CByte**## est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValint ValInt]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cbyte.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cbyte""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cbyte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCubyte Cubyte]]## diff --git a/fbdocs/manual/cache/KeyPgCdbl.wakka b/fbdocs/manual/cache/KeyPgCdbl.wakka index 7c0ec6e0cf..e4e8f480dd 100644 --- a/fbdocs/manual/cache/KeyPgCdbl.wakka +++ b/fbdocs/manual/cache/KeyPgCdbl.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CDBL"}}---- -Converts numeric or string expression to ##[[KeyPgDouble Double]]## precision floating point +Convertit une expression numérique ou une chaîne en nombre ##[[KeyPgDouble Double]]## précision à virgule flottante. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cdbl** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -15,49 +15,49 @@ Converts numeric or string expression to ##[[KeyPgDouble Double]]## precision fl ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgDouble Double]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgDouble Double]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgDouble Double]]## precision value. +##[[KeyPgDouble Double]]## précision. + {{fbdoc item="desc"}} -{{fbdoc item="desc"}} - The ##**CDbl**## function returns a 64-bit ##[[KeyPgDouble Double]]## value. The function does not check for an overflow, so be sure not to pass a value outside the representable range of the ##[[KeyPgDouble Double]]## data type. The name can be explained as 'Convert to ""DouBLe""'. +La fonction ##**CDbl**## retourne une valeur ##[[KeyPgDouble Double]]## 64 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur en dehors de l'intervalle correspondant au type de données ##[[KeyPgDouble Double]]##. Le nom peut être expliqué par 'Convert to DouBLe'. + Si l'argument de ##**CDbl**## est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgVal Val]]##. - If the argument to ##**CDbl**## is a string expression, it is first converted to numeric by using ##[[KeyPgVal Val]]##. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/casting/cdbl.bas"}}%%(freebasic) ' Using the CDBL function to convert a numeric value - 'Create an DOUBLE variable -DIM numeric_value AS DOUBLE +Dim numeric_value As Double 'Convert a numeric value -numeric_value = CDBL(-12345678.123) +numeric_value = CDbl(-12345678.123) 'Print the result, should return -12345678.123 -PRINT numeric_value -SLEEP -%% +Print numeric_value +Sleep +%% {{fbdoc item="diff"}} - - None - -{{fbdoc item="see"}} - - ##[[KeyPgCbyte Cbyte]]## - - ##[[KeyPgCubyte Cubyte]]## - - ##[[KeyPgCshort Cshort]]## - - ##[[KeyPgCushort Cushort]]## - - ##[[KeyPgCint Cint]]## - - ##[[KeyPgCuint Cuint]]## - - ##[[KeyPgClng Clng]]## - - ##[[KeyPgCulng Culng]]## - - ##[[KeyPgClngint Clngint]]## - - ##[[KeyPgCulngint Culngint]]## + +- Aucune + {{fbdoc item="see"}} + +- ##[[KeyPgCbyte CByte]]## + - ##[[KeyPgCubyte CUByte]]## + - ##[[KeyPgCshort CShort]]## + - ##[[KeyPgCushort CUShort]]## + - ##[[KeyPgCint CInt]]## + - ##[[KeyPgCuint CUInt]]## + - ##[[KeyPgClng CLng]]## + - ##[[KeyPgCulng CULng]]## + - ##[[KeyPgClngint CLngInt]]## + - ##[[KeyPgCulngint CULngInt]]## + - ##[[KeyPgCsng CSng]]## - ##[[KeyPgCsng Csng]]## {{fbdoc item="back" value="CatPgCasting|Converting Data Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgCdecl.wakka b/fbdocs/manual/cache/KeyPgCdecl.wakka index ba0bf4dad4..d05509539b 100644 --- a/fbdocs/manual/cache/KeyPgCdecl.wakka +++ b/fbdocs/manual/cache/KeyPgCdecl.wakka @@ -1,36 +1,38 @@ {{fbdoc item="title" value="CDECL"}}---- -Specifies a //cdecl//-style calling convention in a procedure declaration +Spécifie une convention de style-//cdecl// à l'appel d'une déclaration de procédure {{fbdoc item="syntax"}}## - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Cdecl** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **cdecl** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Cdecl** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **cdecl** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Cdecl** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **cdecl** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Cdecl** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **cdecl** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure declarations, ##**Cdecl**## specifies that a procedure will use the ##**cdecl**## calling convention. In the ##**cdecl**## calling convention, any parameters are to be passed (pushed onto the stack) in the reverse order in which they are listed, that is, from right to left. The procedures need not preserve the ##EAX##, ##ECX## or ##EDX## registers, and must not clean up the stack (pop any parameters) before it returns - that is left to the calling code. + Dans les déclarations de procédure, ##**cdecl**## précise que la procédure va utiliser la convention d'appel ##**cdecl**##. Dans la convention d'appel ##**cdecl**##, tous les paramètres passés (push = poussés sur la pile) dans l'ordre inverse dans lequel ils sont listés, donc, de droite à gauche. Les procédures ne doivent pas préserver les registres ##EAX##, ##ECX## ou ##EDX##, et ne doivent pas nettoyer la pile (pop = sortir tous les paramètres) avant retour - ce qui est le travail du code appelant. + + ##**cdecl**## est la convention d'appel par défaut des procédures sous Linux, *BSD et DOS, sauf si une autre convention d'appel est explicitement ou implicitement spécifiée par l'un des [[KeyPgExternBlock Extern Blocks]]. ##**cdecl**## est aussi généralement la convention d'appel par défaut pour de nombreux compilateurs C et est utilisée presque exclusivement sur les systèmes Unix. - //cdecl// is the default calling convention on Linux, the *BSDs, and DOS, unless another calling convention is explicitly specified or implied by one of the [[KeyPgExternBlock EXTERN blocks]]. ##**cdecl**## is typically the default calling convention for C compilers, and it's used almost exclusively on Unix-like systems. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/cdecl.bas"}}%%(freebasic) ' declaring 'strcpy' from the standard C library Declare Function strcpy cdecl Alias "strcpy" (ByVal dest As ZString Ptr, ByVal src As ZString Ptr) As ZString Ptr %% - {{fbdoc item="diff"}} - - New to ""FreeBASIC"" -{{fbdoc item="see"}} - - [[KeyPgPascal Pascal]], [[KeyPgStdcall Stdcall]] +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} + +- [[KeyPgPascal pascal]], [[KeyPgStdcall stdcall]] - [[KeyPgDeclare Declare]] - [[KeyPgSub Sub]], [[KeyPgFunction Function]] + - [[KeyPgSub Sub]], [[KeyPgFunction Function]] {{fbdoc item="back" value="CatPgProcedures|Procedures"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgChain.wakka b/fbdocs/manual/cache/KeyPgChain.wakka index dba74694a2..905cf41d7a 100644 --- a/fbdocs/manual/cache/KeyPgChain.wakka +++ b/fbdocs/manual/cache/KeyPgChain.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CHAIN"}}---- -Temporarily transfers control to an external program +Transfère temporairement le contrôle à un programme externe {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Chain** ( [[KeyPgByref byref]] //program// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,41 +9,39 @@ Temporarily transfers control to an external program ## {{fbdoc item="param"}} ##//program//## - The file name (including file path) of the program (executable) to transfer control to. + Le nom de fichier (y compris le chemin du fichier) du programme (exécutable) à qui on donne le contrôle. -{{fbdoc item="ret"}} - Returns the external program's exit code if executed successfully, or negative one (-1) otherwise. +{{fbdoc item="section" value="Valeur retournée + Retourne le code de sortie du programme externe si exécuté avec succès, autrement un nombre négatif (-1) . {{fbdoc item="desc"}} - Transfers control over to an external program. When the program exits, execution resumes immediately after the call to ##**Chain**##. + Transfère le contrôle à un programme externe. Lorsque le programme se termine, l'exécution reprend immédiatement après l'appel à ##**Chain**##. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/system/chain.bas"}}%%(freebasic) + %%(freebasic) #ifdef FB__LINUX -#define CHAIN2 "chain2" + #define CHAIN2 "chain2" #else -#define CHAIN2 "chain2.exe" + #define CHAIN2 "chain2.exe" #endif - print "chain1 begins" - - chain CHAIN2 - - print "chain1 ends" - - sleep +Print "chain1 begins" +Chain CHAIN2 + Print "chain1 ends" +Sleep %% + {{fbdoc item="target"}} - - Linux requires the ##//program//## name case matches the real name of the file. Windows and DOS are case insensitive. The program chained may be case sensitive for its command line parameters. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. - - Exit code is limited to 8 bits in DOS. + - Linux nécessite que la casse du nom du ##//program//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensible à la casse. Le programme chaîné doit être sensible à la casse pour les paramètres de sa ligne de commande. + - Les séparateurs de chemin sous Linux sont des barres obliques / . Windows utilise des barres obliques arrière \ mais il permet les barres obliques . DOS utilise des barres obliques arrière \ . + - Le code de sortie est limité à 8 bits sous DOS. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgExec Exec]]## transfer temporarily, with arguments - - ##[[KeyPgRun Run]]## one-way transfer - - ##[[KeyPgCommand Command]]## pick arguments + - ##[[KeyPgExec Exec]]## + - ##[[KeyPgRun Run]]## + - ##[[KeyPgCommand Command]]## {{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgChdir.wakka b/fbdocs/manual/cache/KeyPgChdir.wakka index db795d7b66..38a7d6b495 100644 --- a/fbdocs/manual/cache/KeyPgChdir.wakka +++ b/fbdocs/manual/cache/KeyPgChdir.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CHDIR"}}---- -Changes the current drive and directory +Change le lecteur et le répertoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Chdir** ( [[KeyPgByref byref]] //path// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Changes the current drive and directory ## {{fbdoc item="param"}} ##//path//## - A ##[[KeyPgString string]]## argument specifying the path to change to. + Une ##[[KeyPgString String (= Chaîne)]]## spécifiant le nouveau chemin à changer. -{{fbdoc item="ret"}} - Returns zero (0) on success and negative one (-1) on failure. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si succès et une valeur négative (-1) en cas d'échec. {{fbdoc item="desc"}} - Changes the current drive and directory to that specified. + Change le lecteur et le répertoire courant pour celui qui est indiqué. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/chdir.bas"}}%%(freebasic) @@ -26,11 +26,11 @@ If 0 <> result Then Print "error changing current directory to " & pathname & ". %% {{fbdoc item="target"}} - - Linux requires the //filename// case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. + - Linux nécessite que la casse de //filename// corresponde à celle du nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin sous Linux sont des barres obliques / . Windows utilise des barres obliques arrière \ mais il permet les barres obliques . DOS utilise des barres obliques arrière \ . {{fbdoc item="diff"}} - - In QB, the drive could not be specified. + - Dans QB, le lecteur peut ne pas être spécifié. {{fbdoc item="see"}} - ##[[KeyPgMkdir Mkdir]]## diff --git a/fbdocs/manual/cache/KeyPgChr.wakka b/fbdocs/manual/cache/KeyPgChr.wakka index 39a0157f2d..2d1b49177b 100644 --- a/fbdocs/manual/cache/KeyPgChr.wakka +++ b/fbdocs/manual/cache/KeyPgChr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CHR"}}---- -Returns a string of characters from one or more ASCII integer values +Retourne une chaîne de caractères à partir d'une ou plusieurs valeurs entières ASCII {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Chr** ( [[KeyPgByval byval]] //ch// [[KeyPgAs as]] [[KeyPgInteger integer]] [, ... ] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,17 +9,17 @@ Returns a string of characters from one or more ASCII integer values ## {{fbdoc item="param"}} ##//ch//## - The [[CptAscii ASCII]] integer value of a character. + La valeur entière [[CptAscii ASCII]] d'un caractère. -{{fbdoc item="ret"}} - Returns a string containing the character(s). +{{fbdoc item="section" value="Valeur retournée + Retourne une chaîne contenant le(s) caractère(s). {{fbdoc item="desc"}} - ##**Chr**## returns a string containing the character(s) represented by the [[CptAscii ASCII]] values passed to it. + ##**Chr**## retourne une chaîne contenant le(s) caractère(s) représenté(s) par la(les) valeur(s) [[CptAscii ASCII]] qui lui est(sont) passée(s). - When ##**Chr**## is used with numerical constants or literals, the result is evaluated at compile-time, so it can be used in variable initializers. + Quand ##**Chr**## est utilisé avec des constantes numériques ou littérales, le résultat est évalué lors de la compilation, de sorte qu'il peut être utilisé dans des initialiseurs de variable. - ##[[KeyPgAsc ASC]]## performs the opposite function, returning the [[CptAscii ASCII]] code of a character represented by a string. + ##[[KeyPgAsc Asc]]## effectue la fonction inverse, retournant le code [[CptAscii ASCII]] du caractère représenté par une chaîne. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/chr.bas"}}%%(freebasic) @@ -35,15 +35,15 @@ print s %% {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - FreeBASIC accepts multiple integer values as arguments, QB accepted only one. - - FreeBASIC evaluates the CHR function at compile time when used with constants or literals. + - FreeBASIC accepte des valeurs entières multiples comme arguments, QB n'en accepte qu'une seule. + - FreeBASIC évalue la fonction CHR lors de la compilation si elle est utilisée avec des constantes ou des littéraux. {{fbdoc item="see"}} - - [[CptAscii ASCII Character Codes]] + - [[CptAscii Codes ASCII des caractères]] - ##[[KeyPgAsc Asc]]## - ##[[KeyPgStr Str]]## - ##[[KeyPgVal Val]]## diff --git a/fbdocs/manual/cache/KeyPgCint.wakka b/fbdocs/manual/cache/KeyPgCint.wakka index ce76d51ec0..0aa38d3838 100644 --- a/fbdocs/manual/cache/KeyPgCint.wakka +++ b/fbdocs/manual/cache/KeyPgCint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CINT"}}---- -Converts numeric or string expression to an ##[[KeyPgInteger Integer]]## +Convertit une expression numérique ou une chaîne en ##[[KeyPgInteger Integer]]## (nombre entier) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cint** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -15,21 +15,21 @@ Converts numeric or string expression to an ##[[KeyPgInteger Integer]]## ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgInteger Integer]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgInteger Integer]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de donnée numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - An ##[[KeyPgInteger Integer]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgInteger Integer]]##. {{fbdoc item="desc"}} - If ##**Cint**## is passed a ##//numeric expression//##, it rounds it using using the [[http://en.wikipedia.org/wiki/Rounding#Round-to-even_method round-to-even method]] - i.e. it rounds to the closest integer value, choosing the closest even integer if the number is equidistant from two integers - and returns a 32-bit ##[[KeyPgInteger Integer]]##. The function does not check for an overflow, and results are undefined for values which are less than ##-2## ##147## ##483## ##648## or larger than ##2## ##147## ##483## ##647##. + Si une ##//numeric expression//## est passée à ##**CInt**##, elle est arrondie en utilisant la méthode [[http://en.wikipedia.org/wiki/Rounding#Round-to-even_method">Arrondir au pair le plus proche (round-to-even method)]] - c'est à dire, que le nombre est arrondi à la valeur entière la plus proche, en choisissant le plus proche entier pair si le nombre est équidistant de deux nombres entiers - et retourne un ##[[KeyPgInteger Integer]]## 32 bits. La fonction ne vérifie pas s'il y a un dépassement et les résultats sont imprévisibles pour des valeurs inférieures à ##-2## ##147## ##483## ##648## ou supérieures à ##2## ##147## ##483## ##647##. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValint Valint]]##. + Si l'argument est une expression de chaîne, il est converti en numérique à l'aide de ##[[KeyPgValint ValInt]]##. - The name "CINT" is derived from 'Convert to INTeger'. + Le nom "CINT" est dérivé de 'Convert to INTeger'. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cint.bas"}}%%(freebasic) @@ -51,10 +51,10 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, ##**Cint**## will return a 16-bit integer, like in QB. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, ##**CInt**## retourne un entier 16 bits, comme QB. {{fbdoc item="diff"}} - - The string argument was not allowed in QB + - L'argument de chaîne n'est pas autorisé sous QB {{fbdoc item="see"}} - ##[[KeyPgCast Cast]]## diff --git a/fbdocs/manual/cache/KeyPgCircle.wakka b/fbdocs/manual/cache/KeyPgCircle.wakka index e1d6c05f7f..e1626f1b3f 100644 --- a/fbdocs/manual/cache/KeyPgCircle.wakka +++ b/fbdocs/manual/cache/KeyPgCircle.wakka @@ -1,21 +1,21 @@ -{{fbdoc item="title" value="CIRCLE"}}---- -Graphics statement to draw a circle - -{{fbdoc item="syntax"}}## - **Circle** [//target//,] [STEP] (x,y), radius[, [color][, [start][, [end][, [aspect][, F]]]]] -## -{{fbdoc item="param"}} - ##//target//## - specifies buffer to draw on. - ##STEP## - indicates that coordinates are relative - ##(//x, y//)## - coordinates of the circle's center. - ##//radius//## - radius - ##//color//## - the color attribute. - ##//start//## +{{fbdoc item="title" value="Circle"}}----
    +Instruction graphique pour tracer un cercle

    {{fbdoc item="syntax"}}##
    **Circle** [//target//,] [STEP] (x,y), radius[, [color][,[start][, [end][, [aspect][, F]]]]]
    ##
    + +{{fbdoc item="param"}}
    ##//target//##
    spécifie le tampon sur lequel on dessine.
    + ##STEP##
    indique que les coordonnées sont relatives
    +##(//x, y//)##
    coordonnées du centre du cercle.
    +##//radius//##
    rayon
    + ##//color//##
    l'attribut de couleur.
    + ##//start//##
    l'angle de départ
    + ##//end//##
    l'angle de fin
    + ##//aspect//##
    aspect ratio
    + ##F##
    indicateur de mode de remplissage

    + {{fbdoc item="desc"}}
    ##**Circle**## trace un cercle, une ellipse ou un arc de cercled'après les paramètres fournis.

    ##//target//## spécifie le buffer oùl'on dessine. ##//target//## peut être une imagecréée avec ##ImageCreate## ou ##Get (Graphics)##. Si omis, ##//target//##est par défaut la page valide de l'écran detravail. (Voir ##[[KeyPgScreenset ScreenSet]]##)

    Le centre de la figure est placé sur la surfacedestination en ##(//X//,//Y//)##.

    ##//Radius//## donne le rayon de la figure. Si ##//aspectratio//## est utilisé, le plus grand rayon doitêtre indiqué ici.

    ##//Color//## correspond à l'attribut de couleur,qui est spécifique au mode (voir ##Color## et ##Screen (Graphics)## pour desdétails). Si omis, la couleur de premier-plandéfinie par ##[[KeyPgColor Color]]##est utilisée.

    L'option ##STEP## spécifie que ##//X//## et##//Y//## sont relatifs à la position du curseurgraphique.

    ##//start//## et ##//end//## sont des angles en ##radians##.Valeurs de -2PI à 2PI; si vous spécifiez unangle négatif, savaleur change de signe et une ligne est tracée du centrejusqu'aupoint de l'arc de cercle. ##//end//## angle peutêtre inférieur à ##//start//##angle. Si vous omettez ##//start//## et ##//end//##,un cercle/ellipse complet est tracé; si vousspécifiez ##//start//## mais pas ##//end//##,##//end//## prend la valeur 2PI; si vous spécifiez##//end//## mais pas ##//start//##, ##//start//##prend la valeur 0.

    ##//aspect//## est le ratio d'aspect, ou le ratio du y sur le xdu rayon. La valeur par défaut est la valeur requise pour tracerun cercle parfait à l'écran, en gardant le ratio d'aspectdes pixels. Cette valeur peut être calculée comme ceci:

    ##ratio = (y_radius / x_radius) * pixel_aspect_ratio##

    Où ##//pixel_aspect_ratio//## est le ratio de la largeur sur la hauteurdans le mode courant, correspondant à un moniteur 4:3 standard. Si le ratio d'aspectest inférieur à 1, le rayon est le rayon x; s'il est supérieur ou égal à 1,le rayon est le rayon y.

    F est l'indicateur de remplissage. Si vous le spécifiez, le cercle/ellipse serarempli avec la couleur sélectionnée. Ceci est sans effet dans le cas d'un arc decercle.

    Le système de coordonnées mis en place par ##[[KeyPgWindow Window]]##et/ou ##[[KeyPgViewgraphics View (Graphics)]]##modifie l'opération de dessin; le découpage (clipping) mis en place par ##View## s'applique aussi. Quand ##**Circle**##termine le tracé, le curseur graphique courant est positionné sur le centre donné.

    + {{fbdoc item="ex"}}
    ##
    ' Valide mode 640x480, 256 couleurs
    Screen 18

    ' Trace un cercle au centre
    Circle (320, 240), 200, 15

    ' Trace une ellipse pleine
    Circle (320, 240), 200, 2, , , 0.2, F

    ' Trace un petit arc
    Circle (320, 240), 200, 4, 0.83, 1.67, 3

    Sleep
    + ##

    +

    + {{fbdoc item="diff"}}
    - FreeBASIC utilisant un algorithme différent de QB pour le tracé ellipse/arc,le résultat peut être légèrement différent pour chaque pixel.
  • - L'indicateur F pour remplir les cercles/ellipses est nouveau dans FreeBASIC.
    - ##//target//## Nouveau pour FreeBASIC

    + {{fbdoc item="see"}}
    - ##[[KeyPgScreengraphics Screen (Graphics)]]##
    - ##[[KeyPgColor Color]]##

    starting angle ##//end//## ending angle diff --git a/fbdocs/manual/cache/KeyPgClass.wakka b/fbdocs/manual/cache/KeyPgClass.wakka index 4eb01ba186..f94b0e6242 100644 --- a/fbdocs/manual/cache/KeyPgClass.wakka +++ b/fbdocs/manual/cache/KeyPgClass.wakka @@ -1,32 +1,32 @@ {{fbdoc item="title" value="CLASS"}}---- -Declares a class object +Déclare une classe d'objects {{fbdoc item="syntax"}}## **Class** //typename// ... ## {{fbdoc item="param"}} ##//typename//## - name of the ##**Class**## + nom de la ##**Class**## {{fbdoc item="desc"}} - We would have put something useful here (honest) except this feature isn't implemented in the compiler yet. But since it will get added in future, and there are several other document pages that need to link here, we thought it safe to include in anyway. + NON ENCORE IMPLEMENTE +We would have put something useful here (honest) except this feature isn't implemented in the compiler yet. But since it will get added in future, and there are several other document pages that need to link here, we thought it safe to include in anyway. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/check/KeyPgClass_1.bas"}}%%(freebasic) '' sample code -%% +'' sample code +%% Output: %% sample output -%% -{{fbdoc item="lang"}} - - Object-related features are supported only in the //[[CompilerOptlang -lang fb]]// option +%% + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Object-related features are supported only in the //[[CompilerOptlang -lang fb]]// option + {{fbdoc item="diff"}} -{{fbdoc item="see"}} - - ##[[KeyPgEnum Enum]]## - - ##[[KeyPgType Type]]## \ No newline at end of file +- New to FreeBASIC + {{fbdoc item="see"}} + - ##[[KeyPgEnum Enum]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgClear.wakka b/fbdocs/manual/cache/KeyPgClear.wakka index 7c3c023547..96f4cb7c04 100644 --- a/fbdocs/manual/cache/KeyPgClear.wakka +++ b/fbdocs/manual/cache/KeyPgClear.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CLEAR"}}---- -Clears or initializes some memory +Efface ou initialise de la mémoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Clear** [[KeyPgCdecl cdecl]] ( [[KeyPgByref byref]] //dst// [[KeyPgAs as]] [[KeyPgAny any]], [[KeyPgByval byval]] //value// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByval byval]] //bytes// [[KeyPgAs as]] [[KeyPgInteger integer]] ) @@ -9,16 +9,16 @@ Clears or initializes some memory ## {{fbdoc item="param"}} ##//dst//## - starting address of some memory + adresse de départ de la mémoire ##//value//## - the value to set all bytes equal to + la valeur servant à initialiser tous les octets ##//bytes//## - number of bytes to clear + nombre d'octets à initialiser {{fbdoc item="desc"}} - ##**Clear**## sets one or more bytes in memory to a certain value (the default value is zero (##0##) if not specified). The starting address is taken from a reference to a variable or array element. + ##**Clear**## initialise un ou plusieurs octets de la mémoire avec une même valeur (si elle n'est pas spécifiée, la valeur d'initialisation par défaut est zéro (##0##)). L'adresse de début est déduite par référence à une variable ou à un élément d'un tableau. - **NOTE:** In order to clear memory referenced by a ##[[KeyPgPointer Pointer]]##, it must be dereferenced first. Otherwise, ##**Clear**## will try to clear the bytes at the **pointer variable**'s memory location. + **NOTE:** Pour effacer la mémoire référencée par un ##[[KeyPgPointer Pointer]]##, celui-ci doit être déréférencé au préalable. Sinon, ##**Clear**## essaiera de travailler sur les octets à l'adresse mémoire du **pointeur de la variable**. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/array/clear.bas"}}%%(freebasic) @@ -48,8 +48,8 @@ deallocate p %% {{fbdoc item="diff"}} - - The behavior and usage is new to ""FreeBASIC"" - - The keyword ##CLEAR## was used in QB to erase all variables, close all files, and optionally change the stack size. This use is not supported in ""FreeBASIC"". + - Le comportement et l'utilisation sont nouveaux pour FreeBASIC + - Le mot-clef ##CLEAR## était utilisé dans QB pour effacer toutes les variables, fermer tous les fichiers et éventuellement modifier la taille de la pile. Cette utilisation n'est pas prise en charge dans FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgErase Erase]]## diff --git a/fbdocs/manual/cache/KeyPgClng.wakka b/fbdocs/manual/cache/KeyPgClng.wakka index a46c4ce0bf..41909d9186 100644 --- a/fbdocs/manual/cache/KeyPgClng.wakka +++ b/fbdocs/manual/cache/KeyPgClng.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CLNG"}}---- -Converts numeric or string expression to ##[[KeyPgLong Long]]## having the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## +Convertit une expression numérique ou une chaîne en nombre ##[[KeyPgLong Long]]## ayant la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Clng** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgLong long]] @@ -15,21 +15,21 @@ Converts numeric or string expression to ##[[KeyPgLong Long]]## having the same ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgLong Long]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgLong Long]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de donnée numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgLong Long]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgLong Long]]##. {{fbdoc item="desc"}} - The ##**Clng**## function rounds off the decimal part and returns a 32 bit ##[[KeyPgInteger Integer]]## or 64 bit ##[[KeyPgLongint Longint]]## value. The function does not check for an overflow. The name can be explained as 'Convert to ""LoNG""'. + La fonction ##**CLng**## arrondit la partie entière et retourne un nombre ##[[KeyPgInteger Integer]]## 32 bits ou un nombre ##[[KeyPgLongint LongInt]]## 64 bits. La fonction ne vérifie pas s'il y a un dépassement. Le nom vient de 'Convert to LoNG'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValint Valint]]## or ##[[KeyPgVallng Vallng]]##. + Si l'argument est une expression de chaîne, il est converti en numérique à l'aide de ##[[KeyPgValint ValInt]]## ou ##[[KeyPgVallng ValLng]]##. - ##**Long**## has the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. + ##**Long**## a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. {{fbdoc item="ex"}} @@ -48,8 +48,8 @@ SLEEP %% {{fbdoc item="diff"}} - - The string argument was not allowed in QB - - LONG is always 32 bit in QB + - L'argument de chaîne n'est pas autorisé dans QB + - LONG est toujours 32 bits dans QB {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgClngint.wakka b/fbdocs/manual/cache/KeyPgClngint.wakka index dad1a2ae82..7b90043db5 100644 --- a/fbdocs/manual/cache/KeyPgClngint.wakka +++ b/fbdocs/manual/cache/KeyPgClngint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CLNGINT"}}---- -Converts numeric or string expression to 64-bit integer (##[[KeyPgLongint Longint]]##) +Convertit une expression numérique ou une chaîne en nombre entier 64 bits (##[[KeyPgLongint LongInt]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Clngint** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] @@ -15,19 +15,19 @@ Converts numeric or string expression to 64-bit integer (##[[KeyPgLongint Longin ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgLongint Longint]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgLongint LongInt]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgLongint Longint]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgLongint LongInt]]##. {{fbdoc item="desc"}} - The ##**Clngint**## function rounds off the decimal part and returns a 64 bit ##[[KeyPgLongint Longint]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger than -9 223 372 036 854 775 808 to 9 223 372 036 854 775 807. The name can be explained as 'Convert to ""LoNG INTeger""'. + La fonction ##**CLngInt**## arrondit la partie entière et retourne un ##[[KeyPgLongint LongInt]]## 64 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à -9 223 372 036 854 775 808 ou supérieure à 9 223 372 036 854 775 807. Le nom vient de 'Convert to LoNG INTeger'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgVallng Vallng]]##. + Si l'argument est une expression de chaîne, il est converti en numérique à l'aide de ##[[KeyPgVallng ValLng]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/clngint.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Clngint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Clngint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgClose.wakka b/fbdocs/manual/cache/KeyPgClose.wakka index 3aff6618ec..39cb5cc671 100644 --- a/fbdocs/manual/cache/KeyPgClose.wakka +++ b/fbdocs/manual/cache/KeyPgClose.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="CLOSE"}}---- -Stream I/O function to terminate access to a device +Fonction flux Entrée/Sortie pour terminer l'accès à un périphérique {{fbdoc item="syntax"}}## **Close** [[#]//filenum// ] [, [#]//filenum// ...] - // or // + // ou // //result// = **Close**( [#//filenum//] ) ## {{fbdoc item="param"}} ##//filenum//## - List of file numbers to close. + Liste des numéros de fichiers à fermer. {{fbdoc item="desc"}} - Closes the files whose file numbers are passed as arguments. If an unused file number is passed, ##**Close**## returns an error. + Ferme les fichiers dont les numéros sont passés en arguments. Si un numéro inutilisé est passé, ##**Close**## renvoie une erreur. - ##**Close**## without arguments closes all the files presently opened. + ##**Close**## sans arguments ferme tous les fichiers ouverts. - Terminating the program using an ##[[KeyPgEnd End]]## statement will automatically close all files. + Terminer un programme en utilisant ##[[KeyPgEnd End]]## fermera automatiquement tous les fichiers. -{{fbdoc item="ret"}} - ##**Close**## returns zero (##0##) on success and a non-zero error code otherwise. +{{fbdoc item="section" value="Valeur retournée + ##**Close**## retourne zéro (##0##) si succès et sinon un code d'erreur différent de zéro. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/close.bas"}}%%(freebasic) @@ -44,7 +44,7 @@ End %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgCls.wakka b/fbdocs/manual/cache/KeyPgCls.wakka index afba9a1376..42c8ec3992 100644 --- a/fbdocs/manual/cache/KeyPgCls.wakka +++ b/fbdocs/manual/cache/KeyPgCls.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CLS"}}---- -Clears the screen in both text modes and graphics modes +Efface l'écran, aussi bien dans le mode texte que le mode graphique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Cls** ( [[KeyPgByval byval]] //mode// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) @@ -9,34 +9,34 @@ Clears the screen in both text modes and graphics modes ## {{fbdoc item="param"}} ##//mode//## - A optional numeric variable with a value from ##0## to ##2##. If omitted, it defaults to ##1##. + Une variable numérique facultative d'une valeur de 0 à 2. Si omise, 1 par défaut. {{fbdoc item="desc"}} - An optional ##//mode//## parameter may be given, + Un paramètre facultatif ##//mode//## peut être fourni, - If omitted, ##**CLS**## clears either the text or graphics viewport. If a graphics viewport has been defined using the ##[[KeyPgViewgraphics View (Graphics)]]## statement, the graphics viewport is cleared. Otherwise, the text viewport, defined by ##[[KeyPgViewtext View Print]]##, is cleared. (If there is no explicit text viewport defined, the entire screen is cleared.) + S'il est omis, ##**Cls**## efface le texte ainsi que les graphiques de la fenêtre. Si une fenêtre graphique a été définie en utilisant ##[[KeyPgViewgraphics View (Graphics)]]##, cette fenêtre est effacée. Autrement, la fenêtre texte définie par ##[[KeyPgViewtext View Print]]##, est nettoyée. (S'il n'y a pas de fenêtre texte explicitement définie, l'écran entier est nettoyé.). - If ##0##, clears the entire screen + Si à ##0##, efface l'écran entier. - If ##1##, clears the graphics viewport if defined. Otherwise, clears the text viewport + Si à ##1##, efface la fenêtre graphique si elle a été définie. Autrement, efface la fenêtre texte. - If ##2##, clears the text viewport + Si à ##2##, efface le fenêtre texte. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/cls.bas"}}%%(freebasic) -'' set the color to light grey text on a blue background +'' Valide couleur texte : gris clair et arrire-plan bleu Color 7, 1 -'' clear the screen to the background color +'' efface ecran avec couleur arriere-plan Cls -'' print text in the center of the screen +'' ecris texte au centre ecran Locate 12, 33 Print "Hello Universe!" %% -In graphics modes, if you want to clear the entire screen to color ##0##, it can be faster using ##[[KeyPgClear Clear]]## to write zeroes to the screen memory than calling ##**CLS**##. +Dans les modes graphiques, si vous voulez effacer entièrement l'écran avec la couleur ##0##, il est plus rapide d'utiliser ##[[KeyPgClear Clear]]## pour écrire des zéros dans la mémoire écran que d'appeler ##**Cls**##. {{fbdoc item="filename" value="examples/manual/gfx/cls-memset.bas"}}%%(freebasic) Dim scrbuf As Byte Ptr, scrsize As Integer @@ -51,29 +51,29 @@ scrsize = scrpitch * scrhei Do - '' lock the screen (must do this while working directly on screenbuffer) + '' verouille ecran (obligatoire pendant travail directement dans tampon ecran) Screenlock - '' clear the screen (could use Cls here): + '' efface ecran (possible utiliser Cls ici): Clear *scrbuf, 0, scrsize - '' draw circle + '' dessine cercle Circle (320, 240), r Screenunlock - '' grow/shrink circle radius + '' augment/diminue rayon cercle r += dr If r <= 0 Then dr = 1 Else If r >= 100 Then dr = -1 - '' short pause in each frame (prevents hogging the CPU) + '' courte pause pour chaque image (previent saturation CPU) Sleep 1, 1 - '' run loop until user presses a key + touche appuyee Loop Until len(Inkey) > 0%% -{{fbdoc item="diff"}} - - None +{{fbdoc item="section" value="Différences par rapport à QB + - Aucune {{fbdoc item="see"}} - ##[[KeyPgColor Color]]## diff --git a/fbdocs/manual/cache/KeyPgColor.wakka b/fbdocs/manual/cache/KeyPgColor.wakka index bb140bfe30..5ef3c58da0 100644 --- a/fbdocs/manual/cache/KeyPgColor.wakka +++ b/fbdocs/manual/cache/KeyPgColor.wakka @@ -1,20 +1,20 @@ -{{fbdoc item="title" value="COLOR"}}---- -Sets the display foreground / background color that is used with console output and graphics output of text + {{fbdoc item="title" value="Color"}}----
    +Définit la couleur d'affichage de premier-plan/ d'arrière-plan qui est utilisée en sortie console ou graphique pourle texte.

    {{fbdoc item="syntax"}}##
    [[KeyPgDeclare Declare]] [[KeyPgFunction Function]]**Color** ( [[KeyPgByval ByVal]] //foreground// [[KeyPgAs As]] [[KeyPgInteger Integer]] , [[KeyPgByval ByVal]] //background// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgInteger Integer]]
    ##
    -{{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Color** ( [[KeyPgByval byval]] //foreground// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //background// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] -## -{{fbdoc item="usage"}}## - **Color** [//foreground//] [, //background//] - //result// = **Color** [( [//foreground//] [, //background//] )] -## -{{fbdoc item="param"}} - ##//foreground//## - the foreground color to set - ##//background//## - the background color to set +{{fbdoc item="usage"}}##
    **Color** [//foreground//] [, //background//]
    //result// = **Color** [( [//foreground//] [, //background//])]
    ##
    + {{fbdoc item="param"}}
    ##//foreground//##
    choix de la couleur de premier-plan
    +##//background//##
    choix de la couleur d'arrière-plan

    +{{fbdoc item="section" value="Valeur renvoyée +
    Renvoie un ##[[KeyPgInteger Entier]]## 32 bitscontenant la couleur courante de premier-plan dans le [[KeyPgLoWord Mot de Poids Faible]] et la couleur couranted'arrière-plan dans le [[KeyPgHiword Mot de Poids Fort]]. Lesvaleurs des couleurs anciennes peuvent être extraites en même temps quela création de nouvelles. + {{fbdoc item="desc"}}
    ##**Color**## définit les couleurs courantes de premier-planet/ou d'arrière-plan. ##[[KeyPgCircle Circle]]##, ##[[KeyPgDraw Draw]]##, ##[[KeyPgLinegraphics Line (Graphics)]]##, ##[[KeyPgCls Cls]]##, ##[[KeyPgPaint Paint]]##,##[[KeyPgPrint Print]]##, ##[[KeyPgPreset PReset]]## et ##[[KeyPgPset PSet]]## utilisent tous,quand vous ne leurspécifiez pas de couleur particulière, les dernières couleurspositionnées par cette fonction. Les couleurs acceptées par ##**Color**##dépendent du mode graphique courant.

    {{table columns="" cellpadding="2" cells=" Mode; Signification; 1; foreground est la couleur d'écran (de 0 è 15). backgroundmodulo 4 est la palette CGA émulée à utiliser: 0 (vert, rouge, etmarron), 1 (cyan, magenta et blanc), 2 (comme 0, mais avec des couleursvives) ou 3 (comme 1, mais avec des couleurs vives); 2, 11; foreground est un indice de couleur dans la palette courante(de 0 à 1). background est un indice de couleur dans la palette courante(de 0 à 1).; 7, 8; foreground est un indice de couleur dans la palette courante(de 0 à 15). background est un indice de couleur dans la palettecourante (de 0 à 15).; 9; foreground est un indice de couleur dans la palette courante(de 0 à 63). background est un indice de couleur écran dans la palettecourante (de 0 à 63).; 12; foreground est un indice de couleur dans la palette courante(de 0 à 15). background est un indice de couleur dans la palettecourante (de 0 à 15).; 13 et plus; foreground est un indice de couleur dans la palette courante(de 0 à 255). background est un indice de couleur dans la palettecourante (de 0 à 255).;
    +

    Si vous utilisez une profondeur de couleur supérieure à 8bpp (bit parpixel), premier-plan et arrière-plan ont directement des valeurs decouleur ##[[KeyPgRgb RGB]]## de la forme ##&hAARRVVBB##,où ##AA##, ##RR##, ##VV## et ##BB## sont lescomposantes alpha, rouge, vert et bleu ayant des valeurs de ##&h00à &hFF## (0-255 en notation décimale). Tandis qu'en modes"hi / true color", vous pouvez utiliser les macros ##[[KeyPgRgb RGB]]## ou ##[[KeyPgRgba RGBA]]##pour obtenir une valeur de couleur valide.
    Une [[GfxDefPalettes Palette par Défaut]] estautomatiquement attribuée quand vous entrez un ##[[KeyPgScreengraphics Screen]]## mode.

    +{{fbdoc item="ex"}}
    ##
    ' Valide 320x240 en 32bpp profondeur couleur
    Screen 14, 32

    ' Valide couleurs premier-plan orange et arriere-plan bleu fonce
    Color RGB(255, 128, 0), RGB(0, 0, 64)

    ' Efface ecran avec couleur arriere-plan
    Cls

    ' Affiche "Hello World!" au milieu de l'ecran
    Locate 15, 14
    Print "Hello World!"

    Sleep
    + ##
    +
    ##
    Dim c As UInteger

    'Recupere valeurs couleur courante
    c = Color()

    'Extraie valeur couleur dans c utilisant LOWORD et HIWORD
    Print "Console colors:"
    Print "Foreground: " & LoWord(c)
    Print "Background: " & HiWord(c)
    + ##

    + {{fbdoc item="diff"}}
    - Les modes de couleur Direct ne sont pas supportés dans QB.
  • Il n'y a pas d'argument bordure.

  • -{{fbdoc item="ret"}} +{{fbdoc item="see"}}
    - ##[[KeyPgRgb RGB]]##
    - ##[[KeyPgRgba RGBA]]##
    - ##[[KeyPgLoWord LoWord]]##
    - ##[[KeyPgHiword HiWord]]##
    - ##[[KeyPgLocate Locate]]##
    - ##[[KeyPgPalette Palette]]##
    - ##[[KeyPgScreengraphics Screen]]##

    Returns a 32 bit ##[[KeyPgInteger Integer]]## containing the current foreground color in the [[KeyPgLoWord low word]] and the current background color in the [[KeyPgHiword high word]]. The old color values can be retrieved at the same time as setting new ones. {{fbdoc item="desc"}} diff --git a/fbdocs/manual/cache/KeyPgCommand.wakka b/fbdocs/manual/cache/KeyPgCommand.wakka index 6f57dab806..f7db573d6c 100644 --- a/fbdocs/manual/cache/KeyPgCommand.wakka +++ b/fbdocs/manual/cache/KeyPgCommand.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="COMMAND"}}---- -Returns command line parameters used to call the program +Renvoie les paramètres de la ligne de commande utilisés pour appeler le programme {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Command** ( [[KeyPgByval byval]] //index// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,84 +9,77 @@ Returns command line parameters used to call the program ## {{fbdoc item="param"}} ##//index//## - Zero-based index for a particular command-line argument. + Indice (de base zéro) pour un argument particulier de la ligne de commande. -{{fbdoc item="ret"}} - Returns the command-line arguments(s). +{{fbdoc item="section" value="Valeur retournée + Retourne le(s) arguments(s)de ligne de commande. {{fbdoc item="desc"}} - ##**Command**## returns command-line arguments passed to the program upon execution. + ##**Command**## retourne le(s) arguments(s)de ligne de commande passés au programme lors de l'exécution. - If ##//index//## is less than zero (##< 0##), a space-separated list of all command-line arguments is returned, otherwise, a single argument is returned. A value of zero (##0##) returns the name of the executable; and values of one (##1##) and greater return each command-line argument. + Si ##//index//## est inférieur à zéro (##< 0##), une liste de tous les arguments (séparés par des epaces) de la ligne de commande est retournée, autrement, un argument unique est retourné. Une valeur de zéro (##0##) retourne le nom de l'exécutable; et une valeur de un (##1##) et supérieure retourne chaque argument de la ligne de commande. - If ##//index//## is greater than the number of arguments passed to the program, the null string (##"####"##) is returned. + Si ##//index//## est supérieur au nombre d'arguments passés au programme, la chaîne nulle ##"####"##) est retournée. - When the command line is parsed for arguments, everything between double quotes in the parameter list will be considered as a single parameter, and is returned with the double quotes. + Lorsque la ligne de commande est analysée pour les arguments, ce qui est entre guillemets dans la liste des paramètres sera considéré comme un seul paramètre, et est retourné avec les guillemets. - By default, filename globbing for arguments (expansion of wildcards to filenames) is used on all ports of ""FreeBASIC"" for compatibility. Arguments on the command line containing wildcards are typically not expanded if when no file is matched or if properly quoted. Other special characters for redirection are typically not returned unless properly quoted. Consult the documentation on the shell being used for more information on the proper quoting of command line arguments. + Par défaut, le nom de fichier avec "globbing" (expansion des jokers pour les noms de fichiers) pour les arguments est utilisé sur tous les portages de FreeBasic pour la compatibilité. Les arguments sur la ligne de commande contenant des jokers ne sont généralement pas expansés si aucun fichier ne correspond ou n'est correctement déclaré. Les autres caractères spéciaux pour la redirection ne sont généralement pas retournés sauf si correctement déclarés. Consultez la documentation sur l'interpréteur de commandes (shell) utilisé pour plus d'informations sur la déclaration convenable des arguments de la ligne de commande. -~&//**WARNING**: By nature of constructor precedence in ""FreeBASIC"" and main() initialization, calling ##**Command**## within a global constructor is not safe. At the moment your app will not crash, but you will only receive the null string (##"####"##). This *may* be able to be fixed in the future, but it would be wise not to rely on that.// +//**AVERTISSEMENT**: Par la nature de la priorité de constructeur sous FreeBASIC et initialisation de main(), appeler ##**Command**## dans un constructeur global n'est pas sûr. Sur le moment, votre application ne plantera pas, mais vous ne recevrez que la chaîne nulle (##"####"##). Ceci sera *peut être* corrigé à l'avenir, mais il serait sage de ne pas trop y croire.// - __Disabling filename globbing under Win32__ - For mingw32 and cygwin builds, link the ""FreeBASIC"" program with CRT_noglob.o or define the following somewhere in the source: - {{fbdoc item="filename" value="examples/manual/check/KeyPgCommand_1.bas"}}%%(freebasic) + Désactivation de "globbing" de nom de fichier sous Win32 + Pour les constructions mingw32 et cygwin builds, lier le programme FreeBASIC avec CRT_noglob.o ou définir ce qui suit quelque part dans la source: + %%(freebasic) Extern _CRT_glob Alias "_CRT_glob" As Integer Dim Shared _CRT_glob As Integer = 0 %% - __Disabling filename globbing under Dos__ - Define the following function somewhere in the source: - {{fbdoc item="filename" value="examples/manual/check/KeyPgCommand_2.bas"}}%%(freebasic) + Désactivation du "globbing" de nom de fichier sous Dos + Définir la fonction suivante quelque part dans la source: + %%(freebasic) Public Function __crt0_glob_function Alias "__crt0_glob_function" ( ByVal arg As UByte Ptr ) As UByte Ptr Ptr Return 0 End Function %% - __Disabling filename globbing under Linux__ - Filename globbing is handled by the command shell. Quote the argument containing wildcards or disable filename globbing in the shell prior to executing the command. For example in bash use 'set -f' to disable wildcard expansion + Désactivation du "globbing" de nom de fichier sous Linux + Le "globbing" de nom de fichier est géré par l'interpréteur de commandes (shell). Mettre entre guillemets l'argument contenant des jokers ou désactiver le "globbing" de nom de fichier dans le shell avant l'exécution de la commande. Par exemple dans l'interpréteur de commandes bash utilisez 'set -f' pour désactiver l'expansion des jokers. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/command.bas"}}%%(freebasic) '' + '' command-line arguments example '' + Print "exe name= "; Command( 0 ) + Dim argc As Integer, argv As String + argc = 1 + Do - print "exe name= "; command( 0 ) - - dim argc as integer, argv as string - - argc = 1 - do - argv = command( argc ) + argv = Command( argc ) + If( Len( argv ) = 0 ) Then +Exit Do - if( len( argv ) = 0 ) then - exit do - end if +End If + Print "arg"; argc; " = """; argv; """" +argc += 1 - print "arg"; argc; " = """; argv; """" +Loop +If( argc = 1 ) Then - argc += 1 - loop +Print "(no arguments)" + End If + Print "The complete list: ";Command - if( argc = 1 ) then - print "(no arguments)" - end if - print "The complete list: ";command %% - -{{fbdoc item="lang"}} - - The string type suffix ##$## is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix ##$## is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + {{fbdoc item="lang"}} + - Le suffixe de type chaîne ##$## est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type chaîne ##$## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - The numeric argument was not supported in QB. - - QB converted the parameter list to uppercase before returning it, ""FreeBASIC"" doesn't. - - By default arguments containing wildcard characters are expanded (filename globbing) - -{{fbdoc item="see"}} - - ##[[KeyPgDdfbargc __FB_ARGC__]]## - - ##[[KeyPgDdfbargv __FB_ARGV__]]## - - ##[[KeyPgExec Exec]]## - - ##[[KeyPgRun Run]]## + - L'argument numérique n'était pas pris en charge dans QB. + - QB convertit la liste de paramètres en majuscules avant de la retourner, FreeBASIC non. + - Par défaut les arguments contenant des caractères génériques sont développés ("globbing" des noms de fichiers) + {{fbdoc item="see"}} -{{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}} \ No newline at end of file +- ##[[KeyPgDdfbargc __FB_ARGC__]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgCommon.wakka b/fbdocs/manual/cache/KeyPgCommon.wakka index b604b6014c..62dc0719a0 100644 --- a/fbdocs/manual/cache/KeyPgCommon.wakka +++ b/fbdocs/manual/cache/KeyPgCommon.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="COMMON"}}---- -Variable declaration and scope modifier +Déclaration de variables et modificateur de portée {{fbdoc item="syntax"}}## **Common** [[[KeyPgShared Shared]]] //symbolname//[()] [AS [[DataType DataType]]] [, ...] ## {{fbdoc item="desc"}} - Declares a variable which is shared between code modules. A matching ##**Common**## statement must appear in all other code modules using the variable. + Déclare une variable qui est partagée entre les modules de code. Une déclaration correspondante ##**Common**## doit apparaître dans tous les modules de code utilisant la variable. - The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub sub]]##s and ##[[KeyPgFunction function]]##s, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## statement. + Le paramètre facultatif ##**Shared**## rend la varable globale, ainsi il est utilisable dans ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]##, aussi bien qu'au niveau module. Les tableaux ##**Common**## sont toujours de longueur variable, et doivent être définis avec un paramètre de liste vide ##()##, et leurs dimensions fixées plus tard avec les déclarations ##[[KeyPgDim Dim]]## ou ##[[KeyPgRedim ReDim]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/common1.bas"}}%%(freebasic) @@ -35,14 +35,14 @@ Sub initme() foo(2) = foo(1)*2 End Sub %% -Output: +Affichage: %% 3.141592653589793 1.047197551196598 2.094395102393195 %% {{fbdoc item="diff"}} - - The arrays will be always variable-length. - - ##//blockname//## is not needed and must be removed because the order of declaration no longer matters, only the symbol names. + - Les tableaux doivent toujours être de longueur variable. + - ##//blockname//## n'est pas nécessaire et doit être retiré parce que l'ordre de la déclaration n'a plus d'importance, seuls les noms de symboles. {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/KeyPgCondBroadcast.wakka b/fbdocs/manual/cache/KeyPgCondBroadcast.wakka index 55d3052725..31f67c13d6 100644 --- a/fbdocs/manual/cache/KeyPgCondBroadcast.wakka +++ b/fbdocs/manual/cache/KeyPgCondBroadcast.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONDBROADCAST"}}---- -Restarts all threads ##[[KeyPgCondWait Condwait]]##ing for the handle +Redémarre toutes les "threads" attendant une condition pour un "handle" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Condbroadcast** ( [[KeyPgByval byval]] //handle// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,23 +9,23 @@ Restarts all threads ##[[KeyPgCondWait Condwait]]##ing for the handle ## {{fbdoc item="param"}} ##//handle//## - The handle of a conditional variable, or the null pointer (0) on failure. + Le "handle" d'une variable conditionnelle, ou le pointeur nul (0) en cas d'échec. {{fbdoc item="desc"}} - Once the conditional is ##[[KeyPgCondCreate Condcreate]]## and the threads are started, one of more of them can be set to ##[[KeyPgCondWait Condwait]]## for the conditional, they will be stopped until some other thread ##[[KeyPgCondSignal Condsignal]]##s that the waiting thread can restart. ##[[KeyPgCondBroadcast Condbroadcast]]## can be used to restart all threads waiting for the conditional. At the end of the program ##[[KeyPgCondDestroy Conddestroy]]## must be used to avoid leaking resources in the OS. + Dès que le conditionnel est ##[[KeyPgCondCreate CondCreate]]## et que les "threads" sont démarrés, l'un (ou plusieurs) d'entre eux peut être fixé à ##[[KeyPgCondWait CondWait]]## pour le conditionnel, ils seront arrêtés jusqu'à ce qu'un autre "thread" ##[[KeyPgCondSignal CondSignal]]## puisse être redémarré par le "thread" en attente. ##[[KeyPgCondBroadcast CondBroadcast]]## peut être utilisé pour redémarrer tous les "threads" attendant pour le conditionnel. A la fin du programme ##[[KeyPgCondDestroy CondDestroy]]## doit être utilisé pour éviter les fuites de ressources dans le système d'exploitation. {{fbdoc item="ex"}} See ##[[KeyPgCondCreate Condcreate]]## {{fbdoc item="target"}} - - **Condbroadcast** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. + - **Condbroadcast** n'est pas utilisable avec la version/cible DOS de FreeBASIC, parce que le "multithreading" n'est pas supporté par le noyau DOS, ni l'extension utilisée. + - Dans Linux les "threads" sont toujours démarrés dans l'ordre de leur création, ceci n'est pas possible sous Win32. Il s'agit de l'OS, pas une question FreeBasic. {{fbdoc item="lang"}} - - Threading is not allowed in //[[CompilerOptlang -lang qb]]// + - "Threading" n'est pas permis dans le dialecte //[[CompilerOptlang -lang qb]]// {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCondCreate Condcreate]]## diff --git a/fbdocs/manual/cache/KeyPgCondCreate.wakka b/fbdocs/manual/cache/KeyPgCondCreate.wakka index db0d650f1b..385c96a853 100644 --- a/fbdocs/manual/cache/KeyPgCondCreate.wakka +++ b/fbdocs/manual/cache/KeyPgCondCreate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONDCREATE"}}---- -Creates a conditional variable to be used in synchronizing threads +Crée une variable conditionnelle pour l'utiliser dans la synchronisation des "threads" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Condcreate** ( ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -7,11 +7,11 @@ Creates a conditional variable to be used in synchronizing threads {{fbdoc item="usage"}}## //result// = **Condcreate** ## -{{fbdoc item="ret"}} - A handle to a newly created conditional variable, or the null pointer (0) on failure. +{{fbdoc item="section" value="Valeur retournée + Un "handle" vers une nouvelle variable conditionnelle, ou le pointeur nul (0) en cas d'échec. {{fbdoc item="desc"}} - Once the conditional is ##**KeyPgCondCreate Condcreate**##d and the threads are started, one or more of them can be set to ##[[KeyPgCondWait Condwait]]## for the conditional, they will be stopped until some other thread ##[[KeyPgCondSignal Condsignal]]##s that the waiting thread can restart. ##[[KeyPgCondBroadcast Condbroadcast]]## can be used to restart all threads waiting for the conditional. At the end of the program ##[[KeyPgCondDestroy Conddestroy]]## must be used to avoid leaking resources in the OS. + Une fois que le conditionnel est ##[[KeyPgCondCreate CondCreate]]## et les "threads" démarrés, l'un (ou plusieurs) d'entre eux peut être fixé à ##[[KeyPgCondWait CondWait]]## pour le conditionnel, ils seront arrêtés jusqu'à un autre "thread" ##[[KeyPgCondSignal CondSignal]]## que le "thread" en attente puisse redémarrer. ##[[KeyPgCondBroadcast CondBroadcast]]## peut être utilisé pour redémarrer tous les "threads" qui attendent le conditionnel. A la fin du programme ##[[KeyPgCondDestroy CondDestroy]]## doit être utilisé pour éviter les fuites de ressources dans le système d'exploitation. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/threads/condcreate.bas"}}%%(freebasic) @@ -40,7 +40,7 @@ sub mythread(byval id_ptr as any ptr) '' wait for the start signal Mutexlock hmutexstart - do while start = 0 + Do While start = 0 Condwait hcondstart, hmutexstart loop @@ -102,13 +102,13 @@ conddestroy hcondstart %% {{fbdoc item="target"}} - - **Condcreate** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. + - **Condcreate** n'est pas utilisable avec la version/cible DOStarget de FreeBASIC, parce que le "multithreading" n'est pas supporté par le noyau DOS, ni l'extension utilisée. {{fbdoc item="lang"}} - - Threading is not allowed in //[[CompilerOptlang -lang qb]]// + - "Threading" n'est pas utilisable dans le dialecte //[[CompilerOptlang -lang qb]]// {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCondBroadcast Condbroadcast]]## diff --git a/fbdocs/manual/cache/KeyPgCondDestroy.wakka b/fbdocs/manual/cache/KeyPgCondDestroy.wakka index f40f82ccac..131a9204a5 100644 --- a/fbdocs/manual/cache/KeyPgCondDestroy.wakka +++ b/fbdocs/manual/cache/KeyPgCondDestroy.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONDDESTROY"}}---- -Destroys a multi-threading conditional variable when it is no more needed +Détruit une variable multi-threading conditionnelle quand elle n'est plus nécessaire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Conddestroy** ( [[KeyPgByval byval]] //handle// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,22 +9,22 @@ Destroys a multi-threading conditional variable when it is no more needed ## {{fbdoc item="param"}} ##//handle//## - The handle of a conditional variable to destroy. + Le "handle" d'une variable conditionnelle à détruire. {{fbdoc item="desc"}} - Once the conditional is ##[[KeyPgCondCreate Condcreate]]##d and the threads are started, one of more of them can be set to ##[[KeyPgCondWait Condwait]]## for the conditional, they will be stopped until some other thread ##[[KeyPgCondSignal Condsignal]]##s that the waiting thread can restart. ##[[KeyPgCondBroadcast Condbroadcast]]## can be used to restart all threads waiting for the conditional. At the end of the program ##[[KeyPgCondDestroy Conddestroy]]## must be used to avoid leaking resources in the OS. + Une fois que le conditionnel est ##[[KeyPgCondCreate CondCreate]]## et les "threads" démarrés, l'un (ou plusieurs) d'entre eux peut être fixé à ##[[KeyPgCondWait CondWait]]## pour le conditionnel, ils seront arrêtés jusqu'à un autre "thread" ##[[KeyPgCondSignal CondSignal]]## que le "thread" en attente puisse redémarrer. ##[[KeyPgCondBroadcast CondBroadcast]]## peut être utilisé pour redémarrer tous les "threads" qui attendent le conditionnel. A la fin du programme ##[[KeyPgCondDestroy CondDestroy]]## doit être utilisé pour éviter les fuites de ressources dans le système d'exploitation. {{fbdoc item="ex"}} - See ##[[KeyPgCondCreate Condcreate]]## + Voir ##[[KeyPgCondCreate CondCreate]]## {{fbdoc item="target"}} - - **Conddestroy** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. + - **Conddestroy** n'est pas utilisable avec la version/cible DOS de FreeBASIC, parce que le "multithreading" n'est pas supporté par le noyau DOS, ni l'extension utilisée. {{fbdoc item="lang"}} - - Threading is not allowed in //[[CompilerOptlang -lang qb]]// + - "Threading" n'est pas utilisable dans le dialecte //[[CompilerOptlang -lang qb]]// {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCondCreate Condcreate]]## diff --git a/fbdocs/manual/cache/KeyPgCondSignal.wakka b/fbdocs/manual/cache/KeyPgCondSignal.wakka index 558166f471..3c57b8d995 100644 --- a/fbdocs/manual/cache/KeyPgCondSignal.wakka +++ b/fbdocs/manual/cache/KeyPgCondSignal.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONDSIGNAL"}}---- -Restarts a thread suspended by a call to ##[[KeyPgCondWait Condwait]]## +Redémarre un "thread" suspendu par un appel à ##[[KeyPgCondWait CondWait]]## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Condsignal** ( [[KeyPgByval byval]] //handle// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -12,20 +12,20 @@ Restarts a thread suspended by a call to ##[[KeyPgCondWait Condwait]]## The handle of a conditional variable, or the null pointer (0) on failure. {{fbdoc item="desc"}} - Once the conditional is created with ##[[KeyPgCondCreate Condcreate]]## and the threads are started, one of more of them can be set to ##[[KeyPgCondWait Condwait]]## for the conditional, they will be stopped until some other thread ##[[KeyPgCondSignal Condsignal]]##s that the waiting thread can restart. ##[[KeyPgCondBroadcast Condbroadcast]]## can be used to restart all threads waiting for the conditional. At the end of the program ##[[KeyPgCondDestroy Conddestroy]]## must be used to avoid leaking resources in the OS. + Une fois que le conditionnel est ##[[KeyPgCondCreate CondCreate]]## et les "threads" démarrés, l'un (ou plusieurs) d'entre eux peut être fixé à ##[[KeyPgCondWait CondWait]]## pour le conditionnel, ils seront arrêtés jusqu'à un autre "thread" ##[[KeyPgCondSignal CondSignal]]## que le "thread" en attente puisse redémarrer. ##[[KeyPgCondBroadcast CondBroadcast]]## peut être utilisé pour redémarrer tous les "threads" qui attendent le conditionnel. A la fin du programme ##[[KeyPgCondDestroy CondDestroy]]## doit être utilisé pour éviter les fuites de ressources dans le système d'exploitation. {{fbdoc item="ex"}} - See ##[[KeyPgCondCreate Condcreate]]## + Voir ##[[KeyPgCondCreate CondCreate]]## {{fbdoc item="lang"}} - - Threading is not allowed in //[[CompilerOptlang -lang qb]]// + - "Threading" n'est pas utilisable dans le dialecte //[[CompilerOptlang -lang qb]]// {{fbdoc item="target"}} - - **Condsignal** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. + - **Condsignal** n'est pas utilisable avec la version/cible DOS de FreeBASIC, parce que le "multithreading" n'est pas supporté par le noyau DOS, ni l'extension utilisée. + - Sous Linux les "threads" sont toujours démarrés dans l'ordre de leur création, ceci n'est pas vrai sous Win32. C'est un OS, pas une question FreeBasic. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCondCreate Condcreate]]## diff --git a/fbdocs/manual/cache/KeyPgCondWait.wakka b/fbdocs/manual/cache/KeyPgCondWait.wakka index a72b1f2244..a6aa069b29 100644 --- a/fbdocs/manual/cache/KeyPgCondWait.wakka +++ b/fbdocs/manual/cache/KeyPgCondWait.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONDWAIT"}}---- -Stops execution of current thread until some condition becomes true +Arrête l'exécution du "thread" courant jusqu'à ce qu'une condition devienne vraie {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Condwait** ( [[KeyPgByval byval]] //handle// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //mutex// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,29 +9,29 @@ Stops execution of current thread until some condition becomes true ## {{fbdoc item="param"}} ##//handle//## - The handle of a conditional variable, or the null pointer (0) on failure. + Le "handle" d'une variable conditionnelle, ou le pointeur nul (0) en cas d'échec. ##//mutex//## - The mutex associated with this conditional variable, which must be locked when testing the condition and calling ##**Condwait**## + Le "mutex" associé à cette variable conditionnelle, qui doit être verrouillé lors de la vérification de la condition et l'appel à ##**CondWait**## {{fbdoc item="desc"}} - Function that stops the thread where it is called until some other thread ##[[KeyPgCondSignal Condsignal]]##s or ##[[KeyPgCondBroadcast Condbroadcast]]##s the handle. + Fonction qui arrête le "thread" où elle est appelée jusqu'à ce qu'un autre thread ou ##[[KeyPgCondSignal CondSignal]]##s ou ##[[KeyPgCondBroadcast CondBroadcast]]## le "handle". - Once the conditional variable is created with ##[[KeyPgCondCreate Condcreate]]## and the threads are started, one of more of them can be set to ##**Condwait**## for the conditional; they will be stopped until some other thread ##[[KeyPgCondSignal Condsignal]]##s that the waiting thread can restart. ##[[KeyPgCondBroadcast Condbroadcast]]## can be used to restart all threads waiting for the conditional. At the end of the program ##[[KeyPgCondDestroy Conddestroy]]## must be used to avoid leaking resources in the OS. + Une fois que le conditionnel est ##[[KeyPgCondCreate CondCreate]]## et les "threads" démarrés, l'un (ou plusieurs) d'entre eux peut être fixé à ##**CondWait**## pour le conditionnel, ils seront arrêtés jusqu'à un autre "thread" ##[[KeyPgCondSignal CondSignal]]## que le "thread" en attente puisse redémarrer. ##[[KeyPgCondBroadcast CondBroadcast]]## peut être utilisé pour redémarrer tous les "threads" qui attendent le conditionnel. A la fin du programme ##[[KeyPgCondDestroy CondDestroy]]## doit être utilisé pour éviter les fuites de ressources dans le système d'exploitation. - When calling ##**Condwait**##, ##//mutex//## should already be locked. An atomic unlock of the mutex and wait on the conditional variable will occur. When the condition variable becomes signaled, ##//mutex//## will be locked again and then execution will return to the thread after the ##**Condwait**## call. + A l'appel de ##**CondWait**##, ##//mutex//## doit toujours être verrouillé. Un déblocage "atomique" des mutex et une veille sur la variable conditionnelle auront lieu. Lorsque la variable de condition est signalée, ##//mutex//## est verrouillé à nouveau, puis l'exécution retournera au "thread" après l'appel de ##**CondWait**##. {{fbdoc item="ex"}} - See ##[[KeyPgCondCreate Condcreate]]## + Voir ##[[KeyPgCondCreate CondCreate]]## {{fbdoc item="target"}} - - **Condwait** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. + - **Condwait** n'est pas utilisable avec la version/cible DOS de FreeBASIC, parce que le "multithreading" n'est pas supporté par le noyau DOS, ni l'extension utilisée. + - Sous Linux les "threads" sont toujours démarrés dans l'ordre de leur création, ceci n'est pas vrai sous Win32. C'est une question d'OS, pas de FreeBasic. {{fbdoc item="lang"}} - - Threading is not allowed in //[[CompilerOptlang -lang qb]]// + - "Threading" n'est pas utilisable dans le dialecte //[[CompilerOptlang -lang qb]]// {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCondCreate Condcreate]]## diff --git a/fbdocs/manual/cache/KeyPgConst.wakka b/fbdocs/manual/cache/KeyPgConst.wakka index be7237af94..d3326b1198 100644 --- a/fbdocs/manual/cache/KeyPgConst.wakka +++ b/fbdocs/manual/cache/KeyPgConst.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="CONST"}}---- -Non-modifiable variable declaration. +Déclare une variable non-modifiable. {{fbdoc item="syntax"}}## **Const** //symbolname// [AS [[DataType DataType]]] = //value// [, ...] ## {{fbdoc item="desc"}} - Declares non-modifiable constant data that can be integer or decimal (floating-point) numbers or strings. The constant type will be inferred if //DataType// isn't explicitly given. + Déclare une donnée constante non-modifiable qui peut être un nombre entier ou décimal (à virgule flottante) ou une chaîne. Le type constante sera appliqué si //DataType// n'est pas donné explicitement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/variable/const.bas"}}%%(freebasic) @@ -21,7 +21,7 @@ end %% {{fbdoc item="diff"}} - - QB does not support the ##[[KeyPgAs as]]## ##[[DataType datatype]]## syntax. + - QB ne supporte pas la syntaxe ##[[KeyPgAs As]]## ##[[DataType datatype]]##. {{fbdoc item="see"}} - ##[[KeyPgPpdefine #Define]]## diff --git a/fbdocs/manual/cache/KeyPgConstMember.wakka b/fbdocs/manual/cache/KeyPgConstMember.wakka index 20c4df6163..6fd6540c2c 100644 --- a/fbdocs/manual/cache/KeyPgConstMember.wakka +++ b/fbdocs/manual/cache/KeyPgConstMember.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONST (Member)"}}---- -Specifies that a member procedure is read only. +Indique qu'un membre d'une procédure est en lecture seule. {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -8,16 +8,16 @@ Specifies that a member procedure is read only. ## {{fbdoc item="param"}} ##//typename//## - Name of a user defined data type. + Nom d'un type de donnée défini par l'utilisateur. ##//membertype//## - ##[[KeyPgMemberSub Sub]]## or ##[[KeyPgMemberFunction Function]]##. + ##[[KeyPgMemberSub Sub]]## ou ##[[KeyPgMemberFunction Function]]##. ##//membername// ...## - Name of the member to declare or define with parameter list or return value following. + Nom du membre à déclarer ou définir avec liste de paramètres ou valeur de retour. {{fbdoc item="desc"}} - Specifies that the ##//membertype//## immediately to the right of the ##**Const**## qualifier is to be considered as read only. Read-only (##**Const**##) declarations are a measure of type safety that can be read as 'promises not to change.' The compiler uses the const declarations to check operations on variables and parameters and generate an error at compile time if their data could potentially change. There is no runtime overhead for using ##**Const**## qualifiers since all of the checks are made at compile time. + Indique que le ##//membertype//## immédiatement à la droite du qualificateur ##**Const**## doit être considéré comme étant en lecture seule. Les déclarations "En-lecture-seule" (Read-only) (##**Const**##) sont une mesure de sécurité qui peut être comprise comme "promesse d'aucun changement". Le compilateur utilise les déclarations ##**Const**## pour vérifier les opérations sur les variables et paramètres et générer une erreur lors de la compilation si leurs données pourraient changer. Il n'y a pas de temps perdu d'exécution en utilisant les qualificateurs ##**Const**## puisque tous les contrôles sont effectués au moment de la compilation. - ##**Const**##, when used preceding ##//membertype//## at the beginning of a declaration indicates that the hidden ##[[KeyPgThis This]]## parameter is considered read-only. The declaration can be read as 'invoking ##//membertype//## promises not to change ##//typename//##', and the compiler will error if the member procedure tries to change any of the data fields, or calls a non-const member procedure. Member procedures can not be both ##**Const**## and ##[[KeyPgStaticMember Static]]## since static member procedures do not have a hidden ##[[KeyPgThis This]]## parameter. + ##**Const**##, lorsqu'il est utilisé précédant ##//membertype//## au début d'une déclaration indique que le paramètre caché ##[[KeyPgThis This]]## est considéré comme en lecture seule. La déclaration peut être lue comme l'invocation de la promesse que ##//membertype//## ne changera pas de ##//typename//##, et le compilateur affichera une erreur si le membre de la procédure essaye de changer un champ de données, ou appelle un membre non-##**Const**## de procédure. Les membres de procédures ne peuvent être à la fois ##**Const**## et ##[[KeyPgStaticMember Static]]## car les membres statiques de procédures n'ont pas de paramètre ##[[KeyPgThis This]]## caché. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/const-proc.bas"}}%%(freebasic) @@ -77,11 +77,11 @@ end sub %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgConst Const]]## - - ##[[KeyPgConstQualifier Const (Qualifier)]]## + - ##[[KeyPgConstQualifier Const (Qualificateur)]]## - ##[[KeyPgDim Dim]]## - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgConstQualifier.wakka b/fbdocs/manual/cache/KeyPgConstQualifier.wakka index a43eb91179..7e79c27c5e 100644 --- a/fbdocs/manual/cache/KeyPgConstQualifier.wakka +++ b/fbdocs/manual/cache/KeyPgConstQualifier.wakka @@ -1,27 +1,27 @@ {{fbdoc item="title" value="CONST (Qualifier)"}}---- -Specifies that a data type or pointer data type is read only. +Indique que le type de données ou un pointeur de type de données est en lecture seule. {{fbdoc item="syntax"}}## ... [[KeyPgAs as]] [**Const**] //[[DataType datatype]]// [ [**Const**] [[KeyPgPtr ptr]] ... ] ## {{fbdoc item="param"}} ##//datatype//## - Name of a standard or user defined data type. + Nom d'un type de données standard ou d'un type de données défini par l'utilisateur. {{fbdoc item="desc"}} - Specifies that the ##//datatype//## or ##[[KeyPgPtr ptr]]## immediately to the right of the ##**Const**## qualifier is to be considered as read only. Read-only (##**Const**##) declarations are a measure of type safety that can be read as 'promises not to change.' The compiler uses the const declarations to check operations on variables and parameters and generate an error at compile time if their data could potentially change. There is no runtime overhead for using ##**Const**## qualifiers since all of the checks are made at compile time. + Indique que le ##//datatype (= type de données)//## ou ##[[KeyPgPtr Ptr]]## immédiatement à la droite du qualificateur ##**Const**## doit être considéré comme étant en lecture seule. Les déclarations en lecture seule (##**Const**##) sont une mesure de sécurité de type qui peut être comprise comme "//promesse de ne pas changer//". Le compilateur utilise les déclarations ##**Const**## pour vérifier les opérations sur les variables et paramètres et générer une erreur lors de la compilation si leurs données pourraient changer. Il n'y a pas d'annulation d'exécution pour l'utilisation du qualificateur ##**Const**## puisque tous les contrôles sont effectués au moment de la compilation. - ##**Const**## can be used anywhere data type declarations are made. This includes variables, parameters, function return results, user defined type fields, type aliases, and casting. The ##//datatype//## can be any built-in standard data type or user defined type. + ##**Const**## peut être utilisé partout où des déclarations de type de données sont présentes. Cela inclut les variables, les paramètres, les résultats de retour de fonction, des champs de type défini par l'utilisateur, alias de type et ##//casting//##. Le ##//datatype (= type de données)//## peut être n'importe quel type intégré de données standard ou de type défini par l'utilisateur. - Read-only variables must have an initializer since modifying a read-only variable through an assignment will generate a compiler error. The initializer may appear after the declaration of the variable. + Les variables en lecture seule doivent avoir un initialisateur sinon la modification d'une variable en lecture seule par le biais d'une allocation générera une erreur de compilation. L'initialisation peut apparaître après la déclaration de la variable. - Both non-const and const variables may be passed to a procedure expecting a const parameter. However, a const variable may not be passed to a procedure taking a non-const parameter, and will generate a compile error. + Des variables ##**Const**## et non-##**Const**## peuvent être transmises à une procédure qui attend un paramètre ##**Const**##. Toutefois, une variable ##**Const**## ne peut pas être passée à une procédure exigeant un paramètre non-##**Const**##, cela générera une erreur de compilation. - Procedures can be overloaded based on the const-ness of parameters. For example a procedure can be overloaded where one version of the procedure takes a ##'byref foo as bar'## parameter and another version of the procedure takes a ##'byref foo as const bar'## parameter. + Les procédures peuvent être surchargées sur la base ##**Const**## des paramètres. Par exemple, une procédure peut être surchargée, une version de la procédure ayant un paramètre '##//foo byref as bar//##' et l'autre version de la procédure ayant un paramètre '##//foo bar byref as const//##'. - With pointer declarations, ##**Const**## can be used to indicate which part of the pointer declaration is read-only (all other parts are by default read-write). The read-only portion of the pointer data type could be the pointer itself (the address), what the pointer points to (the data), or both. In a declaration with more than one level of ##[[KeyPgPtr Ptr]]## indirection, the right most ##[[KeyPgPtr Ptr]]## indicates the highest order level of indirection and is therefore dereferenced first. + Avec une déclaration de pointeur, ##**Const**## peut être utilisé pour indiquer quelle partie de la déclaration de pointeur est en lecture seule (toutes les autres parties sont par défaut en lecture-écriture). L'élément en lecture seule du type de pointeur de données peut être le pointeur lui-même (l'adresse), ce que le pointeur pointe (les données), ou les deux. Dans une déclaration avec plus d'un niveau d'indirection de ##[[KeyPgPtr Ptr]]##, le ##[[KeyPgPtr Ptr]]## le plus à droite indique le niveau le plus élevé d'indirection et est donc déréférencé en premier. - The compiler has an internal hard-limit of eight (8) levels of pointer indirection with respect to const qualifiers and the behavior of using ##**Const**## with ##[[KeyPgPtr Ptr]]## data types having greater than eight (8) levels of indirection is undefined. + Le compilateur a une limite '##//hard//##' interne de huit (8) niveaux d'indirection pointeur en ce qui concerne les qualificateurs ##**Const**## et le comportement de ##**Const**## avec l'utilisation des types de données ##[[KeyPgPtr Ptr]]## ayant plus de huit (8) niveaux d'indirection est indéfini. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/const-var.bas"}}%%(freebasic) @@ -143,7 +143,7 @@ foo( y ) '' called 'foo( byref n as const integer )' %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgConst Const]]## diff --git a/fbdocs/manual/cache/KeyPgConstructor.wakka b/fbdocs/manual/cache/KeyPgConstructor.wakka index 69e4c62f96..26f8d0ea1b 100644 --- a/fbdocs/manual/cache/KeyPgConstructor.wakka +++ b/fbdocs/manual/cache/KeyPgConstructor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONSTRUCTOR"}}---- -Called automatically when a class or user defined type is created +Appelé automatiquement lorsqu'une classe ou un type défini par l'utilisateur est créé {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -13,23 +13,23 @@ Called automatically when a class or user defined type is created ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## of ##[[KeyPgClass Class]]## + nom du ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## {{fbdoc item="desc"}} - ##**Constructor**## methods are called when a user defined ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## variable is created. + Les méthodes ##**Constructor**## sont appelées lorsqu'un ##[[KeyPgType Type]]## défini par l'utilisateur ou une variable de ##[[KeyPgClass Class]]## est créé. - ##//typename//## is the name of the type for which the ##**Constructor**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace Namespace]]##. + ##//typename//## est le nom du type pour lequel la méthode ##**Constructor**## est déclarée et définie. La résolution de noms pour ##//typename//## suit les mêmes règles que les procédures en cas d'utilisation dans un ##[[KeyPgNamespace espace de noms]]##. - More than one constructor may exist for a type or class. The exact constructor method called depends on the ##//parameter//## signature matched when the variable is initialized. More than one ##//parameter//## may exist in a constructor method declaration. + Plus d'un constructeur peut exister pour un type ou une classe. La méthode constructeur exacte appelée dépend de la signature ##//parameter//## correspondant quand la variable est initialisée. Plus d'un ##//parameter//## peut exister dans la déclaration de la méthode ##**Constructor**##. - A constructor method is passed a hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//##. ##[[KeyPgThis this]]## is optionally used to access the fields of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## which is to be initialized in the ##**Constructor**## method. + Une méthode constructeur est passée à un paramètre ##[[KeyPgThis This]]## caché qui est du même type que ##//typename//##. ##[[KeyPgThis This]]## est éventuellement utilisé pour accéder aux champs du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## qui a été initialisé dans la méthode ##**Constructor**##. - Chaining of constructors in nested types is supported. Any fields that have their own default constructor are called first. + Le chaînage des constructeurs dans les types imbriqués est pris en charge. Tous les champs qui ont leur propre constructeur par défaut sont appelés en premier. - Constructors are called when declaring global or local static instances of ##//typename//## and when allocating ##//typename//## dynamically using the ##[[KeyPgOpNew New]]## operator. + Les constructeurs sont appelés lors de la déclaration d'instances statiques globales ou locales de ##//typename//## et lors de l'allocation dynamique de ##//typename//## en utilisant l'opérateur ##[[KeyPgOpNew New]]##. {{fbdoc item="ex"}} -Simple constructor example for beginners. +Exemple de constructeur simple pour débutants. {{fbdoc item="filename" value="examples/manual/udt/constructor-ptr.bas"}}%%(freebasic) Type MyObj Foo As Integer Ptr @@ -76,7 +76,7 @@ End Scope '' Because our objects are being deleted. Sleep %% -More advanced construction example, showing constructor overloading among other things. +Exemple de construction plus avancée, montrant une surcharge constructeur entre autres choses. {{fbdoc item="filename" value="examples/manual/udt/constructor.bas"}}%%(freebasic) type sample @@ -119,7 +119,7 @@ constructor sample ( a as string, b as byte ) this._text = str(a) + "," + str(b) end constructor -operator sample.cast () as string +TheOperator sample.cast () As String return this._text end operator @@ -142,10 +142,10 @@ print " x3 = "; x3 print " x4 = "; x4 %% {{fbdoc item="lang"}} - - Object-related features are supported only in the //[[CompilerOptlang -lang fb]]// option + - Les caractéristiques liées à l'objet sont prises en charge uniquement dans le dialecte //[[CompilerOptlang -lang fb]]// {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Class]]## diff --git a/fbdocs/manual/cache/KeyPgContinue.wakka b/fbdocs/manual/cache/KeyPgContinue.wakka index fc5fbb369c..886ba87db4 100644 --- a/fbdocs/manual/cache/KeyPgContinue.wakka +++ b/fbdocs/manual/cache/KeyPgContinue.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="CONTINUE"}}---- -Control flow statement to continue next iteration of a loop +Déclaration de contrôle de flux pour poursuivre avec l'itération suivante d'une boucle {{fbdoc item="syntax"}}## **Continue** {[[KeyPgDoloop do]] | [[KeyPgFornext for]] | [[KeyPgWhilewend while]]} ## {{fbdoc item="desc"}} - Skips all code until the end clause of a loop structure, i.e. ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, or a ##[[KeyPgWhilewend While...Wend]]## block, then executes the limit condition check. In the case of a ##[[KeyPgFornext For...Next]]##, the variable is incremented according to the ##[[KeyPgStep Step]]## specified. + Saute tout le code jusqu'à la clause de fin d'une structure de boucle, c'est à dire un bloc ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ou ##[[KeyPgWhilewend While...Wend]]##, puis exécute la vérification de l'état de la limite. Dans le cas d'une boucle ##[[KeyPgFornext For...Next]]##, la variable est incrémentée selon la valeur de ##[[KeyPgStep Step]]##. - Where there are multiple ##[[KeyPgDoloop Do]]## / ##[[KeyPgFornext For]]## / ##[[KeyPgWhilewend While]]## blocks nested, it will continue on the innermost block of that type, i.e. the last one entered. You can continue an earlier block of that type by giving the word multiple times, separated by commas. e.g. ##**continue while, while**## + Lorsqu'il y a plusieurs blocs ##[[KeyPgDoloop Do]]## / ##[[KeyPgFornext For]]## / ##[[KeyPgWhilewend While]]## imbriqués, cela continuera sur le bloc de ce type le plus intérieur, à savoir le dernier entré. Vous pouvez continuer un bloc précédent de ce type en donnant à la suite plusieurs mots, séparés par des virgules. Par exemple, ##**continue while, while**## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/continue.bas"}}%%(freebasic) @@ -52,10 +52,10 @@ Next n %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Continue""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Continue**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgExit Exit]]## diff --git a/fbdocs/manual/cache/KeyPgCos.wakka b/fbdocs/manual/cache/KeyPgCos.wakka index ee9cb1f2aa..8c1365f1fa 100644 --- a/fbdocs/manual/cache/KeyPgCos.wakka +++ b/fbdocs/manual/cache/KeyPgCos.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="COS"}}---- -Returns the cosine of a number +Retourne le cosinus d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cos** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Returns the cosine of a number ## {{fbdoc item="param"}} ##//number//## - the angle (in radians) + l'angle (en radians) -{{fbdoc item="ret"}} - Returns the cosine of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of -1 to 1. +{{fbdoc item="section" value="Valeur retournée + Renvoie le cosinus de l'argument ##//number//## comme un ##[[KeyPgDouble Double]]## dans l'intervalle de -1 à 1. {{fbdoc item="desc"}} - The argument ##//number//## is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). The required ##//number//## argument can be any valid numeric expression. + L'argument ##//number//## est mesuré [[TutMathAngles radians]] (non en [[TutMathAngles degrés]]). L'argument obligatoire ##//number//## peut être n'importe quelle expression numérique valide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/cos.bas"}}%%(freebasic) @@ -23,22 +23,22 @@ CONST PI AS DOUBLE = 3.1415926535897932 DIM a AS DOUBLE DIM r AS DOUBLE INPUT "Please enter an angle in degrees: ", a -r = a * PI / 180 'Convert the degrees to Radians +r = a * PI / 180 'Convert the degrees to Radians PRINT "" PRINT "The cosine of a" ; a; " degree angle is"; COS ( r ) SLEEP %% -Output: +Affiche: %% Please enter an angle in degrees: 30 The cosine of a 30 degree angle Is 0.8660254037844387 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgAcos Acos]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgCptr.wakka b/fbdocs/manual/cache/KeyPgCptr.wakka index 3ced745111..a40c962269 100644 --- a/fbdocs/manual/cache/KeyPgCptr.wakka +++ b/fbdocs/manual/cache/KeyPgCptr.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="CPTR"}}---- -Converts a pointer expression to a specified data type pointer +Convertit une expression pointeur en pointeur de type de données spécifié {{fbdoc item="syntax"}}## - **Cptr**( //""PointerDataType""//, //expression// ) + **CPtr**( //PointerDataType//, //expression// ) ## {{fbdoc item="desc"}} - Converts ##//expression//## to ##//""PointerDataType""//##. + Convertit ##//expression//## vers ##//PointerDataType//##. - ##//""PointerDataType""//## must be a ##[[KeyPgPointer Pointer]]## type (e.g. a [[DataType]] ##[[KeyPgPtr Ptr]]## or an ##[[KeyPgAny Any]]## ##[[KeyPgPtr Ptr]]##), or a ##[[KeyPgTypeAlias Type (Alias)]]## to one. - ##//expression//## may have a different pointer type or be an ##[[KeyPgInteger Integer]]##. + ##//PointerDataType//## doit être un ##[[KeyPgPointer Pointer]]## vers un type de données (par exemple, un type de données ##[[KeyPgPtr Ptr]]## ou un ##[[KeyPgAny Any]]## ##[[KeyPgPtr Ptr]]##), ou un ##[[KeyPgTypeAlias Type (Alias)]]##. + ##//expression//## peut avoir un autre type de pointeur ou être un ##[[KeyPgInteger Integer]]##. -~&//Note: Currently, FB does not actually enforce that ##//""PointerDataType""//## must be a pointer. This will likely change in future versions though. Currently, it will display a warning if you try to convert to a non-pointer, if you compile with the ##**[[CompilerOptw -w pedantic]]**## compiler switch.// +//Note: Actuellement, FB n'impose pas effectivement que ##//PointerDataType//## soit un pointeur. Cela changera probablement dans les futures versions. À l'heure actuelle, il affichera un avertissement si vous tentez de convertir vers un non-pointeur, si vous compilez avec le commutateur de compilateur ##**[[CompilerOptw -w pedantic]]**##.// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cptr.bas"}}%%(freebasic) @@ -23,10 +23,10 @@ print *cptr( byte ptr, intptr ), *intptr %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cptr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cptr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPtr Ptr]]## diff --git a/fbdocs/manual/cache/KeyPgCshort.wakka b/fbdocs/manual/cache/KeyPgCshort.wakka index 96e2e22ff1..89cdaaea32 100644 --- a/fbdocs/manual/cache/KeyPgCshort.wakka +++ b/fbdocs/manual/cache/KeyPgCshort.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CSHORT"}}---- -Converts numeric or string expression to an integer (##[[KeyPgShort Short]]##) +Convertit une expression numérique ou une chaîne en nombre entier (##[[KeyPgShort Short]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cshort** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgShort short]] @@ -15,19 +15,19 @@ Converts numeric or string expression to an integer (##[[KeyPgShort Short]]##) ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgShort Short]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgShort Short]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgShort Short]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgShort Short]]##. {{fbdoc item="desc"}} - The ##**Cshort**## function rounds off the decimal part and returns a 16 bit ##[[KeyPgShort Short]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger then -32768 to 32767. The name can be explained as 'Convert to Short'. + La fonction ##**CShort**## arrondit la partie entière et retourne une valeur ##[[KeyPgShort Short]]## 16 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à -32768 ou supérieure à 32767. Le nom vient de 'Convert to Short'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValint Valint]]##. + Si l'argument est une expression de chaîne, il est converti en numérique à l'aide de ##[[KeyPgValint ValInt]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cshort.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cshort""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cshort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCsign.wakka b/fbdocs/manual/cache/KeyPgCsign.wakka index 06de1ed40f..a4c0d229e4 100644 --- a/fbdocs/manual/cache/KeyPgCsign.wakka +++ b/fbdocs/manual/cache/KeyPgCsign.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CSIGN"}}---- -Converts an expression to signed +Convertit une expression en une valeur signée {{fbdoc item="syntax"}}## **Csign** ( //expression// ) @@ -8,9 +8,9 @@ Converts an expression to signed //variable// = **Csign** ( //expression// ) ## {{fbdoc item="desc"}} - Converts an unsigned ##//expression//## to a signed one, useful to force signed behavior of division or multiplication (including with ##[[KeyPgOpShiftLeft Shl]]## and ##[[KeyPgOpShiftRight Shr]]##). + Convertit une ##//expression//## non-signée en une expression signée, utile pour forcer le comportement signé de la division ou de la multiplication (y compris avec ##[[KeyPgOpShiftLeft Shl]]## et ##[[KeyPgOpShiftRight Shr]]##). - This is the opposite of ##[[KeyPgCunsg Cunsg]]##. + C'est l'opposé de ##[[KeyPgCunsg CUnsg]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/csign.bas"}}%%(freebasic) @@ -19,10 +19,10 @@ print csign(value) '' will print -1 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Csign""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Csign**##. -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +{{fbdoc item="see"}} + - ##[[KeyPgCunsg CUnsg]]## {{fbdoc item="see"}} - ##[[KeyPgCunsg Cunsg]]## diff --git a/fbdocs/manual/cache/KeyPgCsng.wakka b/fbdocs/manual/cache/KeyPgCsng.wakka index 11ef649399..8d58429e34 100644 --- a/fbdocs/manual/cache/KeyPgCsng.wakka +++ b/fbdocs/manual/cache/KeyPgCsng.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CSNG"}}---- -Converts numeric or string expression to ##[[KeyPgSingle Single]]## precision floating point +Convertit une expression numérique ou une chaîne vers un nombre ##[[KeyPgSingle Single]]## précision à virgule flottante. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Csng** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgSingle single]] @@ -15,19 +15,19 @@ Converts numeric or string expression to ##[[KeyPgSingle Single]]## precision fl ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgSingle Single]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgSingle Single]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgSingle Single]]## precision value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgSingle Single]]## précision. {{fbdoc item="desc"}} - The ##**Csng**## function returns a 32-bit ##[[KeyPgSingle Single]]## value. The function does not check for an overflow, so be sure not to pass a value outside the representable range of the ##[[KeyPgSingle Single]]## data type. The name can be explained as 'Convert to ""SiNGle""'. + La fonction ##**CSng**## retourne une valeur ##[[KeyPgSingle Single]]## 32 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous qu'elle ne soit pas en dehors de la plage valide du type de données ##[[KeyPgSingle Single]]##. Le nom vient de 'Convert to SiNGle'. - If the argument to ##**Csng**## is a string expression, it is first converted to numeric by using ##[[KeyPgVal Val]]##. + Si l'argument de ##**CSng**## est une expression chaîne, elle sera convertie en numérique avec ##[[KeyPgVal Val]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/csng.bas"}}%%(freebasic) @@ -45,7 +45,7 @@ SLEEP %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCsrlin.wakka b/fbdocs/manual/cache/KeyPgCsrlin.wakka index 7dd4473ec0..6eb40faff4 100644 --- a/fbdocs/manual/cache/KeyPgCsrlin.wakka +++ b/fbdocs/manual/cache/KeyPgCsrlin.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CSRLIN"}}---- -Returns the row position of the cursor +Retourne la position-ligne du curseur {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Csrlin** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,11 +7,11 @@ Returns the row position of the cursor {{fbdoc item="usage"}}## //result// = **Csrlin** ## -{{fbdoc item="ret"}} - An ##[[KeyPgInteger integer]]## specifying the current row of the cursor. +{{fbdoc item="section" value="Valeur retournée + Un ##[[KeyPgInteger Integer (entier)]]## spécifiant la ligne courante du curseur. {{fbdoc item="desc"}} - Returns the current row the cursor is on (i.e. the "**c**ur**s**o**r** **lin**e"). The topmost row is number ##1##. + Retourne la ligne courante où se trouve le curseur (c'est à dire **"la ligne curseur"**). La première ligne en haut a le numéro ##1##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/csrlin.bas"}}%%(freebasic) @@ -19,7 +19,7 @@ print "The cursor is on row:"; CSRLIN %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgLocate Locate]]## diff --git a/fbdocs/manual/cache/KeyPgCubyte.wakka b/fbdocs/manual/cache/KeyPgCubyte.wakka index 83ad2d064b..e5e01d7d99 100644 --- a/fbdocs/manual/cache/KeyPgCubyte.wakka +++ b/fbdocs/manual/cache/KeyPgCubyte.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CUBYTE"}}---- -Converts numeric or string expression to an unsigned byte (##[[KeyPgUbyte Ubyte]]##) +Convertit une expression numérique ou une chaîne vers un octet non-signé (##[[KeyPgUbyte UByte]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cubyte** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]] @@ -15,19 +15,19 @@ Converts numeric or string expression to an unsigned byte (##[[KeyPgUbyte Ubyte] ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgUbyte Ubyte]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgUbyte UByte]]## ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgUbyte Ubyte]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgUbyte UByte]]##. {{fbdoc item="desc"}} - The ##**Cubyte**## function rounds off the decimal part and returns a 8 bit ##[[KeyPgUbyte Ubyte]]## value. The function does not check for an overflow, so be sure not to pass a value thats less/larger then 0 to 255. The name can be explained as 'Convert to Unsigned Byte'. + La fonction ##**CUByte**## arrondit la partie entière et retourne une valeur ##[[KeyPgUbyte UByte]]## 8 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à 0 / supérieure à 255. Le nom peut être expliqué par 'Convert to Unsigned Byte'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValuint Valuint]]##. + Si l'argument est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValuint ValUInt]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cubyte.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cubyte""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cubyte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCuint.wakka b/fbdocs/manual/cache/KeyPgCuint.wakka index 94e3d13935..3bd3f91798 100644 --- a/fbdocs/manual/cache/KeyPgCuint.wakka +++ b/fbdocs/manual/cache/KeyPgCuint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CUINT"}}---- -Converts numeric or string expression to an unsigned integer (##[[KeyPgUinteger Uinteger]]##) +Convertit une expression numérique ou une chaîne en nombre entier non-signé (##[[KeyPgUinteger UInteger]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cuint** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]] @@ -15,19 +15,19 @@ Converts numeric or string expression to an unsigned integer (##[[KeyPgUinteger ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgUinteger Uinteger]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgByte UInteger]]##. ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgUinteger Uinteger]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgUinteger UInteger]]##. {{fbdoc item="desc"}} - The ##**Cuint**## function rounds off the decimal part and returns a 32 bit ##[[KeyPgUinteger Uinteger]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger then 0 to 4 294 967 296. The name can be explained as 'Convert to Unsigned INTeger'. + La fonction ##**CUInt**## arrondit la partie entière et retourne une valeur ##[[KeyPgUinteger UInteger]]## 32 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à 0 / supérieure à 4 294 967 296. Le nom peut être expliqué par 'Convert to Unsigned INTeger'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValuint Valuint]]##. + Si l'argument est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValuint ValUInt]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cuint.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cuint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cuint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCulng.wakka b/fbdocs/manual/cache/KeyPgCulng.wakka index 06c6da6d78..80c396608b 100644 --- a/fbdocs/manual/cache/KeyPgCulng.wakka +++ b/fbdocs/manual/cache/KeyPgCulng.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CULNG"}}---- -Converts numeric or string expression to ##[[KeyPgUlong Ulong]]## having the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## +Convertit une expression numérique ou une chaîne en ##[[KeyPgUlong Ulong]]## ayant la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Culng** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgUlong ulong]] @@ -15,21 +15,21 @@ Converts numeric or string expression to ##[[KeyPgUlong Ulong]]## having the sam ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgUlong Ulong]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgByte Ulong]]##. ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgUlong Ulong]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgUlong Ulong]]##. {{fbdoc item="desc"}} - The ##**Culng**## function rounds off the decimal part and returns a 32 bit ##[[KeyPgUinteger Uinteger]]## or 64 bit ##[[KeyPgUlongint Ulongint]]## value. The function does not check for an overflow. The name can be explained as 'Convert to Unsigned ""LoNG""'. + La fonction ##**CULng**## arrondit la partie entière et retourne une valeur ##[[KeyPgUinteger UInteger]]## 32 bits ou ##[[KeyPgUlongint ULongInt]]## 64 bits. La fonction ne vérifie pas s'il y a un dépassement. Le nom peut être expliqué par 'Convert to Unsigned LoNG'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValuint Valuint]]## or ##[[KeyPgValulng Valulng]]##. + Si l'argument est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValuint ValUInt]]## or ##[[KeyPgValulng ValULng]]##. - ##[[KeyPgUlong Ulong]]## has the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. + ##[[KeyPgUlong Ulong]]## a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/culng.bas"}}%%(freebasic) @@ -47,10 +47,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Culng""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Culng**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCulngint.wakka b/fbdocs/manual/cache/KeyPgCulngint.wakka index fd30faa545..5f298ebb96 100644 --- a/fbdocs/manual/cache/KeyPgCulngint.wakka +++ b/fbdocs/manual/cache/KeyPgCulngint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CULNGINT"}}---- -Converts numeric or string expression to 64-bit unsigned integer (##[[KeyPgUlongint Ulongint]]##) +Convertit une expression numérique ou une chaîne en nombre entier non-signé 64 bits (##[[KeyPgUlongint ULongInt]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Culngint** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]] @@ -15,19 +15,19 @@ Converts numeric or string expression to 64-bit unsigned integer (##[[KeyPgUlong ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgUlongint Ulongint]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgByte ULongInt]]##. ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgUlongint Ulongint]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgUlongint ULongInt]]##. {{fbdoc item="desc"}} - The ##**Culngint**## function rounds off the decimal part and returns a 64 bit ##[[KeyPgUlongint Ulongint]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger than 0 to 18 446 744 073 709 551 615. The name can be explained as 'Convert to Unsigned ""LoNG INTeger""'. + La fonction ##**CULngInt**## arrondit la partie entière et retourne une valeur ##[[KeyPgUlongint ULongInt]]## 64 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à 0 / supérieure à 18 446 744 073 709 551 615. Le nom peut être expliqué par 'Convert to Unsigned LoNG INTeger'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValulng Valulng]]##. + Si l'argument est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValulng ValULng]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/culngint.bas"}}%%(freebasic) @@ -45,10 +45,10 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Culngint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Culngint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCunsg.wakka b/fbdocs/manual/cache/KeyPgCunsg.wakka index 14e5ed096c..800f932421 100644 --- a/fbdocs/manual/cache/KeyPgCunsg.wakka +++ b/fbdocs/manual/cache/KeyPgCunsg.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CUNSG"}}---- -Converts an expression to unsigned +Convertit une expression en valeur non-signée {{fbdoc item="syntax"}}## **Cunsg** ( //expression// ) @@ -7,9 +7,9 @@ Converts an expression to unsigned {{fbdoc item="usage"}}## //variable// = **Cunsg** ( //expression// ) ## - Converts a signed ##//expression//## to an unsigned one, useful to force unsigned behavior of division or multiplication (including with ##[[KeyPgOpShiftLeft Shl]]## and ##[[KeyPgOpShiftRight Shr]]##). + Convertit une ##//expression//## signée en une expression non-signée, utile pour forcer le comportement signé de la division ou la multiplication (y compris avec ##[[KeyPgOpShiftLeft Shl]]## et ##[[KeyPgOpShiftRight Shr]]##). - This is the opposite of ##[[KeyPgCsign Csign]]##. + C'est l'opposé de ##[[KeyPgCsign CSign]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cunsg.bas"}}%%(freebasic) @@ -17,10 +17,10 @@ dim value as short = -1 print cunsg(value) '' will print 65535 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cunsg""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cunsg**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCsign Csign]]## diff --git a/fbdocs/manual/cache/KeyPgCurdir.wakka b/fbdocs/manual/cache/KeyPgCurdir.wakka index d3a3442248..bf8426a1ee 100644 --- a/fbdocs/manual/cache/KeyPgCurdir.wakka +++ b/fbdocs/manual/cache/KeyPgCurdir.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CURDIR"}}---- -Returns the current directory/folder +Retourne le répertoire/dossier actuel {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Curdir** ( ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,23 +7,23 @@ Returns the current directory/folder {{fbdoc item="usage"}}## //result// = **Curdir** ## -{{fbdoc item="ret"}} - A ##[[KeyPgString string]]## which is set to the name of the current directory/folder. +{{fbdoc item="section" value="Valeur retournée + Une chaîne (##[[KeyPgString String]]##) qui contient le nom du répertoire/dossier actuel. {{fbdoc item="desc"}} - Returns the current directory/folder. + Retourne le nom du répertoire/dossier actuel. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/curdir.bas"}}%%(freebasic) print curdir %% - output will vary. + L'affichage peut varier. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Curdir""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Curdir**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgCushort.wakka b/fbdocs/manual/cache/KeyPgCushort.wakka index 1cb0d6cb00..206128702a 100644 --- a/fbdocs/manual/cache/KeyPgCushort.wakka +++ b/fbdocs/manual/cache/KeyPgCushort.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CUSHORT"}}---- -Converts numeric or string expression to an unsigned integer (##[[KeyPgUshort Ushort]]##) +Convertit une expression numérique ou une chaîne en nombre entier non-signé (##[[KeyPgUshort UShort]]##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cushort** ( [[KeyPgByval byval]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[KeyPgUshort ushort]] @@ -15,19 +15,19 @@ Converts numeric or string expression to an unsigned integer (##[[KeyPgUshort Us ## {{fbdoc item="param"}} ##//expression//## - a numeric, string, or pointer expression to cast to a ##[[KeyPgUshort Ushort]]## value + Une expression numérique, chaîne ou pointeur à transformer (cast) en valeur ##[[KeyPgByte UShort]]##. ##//datatype//## - any numeric, string, or pointer data type + Tout type de données numérique, chaîne ou pointeur. ##//typename//## - a user defined type + Un type défini par l'utilisateur. -{{fbdoc item="ret"}} - A ##[[KeyPgUshort Ushort]]## value. +{{fbdoc item="section" value="Valeur retournée + Une valeur ##[[KeyPgUshort UShort]]##. {{fbdoc item="desc"}} - The ##**Cushort**## function rounds off the decimal part and returns a 16 bit ##[[KeyPgUshort Ushort]]## value. The function does not check for an overflow, so be sure not to pas a value thats less/larger then 0 to 65535. The name can be explained as 'Convert to Unsigned Short'. + La fonction ##**CUShort**## arrondit la partie entière et retourne une valeur ##[[KeyPgUshort UShort]]## 16 bits. La fonction ne vérifie pas s'il y a un dépassement, alors assurez-vous de ne pas avoir une valeur inférieure à 0 / supérieure à 65535. Le nom peut être expliqué par 'Convert to Unsigned Short'. - If the argument is a string expression, it is converted to numeric by using ##[[KeyPgValuint Valuint]]##. + Si l'argument est une expression chaîne, il est converti en valeur numérique à l'aide de ##[[KeyPgValuint ValUInt]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/casting/cushort.bas"}}%%(freebasic) @@ -44,10 +44,10 @@ PRINT numeric_value SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cushort""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cushort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCbyte Cbyte]]## diff --git a/fbdocs/manual/cache/KeyPgCustomgfx.wakka b/fbdocs/manual/cache/KeyPgCustomgfx.wakka index 209dbea955..6fb24a6548 100644 --- a/fbdocs/manual/cache/KeyPgCustomgfx.wakka +++ b/fbdocs/manual/cache/KeyPgCustomgfx.wakka @@ -1,26 +1,26 @@ -{{fbdoc item="title" value="CUSTOM"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects a custom method - -{{fbdoc item="syntax"}}## - **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Custom**, //custom_function_ptr// [, //parameter//] -## -{{fbdoc item="param"}} - ##**Custom**## - Required. - ##//custom_function_ptr//## - name of the custom user defined function. - ##//parameter//## - optional ##[[KeyPgPointer pointer]]## to be passed to the custom function; if omitted, the default value is zero (##0##). - -{{fbdoc item="desc"}} - ##**Custom**## selects a custom user defined function as the method for blitting an image buffer. - - The ##Custom## method uses a user-defined function to calculate the final pixel values to be drawn to the destination buffer. This function will be called once for every pixel of the source image, and will receive the source and destination pixel values, and a data pointer passed by the ##[[KeyPgPutgraphics Put]]## function. The pixel value returned will be the value used to draw to the destination buffer. The function has the form: - - ##[[KeyPgDeclare declare]] [[KeyPgFunction function]] //identifier// ( _ - [[KeyPgByval byval]] //source_pixel// [[KeyPgAs as]] [[KeyPgUinteger uinteger]], _ - [[KeyPgByval byval]] //destination_pixel// [[KeyPgAs as]] [[KeyPgUinteger uinteger]], _ - [[KeyPgByval byval]] //parameter// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] _ +{{fbdoc item="title" value="Custom"}}----
    +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui sélectionne une méthode définie par l'utilisateur

    {{fbdoc item="syntax"}}##
    **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Custom**, //custom_function_ptr// [, //parameter//]
    ##
    + +{{fbdoc item="param"}}
    ##**Custom**##
    Obligatoire.
    + ##//custom_function_ptr//##
    nom de la fonction définie par l'utilisateur.
    +##//parameter//##
    optional ##[[KeyPgPointer Pointeur]]## facultatif à passer à la fonction; si omis, la valeur par défaut est zéro (##0##).

    +{{fbdoc item="desc"}}
    ##**Custom**## sélectionne une fonction définie par l'utilisateur comme méthode utilisée pour modifier (blitting) un tampon image.

    La méthode ##Custom## utilise une fonction définie parl'utilisateur pour calculer la valeur finale des pixels à dessiner dansle tampon destination. Cette fonction sera appelée une fois pour chaquepixel de l'image source , et recevra les valeurs des pixels source etdestination, et un pointeur de données passé par la fonction ##[[KeyPgPutgraphics Put]]##. La valeur du pixel renvoyée sera la valeur utilisée pour le tracé dans le tampon destination. La fonction à la forme:

    ##[[KeyPgDeclare Declare]] [[KeyPgFunction Function]] //identifier// ( _ + [[KeyPgByval ByVal]] //source_pixel// [[KeyPgAs As]] [[KeyPgUinteger UInteger]], _ + [[KeyPgByval ByVal]] //destination_pixel// [[KeyPgAs As]] [[KeyPgUinteger UInteger]], _ + [[KeyPgByval ByVal]] //parameter// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] _ + ) [[KeyPgAs As]] [[KeyPgUinteger UInteger]]## +
    ##//identifier//## est le nom de la fonction.
    ##//source_pixel//## est la valeur courante du pixel de l'image source.
    ##//destination_pixel//## est la valeur courante du pixel de l'image destination.
    ##//parameter//## est le paramètre qui est passé par la commande ##[[KeyPgPutgraphics Put]]##. Si omis, sa valeur sera zéro.

    + {{fbdoc item="ex"}}
    %%(freebasic) + +Function dither ( ByVal source_pixel As UInteger, ByVal destination_pixel As UInteger, ByVal parameter As Any Ptr ) As UInteger

    ''Retourne soit le pixel source soit le pixel destination, en fonction de la valeur du rnd

    Dim threshold As Single = 0.5
    If parameter <> 0 Then threshold = *CPtr(Single Ptr, parameter)

    If Rnd() < threshold Then
    Return source_pixel
    Else
    Return destination_pixel
    End If

    End Function


    Dim img As Any Ptr, threshold As Single

    '' Valide un ecran
    ScreenRes 320, 200, 16, 2
    ScreenSet 0, 1

    '' Cree une image
    img = ImageCreate(32, 32)
    Line img, ( 0, 0)-(15, 15), RGB(255, 0, 0), bf
    Line img, (16, 0)-(31, 15), RGB( 0, 0, 255), bf
    Line img, ( 0, 16)-(15, 31), RGB( 0, 255, 0), bf
    Line img, (16, 16)-(31, 31), RGB(255, 0, 255), bf

    '' fonction dither image avec differents thresholds
    Do Until Len(Inkey)

    Cls

    threshold = 0.2
    Put ( 80 - 16, 100 - 16), img, Custom, @dither, @threshold

    '' default threshold = 0.5
    Put (160 - 16, 100 - 16), img, Custom, @dither

    threshold = 0.8
    Put (240 - 16, 100 - 16), img, Custom, @dither, @threshold

    ScreenCopy
    Sleep 25

    Loop

    '' free the image memory
    ImageDestroy img
    + ##
    + +

    + + {{fbdoc item="section" value="Differences de dialecte +
    - Non utilisable dans le dialecte //[[CompilerOptlang -lang qb]]//.

    + {{fbdoc item="diff"}}
    - Nouveau pour FreeBASIC

    + {{fbdoc item="see"}}
    - ##[[KeyPgPutgraphics Put (Graphique)]]##

    ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]]## ##//identifier//## is the name of the function. diff --git a/fbdocs/manual/cache/KeyPgCvd.wakka b/fbdocs/manual/cache/KeyPgCvd.wakka index 23ad02fecb..9a9df22f33 100644 --- a/fbdocs/manual/cache/KeyPgCvd.wakka +++ b/fbdocs/manual/cache/KeyPgCvd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVD"}}---- -Converts an eight byte string to a double-precision variable +Conversion d'une chaîne de 8 octets en une variable double-précision {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvd** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,15 +9,15 @@ Converts an eight byte string to a double-precision variable ## {{fbdoc item="param"}} ##//str//## - A [[KeyPgString string]] exactly eight bytes in length with a binary copy of a double-precision variable stored in it. + Une chaîne ([[KeyPgString String]]) ayant exactement 8 octets de longueur, copie d'une variable double-précision. -{{fbdoc item="ret"}} - Returns a [[KeyPgDouble double-precision]] variable to copy the binary copy of a double to. +{{fbdoc item="section" value="Valeur retournée + Retourne une variable [[KeyPgDouble Double-Precision]] qui contient la copie binaire d'un DOUBLE. {{fbdoc item="desc"}} - Does a binary copy from a 8-byte-string to a double-precision variable. The result will have a sense only if the string contained a IEEE754 formated double value, as the one generated by ##[[KeyPgMkd Mkd]]##. + Exécute une copie binaire d'une chaîne-8-octets vers une variable double-précision. Le résultat n'aura un sens que si la chaîne contient une valeur double formatée IEEE754, comme celle générée par ##[[KeyPgMkd MKD]]##. - This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour lire une valeur numérique à partir d'un tampon sans utiliser de définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvd.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgMkd Mkd]]## diff --git a/fbdocs/manual/cache/KeyPgCvi.wakka b/fbdocs/manual/cache/KeyPgCvi.wakka index 64e5214b52..8b08f42cee 100644 --- a/fbdocs/manual/cache/KeyPgCvi.wakka +++ b/fbdocs/manual/cache/KeyPgCvi.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVI"}}---- -Converts an four byte string to an integer variable +Conversion d'une chaîne de 4 octets en une variable entière {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvi** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Converts an four byte string to an integer variable ## {{fbdoc item="param"}} ##//str//## - A [[KeyPgString string]] exactly four bytes in length with a binary copy of an integer variable stored in it. + Une chaîne ([[KeyPgString String]]) ayant exactement 4 octets de longueur, copie d'une variable entière. -{{fbdoc item="ret"}} - An [[KeyPgInteger integer]] variable to copy the binary copy of a integer to. +{{fbdoc item="section" value="Valeur retournée + Une variable entière ([[KeyPgInteger Integer]]) pour contenir la copie binaire d'un ENTIER. {{fbdoc item="desc"}} - Returns a 32 bit ##[[KeyPgInteger Integer]]## value using the binary data contained in a string that is **exactly** four bytes in length. An integer value of zero (0) is returned if the string is not exactly four bytes in length. + Retourne une valeur entière (##[[KeyPgInteger Integer]]##) 32 bits en utilisant les données contenues dans une chaîne qui a **exactement** 4 octets de longueur. Une valeur entière zéro (0) est retournée si la chaîne n'a pas exactement 4 octets de longueur. - ##**Cvi**## is used to convert 4-byte-strings created with ##[[KeyPgMki Mki]]##. + ##**CVI**## est utilisé pour convertir des chaînes-4-octets crées avec ##[[KeyPgMki MKI]]##. - This function can also be used to convert 32 bit integer values from a memory or file buffer without the need for a ##[[KeyPgType ]]## structure. However, just as with the type structure, special care should be taken when using ##**Cvi**## to convert strings that have been read from a buffer. The ##[[KeyPgCvi Cvi]]## and ##[[KeyPgMki Mki]]## functions are processor dependent. That is, they will return different results depending on the endianness of the processor. + Cette fonction peut aussi convertir des valeurs entières 32 bits à partir de la mémoire ou d'un tampon fichier sans l'utilisation d'une structure ##[[KeyPgType Type]]##. Cependant, tout comme avec la structure type, une attention particulière doit être prise lors de l'utilisation ##**CVI**## pour convertir des chaînes qui ont été lues à partir d'un tampon. Les fonctions ##[[KeyPgCvi CVI]]## et ##[[KeyPgMki MKI]]## sont dépendantes du processeur. Elles retourneront des résultats différents dépendant de l'//endian// du processeur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvi.bas"}}%%(freebasic) @@ -31,10 +31,10 @@ sleep %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, ##**Cvi**## expects a 2-byte-string, since a QB integer is only 16 bits. Only the first two bytes of the string are used, even if the string happens to be longer than two bytes. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, ##**CVI**## attend des chaînes-2-octets, car un entier QB integer n'a que 16 bits. Seuls les deux premiers octets de la chaîne sont utilisés, même si la chaîne à une longueur supérieure à 2 octets. {{fbdoc item="diff"}} - - In QB an error occurs if the string passed is less than two bytes in length. + - Dans QB une erreur apparaît si la chaîne passée a une longueur supérieure à 2 octets. {{fbdoc item="see"}} - ##[[KeyPgMki Mki]]## diff --git a/fbdocs/manual/cache/KeyPgCvl.wakka b/fbdocs/manual/cache/KeyPgCvl.wakka index cd42032bf5..6c331c5fe2 100644 --- a/fbdocs/manual/cache/KeyPgCvl.wakka +++ b/fbdocs/manual/cache/KeyPgCvl.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVL"}}---- -Converts an four byte string to an integer (long) variable +Conversion d'une chaîne de 4 octets en une variable entière longue {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvl** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,15 +9,15 @@ Converts an four byte string to an integer (long) variable ## {{fbdoc item="param"}} ##//str//## - A [[KeyPgString string]] exactly four bytes in length with a binary copy of an integer variable stored in it. + Une [[KeyPgString String (chaîne)]] ayant exactement 4 octets de longueur, copie d'une variable entière. -{{fbdoc item="ret"}} - A [[KeyPgInteger integer]] variable to copy the binary copy of a integer to. +{{fbdoc item="section" value="Valeur retournée + Une variable [[KeyPgInteger Integer (entière)]] pour contenir la copie binaire d'un ENTIER. {{fbdoc item="desc"}} - Does a binary copy from a 4-byte-string to a long variable. The result will have a sense only if the string contained a correctly formatted integer, as the one generated by ##[[KeyPgMkl Mkl]]## or ##[[KeyPgMki Mki]]##. + Effectue une copie d'une chaîne-4-octets vers une variable LONGue. Le résultat n'aura un sens que si la chaîne contient un ENTIER correctement formaté, comme ceux produit par ##[[KeyPgMkl MKL]]## ou ##[[KeyPgMki MKI]]##. - This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour lire des valeurs à partir de tampons sans utiliser une définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvl.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ sleep %% {{fbdoc item="diff"}} - - None. + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgMkl Mkl]]## diff --git a/fbdocs/manual/cache/KeyPgCvlongint.wakka b/fbdocs/manual/cache/KeyPgCvlongint.wakka index 1170b695c7..99b97b018d 100644 --- a/fbdocs/manual/cache/KeyPgCvlongint.wakka +++ b/fbdocs/manual/cache/KeyPgCvlongint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVLONGINT"}}---- -Converts an eight byte string to a long integer variable +Conversion d'une chaîne de 8 octets en une variable entière longue {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvlongint** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] @@ -9,15 +9,15 @@ Converts an eight byte string to a long integer variable ## {{fbdoc item="param"}} ##//str//## - A [[KeyPgString string]] exactly eight bytes in length with a binary copy of a long integer variable stored in it. + Une chaîne ([[KeyPgString String]]) ayant exactement 8 octets de longueur, copie d'une variable entière longue. -{{fbdoc item="ret"}} - A [[KeyPgLongint longint]] variable to copy the binary copy of a long integer to. +{{fbdoc item="section" value="Valeur retournée + Une variable [[KeyPgLongint LongInt]] pour contenir la copie binaire d'un ENTIER LONG. {{fbdoc item="desc"}} - Does a binary copy from an 8-byte-string to a longint variable. The result will have a sense only if the string contained a correctly formatted longint, as the one generated by ##[[KeyPgMklongint Mklongint]]## + Effectue une copie d'une chaîne-8-octets vers une variable ENTIERe LONGue. Le résultat n'aura un sens que si la chaîne contient un ENTIER LONG correctement formaté, comme ceux produit par ##[[KeyPgMkl MKLongInt]]##. - This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour lire des valeurs à partir de tampons sans utiliser une définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvlongint.bas"}}%%(freebasic) @@ -29,13 +29,13 @@ sleep %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cvlongint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cvlongint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +{{fbdoc item="see"}} + - ##[[KeyPgMklongint MKLongInt]]## {{fbdoc item="see"}} - ##[[KeyPgMklongint Mklongint]]## diff --git a/fbdocs/manual/cache/KeyPgCvs.wakka b/fbdocs/manual/cache/KeyPgCvs.wakka index 7752eaec8c..e86aaec7c4 100644 --- a/fbdocs/manual/cache/KeyPgCvs.wakka +++ b/fbdocs/manual/cache/KeyPgCvs.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVS"}}---- -Converts an four byte string to an single-precision variable +Conversion d'une chaîne de 4 octets en une variable simple-précision {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvs** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgSingle single]] @@ -9,15 +9,15 @@ Converts an four byte string to an single-precision variable ## {{fbdoc item="param"}} ##//str//## - A [[KeyPgString string]] exactly four bytes in length with a binary copy of an single-precision variable stored in it. + Une chaîne ([[KeyPgString String]]) ayant exactement 4 octets de longueur, copie d'une variable simple-précision. -{{fbdoc item="ret"}} - Returns a [[KeyPgSingle single]] variable to copy the binary copy of a single to. +{{fbdoc item="section" value="Valeur retournée + Retourne une variable [[KeyPgLongint Single]] pour contenir la copie binaire d'un nombre SIMPLE PRECISION. {{fbdoc item="desc"}} - Does a binary copy from a 4-byte-string to a ##[[KeyPgSingle Single]]## variable. The result will have a sense only if the string contained a IEEE754 formated single value, as the one generated by ##[[KeyPgMks Mks]]##. + Effectue une copie d'une chaîne-4-octets vers une variable ##[[KeyPgSingle Single (simple précision)]]##. Le résultat n'aura un sens que si la chaîne contient une valeur SIMPLE PRECISION formatée IEEE754, comme celles produites par ##[[KeyPgMkl MKS]]##. - This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour lire des valeurs à partir de tampons sans utiliser une définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvs.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgMks Mks]]## diff --git a/fbdocs/manual/cache/KeyPgCvshort.wakka b/fbdocs/manual/cache/KeyPgCvshort.wakka index 8995861d2b..c180637a3b 100644 --- a/fbdocs/manual/cache/KeyPgCvshort.wakka +++ b/fbdocs/manual/cache/KeyPgCvshort.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CVSHORT"}}---- -Converts an two byte string to a short variable +Conversion d'une chaîne de 2 octets en une variable [[KeyPgShort Short]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]] @@ -9,15 +9,15 @@ Converts an two byte string to a short variable ## {{fbdoc item="param"}} ##//str//## - A ##[[KeyPgString String]]## exactly two bytes in length with a binary copy of a short variable stored in it. + Une chaîne ([[KeyPgString String]]) ayant exactement 2 octets de longueur, copie d'une variable [[KeyPgShort Short]]. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgShort Short]]## variable to copy the binary copy of a short to. +{{fbdoc item="section" value="Valeur retournée + Retourne une variable ##[[KeyPgShort Short]]## qui contient la copie binaire d'un ##[[KeyPgShort Short]]##. {{fbdoc item="desc"}} - Does a binary copy from a 2-byte-string to a ##[[KeyPgShort Short]]## variable. The result will have a sense only if the string contained a correctly formatted ##[[KeyPgShort Short]]##, as the one generated by ##[[KeyPgMkshort Mkshort]]## + Effectue une copie d'une chaîne-2-octets vers une variable ##[[KeyPgSingle Short (court)]]##. Le résultat n'aura un sens que si la chaîne contient une valeur ##[[KeyPgShort Short]]## correctement formatée, comme celles produites par ##[[KeyPgMkl MKShort]]##. - This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour lire des valeurs à partir de tampons sans utiliser une définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/cvshort.bas"}}%%(freebasic) @@ -28,13 +28,13 @@ print a, cvshort(b) sleep %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cvshort""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Cvshort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="diff"}} - - In QBasic this function is called CVI +{{fbdoc item="see"}} + - ##[[KeyPgMkshort MKShort]]## {{fbdoc item="see"}} - ##[[KeyPgMkshort Mkshort]]## diff --git a/fbdocs/manual/cache/KeyPgData.wakka b/fbdocs/manual/cache/KeyPgData.wakka index f786247dfe..59b35c1fda 100644 --- a/fbdocs/manual/cache/KeyPgData.wakka +++ b/fbdocs/manual/cache/KeyPgData.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="DATA"}}---- -Statement to store data at compile time. +Déclaration pour stocker des données lors de la compilation. {{fbdoc item="syntax"}}## **Data** //constant_expression1// [,//constant_expression2//]... ## {{fbdoc item="desc"}} - ##Data## stores a list of constant numeric or alphabetical expressions that are evaluated at compile time (except with //[[CompilerOptlang -lang qb]]//) and stored as constants that can be read into variables by using ##[[KeyPgRead Read]]##. + ##Data## stocke une liste d'expressions constantes numériques ou alphabétiques qui sont évaluées au moment de la compilation (excepté avec //[[CompilerOptlang -lang qb]]//) et stockées sous forme de constantes qui peuvent être lues dans des variables en utilisant ##[[KeyPgRead Read]]##. - All the ##**Data**## statements in the program behave as a single chained list; after the last element of one ##**Data**## statement is read, the first element of the following ##**Data**## statement will be read. - The program should not attempt to ##[[KeyPgRead Read]]## after the last ##**Data**## element. The results are (in all dialects) undefined, and the program may crash (Page Fault). + Toutes les déclarations de ##**Data**##s dans le programme se comportent comme une liste unique enchaînée; après la lecture du dernier élément d'une déclaration de ##**Data**##, le premier élément de la déclaration suivante ##**Data**## sera lu. + Le programme ne doit pas tenter un ##[[KeyPgRead Read]]## après le dernier élément ##**Data**##. Les résultats sont (dans tous les dialectes) indéfinis et le programme peut se bloquer (Page Fault = Erreur de page). - ##**Data**## statements are only visible from within the module in which they are defined. + Les déclarations ##**Data**## ne sont visibles que depuis le module dans lequel ells sont définies. - ##**Data**## constants can only be of simple types (numeric or string). A numeric value can be read as a numeric literal into a string. A string read into a numeric variable will be evaluated by the ##[[KeyPgVal Val]]## function. ##[[KeyPgConst Const]]##s can be used as items of data except in the //[[CompilerOptlang -lang qb]]// dialect, where their names are considered as normal text. + Les constantes ##**Data**## ne peuvent être que des types simples (numériques ou chaînes). Une valeur numérique peut être lue comme un littéral numérique dans une chaîne. Une chaîne lue dans une variable numérique sera évaluée par la fonction ##[[KeyPgVal Val]]##. Les ##[[KeyPgConst Const]]##s peuvent être utilisées comme éléments de données, sauf dans le dialecte //[[CompilerOptlang -lang qb]]//, où leurs noms sont considérés comme du texte normal. - The "##**[[KeyPgRestore Restore]]** //label//##" statement makes the first ##**Data**## item after the ##//label//## the next item to be read, allowing the user to choose specific sections of data to read. + //label//## de la déclaration ##**[[KeyPgRestore Restore]]**## fait que le premier item de ##**Data**## après ##//label//## sera le suivant à lire, permettant à l'utilisateur de choisir des sections spécifiques de données à lire. - ##**Data**## is normally used to initialize variables. ""FreeBASIC"" also allows the initialization of static variables when they are ##[[KeyPgDim Dim]]##ensioned - see [[ProPgInitialization Variable Initializers]] for more information. + ##**Data**## est normalement utilisé pour initialiser les variables. FreeBasic permet aussi l'initialisation de variables statiques quand elles sont ##[[KeyPgDim Dim]]##ensionnées - Voir [[ProPgInitialization Initialiseurs de variables]] pour plus d'informations. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/data/data.bas"}}%%(freebasic) @@ -56,12 +56,12 @@ DATA 3, 234, 435/4, 23+433, 87643, "Good" + "Bye!" %% {{fbdoc item="lang"}} - - //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// considers data items as constant expressions that are evaluated during compilation and its result stored in the program. - - //[[CompilerOptlang -lang qb]]// considers unquoted words, including names of variables and constants, as literal strings, and stores them without change, as in QBASIC. Unquoted strings are delimited by commas, and a colon or a line-break signifies the end of the ##**Data**## statement. Unquoted strings are trimmed of whitespace at the beginning and end. + - //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]// considèrent les items de ##**Data**## comme des expressions constantes qui sont évaluées pendant la compilation et leur résultat stocké dans le programme. + - //[[CompilerOptlang -lang qb]]// considère les mots non-commentés, inclus les noms de variables et constantes, comme des chaînes littérales, et les stocke sans changement, comme dans QBASIC. Les chaînes non-commentées sont délimitées par des virgules, et deux-points (:) ou un fin de ligne signifie la fin de la déclaration ##**Data**##. Dans les chaînes non-commentées les espaces sont éliminés au début et à la fin. {{fbdoc item="diff"}} - - Outside of the //[[CompilerOptlang -lang qb]]// dialect, alphabetic string literals must be enclosed within quotation marks, in QBASIC this was optional. - - In QBASIC empty items evaluated to number ##0## or to empty strings, in ""FreeBASIC"" they give a compile error. In QBASIC a comma at the end of the statement made an additional, empty item, evaluated to ##0## or an empty string. In ""FreeBASIC"" they give a compile error. + - En dehors du dialecte //[[CompilerOptlang -lang qb]]// les chaînes de littéraux alphabétiques doivent être entre guillemets, dans QBASIC cette utilisation est facultative. + - Dans QBASIC les items vides sont évalués au nombre ##0## ou à des chaînes vides, dans FreeBASIC ils donnent une erreur de compilation. Dans QBASIC une virgule à la fin de la déclaration amène un item supplémentaire, vide, évalué à ##0## ou une chaîne vide. Dans FreeBASIC ils donnent une erreur de compilation. {{fbdoc item="see"}} - ##[[KeyPgRead Read]]## diff --git a/fbdocs/manual/cache/KeyPgDate.wakka b/fbdocs/manual/cache/KeyPgDate.wakka index bc562dae4d..70c03ea8b8 100644 --- a/fbdocs/manual/cache/KeyPgDate.wakka +++ b/fbdocs/manual/cache/KeyPgDate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DATE"}}---- -Returns the current system date as a string +Retourne la date courante du système sous forme d'une chaîne {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Date** ( ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,11 +7,11 @@ Returns the current system date as a string {{fbdoc item="usage"}}## //result// = **Date** ## -{{fbdoc item="ret"}} - Returns the current system date, in the format ##mm-dd-yyyy## +{{fbdoc item="section" value="Valeur retournée + Retourne la date courante du système, dans le format ##mm-dd-yyyy## {{fbdoc item="desc"}} - None + Aucune {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/date.bas"}}%%(freebasic) @@ -19,7 +19,7 @@ print date ' prints the current date %% {{fbdoc item="diff"}} - - The QB DATE statement (to set the system date) is now called ##[[KeyPgSetdate Setdate]]##. + - La déclaration QB DATE (pour définir la date système) est maintenant appelée ##[[KeyPgSetdate SetDate]]##. {{fbdoc item="see"}} - ##[[KeyPgSetdate Setdate]]## diff --git a/fbdocs/manual/cache/KeyPgDateAdd.wakka b/fbdocs/manual/cache/KeyPgDateAdd.wakka index 5b1cec00a1..8e24b0033f 100644 --- a/fbdocs/manual/cache/KeyPgDateAdd.wakka +++ b/fbdocs/manual/cache/KeyPgDateAdd.wakka @@ -1,30 +1,30 @@ {{fbdoc item="title" value="DateAdd"}}---- -Offset a date with a specified interval +Décale une date avec un intervalle donné {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""DateAdd""** ( [[KeyPgByref byref]] //interval// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **DateAdd** ( [[KeyPgByref ByRef]] //interval// [[KeyPgAs As]] [[KeyPgConstQualifier Const]] [[KeyPgString String]], [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgDouble Double]], [[KeyPgByval ByVal]] //date_serial// [[KeyPgAs As]] [[KeyPgDouble Double]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""DateAdd""**( //interval//, //number//, //date_serial// ) + //result// = **DateAdd**( //interval//, //number//, //date_serial// ) ## {{fbdoc item="param"}} ##//interval//## - string indicating which period of time corresponds to one unit of ##//number//## + chaîne indiquant à quelle période de temps correspond une unité de ##//number//## ##//number//## - the number of intervals to add to the base date. The number will be rounded to the nearest integer. + le nombre d'intervalles à ajouter à la date de base. Le nombre sera arrondi à l'entier le plus proche. ##//date_serial//## - the base date + La date de base -{{fbdoc item="ret"}} - Returns a [[ProPgDates Date Serial]] corresponding to the received ##//date_serial//## plus the ##//number//## of ##//intervals//##. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates Date Serial]] correspondant à la ##//date_serial//## reçue plus le ##//nombre (number)//## d' ##//intervalles (intervals)//##. {{fbdoc item="desc"}} - Interval is specified as follows: + L'intervalle est spécifié comme ci-dessous: - {{table columns="2" cellpadding="1" cells="value;interval;yyyy;years;q;quarter(three months);m;months;ww;weeks;d,w,y;days;h;hours;n;minutes;s;seconds"}} + {{table columns="" cellpadding="2" cells="valeur;intervalle;yyyy;année;q;trimestre;m;mois;ww;semaines;d,w,y;jours;h;heures;n;minutes;s;secondes;
    - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/dateadd.bas"}}%%(freebasic) @@ -48,7 +48,7 @@ print Format( DateAdd( "m", 1, d ), fmt ) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in Visual Basic. + - N'existe pas dans QB. Cette fonction est apparue dans Visual Basic. {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDateDiff.wakka b/fbdocs/manual/cache/KeyPgDateDiff.wakka index a39e522290..ed76fe978d 100644 --- a/fbdocs/manual/cache/KeyPgDateDiff.wakka +++ b/fbdocs/manual/cache/KeyPgDateDiff.wakka @@ -1,47 +1,47 @@ {{fbdoc item="title" value="DateDiff"}}---- -Gets the difference of two dates measured by a specified interval +Récupère la différence entre deux dates, mesurée à l'aide d'un intervalle donné {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""DateDiff""** ( [[KeyPgByref byref]] //interval// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //serial1// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByval byval]] //serial2// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByval byval]] //firstdayofweek// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbUseSystem, [[KeyPgByval byval]] //firstdayofyear// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbUseSystem ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **DateDiff** ( [[KeyPgByref ByRef]] //interval// [[KeyPgAs As]] [[KeyPgConstQualifier Const]] [[KeyPgString String]], [[KeyPgByval ByVal]] //serial1// [[KeyPgAs As]] [[KeyPgDouble Double]], [[KeyPgByval ByVal]] //serial2// [[KeyPgAs As]] [[KeyPgDouble Double]], [[KeyPgByval ByVal]] //firstdayofweek// [[KeyPgAs As]] [[KeyPgInteger Integer]] = fbUseSystem, [[KeyPgByval ByVal]] //firstdayofyear// [[KeyPgAs As]] [[KeyPgInteger Integer]] = fbUseSystem ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""DateDiff""**( //interval//, //date_serial1//, //date_serial2// [, //firstdayofWeek// [, //firstweekofyear// ] ] ) + //result// = **DateDiff**( //interval//, //date_serial1//, //date_serial2// [, //firstdayofWeek// [, //firstweekofyear// ] ] ) ## {{fbdoc item="param"}} ##//interval//## - the unit of time (interval) with which to measure the difference + l'unité de temps (intervalle) utilisée pour calculer la différence ##//date_serial1//## - starting date serial + "date serial" de départ ##//date_serial2//## - end date serial + "date serial" de fin ##//firstdayofweek//## - first day of the week + 1er jour de la semaine ##//firstdayofyear//## - first day of the year + 1er jour de l'année -{{fbdoc item="ret"}} - Returns an integer corresponding to the number of ##//interval//##s found between two [[ProPgDates Date Serials]]. +{{fbdoc item="section" value="Valeur retournée + Retourne un nombre entier correspondant au nombre d'##//interval//##s trouvés entre deux [[ProPgDates Date Serials]]. - If ##//date_serial1//## > ##//date_serial2//##, the result is negative. + Si ##//date_serial1//## > ##//date_serial2//##, le résultat est négatif. {{fbdoc item="desc"}} - ##//interval//## is specified as follows: + ##//interval//## est spécifié comme ci-dessous: - {{table columns="2" cellpadding="1" cells="value;interval;yyyy;years;q;quarter(three months);m;months;w; seven day periods; ww;calendar weeks;d,y;days;h;hours;n;minutes;s;seconds"}} + {{table columns="" cellpadding="2" cells="valeur;intervalle;yyyy;années;q;trimestres;m;mois;w; périodes de 7 jours; ww;semaines du calendrier;d,y;jours;h;heures;n;minutes;s;secondes;
    - ##//first_dayofweek//## Affects the counting when ##'ww'## interval is used. + ##//first_dayofweek//## affecte le comptage quand l'intervalle ##'ww'## est utilisé. - {{table columns="3" cellpadding="1" cells="value;first day of week;constant;omitted;sunday;###;0;local settings;fbUseSystem;1;sunday;fbSunday;2;monday;fbMonday;3;tuesday;fbTuesday;4;wednesday;fbWednesday;5;thursday;fbThursday;6;friday;fbFriday;7;saturday;fbSaturday"}} + {{table columns="" cellpadding="2" cells="valeur;1er jour de la semaine;constante;omis;sunday = dimanche; 0;paramètres locaux;fbUseSystem;1;sunday = dimanche;fbSunday;2;monday = lundi;fbMonday;3;tuesday = mardi;fbTuesday;4;wednesday = mercredi;fbWednesday;5;thursday = jeudi;fbThursday;6;friday = vendredi;fbFriday;7;saturday = samedi;fbSaturday;
    - ##//first_weekofyear//## specifies which year (previous or next) that the week which spans the end of one year and the beginning of the next should included with. + ##//first_weekofyear//## spécifie quelle année (précédente ou suivante) dont la semaine qui est "à cheval" sur la fin d'une année et le début de la suivante devrait être incluse. - {{table columns="3" cellpadding="1" cells="value;first week of year;constant;0;local settings;fbUseSystem;1;January 1's week;fbFirstJan1;2;first weeks having 4 days in the year;fbFirstFourDays;3;first full week of year;fbFirstFullWeek"}} + {{table columns="" cellpadding="2" cells="valeur;1ère semaine de l'année;constante;0;paramètres locaux;fbUseSystem;1;semaine du 1er janvier;fbFirstJan1;2;1ère semaine ayant 4 jours dans l'année;fbFirstFourDays;3;1ère semaine complète de l'année;fbFirstFullWeek;
    - Notice if you do an arithmetical subtraction of two date serials you get the difference in days. + Notez que si vous effectuez une soustraction arithmétique de deux "date serial"s vous obtenez la différence en jours. - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/datediff.bas"}}%%(freebasic) @@ -66,7 +66,7 @@ end if %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in Visual Basic. + - N'existe pas dans QB. Cette fonction est apparue dans Visual Basic. {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDatePart.wakka b/fbdocs/manual/cache/KeyPgDatePart.wakka index 08728239a5..f5ec8f9221 100644 --- a/fbdocs/manual/cache/KeyPgDatePart.wakka +++ b/fbdocs/manual/cache/KeyPgDatePart.wakka @@ -1,41 +1,41 @@ {{fbdoc item="title" value="DatePart"}}---- -Gets an interval from a date +Obtient un intervalle à partir d'une date {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""DatePart""** ( [[KeyPgByref byref]] //interval// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByval byval]] //firstdayofweek// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbUseSystem, [[KeyPgByval byval]] //firstdayofyear// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbUseSystem ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **DatePart** ( [[KeyPgByref ByRef]] //interval// [[KeyPgAs As]] [[KeyPgConstQualifier Const]] [[KeyPgString String]], [[KeyPgByval ByVal]] //date_serial// [[KeyPgAs As]] [[KeyPgDouble Double]], [[KeyPgByval ByVal]] //firstdayofweek// [[KeyPgAs As]] [[KeyPgInteger Integer]] = fbUseSystem, [[KeyPgByval ByVal]] //firstdayofyear// [[KeyPgAs As]] [[KeyPgInteger Integer]] = fbUseSystem ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""DatePart""**( //interval//, //date_serial//, //first_dayofWeek// [, //first_week_of_year// ] ) + //result// = **DatePart**( //interval//, //date_serial//, //first_dayofWeek// [, //first_week_of_year// ] ) ## {{fbdoc item="param"}} ##//interval//## - string indicating which part of the date is required + chaîne indiquant quelle partie de la date est requise ##//date_serial//## - the date serial to decode + la "date serial" à décoder ##//firstdayofweek//## - first day of the week + 1er jour de la semaine ##//firstdayofyear//## - first day of the year + 1er jour de l'année -{{fbdoc item="ret"}} - Return an integer representing the ##//interval//## in the [[ProPgDates Date Serial]]. +{{fbdoc item="section" value="Valeur retournée + Retourne un nombre entier représentant un intervalle ##//interval//## dans la [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - ##//interval//## string indicating which part of the date is required is specified as follows: + La chaîne ##//interval//## indique quelle partie de la date est requise; elle est spécifiée comme ci-dessous: - {{table columns="2" cellpadding="1" cells="value;interval;yyyy;years;q;quarter(three months);m;months; w; weekday; ww; week of the year;y;day of the year;d;day of the month;h;hours;n;minutes;s;seconds"}} + {{table columns="" cellpadding="2" cells="valeur;intervalle;yyyy;années;q;trimestres;m;mois; w; jour de la semaine; ww; semaine de l'année;y;jour de l'année;d;jour du mois;h;heures;n;minutes;s;secondes;
    - ##//first_dayofweek//## Affects the output when 'w' interval is required. + ##//first_dayofweek//## Affecte la sortie quand l'intervalle 'w' est requis. - {{table columns="3" cellpadding="1" cells="value;first day of week;constant;omitted;sunday;###;0;local settings;fbUseSystem;1;sunday;fbSunday;2;monday;fbMonday;3;tuesday;fbTuesday;4;wednesday;fbWednesday;5;thursday;fbThursday;6;friday;fbFriday;7;saturday;fbSaturday"}} + {{table columns="" cellpadding="2" cells="valeur;1er jour de la semaine;constante;omis;sunday = dimanche; 0;paramètres locaux;fbUseSystem;1;sunday = dimanche;fbSunday;2;monday = lundi;fbMonday;3;tuesday = mardi;fbTuesday;4;wednesday = mercredi;fbWednesday;5;thursday = jeudi;fbThursday;6;friday = vendredi;fbFriday;7;saturday = samedi;fbSaturday;
    - ##//first_weekofyear//## specifies which year (previous or next) that the week which spans the end of one year and the beginning of the next should included with. Affects the output when ##'ww'## interval is required. + ##//first_weekofyear//## spécifie quelle année (précédente ou suivante) dont la semaine qui est "à cheval" sur la fin d'une année et le début de la suivante doit être incluse. Affecte la sortie quand l'intervalle ##'ww'## est requis. - {{table columns="3" cellpadding="1" cells="value;first week of year;constant;0;local settings;fbUseSystem;1;January 1's week;fbFirstJan1;2;first weeks having 4 days in the year;fbFirstFourDays;3;first full week of year;fbFirstFullWeek"}} + {{table columns="" cellpadding="2" cells="valeur;1ère semaine de l'année;constante;0;paramètres locaux;fbUseSystem;1;semaine du 1er janvier;fbFirstJan1;2;1ère semaine qui a 4 jours dans l'année;fbFirstFourDays;3;1ère semaine complète de l'année;fbFirstFullWeek;
    - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/datepart.bas"}}%%(freebasic) @@ -51,7 +51,7 @@ print " of the year " & DatePart( "yyyy", d ) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in Visual Basic. + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDateSerial.wakka b/fbdocs/manual/cache/KeyPgDateSerial.wakka index ef41e56cdb..c9004c8201 100644 --- a/fbdocs/manual/cache/KeyPgDateSerial.wakka +++ b/fbdocs/manual/cache/KeyPgDateSerial.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="DATESERIAL"}}---- -Creates a [[ProPgDates date serial]] +Crée une [[ProPgDates date serial]] {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""DateSerial""** ( [[KeyPgByval byval]] //year// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //month// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //day// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **DateSerial** ( [[KeyPgByval ByVal]] //year// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //month// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //day// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""DateSerial""**( //year//, //month//, //day// ) + //result// = **DateSerial**( //year//, //month//, //day// ) ## {{fbdoc item="param"}} ##//year//## - the year + l'année ##//month//## - the month of the year + le mois de l'année ##//day//## - the day of the month + le jour du mois -{{fbdoc item="ret"}} - Returns a [[ProPgDates date serial]] containing the date formed by the values in the ##//year//##, ##//month//## and ##//day//## parameters.The date serial returned has no decimal part. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates date serial]] contenant la date formée par les valeurs dans les paramètres ##//year//##, ##//month//## et ##//day//##. La "date serial" retournée n'a pas de partie décimale. {{fbdoc item="desc"}} - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/dateserial.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ print format(a, "yyyy/mm/dd hh:mm:ss") %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDateValue.wakka b/fbdocs/manual/cache/KeyPgDateValue.wakka index d96fb4a5bd..02bd779337 100644 --- a/fbdocs/manual/cache/KeyPgDateValue.wakka +++ b/fbdocs/manual/cache/KeyPgDateValue.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="DATEVALUE"}}---- -Returns a [[ProPgDates Date Serial]] from a string +Retourne une [[ProPgDates Date Serial]] à partir d'une chaîne {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""DateValue""** ( [[KeyPgByref byref]] //date_string// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **DateValue** ( [[KeyPgByref ByRef]] //date_string// [[KeyPgAs As]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""DateValue""**( //date_string// ) + //result// = **DateValue**( //date_string// ) ## {{fbdoc item="param"}} ##//date_string//## - the string to convert to a date serial + la chaîne à convertir en "Date Serial" -{{fbdoc item="ret"}} - Returns a [[ProPgDates Date Serial]] from a date string. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates Date Serial]] à partir d'une chaîne. {{fbdoc item="desc"}} - The date string must be in the format set in the regional settings of the Operating System. + La chaîne de la date doit être dans le format défini dans les paramètres régionaux du système d'exploitation. - ##**""DateValue""**( Date() )## will work correctly only if the regional settings specify the same short date format QB used (##mm-dd-yyyy##). Consider using the ##[[KeyPgNow Now]]## function in the expression ##Fix(Now())## to obtain the current date as a date serial. + ##**DateValue**( Date() )## ne fonctionnera correctement que si les paramètres régionaux spécifiés ont le même format court de date utilisé par QB (##mm-dd-yyyy##). Pensez à utiliser la fonction ##[[KeyPgNow Now]]## dans l'expression ##Fix(Now())## pour obtenir la date courante sous forme de "date serial". - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/datevalue.bas"}}%%(freebasic) @@ -53,7 +53,7 @@ print "Number of days between dates is " & abs( v2 - v1 ) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDay.wakka b/fbdocs/manual/cache/KeyPgDay.wakka index d68efe15ab..3380aba12a 100644 --- a/fbdocs/manual/cache/KeyPgDay.wakka +++ b/fbdocs/manual/cache/KeyPgDay.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DAY"}}---- -Gets the day of the month from a [[ProPgDates Date Serial]] +Récupère le jour du mois à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Day** ( [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,14 +10,14 @@ Gets the day of the month from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date + la date -{{fbdoc item="ret"}} - Returns the day of the month from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Retourne le jour du mois à partir d'une variable contenant une date sous forme de [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/day.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ print format(ds, "yyyy/mm/dd "); day(ds) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgDdFBBackend.wakka b/fbdocs/manual/cache/KeyPgDdFBBackend.wakka index e48543c9e6..d6d6a1abbb 100644 --- a/fbdocs/manual/cache/KeyPgDdFBBackend.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBBackend.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_BACKEND__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque définie par le compilateur {{fbdoc item="syntax"}}## - ""__FB_BACKEND__"" + __FB_BACKEND__ ## {{fbdoc item="desc"}} - Defined to either ##"gas"## or ##"gcc"##, depending on which backend was specified via [[CompilerOptgen -gen]]. + Définie pour ##"gas"## ou ##"gcc"##, dépendant du "backend" spécifié par [[CompilerOptgen -gen]]. {{fbdoc item="diff"}} - - Did not exist in QB + - N'existe pas dans QB {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} diff --git a/fbdocs/manual/cache/KeyPgDdFBBigEndian.wakka b/fbdocs/manual/cache/KeyPgDdFBBigEndian.wakka index 9c2a994804..68e313223f 100644 --- a/fbdocs/manual/cache/KeyPgDdFBBigEndian.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBBigEndian.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_BIGENDIAN__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_BIGENDIAN__"" + __FB_BIGENDIAN__ ## {{fbdoc item="desc"}} - Define without a value created at compile time if compiling for a big endian target. + Définition sans valeur créée au moment de la compilation si la compilation a une cible "big endian". - It can be used to compile parts of the program only if the target is big endian. + Ne peut être utilisé pour compiler des parties du programme que si la cible est "big endian". {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbbigendian.bas"}}%%(freebasic) @@ -19,6 +19,6 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - Did not exist in QB + - N'existe pas dans QB {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} diff --git a/fbdocs/manual/cache/KeyPgDdFBBuildDate.wakka b/fbdocs/manual/cache/KeyPgDdFBBuildDate.wakka index 689649cf2f..cfb025cf83 100644 --- a/fbdocs/manual/cache/KeyPgDdFBBuildDate.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBBuildDate.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_BUILD_DATE__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_BUILD_DATE__"" + __FB_BUILD_DATE__ ## {{fbdoc item="desc"}} - Substituted with the quoted string containing the date (##MM-DD-YYYY##) the compiler was built on. + Remplacé par la chaîne entre guillemets contenant la date (##MM-DD-YYYY##) de construction du compilateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbbuilddate.bas"}}%%(freebasic) @@ -13,6 +13,6 @@ Intrinsic define (macro string) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdFBMain.wakka b/fbdocs/manual/cache/KeyPgDdFBMain.wakka index 88135091cb..9a6d34a843 100644 --- a/fbdocs/manual/cache/KeyPgDdFBMain.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBMain.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_MAIN__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_MAIN__"" + __FB_MAIN__ ## {{fbdoc item="desc"}} - ##""__FB_MAIN__""## is defined in the main module and not defined in other modules. + ##__FB_MAIN__## est défini dans le module "main" (=principal) mais pas dans les autres modules. - The main module is determined by the compiler as either the first source file listed on the command line or explicitly named using the -m option on the command line. + Le module principal (main) est déterminé par le compilateur, comme étant soit le premier fichier source listé sur la ligne de commande, soit celui explicitement désigné par l'option -m sur la ligne de commande. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbmain.bas"}}%%(freebasic) @@ -19,10 +19,10 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CompilerOptm Compiler Option: -m]] + - [[CompilerOptm Option du compilateur: -m]] - ##[[KeyPgPpifdef #ifdef]]## - ##[[KeyPgPpifndef #ifndef]]## diff --git a/fbdocs/manual/cache/KeyPgDdFBMinVersion.wakka b/fbdocs/manual/cache/KeyPgDdFBMinVersion.wakka index 7ab3a6436b..2f4db3a7ff 100644 --- a/fbdocs/manual/cache/KeyPgDdFBMinVersion.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBMinVersion.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="__FB_MIN_VERSION__"}}---- -Macro function to test minimum compiler version +Fonction macro pour tester la version minimum du compilateur {{fbdoc item="syntax"}}## - [[KeyPgPpdefine #define]] **""__FB_MIN_VERSION__""**( //major//, //minor//, //patch//) _ + [[KeyPgPpdefine #define]] **__FB_MIN_VERSION__**( //major//, //minor//, //patch//) _ (([[KeyPgDdFBVerMajor __FB_VER_MAJOR__]] > major) or _ (([[KeyPgDdFBVerMajor __FB_VER_MAJOR__]] = major) and (([[KeyPgDdFBVerMinor __FB_VER_MINOR__]] > minor) or _ ([[KeyPgDdFBVerMinor __FB_VER_MINOR__]] = minor and [[KeyPgDdFBVerPatch __FB_VER_PATCH__]] >= patch_level)))) ## {{fbdoc item="usage"}}## - **""__FB_MIN_VERSION__""**( //major//, //minor//, //patch//) + **__FB_MIN_VERSION__**( //major//, //minor//, //patch//) ## {{fbdoc item="param"}} ##//major//## - minimum major version to test + version majeure minimum à tester ##//minor//## - minimum minor version to test + version mineure minimum à tester ##//patch//## - minimum patch version to test + version patch minimum à tester -{{fbdoc item="ret"}} - Returns zero (0) if the compiler version is less than the specified version, or non-zero (-1) if the compiler version is greater than or equal to specified version +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si la version du compilateur est inférieure à la version spécifiée ou non-zéro (-1) si la version du compilateur est supérieure ou égale à la version spécifiée. {{fbdoc item="desc"}} - ##""__FB_MIN_VERSION__""## tests for a minimum version of the compiler. + ##__FB_MIN_VERSION__## teste pour une version minimale du compilateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbminversion.bas"}}%%(freebasic) @@ -32,10 +32,10 @@ Macro function to test minimum compiler version %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - [[KeyPgPpif #IF]] diff --git a/fbdocs/manual/cache/KeyPgDdFBVerMajor.wakka b/fbdocs/manual/cache/KeyPgDdFBVerMajor.wakka index 317d5bf5a1..3a4bb0342c 100644 --- a/fbdocs/manual/cache/KeyPgDdFBVerMajor.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBVerMajor.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_VER_MAJOR__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_VER_MAJOR__"" + __FB_VER_MAJOR__ ## {{fbdoc item="desc"}} - ##""__FB_VER_MAJOR__""## will return the major version of FreeBASIC currently being used. For example, the major version is 0 for Freebasic 0.18, and will remain 0 until FreeBASIC 1.0 is released. + ##__FB_VER_MAJOR__## retournera la version majeure de FreeBASIC utilisée actuellement. Par exemple, la version majeure est 0 pour Freebasic 0.18, et restera 0 jusqu'à FreeBasic 1.0. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbvermajor.bas"}}%%(freebasic) @@ -19,7 +19,7 @@ Print "Welcome to freebasic ";fbMajorVersion;".";fbMinorVersion %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdFBVerMinor __FB_VER_MINOR__]]## diff --git a/fbdocs/manual/cache/KeyPgDdFBVerMinor.wakka b/fbdocs/manual/cache/KeyPgDdFBVerMinor.wakka index f82db6737e..9fb34aa08f 100644 --- a/fbdocs/manual/cache/KeyPgDdFBVerMinor.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBVerMinor.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_VER_MINOR__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_VER_MINOR__"" + __FB_VER_MINOR__ ## {{fbdoc item="desc"}} - ""__FB_VER_MINOR__"" will return the minor version of FreeBASIC currently being used. For Freebasic 0.21, for example, the minor version number is 21. + __FB_VER_MINOR__ retournera la version mineure de FreeBASIC utilisée actuellement. Par exemple, pour Freebasic 0.21, le numéro de version mineur est 21. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbverminor.bas"}}%%(freebasic) @@ -19,9 +19,9 @@ Print "Welcome to freebasic ";fbMajorVersion;".";fbMinorVersion %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdFBVerMajor __FB_VER_MAJOR__]]## - ##[[KeyPgDdFBVerPatch __FB_VER_PATCH__]]## diff --git a/fbdocs/manual/cache/KeyPgDdFBVerPatch.wakka b/fbdocs/manual/cache/KeyPgDdFBVerPatch.wakka index 44d61f5856..e5f8c23824 100644 --- a/fbdocs/manual/cache/KeyPgDdFBVerPatch.wakka +++ b/fbdocs/manual/cache/KeyPgDdFBVerPatch.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_VER_PATCH__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_VER_PATCH__"" + __FB_VER_PATCH__ ## {{fbdoc item="desc"}} - ""__FB_VER_PATCH__"" will return the patch/subversion/revision number the version of FreeBASIC currently being used. For FreeBASIC 0.18, for example, there were subversions 1, 2, 3, 4, 5 and 6. + __FB_VER_PATCH__ retournera le patch/subversion/numéro de révision de la version de FreeBasic actuellement utilisé. Pour FreeBASIC 0.18, par exemple, il y a eu les subversions 1, 2, 3, 4, 5 et 6. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbverpatch.bas"}}%%(freebasic) @@ -21,9 +21,9 @@ Print "Welcome to FreeBASIC ";fbMajorVersion;".";fbMinorVersion;" , Revision ";f %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdFBVerMajor __FB_VER_MAJOR__]]## - ##[[KeyPgDdFBVerMinor __FB_VER_MINOR__]]## diff --git a/fbdocs/manual/cache/KeyPgDddate.wakka b/fbdocs/manual/cache/KeyPgDddate.wakka index d7d8e3fd13..51df0b6e02 100644 --- a/fbdocs/manual/cache/KeyPgDddate.wakka +++ b/fbdocs/manual/cache/KeyPgDddate.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__DATE__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__DATE__"" + __DATE__ ## {{fbdoc item="desc"}} - Substitutes the compiler date (##yyyy-mm-dd## format) were used. + Remplacé par la date du compilateur à l'endroit de son utilisation (## format aaaa-mm-jj##). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/date.bas"}}%%(freebasic) @@ -17,9 +17,11 @@ Compile Date: 2005-05-31 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdtime __TIME__]]## + - ##[[KeyPgDdtime __TIME__]]## + - ##[[KeyPgDate Date]]## {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDddateiso.wakka b/fbdocs/manual/cache/KeyPgDddateiso.wakka new file mode 100644 index 0000000000..8ecc0f0db8 --- /dev/null +++ b/fbdocs/manual/cache/KeyPgDddateiso.wakka @@ -0,0 +1,34 @@ +{{fbdoc item="title" value="__DATE_ISO__"}}---- +Intrinsic define (macro value) set by the compiler + +{{fbdoc item="syntax"}}## + ""__DATE_ISO__"" +## +{{fbdoc item="desc"}} + Substitutes the compiler date in a literal string (##"yyyy-mm-dd"## format) where used. This format is in line with ISO 8601 and can be used for lexicographical date comparisons. + +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/defines/date.bas"}}%%(freebasic) +Print "Compile Date: " & __DATE_ISO__ + +If __DATE_ISO__ < "2011-12-25" Then + Print "Compiled before Christmas day 2011" +Else + Print "Compiled after Christmas day 2011" +End If +%% + +%% +Compile Date: 2011-09-29 +Compiled before Christmas day 2011 +%% + +{{fbdoc item="diff"}} + - New to ""FreeBASIC"" + +{{fbdoc item="see"}} + - ##[[KeyPgDddate __DATE__]]## + - ##[[KeyPgDdtime __TIME__]]## + - ##[[KeyPgDate Date]]## + +{{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbargc.wakka b/fbdocs/manual/cache/KeyPgDdfbargc.wakka index aeae19ac4f..a36adea1e5 100644 --- a/fbdocs/manual/cache/KeyPgDdfbargc.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbargc.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_ARGC__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_ARGC__"" + __FB_ARGC__ ## {{fbdoc item="desc"}} - Substituted with the number of arguments passed in on the command line. + Remplacé par le nombre d'arguments passés dans la ligne de commande. - **""__FB_ARGC__""** is the name of a parameter passed to the program's implicit main function, and therefore is only defined in the module level code of the main module for an application. + **__FB_ARGC__** est le nom d'un paramètre passé à la fonction "main" (principale) implicite du programme, et de ce fait est défini seulement dans le module de code de niveau "main module" (module principal) pour une application. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbargc.bas"}}%%(freebasic) @@ -18,7 +18,7 @@ next i %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbargv __FB_ARGV__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfbargv.wakka b/fbdocs/manual/cache/KeyPgDdfbargv.wakka index eac85a3ca8..132f8b777a 100644 --- a/fbdocs/manual/cache/KeyPgDdfbargv.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbargv.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_ARGV__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_ARGV__"" + __FB_ARGV__ ## {{fbdoc item="desc"}} - Substituted with a pointer to a list of pointers to the zero terminated command line arguments passed in on the command line. + Remplacé par un pointeur vers une liste de pointeurs vers des lignes d'arguments terminées par zéro passées à la ligne de commande. - **""__FB_ARGV__""** is the name of a parameter passed to the program's implicit main function, and therefore is only defined in the module level code of the main module for an application. + **__FB_ARGC__** est le nom d'un paramètre passé à la fonction "main" (principale) implicite du programme, et de ce fait est défini seulement dans le module de code de niveau "main module" (module principal) pour une application. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbargv.bas"}}%%(freebasic) @@ -36,7 +36,7 @@ end function %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbargc __FB_ARGC__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfbcygwin.wakka b/fbdocs/manual/cache/KeyPgDdfbcygwin.wakka index d0577dcc08..e4f118bc07 100644 --- a/fbdocs/manual/cache/KeyPgDdfbcygwin.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbcygwin.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_CYGWIN__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_CYGWIN__"" + __FB_CYGWIN__ ## {{fbdoc item="desc"}} - Define without a value created at compile time in the Cygwin version of the compiler, or when the //[[CompilerOpttarget -target cygwin]]// command line option is used. It can be used to compile parts of the program only if the target is Cygwin. + Définition sans valeur créée au moment de la compilation dans la version Cygwin du compilateur, ou quand l'option //[[CompilerOpttarget -target cygwin]]// de la commande en ligne est utilisée. Peut être utilisé pour compiler des parties du programme si la cible est Cygwin. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbcygwin.bas"}}%%(freebasic) @@ -17,12 +17,12 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32_]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbdarwin.wakka b/fbdocs/manual/cache/KeyPgDdfbdarwin.wakka index 5683677399..543af0702f 100644 --- a/fbdocs/manual/cache/KeyPgDdfbdarwin.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbdarwin.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_DARWIN__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_DARWIN__"" + __FB_DARWIN__ ## {{fbdoc item="desc"}} - Define without a value created at compile time in the Darwin version of the compiler, or when the //[[CompilerOpttarget -target darwin]]// command line option is used. It can be used to compile parts of the program only if the target is Darwin. + Définition sans valeur créée au moment de la compilation dans la version Darwin du compilateur, ou quand l'option //[[CompilerOpttarget -target darwin]]// de la commande en ligne est utilisée. Peut être utilisé pour compiler des parties du programme si la cible est Darwin. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbdarwin.bas"}}%%(freebasic) @@ -17,12 +17,12 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - - ##[[KeyPgDdfbunix __FB_UNIX__]]## + - [[CompilerOpttarget Option du compilateur: -target]] - [[CompilerOpttarget Compiler Option: -target]] diff --git a/fbdocs/manual/cache/KeyPgDdfbdebug.wakka b/fbdocs/manual/cache/KeyPgDdfbdebug.wakka index fbf28aa081..d64d9760ba 100644 --- a/fbdocs/manual/cache/KeyPgDdfbdebug.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbdebug.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_DEBUG__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_DEBUG__"" + __FB_DEBUG__ ## {{fbdoc item="desc"}} - ##""__FB_DEBUG__""## indicates if the the generate debug information option '-g' was specified on the command line at the time of compilation. + ##__FB_DEBUG__## indique si l'option "-g" de généreration de l'information de débogage a été spécifiée sur la ligne de commande au moment de la compilation. - Returns non-zero (-1) if the option was specified. Returns zero (0) otherwise. + Retourne non-zéro (-1) si l'option a été spécifiée. Autrement retourne zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbdebug.bas"}}%%(freebasic) @@ -19,11 +19,11 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfberr __FB_ERR__]]## - ##[[KeyPgDdfbmt __FB_MT__]]## - - [[CompilerOptg Compiler Option: -g]] + - [[CompilerOptg Option du compilateur: -g]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbdos.wakka b/fbdocs/manual/cache/KeyPgDdfbdos.wakka index 3cfe7a0e1c..42b0b79c47 100644 --- a/fbdocs/manual/cache/KeyPgDdfbdos.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbdos.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_DOS__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_DOS__"" + __FB_DOS__ ## {{fbdoc item="desc"}} - Define without a value created at compile time if compiling for the DOS target. Default in the DOS hosted version, or active when the //[[CompilerOpttarget -target dos]]// command line option is used. It can be used to compile parts of the program only if the target is DOS. Note: the DOS hosted version cannot compile to other targets than DOS by now. + Définition sans valeur créée au moment de la compilation dans la version DOS. Par défaut dans le DOS version hébergée ou lorsque l'option //[[CompilerOpttarget -target dos]]// de la ligne de commande est utlisée. Ne peut être utilisé pour compiler des parties du programme que si la cible est DOS. Note: actuellement la version hébergée DOS ne peut compiler des cibles autres que DOS. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbdos.bas"}}%%(freebasic) @@ -18,13 +18,13 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbpcos __FB_PCOS__]]## - - ##[[FaqDOS DOS related FAQ]]## - - [[CompilerOpttarget Compiler Option: -target]] + - ##[[FaqDOS FAQ relatrive au DOS]]## + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfberr.wakka b/fbdocs/manual/cache/KeyPgDdfberr.wakka index ac03fe666e..028fb26e32 100644 --- a/fbdocs/manual/cache/KeyPgDdfberr.wakka +++ b/fbdocs/manual/cache/KeyPgDdfberr.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="__FB_ERR__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_ERR__"" + __FB_ERR__ ## {{fbdoc item="desc"}} - ##""__FB_ERR__""## indicates if //[[CompilerOpte -e]]//, //[[CompilerOptex -ex]]//, or //[[CompilerOptexx -exx]]// was specified on the compiler command line at the time of compilation of a module. + ##__FB_ERR__## indique si //[[CompilerOpte -e]]//, //[[CompilerOptex -ex]]//, ou //[[CompilerOptexx -exx]]// a été spécifié sur la ligne de commande du compilateur au moment de la compilation du module. - Returns one of the following values: - {{table columns="2" cellpadding="1" cells="value;description;0;'-e', '-ex', '-exx' not specified;1;'-e' was specified;3;'-ex' was specified;7;'-exx' was specified"}} + Retourne l'une des valeurs suivantes: + {{table columns="" cellpadding="2" cells="valeur;description;0;'-e', '-ex', '-exx' pas specifié1;'-e' a été specifié3;'-ex' a été specifié7;'-exx' a été specifié
    - ##""__FB_ERR__""## is always defined. + ##__FB_ERR__## est toujours défini. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fberr.bas"}}%%(freebasic) @@ -33,14 +33,15 @@ end select %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfbmt __FB_MT__]]## - ##[[KeyPgDdfbdebug __FB_DEBUG__]]## - - [[CompilerOpte Compiler Option: -e]] - - [[CompilerOptex Compiler Option: -ex]] - - [[CompilerOptexx Compiler Option: -exx]] - - [[ProPgErrorHandling Error Handling]] + - [[CompilerOpte Option du compilateur: -e]] + - [[CompilerOptex Option du compilateur: -ex]] + - [[CompilerOptexx Option du compilateur: -exx]] + - [[ProPgErrorHandling Gestion des erreurs]] -{{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} + diff --git a/fbdocs/manual/cache/KeyPgDdfbfpmode.wakka b/fbdocs/manual/cache/KeyPgDdfbfpmode.wakka index 78b9e35984..22b8459d42 100644 --- a/fbdocs/manual/cache/KeyPgDdfbfpmode.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbfpmode.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_FPMODE__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_FPMODE__"" + __FB_FPMODE__ ## {{fbdoc item="desc"}} - Defined as ##"fast"## if SSE fast arithmetics is enabled, or ##"precise"## otherwise. + Défini comme ##//"fast" = "rapide"//## si l'arithmétique rapide SSE est activée, ou ##//"precise" = "précis"//## autrement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbfpmode.bas"}}%%(freebasic) @@ -17,9 +17,9 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[compileroptfpmode Compiler Option: -fpmode]] + - [[compileroptfpmode Option du compilateur: -fpmode]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbfpu.wakka b/fbdocs/manual/cache/KeyPgDdfbfpu.wakka index 21aefba678..3800b682b0 100644 --- a/fbdocs/manual/cache/KeyPgDdfbfpu.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbfpu.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_FPU__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_FPU__"" + __FB_FPU__ ## {{fbdoc item="desc"}} - Defined as ##"sse"## if SSE floating point arithmetics is enabled, or ##"x87"## otherwise. + Défini comme ##"sse"## si l'arithmétique en virgule flottante SSE est activée ou ##"x87"## autrement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbfpu.bas"}}%%(freebasic) @@ -17,10 +17,10 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbsse __FB_SSE__]]## - - [[CompilerOptfpu Compiler Option: -fpu]] + - [[CompilerOptfpu Option du compilateur: -fpu]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbfreebsd.wakka b/fbdocs/manual/cache/KeyPgDdfbfreebsd.wakka index 7e684d7426..e231bf769c 100644 --- a/fbdocs/manual/cache/KeyPgDdfbfreebsd.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbfreebsd.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_FREEBSD__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_FREEBSD__"" + __FB_FREEBSD__ ## {{fbdoc item="desc"}} - Define without a value created at compile time in the ""FreeBSD"" version of the compiler, or when the //[[CompilerOpttarget -target freebsd]]// command line option is used. It can be used to compile parts of the program only if the target is ""FreeBSD"". + Définition sans valeur créée au moment de la compilation dans la version FreeBSD du compilateur ou quand l'option //[[CompilerOpttarget -target freebsd]]// de la commande en ligne est utilisée. Peut être utilisé pour compiler des parties du programme si la cible est FreeBSD. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbfreebsd.bas"}}%%(freebasic) @@ -17,13 +17,13 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbgcc.wakka b/fbdocs/manual/cache/KeyPgDdfbgcc.wakka index 18a127e26e..3e80b8413f 100644 --- a/fbdocs/manual/cache/KeyPgDdfbgcc.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbgcc.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_GCC__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque positionnée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_GCC__"" + __FB_GCC__ ## {{fbdoc item="desc"}} - Defined to true (##-1##) if [[CompilerOptgen -gen gcc]] is used, or false (##0##) otherwise. + Positionnée à vrai (##-1##) si [[CompilerOptgen -gen gcc]] est utilisé ou faux (##0##) sinon. {{fbdoc item="diff"}} - - Did not exist in QB + - N'existe pas dans QB {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} diff --git a/fbdocs/manual/cache/KeyPgDdfblang.wakka b/fbdocs/manual/cache/KeyPgDdfblang.wakka index a08463caea..8d9d13a00c 100644 --- a/fbdocs/manual/cache/KeyPgDdfblang.wakka +++ b/fbdocs/manual/cache/KeyPgDdfblang.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="__FB_LANG__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_LANG__"" + __FB_LANG__ ## {{fbdoc item="desc"}} - ##""__FB_LANG__""## indicates which language compatibility option was set at the time of compilation of a module. By default ##""__FB_LANG__""## will be set to ##"fb"##. The language compatibility option can be changed using one (or more) of the following methods: - - //[[CompilerOptlang -lang]]// command line option - - //[[CompilerOptforcelang -forcelang]]// command line option - - ##[[KeyPgPplang #lang]]## directive - - ##[[KeyPgMetaLang $lang]]## metacommand + ##__FB_LANG__## indique la langue dans laquelle l'option de compatibilité a été fixée au moment de la compilation d'un module. Par défaut ##__FB_LANG__## sera réglé sur ##"fb"##. L'option de compatibilité langue peut être changée en utilisant une (ou plusieurs) des méthodes suivantes: + - //[[CompilerOptlang -lang]]// option ligne de commande + - //[[CompilerOptforcelang -forcelang]]// option ligne de commande + - ##[[KeyPgPplang #lang]]## instruction + - ##[[KeyPgMetaLang $Lang]]## méta-commande - Returns a lower case string with one of the following values: - {{table columns="2" cellpadding="1" cells="value;description;''fb'';FreeBASIC compatibility (default);''qb'';QBASIC compatibility;''fblite'';FreeBASIC language compatibility, with a more QBASIC-compatible coding style;''deprecated'';FBC version 0.16 compatibility"}} + Renvoie une chaîne en minuscules avec l'une des valeurs suivantes: + {{table columns="" cellpadding="2" cells="valeur;description;''fb'';Compatibilité FreeBASIC (défault);''qb'';Compatibilité QBASIC;''fblite'';Compatibilité langage FreeBASIC, avec plus de codage en style QBASIC-compatible;''deprecated'';Compatibilité FBC version 0.16;
    - ##""__FB_LANG__""## is always defined. + ##__FB_LANG__## est toujours défini. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fblang.bas"}}%%(freebasic) @@ -31,13 +31,13 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfbversion __FB_VERSION__]]## - ##[[KeyPgPplang #lang]]## - - [[CompilerOptlang Compiler Option: -lang]] - - [[CompilerOptforcelang Compiler Option: -forcelang]] - - [[CompilerDialects Compiler Dialects]] + - [[CompilerOptlang Option du compilateur: -lang]] + - [[CompilerOptforcelang Option du compilateur: -forcelang]] + - [[CompilerDialects Dialectes du compilateur]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfblinux.wakka b/fbdocs/manual/cache/KeyPgDdfblinux.wakka index 521b18cc97..2c49e87401 100644 --- a/fbdocs/manual/cache/KeyPgDdfblinux.wakka +++ b/fbdocs/manual/cache/KeyPgDdfblinux.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_LINUX__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_LINUX__"" + __FB_LINUX__ ## {{fbdoc item="desc"}} - Define without a value created at compile time when compiling to the Linux target. Default in the Linux hosted version of the compiler, or active when the //[[CompilerOpttarget -target linux]]// command line option is used. It can be used to compile parts of the program only if the target is Linux. + Définition sans valeur créée au moment de la compilation dans la version Linux. Par défaut dans la version Linux hébergée ou lorsque l'option //[[CompilerOpttarget -target linux]]// de la ligne de commande est utlisée. Ne peut être utilisé pour compiler des parties du programme que si la cible est Linux. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fblinux.bas"}}%%(freebasic) @@ -18,12 +18,12 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbdos __FB_DOS__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbmt.wakka b/fbdocs/manual/cache/KeyPgDdfbmt.wakka index ed31e22067..de296ac355 100644 --- a/fbdocs/manual/cache/KeyPgDdfbmt.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbmt.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_MT__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_MT__"" + __FB_MT__ ## {{fbdoc item="desc"}} - ##""__FB_MT__""## indicates if the the multithreaded option //[[CompilerOptmt -mt]]// was specified on the command line at the time of compilation. + ##__FB_MT__## indique si l'option "multi-thread" //[[CompilerOptmt -mt]]// a été spécifiée sur la ligne de commande au moment de la compilation. - Returns non-zero (-1) if the option was specified. Returns zero (0) otherwise. + Retourne non-zéro (-1) si l'option a été spécifiée. Autrement, retourne zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbmt.bas"}}%%(freebasic) @@ -19,10 +19,10 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfbdebug __FB_DEBUG__]]## - - [[CompilerOptmt Compiler Option: -mt]] + - [[CompilerOptmt Option du compilateur: -mt]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbnetbsd.wakka b/fbdocs/manual/cache/KeyPgDdfbnetbsd.wakka index 6e97bb28b5..54fab3139d 100644 --- a/fbdocs/manual/cache/KeyPgDdfbnetbsd.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbnetbsd.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_NETBSD__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_NETBSD__"" + __FB_NETBSD__ ## {{fbdoc item="desc"}} - Define without a value created at compile time in the ""NetBSD"" version of the compiler, or when the //[[CompilerOpttarget -target netbsd]]// command line option is used. It can be used to compile parts of the program only if the target is ""NetBSD"". + Définition sans valeur créée au moment de la compilation dans la version NetBSD du compilateur ou quand l'option //[[CompilerOpttarget -target netbsd]]// de la commande en ligne est utilisée. Peut être utilisé pour compiler des parties du programme si la cible est NetBSD. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbnetbsd.bas"}}%%(freebasic) @@ -17,13 +17,13 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbopenbsd.wakka b/fbdocs/manual/cache/KeyPgDdfbopenbsd.wakka index c40f4988c3..a6be65531c 100644 --- a/fbdocs/manual/cache/KeyPgDdfbopenbsd.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbopenbsd.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_OPENBSD__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPENBSD__"" + __FB_OPENBSD__ ## {{fbdoc item="desc"}} - Define without a value created at compile time in the ""OpenBSD"" version of the compiler, or when the //[[CompilerOpttarget -target openbsd]]// command line option is used. It can be used to compile parts of the program only if the target is ""OpenBSD"". + Définition sans valeur créée au moment de la compilation dans la version OpenBSD du compilateur ou quand l'option //[[CompilerOpttarget -target openbsd]]// de la commande en ligne est utilisée. Peut être utilisé pour compiler des parties du programme si la cible est OpenBSD. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbopenbsd.bas"}}%%(freebasic) @@ -17,13 +17,13 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfboptionbyval.wakka b/fbdocs/manual/cache/KeyPgDdfboptionbyval.wakka index 608a5bbf4e..9463b0ad22 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptionbyval.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptionbyval.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OPTION_BYVAL__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_BYVAL__"" + __FB_OPTION_BYVAL__ ## {{fbdoc item="desc"}} - Indicates if parameters to a ##[[KeyPgFunction Function]]## or ##[[KeyPgSub Sub]]## are passed by reference as with ##[[KeyPgByref Byref]]##, or by value as with ##[[KeyPgByval Byval]]## by default when the by value / by reference specifier is not explicitly stated. + Indique si les paramètres d'une ##[[KeyPgFunction Function]]## ou d'une ##[[KeyPgSub Sub]]## sont passés par référence, comme avec ##[[KeyPgByref ByRef]]##, ou par valeur comme avec ##[[KeyPgByval ByVal]]##, par défaut, quand le spécificateur ##//by value//## (par valeur) / ##//by reference//## (par référence) n'est pas explicitement établi. - ##""__FB_OPTION_BYVAL__""## is set to non-zero (-1) if by default parameters are passed value, and zero (0) if by default parameters are passed by reference. + ##__FB_OPTION_BYVAL__## est fixé à non-zéro (-1) si par les paramètres par défaut sont passés de valeur et zéro (0) si les paramètres par défaut sont passés par référence. - The default for passing parameters by reference or by value is determined by the //[[CompilerOptlang -lang]]// command line option used during compilation or usage of ##[[KeyPgOptionbyval Option Byval]]## in the source file. + La valeur par défaut pour passer des paramètres par référence ou par valeur est déterminée par l'option //[[CompilerOptlang -lang]]// de la ligne de commande utilisée pendant la compilaton ou l'utilisation de ##[[KeyPgOptionbyval Option ByVal]]## dans le fichier source. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptionbyval.bas"}}%%(freebasic) @@ -19,9 +19,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgByval Byval]]## - ##[[KeyPgByref Byref]]## - ##[[KeyPgOptionbyval Option Byval]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboptiondynamic.wakka b/fbdocs/manual/cache/KeyPgDdfboptiondynamic.wakka index bd594e3f2f..e375dbd40b 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptiondynamic.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptiondynamic.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_OPTION_DYNAMIC__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_DYNAMIC__"" + __FB_OPTION_DYNAMIC__ ## {{fbdoc item="desc"}} - ##""__FB_OPTION_DYNAMIC__""## is defined as true (negative one (-1)) if a recent ##[[KeyPgOptiondynamic Option Dynamic]]## statement or ##[[KeyPgMetaDynamic '$Dynamic]]## meta-command was issued. Otherwise, it is defined as zero (0). + ##__FB_OPTION_DYNAMIC__## est définie comme vraie ##//(un négatif (-1))//## si une récente déclaration ##[[KeyPgOptiondynamic Option Dynamic]]## ou métacommande ##[[KeyPgMetaDynamic '$Dynamic]]## a été émise. Sinon, elle est définie comme zéro. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptiondynamic.bas"}}%%(freebasic) @@ -15,9 +15,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgOptiondynamic Option Dynamic]]## - ##[[KeyPgOptionstatic Option Static]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboptionescape.wakka b/fbdocs/manual/cache/KeyPgDdfboptionescape.wakka index 1ca72964e1..c3f9a871f3 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptionescape.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptionescape.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OPTION_ESCAPE__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_ESCAPE__"" + __FB_OPTION_ESCAPE__ ## {{fbdoc item="desc"}} - Indicates if by default, string literals are processed for escape characters when not explicitly prefixed with the [[KeyPgOpPpNoescape $ operator]] for non-escaped strings, or the [[KeyPgOpPpEscape ! operator]] for escaped strings. + Indique si par défaut, les chaînes de littéraux sont prévues pour les caractères d'échappement quand elles ne sont pas explicitement préfixées avec [[KeyPgOpPpNoescape $ Operator]] pour les chaînes non-caractères-d'échappement, ou [[KeyPgOpPpEscape ! Operator]] pour les chaînes-à-caractères-d'échappement. - The default method for processing string literals is set by usage of the //[[CompilerOptlang -lang]]// command line option during compilation or usage of ##[[KeyPgOptionescape Option Escape]]## in the source file. + La méthode par défaut pour traîter les chaînes littérales est fixée par l'utilisation de l'option //[[CompilerOptlang -lang]]// de la ligne de commande pendant la compilation ou l'utilisation de l'##[[KeyPgOptionescape Option Escape]]## dans le fichier source. - ##""__FB_OPTION_ESCAPE__""## returns zero (0) if the option has not been set. Returns non-zero (-1) if the option has been set. + ##__FB_OPTION_ESCAPE__## retourne zéro (0) si l'option n'est pas valide. Retourne non-zéro (-1) si l'option est valide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptionescape.bas"}}%%(freebasic) @@ -19,9 +19,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgOptionescape Option Escape]]## {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfboptionexplicit.wakka b/fbdocs/manual/cache/KeyPgDdfboptionexplicit.wakka index 3ab2e75a51..81a108ac4b 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptionexplicit.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptionexplicit.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FB_OPTION_EXPLICIT__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_EXPLICIT__"" + __FB_OPTION_EXPLICIT__ ## {{fbdoc item="desc"}} - ##""__FB_OPTION_EXPLICIT__""## indicates if ##[[KeyPgOptionexplicit Option Explicit]]## has been used previously in the source. + ##__FB_OPTION_EXPLICIT__## indique si ##[[KeyPgOptionexplicit Option Explicit]]## a été utilisée précédemment dans le source. - Returns zero (0) if the option has not been set. Returns non-zero (-1) if the option has been set. + Retourne zéro (0) si l'option n'a pas été validée. Retourne non-zéro (-1) si l'option a été validée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptionexplicit.bas"}}%%(freebasic) @@ -17,9 +17,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## - ##[[KeyPgOptionexplicit Option Explicit]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboptiongosub.wakka b/fbdocs/manual/cache/KeyPgDdfboptiongosub.wakka index 92e989661d..e2db03e571 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptiongosub.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptiongosub.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OPTION_GOSUB__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_GOSUB__"" + __FB_OPTION_GOSUB__ ## {{fbdoc item="desc"}} - Indicates how ##[[KeyPgGosub Gosub]]## and ##[[KeyPgReturn Return]]## will be handled at compile time. If the option is set (-1) then ##[[KeyPgGosub Gosub]]## is allowed and ##[[KeyPgReturn Return]]## is recognized as return-from-gosub only. If the option is not set (0) then ##[[KeyPgGosub Gosub]]## is not allowed and ##[[KeyPgReturn Return]]## is recognized as return-from-procedure only. + Indique comment ##[[KeyPgGosub GoSub]]## et ##[[KeyPgReturn Return]]## seront pris en charge au moment de la compilation. Si l'option est validée (-1) alors ##[[KeyPgGosub GoSub]]## est permis et ##[[KeyPgReturn Return]]## est reconnu seulement comme ##//"retour-de-gosub"//##. Si l'option n'est pas validée (0) alors ##[[KeyPgGosub GoSub]]## n'est pas permis et ##[[KeyPgReturn Return]]## est reconnu seulement comme ##//"retour-de-procédure"//##. - This macro value can be changed at compile time. ##[[KeyPgOptiongosub Option Gosub]]## will set the option (enable gosub support) and ##[[KeyPgOptionnogosub Option Nogosub]]## will clear the option (disable gosub support). + Cette valeur macro peut être changée au moment de la compilation. ##[[KeyPgOptiongosub Option Gosub]]## validera l'option (valide le support de gosub) et ##[[KeyPgOptionnogosub Option Nogosub]]## annulera l'option (annulation du support de gosub). - ##""__FB_OPTION_GOSUB__""## returns zero (0) if the option has not been set. Returns non-zero (-1) if the option has been set. + ##__FB_OPTION_GOSUB__## retourne zéro (0) si l'option n'a pas été validée. Retourne non-zéro (-1) si l'option a été validée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptiongosub.bas"}}%%(freebasic) @@ -20,12 +20,12 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="lang"}} - - Defaults to ##-1## in the //[[CompilerOptlang -lang qb]]// dialect and ##0## in all other dialects. + - Par défaut, ##-1## dans le dialecte //[[CompilerOptlang -lang qb]]// et ##0## dans tous les autres dialectes. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgOptiongosub Option Gosub]]## - ##[[KeyPgOptionnogosub Option Noosub]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboptionprivate.wakka b/fbdocs/manual/cache/KeyPgDdfboptionprivate.wakka index b266c3a947..9bb7dc79e1 100644 --- a/fbdocs/manual/cache/KeyPgDdfboptionprivate.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboptionprivate.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OPTION_PRIVATE__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OPTION_PRIVATE__"" + __FB_OPTION_PRIVATE__ ## {{fbdoc item="desc"}} - Indicates if by default ##[[KeyPgFunction Function]]##'s and ##[[KeyPgSub Sub]]##'s have module scope or global scope when not explicitly specified with ##[[KeyPgPrivate Private]]## or ##[[KeyPgPublic Public]]##. + Indique si par défaut les ##[[KeyPgFunction Function]]## et ##[[KeyPgSub Sub]]## ont une portée niveau-module ou au niveau-global si rien n'a été explicitement spécifié avec ##[[KeyPgPrivate Private]]## ou ##[[KeyPgPublic Public]]##. - The default scope specifier for functions and subs is set by usage of the //[[CompilerOptlang -lang]]// command line option during compilation or usage of ##[[KeyPgOptionprivate Option Private]]## in the source file. + Le spécificateur de portée par défaut pour les **function**s et les **sub**s est fixé par l'option //[[CompilerOptlang -lang]]// de la ligne de commande durant la compilation ou l'utilisation de l'##[[KeyPgOptionprivate Option Private]]## dans le fichier source. - ##""__FB_OPTION_PRIVATE__""## returns zero (0) if the option has not been set. Returns non-zero (-1) if the option has been set. + ##__FB_OPTION_PRIVATE__## retourne zéro (0) si l'option n'a pas été validée. Retourne non-zéro (-1) si l'option a été validée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboptionprivate.bas"}}%%(freebasic) @@ -19,9 +19,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgOptionprivate Option Private]]## - ##[[KeyPgPrivate Private]]## - ##[[KeyPgPublic Public]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboutdll.wakka b/fbdocs/manual/cache/KeyPgDdfboutdll.wakka index 049c6eda9f..9e347c57a0 100644 --- a/fbdocs/manual/cache/KeyPgDdfboutdll.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboutdll.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OUT_DLL__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OUT_DLL__"" + __FB_OUT_DLL__ ## {{fbdoc item="desc"}} - ##""__FB_OUT_DLL__""## indicates that the specified output file type on the compiler command line at the time of compilation is a shared library. + ##__FB_OUT_DLL__## indique que le type de sortie fichier spécifié sur la ligne de commande du compilateur au moment de la compilation est une bibliothèque partagée (shared library). - Returns non-zero (-1) if the output is a shared library. Returns zero (0) otherwise. + Retourne non-nul (-1) si la sortie est une bibliothèque partagée. Retourne zéro (0) autrement. - Only one of ##""__FB_OUT_DLL__""##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, or ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## will evaluate to non-zero (-1). All others will evaluate to zero (0). + Un seul des ##__FB_OUT_DLL__##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, ou ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## sera à non-zéro (-1). Tous les autres seront à zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboutdll.bas"}}%%(freebasic) @@ -17,16 +17,16 @@ Intrinsic define (macro value) set by the compiler '... specific instructions when making a shared library (DLL) #else '... specific instructions when not making a shared library (DLL) -#endif +#endif %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]## - ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## - ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## - - [[CompilerOptdll Compiler Option: -dll]] + - [[CompilerOptdll Option du compilateur: -dll]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfboutexe.wakka b/fbdocs/manual/cache/KeyPgDdfboutexe.wakka index 820891d848..79e56780f4 100644 --- a/fbdocs/manual/cache/KeyPgDdfboutexe.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboutexe.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OUT_EXE__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OUT_EXE__"" + __FB_OUT_EXE__ ## {{fbdoc item="desc"}} - ##""__FB_OUT_EXE__""## indicates that the specified output file type on the compiler command line at the time of compilation is an executable. + ##__FB_OUT_EXE__## indique que le type de sortie fichier spécifié sur la ligne de commande du compilateur au moment de la compilation est un exécutable. - Returns non-zero (-1) if the output is an executable. Returns zero (0) otherwise. + Retourne non-nul (-1) si la sortie est un exécutable. Retourne zéro (0) autrement. - Only one of ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##""__FB_OUT_EXE__""##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, or ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## will evaluate to non-zero (-1). All others will evaluate to zero (0). + Seulement un des ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##__FB_OUT_EXE__##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, ou ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## sera à non-zéro (-1). Tous les autres seront à zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboutexe.bas"}}%%(freebasic) @@ -21,9 +21,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## - ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## - ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfboutlib.wakka b/fbdocs/manual/cache/KeyPgDdfboutlib.wakka index f526274004..6e9fc318f0 100644 --- a/fbdocs/manual/cache/KeyPgDdfboutlib.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboutlib.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OUT_LIB__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OUT_LIB__"" + __FB_OUT_LIB__ ## {{fbdoc item="desc"}} - ##""__FB_OUT_LIB__""## indicates that the specified output file type on the compiler command line at the time of compilation is a static library. + ##__FB_OUT_LIB__## indique que le type de sortie fichier spécifié sur la ligne de commande du compilateur au moment de la compilation est une librairie statique (static library). - Returns non-zero (-1) if the output is a static library. Returns zero (0) otherwise. + Retourne non-nul (-1) si la sortie est une librairie statique (static library). Retourne zéro (0) autrement. - Only one of ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##""__FB_OUT_LIB__""##, or ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## will evaluate to non-zero (-1). All others will evaluate to zero (0). + Seulement un des ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##__FB_OUT_LIB__##, ou ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## sera à non-zéro (-1). Tous les autres seront à zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboutlib.bas"}}%%(freebasic) @@ -21,12 +21,12 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]## - ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## - ##[[KeyPgDdfboutobj __FB_OUT_OBJ__]]## - - [[CompilerOptlib Compiler Option: -lib]] + - [[CompilerOptlib Option du compilateur: -lib]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfboutobj.wakka b/fbdocs/manual/cache/KeyPgDdfboutobj.wakka index c0ee79ef7b..1d303d6707 100644 --- a/fbdocs/manual/cache/KeyPgDdfboutobj.wakka +++ b/fbdocs/manual/cache/KeyPgDdfboutobj.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FB_OUT_OBJ__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_OUT_OBJ__"" + __FB_OUT_OBJ__ ## {{fbdoc item="desc"}} - ##""__FB_OUT_OBJ__""## indicates that the specified output file type on the compiler command line at the time of compilation is an object module. + ##__FB_OUT_OBJ__## indique que le type de sortie fichier spécifié sur la ligne de commande du compilateur au moment de la compilation est un module objet. - Returns non-zero (-1) if the output is an object module. Returns zero (0) otherwise. + Retourne non-nul (-1) si la sortie est un module objet. Retourne zéro (0) autrement. - Only one of ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, or ##""__FB_OUT_OBJ__""##, will evaluate to non-zero (-1). All others will evaluate to zero (0). + Seulement un des ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]##, ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]##, ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]##, ou ##__FB_OUT_OBJ__## sera à non-zéro (-1). Tous les autres seront à zéro (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fboutobj.bas"}}%%(freebasic) @@ -21,9 +21,9 @@ Intrinsic define (macro value) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgDdfboutexe __FB_OUT_EXE__]]## - ##[[KeyPgDdfboutdll __FB_OUT_DLL__]]## - ##[[KeyPgDdfboutlib __FB_OUT_LIB__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfbpcos.wakka b/fbdocs/manual/cache/KeyPgDdfbpcos.wakka index 0300b128e3..db005c2730 100644 --- a/fbdocs/manual/cache/KeyPgDdfbpcos.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbpcos.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_PCOS__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_PCOS__"" + __FB_PCOS__ ## {{fbdoc item="desc"}} - Define created at compile time if the OS has filesystem behavior styled like common PC OSes, e.g. DOS, Windows, OS/2, Symbian OS, possibly others. Drive letters, backslashes, that stuff, otherwise undefined. + Défini au moment de la compilation si l'OS a un comportement de système de fichiers comme les systèmes d'exploitation courants pour PC, par exemple avec -1 si l'OS a un comportement de système de fichiers de style commun aux OS PC, par exemple, DOS, Windows, OS / 2, Symbian OS, peut-être d'autres. Lettres de lecteur, barres obliques, ce genre de choses, sinon indéfini. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbpcos.bas"}}%%(freebasic) @@ -17,13 +17,13 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - ##[[KeyPgDdfbdos __FB_DOS__]]## - ##[[KeyPgDdfbxbox __FB_XBOX__]]## - ##[[KeyPgDdfbunix __FB_UNIX__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbsignature.wakka b/fbdocs/manual/cache/KeyPgDdfbsignature.wakka index 04877cb1de..9e8712cdc2 100644 --- a/fbdocs/manual/cache/KeyPgDdfbsignature.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbsignature.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_SIGNATURE__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_SIGNATURE__"" + __FB_SIGNATURE__ ## {{fbdoc item="desc"}} - Substituted by a signature of the compiler where used. + Remplacé par la signature du compilateur qui est utilisé. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbsignature.bas"}}%%(freebasic) @@ -17,7 +17,7 @@ FreeBASIC 0.21.1 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbversion __FB_VERSION__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfbsse.wakka b/fbdocs/manual/cache/KeyPgDdfbsse.wakka index 1388b6fac2..1914c09dc6 100644 --- a/fbdocs/manual/cache/KeyPgDdfbsse.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbsse.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_SSE__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_SSE__"" + __FB_SSE__ ## {{fbdoc item="desc"}} - Define without a value created at compile time if SSE floating point arithmetics is enabled. + Définition sans valeur créée au moment de la compilation si l'arithmétique en virgule flottante SSE est activée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbsse.bas"}}%%(freebasic) @@ -17,10 +17,10 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbfpu __FB_FPU__]]## - - [[CompilerOptfpu Compiler Option: -fpu]] + - [[CompilerOptfpu Option du compilateur: -fpu]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbunix.wakka b/fbdocs/manual/cache/KeyPgDdfbunix.wakka index f1a8cf553e..738c489387 100644 --- a/fbdocs/manual/cache/KeyPgDdfbunix.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbunix.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_UNIX__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_UNIX__"" + __FB_UNIX__ ## {{fbdoc item="desc"}} - Define created at compile time if the OS is reasonably enough like UNIX that you can call it UNIX, otherwise undefined. + Définition créée au momen de la compilation si le système d'exploitation est assez raisonnablement compatible UNIX, autrement indéfini. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbunix.bas"}}%%(freebasic) @@ -17,7 +17,7 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## @@ -27,6 +27,6 @@ Intrinsic define set by the compiler - ##[[KeyPgDdfbcygwin __FB_CYGWIN__]]## - ##[[KeyPgDdfbdarwin __FB_DARWIN__]]## - ##[[KeyPgDdfbpcos __FB_PCOS__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbvectorize.wakka b/fbdocs/manual/cache/KeyPgDdfbvectorize.wakka index 34b60b04da..b8e52a04b9 100644 --- a/fbdocs/manual/cache/KeyPgDdfbvectorize.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbvectorize.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_VECTORIZE__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_VECTORIZE__"" + __FB_VECTORIZE__ ## {{fbdoc item="desc"}} - Defined as the vectorisation level number set by the //[[CompilerOptvec -vec]]// command-line option. + Défini comme le numéro de niveau de vectorisation fixé par l'option //[[CompilerOptvec -vec]]// de la ligne de commande. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbvectorize.bas"}}%%(freebasic) @@ -17,9 +17,9 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CompilerOptvec Compiler Option: -vec]] + - [[CompilerOptvec Option du compilateur: -vec]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbversion.wakka b/fbdocs/manual/cache/KeyPgDdfbversion.wakka index b86522f8b7..64ee7253ec 100644 --- a/fbdocs/manual/cache/KeyPgDdfbversion.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbversion.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_VERSION__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_VERSION__"" + __FB_VERSION__ ## {{fbdoc item="desc"}} - Substituted by the version number of the compiler where used. + Remplacé par le numéro de version du compilateur utilisé. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbversion.bas"}}%%(freebasic) @@ -13,11 +13,11 @@ Intrinsic define (macro string) set by the compiler #error Please compile with FB version 0.18 or above #endif %% - This will stop the compilation if the compiler version is below 0.18 + Cela arrêtera la compilation si la version du compilateur est inférieure à 0,18 {{fbdoc item="diff"}} - - Did not exist in QB + - N'éxistait pas dans QB {{fbdoc item="see"}} - ##[[KeyPgDdfbsignature __FB_SIGNATURE__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfbwin32.wakka b/fbdocs/manual/cache/KeyPgDdfbwin32.wakka index 3ab0438335..86244628cb 100644 --- a/fbdocs/manual/cache/KeyPgDdfbwin32.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbwin32.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_WIN32__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_WIN32__"" + __FB_WIN32__ ## {{fbdoc item="desc"}} - Define without a value created at compile time if compiling to the ""Win32"" target. Default in ""Win32"" hosted version, or active if the //[[CompilerOpttarget -target win32]]// command line option is used. It can be used to compile parts of the program only if the target is ""Win32"". + Définition sans valeur créée au moment de la compilation, si compilation vers une cible Win32. Par défaut dans la version Win32 hébergée, ou actif si l'option //[[CompilerOpttarget -target win32]]// de la ligne de commande est utilisée. Peut être utilisé pour compiler des parties d'un programme que si la cible est Win32. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbwin32.bas"}}%%(freebasic) @@ -18,12 +18,12 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfbdos __FB_DOS__]]## - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbpcos __FB_PCOS__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfbxbox.wakka b/fbdocs/manual/cache/KeyPgDdfbxbox.wakka index b0d1aadf9a..8a21a328d1 100644 --- a/fbdocs/manual/cache/KeyPgDdfbxbox.wakka +++ b/fbdocs/manual/cache/KeyPgDdfbxbox.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FB_XBOX__"}}---- -Intrinsic define set by the compiler +Définition intrinsèque fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FB_XBOX__"" + __FB_XBOX__ ## {{fbdoc item="desc"}} - Define without a value created at compile time when the //[[CompilerOpttarget -target xbox]]// command line option is used. It can be used to compile parts of the program only if the target is Xbox. + Définition sans valeur créée au moment de la compilation lorsque l'option //[[CompilerOpttarget -target xbox]]// de la ligne de commande est utilisée. Peut être utilisé pour compiler des parties d'un programme seulement si la cible est Xbox. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/fbxbox.bas"}}%%(freebasic) @@ -17,12 +17,12 @@ Intrinsic define set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfblinux __FB_LINUX__]]## - ##[[KeyPgDdfbwin32 __FB_WIN32__]]## - - [[CompilerOpttarget Compiler Option: -target]] + - [[CompilerOpttarget Option du compilateur: -target]] {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDdfile.wakka b/fbdocs/manual/cache/KeyPgDdfile.wakka index 02c915552d..4312d95bb3 100644 --- a/fbdocs/manual/cache/KeyPgDdfile.wakka +++ b/fbdocs/manual/cache/KeyPgDdfile.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FILE__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FILE__"" + __FILE__ ## {{fbdoc item="desc"}} - Substituted with the quoted source file name where used. + Remplacé par le nom, entre guillemets, du fichier source où il est utilisé. - An example of normal use is to report wrong values in debugging. + Un exemple d'utilisation habituelle est de rendre compte des valeurs erronées dans le débogage. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/file.bas"}}%%(freebasic) @@ -22,7 +22,7 @@ Error: a = -32767 in test.bas (MAIN) line 47 %% {{fbdoc item="diff"}} - - Did not exist in QB + - N'existait pas dans QB {{fbdoc item="see"}} - ##[[KeyPgDdfilenq __FILE_NQ__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfilenq.wakka b/fbdocs/manual/cache/KeyPgDdfilenq.wakka index 3722775076..c21730e50c 100644 --- a/fbdocs/manual/cache/KeyPgDdfilenq.wakka +++ b/fbdocs/manual/cache/KeyPgDdfilenq.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__FILE_NQ__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FILE_NQ__"" + __FILE_NQ__ ## {{fbdoc item="desc"}} - Substituted with the non-quoted source file name where used. + Remplacé par le nom du fichier source entre guillemets où il est utilisé. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/filenq.bas"}}%%(freebasic) @@ -13,7 +13,7 @@ Intrinsic define (macro string) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfile __FILE__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfunction.wakka b/fbdocs/manual/cache/KeyPgDdfunction.wakka index ebae91bb8f..552dccb876 100644 --- a/fbdocs/manual/cache/KeyPgDdfunction.wakka +++ b/fbdocs/manual/cache/KeyPgDdfunction.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="__FUNCTION__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FUNCTION__"" + __FUNCTION__ ## {{fbdoc item="desc"}} - Substituted with the quoted name of the current function block where used. + Remplacé par le nom du fichier source entre guillemets où il est utilisé. - Its normal use is to report wrong values in debugging. + Son utilisation normale est de rendre compte de valeurs erronées lors du débogage. - If ##**""__FUNCTION__""**## is used at the module level, the function name given will be ##"""__FB_MAINPROC__"""## for the main module, or ##"""__FB_MODLEVELPROC__"""## for a different module. + Si ##**__FUNCTION__**## est utilisé au niveau module, le nom de fonction donné sera ##"__FB_MAINPROC__"## pour le module principal (main), ou ##"__FB_MODLEVELPROC__"## pour un module différent. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/function.bas"}}%%(freebasic) @@ -27,7 +27,7 @@ Error: a = -32767 in test.bas (__FB_MAINPROC__) line 47 %% {{fbdoc item="diff"}} - - Did not exist in QB + - N'existait pas dans QB {{fbdoc item="see"}} - ##[[KeyPgDdfile __FILE__]]## diff --git a/fbdocs/manual/cache/KeyPgDdfunctionnq.wakka b/fbdocs/manual/cache/KeyPgDdfunctionnq.wakka index 4b55f281d4..aeb6ef297a 100644 --- a/fbdocs/manual/cache/KeyPgDdfunctionnq.wakka +++ b/fbdocs/manual/cache/KeyPgDdfunctionnq.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__FUNCTION_NQ__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__FUNCTION_NQ__"" + __FUNCTION_NQ__ ## {{fbdoc item="desc"}} - Substituted with the non-quoted name of the current function block where used. + Remplacé par le nom du fichier source entre guillemets où il est utilisé. - If ##**""__FUNCTION_NQ__""**## is used at the module level, the function name given will be ##""__FB_MAINPROC__""## for the main module, or ##""__FB_MODLEVELPROC__""## for a different module. This is not the actual function name though, so it's not as useful there. + Si ##**__FUNCTION_NQ__**## est utilisé au niveau module, le nom de fonction donné sera ##__FB_MAINPROC__## pour le module principal (main), ou ##__FB_MODLEVELPROC__## pour un module différent. Cependant ce n'est pas le nom réel de la fonction, ce n'est donc pas très utile. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/functionnq.bas"}}%%(freebasic) @@ -25,7 +25,7 @@ Address of MYSUB is 4012D0 %% {{fbdoc item="diff"}} - - Did not exist in QB + - N'existait pas dans QB {{fbdoc item="see"}} - ##[[KeyPgDdfilenq __FILE_NQ__]]## diff --git a/fbdocs/manual/cache/KeyPgDdline.wakka b/fbdocs/manual/cache/KeyPgDdline.wakka index 2c8b310fb5..8cad8e52a4 100644 --- a/fbdocs/manual/cache/KeyPgDdline.wakka +++ b/fbdocs/manual/cache/KeyPgDdline.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="__LINE__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__LINE__"" + __LINE__ ## {{fbdoc item="desc"}} - Substituted with the current line number of the source file where used. + Remplacé, où il est utilisé, par le numéro de la ligne courante du fichier source. - Its normal use is to report wrong values in debugging. + Son utilisation normale est de rendre compte de valeurs erronées lors du débogage. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/line.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ Error: a = -32767 in test.bas (MAIN) line 47 %% {{fbdoc item="diff"}} - - Did not exist in QB + - N'existait pas dans QB {{fbdoc item="see"}} - ##[[KeyPgDdfile __FILE__]]## diff --git a/fbdocs/manual/cache/KeyPgDdpath.wakka b/fbdocs/manual/cache/KeyPgDdpath.wakka index 9415bc80e9..663e707f0f 100644 --- a/fbdocs/manual/cache/KeyPgDdpath.wakka +++ b/fbdocs/manual/cache/KeyPgDdpath.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="__PATH__"}}---- -Intrinsic define (macro string) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__PATH__"" + __PATH__ ## {{fbdoc item="desc"}} - Set to the quoted absolute path of the source file at the time of compilation. + Définir le chemin absolu du fichier source (entre guillemets) au moment de la compilation. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/path.bas"}}%%(freebasic) @@ -16,7 +16,7 @@ Intrinsic define (macro string) set by the compiler %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgDdfile __FILE__]]## diff --git a/fbdocs/manual/cache/KeyPgDdtime.wakka b/fbdocs/manual/cache/KeyPgDdtime.wakka index 624f96e7e3..682dda4b6e 100644 --- a/fbdocs/manual/cache/KeyPgDdtime.wakka +++ b/fbdocs/manual/cache/KeyPgDdtime.wakka @@ -1,23 +1,25 @@ {{fbdoc item="title" value="__TIME__"}}---- -Intrinsic define (macro value) set by the compiler +Définition intrinsèque (valeur de la macro) fixée par le compilateur {{fbdoc item="syntax"}}## - ""__TIME__"" + __TIME__ ## {{fbdoc item="desc"}} - Substitutes the compiler time in 24 hour format were used. + Remplacé, où il est utilisé, par l'heure de compilation, dans le format 24 heures. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/defines/time.bas"}}%%(freebasic) -PRINT "CompileTime: ";__TIME__ +Print "CompileTime: ";__TIME__ %% %% Compile Time: 11:42:57 -%% {{fbdoc item="diff"}} - - New to Freebasic +- Nouveau pour Freebasic + {{fbdoc item="see"}} -{{fbdoc item="see"}} +- ##[[KeyPgDddate __DATE__]]## - ##[[KeyPgDddate __DATE__]]## + - ##[[KeyPgDddateiso __DATE_ISO__]]## + - ##[[KeyPgTime Time]]## {{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} diff --git a/fbdocs/manual/cache/KeyPgDeallocate.wakka b/fbdocs/manual/cache/KeyPgDeallocate.wakka index 67a3ceab55..4fec02c69e 100644 --- a/fbdocs/manual/cache/KeyPgDeallocate.wakka +++ b/fbdocs/manual/cache/KeyPgDeallocate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DEALLOCATE"}}---- -Frees previously allocated memory +Libère la mémoire précédemment allouée {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Deallocate** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //pointer// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,15 +9,15 @@ Frees previously allocated memory ## {{fbdoc item="param"}} ##//pointer//## - the address of the previously allocated buffer. + l'adresse de la mémoire tampon précédemment allouée. {{fbdoc item="desc"}} - This procedure frees memory that was previously allocated with ##[[KeyPgAllocate Allocate]]##. ##//pointer//## must be a valid pointer. After the procedure returns, ##//pointer//## will be rendered invalid (pointing to an invalid memory address), and its use will result in undefined behavior. + Cette procédure libère de la mémoire qui a été précédemment allouée avec ##[[KeyPgAllocate Allocate]]##. ##//pointer//## doit être un pointeur valide. Après le retour de procédure, ##//pointer//## sera considéré comme invalide (pointant vers une adresse mémoire invalide) et son utilisation se traduira par un comportement non défini. -~&**##Deallocate##** is an alias for the C runtime library's **##free##**, so it's not guaranteed to be thread safe in all platforms. +**##Deallocate##** est un alias pour la bibliothèque d'exécution C **##libre##**, elle n'est donc pas garantie d'être "thread-safe" sur toutes les plates-formes. {{fbdoc item="ex"}} -The following example shows how to free previously allocated memory. Note that the pointer is set to null following the deallocation: +L'exemple suivant montre comment libérer de la mémoire précédemment allouée. Notez que le pointeur a la valeur nulle après la désallocation: {{fbdoc item="filename" value="examples/manual/memory/deallocate.bas"}}%%(freebasic) sub DeallocateExample1() @@ -35,9 +35,9 @@ end sub end 0 %% -Although in this case it is unnecessary - since 1. the pointer is not a reference to another pointer, 2. no other pointers point to the deallocated memory and 3. the function immediately exits afterward - setting the pointer to null is a good habit to get into. If the function deallocated memory from a pointer that was passed in by reference, for instance, the pointer that was used in the function call will be rendered invalid, and it is up to the caller to either reassign the pointer or set it to null. Example 3 shows how to correctly handle this kind of situation, and the next example shows the effects of deallocating memory with multiple references. +Bien que, dans ce cas, ce ne soit pas nécessaire -##// puisque 1°) le pointeur n'est pas une référence à un autre pointeur, 2°) aucun autre pointeur ne pointe sur la mémoire libérée et 3°) la fonction quitte immédiatement après //##- fixer le pointeur à NULL est une bonne habitude à prendre. Si la fonction libère la mémoire à partir d'un pointeur qui a été passé par référence, dans cette circonstance, le pointeur qui a été utilisé dans l'appel de la fonction sera considéré comme invalide, et il appartient à l'appelant soit de le réaffecter ou de le configurer pour qu'il soit nul. L'exemple 3 montre comment gérer correctement ce genre de situation et l'exemple suivant montre les effets de la désallocation de mémoire avec de multiples références. -In the following example, a different pointer is used to free previously allocated memory. +Dans l'exemple suivant, un pointeur différent est utilisé pour libérer la mémoire précédemment allouée. {{fbdoc item="filename" value="examples/manual/memory/deallocate2.bas"}}%%(freebasic) '' WARNING: "evil" example showing how things should NOT be done @@ -63,7 +63,7 @@ end sub end 0 %% -Note that after the deallocation, //both// pointers are rendered invalid. This illustrates another one of the ways that bugs can arise when working with pointers. As a general rule, only deallocate memory previously allocated when you know that there is only one (1) pointer currently pointing at it. +Notez qu'après la désallocation, //les deux// pointeurs sont invalidés. Cela illustre une autre cause de bugs lorsque l'on travaille avec des pointeurs. En règle générale, ne libérez de la mémoire précédemment allouée que lorsque vous savez qu'il n'y a qu'un seul (1) pointeur qui pointe actuellement sur elle. {{fbdoc item="filename" value="examples/manual/memory/deallocate3.bas"}}%%(freebasic) function createInteger() as integer ptr @@ -90,13 +90,13 @@ end sub end 0 %% -In the program above, a reference pointer in a function is set to null after deallocating the memory it points to. An ##[[KeyPgAssert ASSERT]]## macro is used to test if the original pointer is in fact null after the function call. This example implies the correct way to pass pointers to functions that deallocate the memory they point to is by reference. +Dans le programme ci-dessus, un pointeur de référence dans une fonction est fixé à null après libération de la mémoire sur laquelle il il pointe. Une macro ##[[KeyPgAssert Assert]]## est utilisée pour tester si le pointeur original est en fait nul après l'appel de la fonction. Cet exemple implique que la bonne façon de passer des pointeurs de fonctions qui désallouent la mémoire qu'ils pointent, est par référence. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Deallocate""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Deallocate**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAllocate Allocate]]## diff --git a/fbdocs/manual/cache/KeyPgDeclare.wakka b/fbdocs/manual/cache/KeyPgDeclare.wakka index ee4070b3be..eac520fddb 100644 --- a/fbdocs/manual/cache/KeyPgDeclare.wakka +++ b/fbdocs/manual/cache/KeyPgDeclare.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DECLARE"}}---- -Declares a module-level or member procedure +Déclare une procédure au niveau module ou un membre de procédure {{fbdoc item="syntax"}}## **Declare** [[KeyPgSub Sub]] //name// [ //param_list// ] [ [[KeyPgModuleConstructor Constructor]] | [[KeyPgModuleDestructor Destructor]] ] @@ -17,28 +17,28 @@ Declares a module-level or member procedure ## {{fbdoc item="param"}} ##//param_list//## - Parenthesized comma-separated list of parameters. + Liste entre parenthèses de paramètres séparés par des virgules. ##//return_type//## - The return type of a ##[[KeyPgFunction Function]]##, ##[[KeyPgOperator Operator]]##, or ##[[KeyPgProperty Property]]## procedure. + Le type de retour d'une procédure ##[[KeyPgFunction Function]]##, ##[[KeyPgOperator Operator]]##, ou ##[[KeyPgProperty Property]]##. ##//name//## - The name or symbol of the routine. + Le nom ou le symbole de la routine. ##//op_symbol//## - The name or symbol of an operator. + Le nom ou le symbole d'un opérateur. ##//T//## - The name of a new user-defined type. + Le nom d'un nouveau type défini par l'utilisateur. {{fbdoc item="desc"}} - The ##**Declare**## statement declares a ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgConstructor Constructor]]##, or ##[[KeyPgDestructor Destructor]]##. We will refer to one of these as a routine. - The routine can be referred to in code without seeing its definition, although it must be defined somewhere. Essentially, the ##**Declare**## statement introduces a routine, and states that its definition is elsewhere. For example, a function can be declared at the top of a source module, called, then defined at the bottom of the source file, as shown below the example. + L'instruction ##**Declare**## déclare un(e) ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgConstructor Constructor]]##, ou ##[[KeyPgDestructor Destructor]]##. Nous ferons référence à l'un d'entre eux comme une routine. + La routine peut être mentionnée dans le code sans voir sa définition, cependant elle doit être définie quelque part. Essentiellement, l'instruction ##**Declare**## introduit une routine, et déclare que sa définition est ailleurs. Par exemple, une fonction peut être déclarée en haut d'un module source, appelée, puis définie à la fin du fichier source, comme le montre l'exemple ci-dessous. - A routine's declaration is almost identical to the first line of its definition, except the declaration is preceded by the ##**Declare**## keyword and has no body. Also, attributes such as [[KeyPgExport Export]] are left off the declaration. + Une déclaration de routine est presque identique à la première ligne de sa définition, sauf que la déclaration est précédée par le mot-clé ##**Declare**## et n'a pas de corps. De plus, des attributs tels que [[KeyPgExport Export]] sont laissés hors de la déclaration. - FreeBASIC, as QB, does not require the declaration of the functions unless they are defined in a different source file or in the same file past the point where they are called. This is no longer true for routines declared inside a [[KeyPgType Type]] body, which must **always** be declared first in the [[KeyPgType Type]]'s body before use. If you do not declare [[KeyPgType Type]] routines you will receive an error. + FreeBASIC, comme QB, n'exige pas la déclaration des fonctions à moins qu'elles soient définies dans un fichier source différent ou dans le même fichier après le point où elles sont appelées. Ce n'est pas vrai pour les routines déclarées à l'intérieur d'un corps de [[KeyPgType Type]], qui doivent **toujours** être déclarées en premier dans le corps du [[KeyPgType Type]] avant de les utiliser. Si vous ne déclarez pas les routines [[KeyPgType Type]] vous recevrez un message d'erreur. - As every file using a function must have its declaration, declarations are usually kept in one or more //include files// to allow usage of the function by any module that needs it using the ##[[KeyPgInclude #include]]## statement. + Comme chaque fichier utilisant une fonction doit avoir sa déclaration, les déclarations sont habituellement groupée dans un ou plusieurs //fichiers include// pour permettre l'utilisation de la fonction par un module quelconque qui en a besoin en utilisant l'instruction ##[[KeyPgInclude #include]]##. {{fbdoc item="ex"}} -Module-level Function: +Fonction niveau module: {{fbdoc item="filename" value="examples/manual/procs/declare.bas"}}%%(freebasic) '' declare the function sum which takes two integers and returns an integer declare function sum( as integer, as integer ) as integer @@ -51,7 +51,7 @@ function sum( a as integer, b as integer ) as integer end function %% -Type-level Sub: +Niveau type Sub: {{fbdoc item="filename" value="examples/manual/procs/declare2.bas"}}%%(freebasic) type my_type my_data as integer @@ -71,12 +71,12 @@ an_instance.increment_data( ) Print an_instance.my_data %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// dialect, ##**Byval**## is the default parameter passing convention. - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang deprecated]]// dialects, ##**Byref**## is the default parameter passing convention. - - Type-level ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]##/##[[KeyPgOperator Operator]]##/##[[KeyPgConstructor Constructor]]##/##[[KeyPgDestructor Destructor]]##'s are only allowed in //[[CompilerOptlang -lang fb]]// + - Dans le dialecte //[[CompilerOptlang -lang fb]]//, ##**ByVal**## est la convention par défaut de passage de paramètre. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang deprecated]]//, ##**ByRef**## est la convention par défaut de passage de paramètre. + - Niveaux type ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]##/##[[KeyPgOperator Operator]]##/##[[KeyPgConstructor Constructor]]##/##[[KeyPgDestructor Destructor]]## ne sont permis qu'en //[[CompilerOptlang -lang fb]]// {{fbdoc item="diff"}} - - In FreeBASIC, the parameter names are optional. + - Dans FreeBASIC, les noms de paramètres sont facultatifs. {{fbdoc item="see"}} - ##[[KeyPgSub Sub]]## diff --git a/fbdocs/manual/cache/KeyPgDefbyte.wakka b/fbdocs/manual/cache/KeyPgDefbyte.wakka index b154111f98..9ec20a08e4 100644 --- a/fbdocs/manual/cache/KeyPgDefbyte.wakka +++ b/fbdocs/manual/cache/KeyPgDefbyte.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFBYTE"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defbyte** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defbyte**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgByte Byte]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefByte**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgByte Byte]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##bNumber## a ##[[KeyPgByte Byte]]## number since it's first letter starts with b: + Ceci fera de ##bNumber## un ##[[KeyPgByte Byte]]## car sa première lettre commence par un "b": {{fbdoc item="filename" value="examples/manual/switches/defbyte.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -25,11 +25,11 @@ Dim bNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defbyte""**##. + - Disponible dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defbyte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgByte Byte]]## diff --git a/fbdocs/manual/cache/KeyPgDefdbl.wakka b/fbdocs/manual/cache/KeyPgDefdbl.wakka index a3e26c48c8..1c1541ddd3 100644 --- a/fbdocs/manual/cache/KeyPgDefdbl.wakka +++ b/fbdocs/manual/cache/KeyPgDefdbl.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFDBL"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defdbl** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defdbl**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgDouble Double]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefDbl**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgDouble Double]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##aNum## a ##[[KeyPgDouble Double]]##-precision decimal number since it is in the range of a-d: + Ceci fera de ##aNum## un nombre décimal ##[[KeyPgDouble Double]]##-précision car sa première lettre est dans la plage a-d: {{fbdoc item="filename" value="examples/manual/switches/defdbl.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -27,10 +27,10 @@ Print Len(aNum) ' Prints 8, the number of bytes in a double. %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefined.wakka b/fbdocs/manual/cache/KeyPgDefined.wakka index 0d560d9f87..cfcaede4db 100644 --- a/fbdocs/manual/cache/KeyPgDefined.wakka +++ b/fbdocs/manual/cache/KeyPgDefined.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="DEFINED"}}---- -Preprocessor function to test if a symbol has been defined +Fonction du préprocesseur pour tester si un symbole a déjà été défini {{fbdoc item="syntax"}}## **defined** (//symbol_name//) ## {{fbdoc item="param"}} ##//symbol_name//## - Name of the symbol to test + Nom du symbole à tester -{{fbdoc item="ret"}} - Returns non-zero (-1) if the symbol has been defined, otherwise returns zero (0). +{{fbdoc item="section" value="Valeur retournée + Retourne non-zéro (-1) si le symbole a été défini, autrement retourne zéro (0). {{fbdoc item="desc"}} - Given the symbol name, the **defined()** preprocessor function returns true if the symbol has been defined - or false if the symbol is unknown of. + Etant donné le nom du symbole, la fonction préprocesseur **defined()** retourne vrai (true) si le symbole a été défini - ou faux (false) si le symbole est inconnu. - This is used mainly with ##[[KeyPgPpif #if]]##. + Utilisé principalement avec ##[[KeyPgPpif #if]]##. - Similar to ##[[KeyPgPpifdef #ifdef]]## except it allows more than one check to occur because of its flexibility. + Similaire à ##[[KeyPgPpifdef #ifdef]]## sauf qu'il permet de faire plus d'une vérification en raison de sa flexibilité. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/defined.bas"}}%%(freebasic) @@ -41,7 +41,7 @@ dim c as single %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## diff --git a/fbdocs/manual/cache/KeyPgDefint.wakka b/fbdocs/manual/cache/KeyPgDefint.wakka index acd9b2913c..71c5985c97 100644 --- a/fbdocs/manual/cache/KeyPgDefint.wakka +++ b/fbdocs/manual/cache/KeyPgDefint.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFINT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defint** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defint**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgInteger Integer]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefInt**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgInteger Integer]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##iNumber## an ##[[KeyPgInteger Integer]]## number since it's first letter starts with i. + Ceci fera de ##iNumber## un nombre ##[[KeyPgInteger Integer = entier]]## car sa première lettre est i. {{fbdoc item="filename" value="examples/manual/switches/defint.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -25,10 +25,10 @@ Dim iNumber %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDefbyte Defbyte]]## diff --git a/fbdocs/manual/cache/KeyPgDeflng.wakka b/fbdocs/manual/cache/KeyPgDeflng.wakka index a3a4534fb0..e4350fea8d 100644 --- a/fbdocs/manual/cache/KeyPgDeflng.wakka +++ b/fbdocs/manual/cache/KeyPgDeflng.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFLNG"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Deflng** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Deflng**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgLong Long]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefLng**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgLong Long]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##lNumber## a ##[[KeyPgLong Long]]## integer number since it starts with l. + Ceci fera de ##lNumber## un nombre entier ##[[KeyPgLong Long]]## car sa première lettre est l. {{fbdoc item="filename" value="examples/manual/switches/deflng.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -27,10 +27,10 @@ Print Len(lNumber) ' Displays 4, the number of bytes in a long. %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDeflongint.wakka b/fbdocs/manual/cache/KeyPgDeflongint.wakka index 6080f0f75f..7692ebdc0b 100644 --- a/fbdocs/manual/cache/KeyPgDeflongint.wakka +++ b/fbdocs/manual/cache/KeyPgDeflongint.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFLONGINT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Deflongint** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Deflongint**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgLongint Longint]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**Deflongint**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgLongint LongInt]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##lNumber## a ##[[KeyPgLongint Longint]]## number since it's first letter starts with l. + Ceci fera de ##lNumber## un nombre ##[[KeyPgLongint LongInt]]## car sa première lettre est l. {{fbdoc item="filename" value="examples/manual/switches/deflongint.bas"}}%%(freebasic) '' Compile with -lang fblite @@ -25,11 +25,11 @@ Dim lNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Deflongint""**##. + - Disponible dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Deflongint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefshort.wakka b/fbdocs/manual/cache/KeyPgDefshort.wakka index e6944a693a..463868f2f1 100644 --- a/fbdocs/manual/cache/KeyPgDefshort.wakka +++ b/fbdocs/manual/cache/KeyPgDefshort.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFSHORT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defshort** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defshort**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgShort Short]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefShort**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgShort Short]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##sNumber## a ##[[KeyPgShort Short]]## number since it's first letter starts with s. + Ceci fera de ##sNumber## un nombre ##[[KeyPgShort Short]]## car sa première lettre est s. {{fbdoc item="filename" value="examples/manual/switches/defshort.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -25,12 +25,12 @@ Dim sNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defshort""**##. + - Disponible dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defshort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" - - In QBasic, to make variables default to a 2 byte integer, DEFINT is used. + - Nouveau pour FreeBASIC + - Dans QBasic, pour que les variables aient par défaut 2 octets entiers, utilisez DEFINT. {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefsng.wakka b/fbdocs/manual/cache/KeyPgDefsng.wakka index 35aad8f57f..f4ef2039f8 100644 --- a/fbdocs/manual/cache/KeyPgDefsng.wakka +++ b/fbdocs/manual/cache/KeyPgDefsng.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFSNG"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defsng** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defsng**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgSingle Single]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefSng**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgSingle Single]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##sNumber## and ##yNumber## a ##[[KeyPgSingle Single]]##-precision decimal number since it is in the range of s-z. + Ceci fera de ##sNumber## et ##yNumber## un nombre décimal ##[[KeyPgSingle Single]]##-précision car sa première lettre est dans la plage s-z. {{fbdoc item="filename" value="examples/manual/switches/defsng.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -25,10 +25,10 @@ Dim sNumber, yNumber %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefstr.wakka b/fbdocs/manual/cache/KeyPgDefstr.wakka index 31a57d5a6d..83b15b01c2 100644 --- a/fbdocs/manual/cache/KeyPgDefstr.wakka +++ b/fbdocs/manual/cache/KeyPgDefstr.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFSTR"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defstr** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defstr**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgString String]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefStr**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgString String]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##sMessage## a ##[[KeyPgString String]]## since it starts with s. + Ceci fera de ##sMessage## une ##[[KeyPgString String]]## car sa première lettre est s. {{fbdoc item="filename" value="examples/manual/switches/defstr.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -25,10 +25,10 @@ Dim sMessage %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefubyte.wakka b/fbdocs/manual/cache/KeyPgDefubyte.wakka index 9e7e51b295..a8ee23165c 100644 --- a/fbdocs/manual/cache/KeyPgDefubyte.wakka +++ b/fbdocs/manual/cache/KeyPgDefubyte.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFUBYTE"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defubyte** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defubyte**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgUbyte Ubyte]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefUByte**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgUbyte UByte]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##uNumber## a ##[[KeyPgUbyte Ubyte]]## number since it's first letter starts with u. + Ceci fera de ##uNumber## un nombre ##[[KeyPgUbyte UByte]]## car sa première lettre est u. {{fbdoc item="filename" value="examples/manual/switches/defubyte.bas"}}%%(freebasic) '' Compile with -lang fblite @@ -25,11 +25,11 @@ Dim uNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defubyte""**##. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defubyte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDefbyte Defbyte]]## diff --git a/fbdocs/manual/cache/KeyPgDefuint.wakka b/fbdocs/manual/cache/KeyPgDefuint.wakka index 8f5fe9bece..0bef695cbe 100644 --- a/fbdocs/manual/cache/KeyPgDefuint.wakka +++ b/fbdocs/manual/cache/KeyPgDefuint.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFUINT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defuint** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defuint**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgUinteger Uinteger]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefUInt**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgUinteger UInteger]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##uNumber## a ##[[KeyPgUinteger Uinteger]]## number since it's first letter starts with u. + Ceci fera de ##uNumber## un nombre ##[[KeyPgUinteger UInteger]]## car sa première lettre est u. {{fbdoc item="filename" value="examples/manual/switches/defuint.bas"}}%%(freebasic) '' Compile with -lang fblite @@ -25,11 +25,11 @@ Dim uNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defuint""**##. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defuint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefulongint.wakka b/fbdocs/manual/cache/KeyPgDefulongint.wakka index 694179ad27..d5432fee32 100644 --- a/fbdocs/manual/cache/KeyPgDefulongint.wakka +++ b/fbdocs/manual/cache/KeyPgDefulongint.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFULONGINT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defulongint** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defulongint**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgUlongint Ulongint]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**Defulongint**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgUlongint ULongInt]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##lNumber## a ##[[KeyPgUlongint Ulongint]]## number since it's first letter starts with l. + Ceci fera de ##lNumber## un nombre ##[[KeyPgUlongint ULongInt]]## car sa première lettre est l. {{fbdoc item="filename" value="examples/manual/switches/defulongint.bas"}}%%(freebasic) '' Compile with -lang fblite @@ -25,11 +25,11 @@ Dim lNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defulongint""**##. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defulongint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDefushort.wakka b/fbdocs/manual/cache/KeyPgDefushort.wakka index ac8a8aae45..ce6cf40173 100644 --- a/fbdocs/manual/cache/KeyPgDefushort.wakka +++ b/fbdocs/manual/cache/KeyPgDefushort.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="DEFUSHORT"}}---- -Specifies a default data type for a range of variable names +Spécifie un type de données par défaut pour une série de noms de variables {{fbdoc item="syntax"}}## **Defushort** //start_letter//[**-**//end_letter// ][, ...] ## {{fbdoc item="param"}} ##//start_letter//## - the first letter in the range + la première lettre dans la série ##//end_letter//## - the last letter in the range + la dernière lettre dans la série {{fbdoc item="desc"}} - ##**Defushort**## specifies that variables and arrays which aren't declared with a data type - or not declared at all - are implicitly declared of type ##[[KeyPgUshort Ushort]]## if the first letter of their names matches a certain letter or lies within an inclusive range of letters. + ##**DefUShort**## précise que les variables et les tableaux qui ne sont pas déclarés avec un type de données - ou non déclarés entièrement - sont implicitement déclarés de type ##[[KeyPgUshort UShort]]## si la première lettre de leur nom correspond à une certaine lettre ou se trouve dans une plage inclusive de lettres. {{fbdoc item="ex"}} - This will make ##uNumber## a ##[[KeyPgUshort Ushort]]## number since it's first letter starts with u. + Ceci fera de ##uNumber## un nombre ##[[KeyPgUshort UShort]]## car sa première lettre est u. {{fbdoc item="filename" value="examples/manual/switches/defushort.bas"}}%%(freebasic) '' Compile with -lang fblite @@ -25,11 +25,11 @@ Dim uNumber %% {{fbdoc item="lang"}} - - Available in the //[[CompilerOptlang -lang fblite]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Defushort""**##. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fblite]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Defushort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDefint Defint]]## diff --git a/fbdocs/manual/cache/KeyPgDestructor.wakka b/fbdocs/manual/cache/KeyPgDestructor.wakka index ed37034abc..7a4028c635 100644 --- a/fbdocs/manual/cache/KeyPgDestructor.wakka +++ b/fbdocs/manual/cache/KeyPgDestructor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DESTRUCTOR"}}---- -Called automatically when a class or user defined type goes out of scope or is destroyed +Appelé automatiquement lorsqu'une classe ou un type défini par l'utilisateur est hors de portée ou est détruit {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -13,18 +13,18 @@ Called automatically when a class or user defined type goes out of scope or is d ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## of ##[[KeyPgClass Class]]## + nom du ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## {{fbdoc item="desc"}} - The destructor method is called when a user defined ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## variable goes out of scope or is destroyed explicitly with the ##[[KeyPgOpDelete Delete]]## operator. + La méthode ##**Destructor**## est appelée lorsqu'un ##[[KeyPgType Type]]## défini par l'utilisateur ou une variable ##[[KeyPgClass Class]]## est hors de portée ou est détruit explicitement avec l'opérateur ##[[KeyPgOpDelete Delete]]##. - The ##**Destructor**## method is passed a hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//##. + La méthode ##**Destructor**## est passée à un paramètre caché ##[[KeyPgThis This]]## qui a le même type que ##//typename//##. - The destructor in a type is called before the destructors on any of its fields. Therefore, all fields are accessible with the hidden ##[[KeyPgThis this]]## parameter in the destructor body. + Le ##**Destructor**## dans un type est appelé avant les ##**Destructor**##s de ses propres champs. Par conséquent, tous les champs sont accessibles avec le paramètre caché ##[[KeyPgThis This]]## dans le corps du destructeur. - Only one destructor may be declared and defined per type. + Un seul destructeur peut être déclaré et défini par type. - Since the ##[[KeyPgEnd End]]## statement does not close any scope, object destructors will not automatically be called if the ##[[KeyPgEnd End]]## statement is used to terminate the program. + Comme la déclaration ##[[KeyPgEnd End]]## ne ferme aucune portée, les destructeurs d'objet ne seront pas automatiquement appelés si l'instruction ##[[KeyPgEnd End]]## est utilisée pour terminer le programme. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/destructor.bas"}}%%(freebasic) @@ -55,7 +55,7 @@ end scope MySub %% -Output: +Affichera: %% Creating: main.x Creating: main.scope.x @@ -63,18 +63,18 @@ Destroying: main.scope.x Creating: A.x Destroying: A.x Destroying: main.x -%% {{fbdoc item="lang"}} - - Object-related features are supported only in the //[[CompilerOptlang -lang fb]]// dialect. +- Les caractéristiques liées à l'objet sont prises en charge uniquement dans le dialecte //[[CompilerOptlang -lang fb]]// + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgClass Class]]## +- ##[[KeyPgClass Class]]## - ##[[KeyPgConstructor Constructor]]## - ##[[KeyPgOpDelete Delete]]## - ##[[KeyPgModuleDestructor Destructor (Module)]]## - ##[[KeyPgType Type]]## + - ##[[KeyPgType Type]]## {{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDim.wakka b/fbdocs/manual/cache/KeyPgDim.wakka index 6fed8c2fb5..0e09fb794e 100644 --- a/fbdocs/manual/cache/KeyPgDim.wakka +++ b/fbdocs/manual/cache/KeyPgDim.wakka @@ -1,33 +1,33 @@ {{fbdoc item="title" value="DIM"}}---- -Declares a variable +Déclare une variable {{fbdoc item="syntax"}} - Declaring a Single Variable: + Déclaration d'une variable unique: ##**Dim** [[[KeyPgShared Shared]]] //symbolname// [As [[DataType DataType]]] [, ...]## ##**Dim** [[[KeyPgShared Shared]]] As [[DataType DataType]] //symbolname// [, ...]## - Declaring Arrays: + Déclaration de tableaux: ##**Dim** [[[KeyPgShared Shared]]] //symbolname// ( [//lbound// To] //ubound// [, ...] ) [As [[DataType DataType]]] [,...]## ##**Dim** [[[KeyPgShared Shared]]] As [[DataType DataType]] //symbolname// ( [//lbound// To] //ubound// [, ...] ) [,...]## - Initializing Values: + Initialisation de variables: ##**Dim** //scalar_symbol// As [[DataType DataType]]] = //expression// | [[KeyPgAny Any]]## ##**Dim** //array_symbol// ([//lbound// To] //ubound//) [AS [[DataType DataType]]] => { //expression// [, ...] } | [[KeyPgAny Any]]## ##**Dim** //udt_symbol// As [[DataType DataType]] = ( //expression// [, ...] ) | [[KeyPgAny Any]]## {{fbdoc item="desc"}} - Declares a variable by name and reserves memory to accommodate it. + Déclare une variable par son nom et réserve de la mémoire pour la stocker. - Variables must be declared before they can be used in the //[[CompilerOptlang -lang fb]]// dialect or when using ##[[KeyPgOptionexplicit Option Explicit]]## in the other dialects. Only in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects variables may be used without first declaring them, in such a case they are called implicit variables. + Les variables doivent être déclarées avant leur utilisation dans le dialecte //[[CompilerOptlang -lang fb]]// ou lors de leur utilisation si vous utilisez l'##[[KeyPgOptionexplicit Option Explicit]]## des autres dialectes. Seuls les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]// acceptent que les variables soient utilisées sans déclaration préalable, dans ce cas elles sont appelées en tant que variables implicites. - ##**Dim**## can be used to declare and assign variables of any of the supported data types, user defined types, or enumerations. + ##**Dim**## peut être utilisé pour déclarer et affecter des variables de l'un des types de données pris en charge, types définis par l'utilisateur ou énumérations. - Depending on where and how a variable or array is declared can change how it is allocated in memory. See //[[ProPgStorageClasses Storage Classes]]//. + Selon l'endroit, où et comment une variable ou un tableau est déclaré peut changer la façon dont il(elle) est alloué(e) dans la mémoire. Voir //[[ProPgStorageClasses Classes de stockage]]//. -{{fbdoc item="section" value="Explicit Variables with Explicit Data Types"}} - In the default dialect //[[CompilerOptlang -lang fb]]//, each variable must be explicitly declared with a desired data type. Type suffixes are not allowed. +{{fbdoc item="section" value="Variables explicites avec des données de type explicite + Dans le dialecte par défaut //[[CompilerOptlang -lang fb]]//, chaque variable doit être explicitement déclarée avec le type de données désiré. Les suffixes de type ne sont pas permis. - More than one variable may be declared in a single ##**Dim**## statement by separating each variable declaration with a comma. + Plus d'une variable peut être déclarée dans un seul ##**Dim**## en séparant les déclarations de variable par des virgules. {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_1.bas"}}%%(freebasic) '' Variable declaration examples @@ -46,8 +46,8 @@ dim as integer mx, my, mz ,mb dim px as double ptr = @x %% -{{fbdoc item="section" value="Explicit Variables with Implicit Data Types"}} - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, even if the variable is declared explicitly, it will be given a default data type if the data type is not explicitly given either by name or by type suffix. The default data type is ##[[KeyPgSingle Single]]## in the //[[CompilerOptlang -lang qb]]// dialect and ##[[KeyPgInteger Integer]]## in the //[[CompilerOptlang -lang fblite]]// dialect. The default data type can be changed throughout a source listing by use of the ##**Def""###""**## statements. (for example, ##[[KeyPgDefint DefInt]]##, ##[[KeyPgDefstr DefStr]]##, ##[[KeyPgDefsng DefSng]]##) +{{fbdoc item="section" value="Variables explicites avec des types de données implicites + Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, même si la variable est déclarée explicitement, un type sera automatiquement attribué si le type de données n'est pas explicitement donné, soit par le nom, soit par le suffixe. Le type de données par defaut est ##[[KeyPgSingle Single]]## dans le dialecte //[[CompilerOptlang -lang qb]]// et ##[[KeyPgInteger Integer]]## dans le dialecte //[[CompilerOptlang -lang fblite]]//. Le type de données par défaut peut être changé au cours du listing du code source par l'utilisation des déclarations du style ##**Def###**##. (par exemple, ##[[KeyPgDefint DefInt]]##, ##[[KeyPgDefstr DefStr]]##, ##[[KeyPgDefsng DefSng]]##) {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_2.bas"}}%%(freebasic) '' Compile with -lang qb @@ -66,8 +66,8 @@ DefInt I-N Dim I, J, X, Y, T$, D As Double %% -{{fbdoc item="section" value="Arrays"}} - As with most BASIC dialects, ""FreeBASIC"" supports arrays with indexes ranging from a lower bound to an upper bound. In the syntaxes shown, ##//lbound//## refers to the lower bound, or the smallest index. And ##//Ubound//## refers to the upper bound, or the largest index. If a lower bound is not specified, it is assumed to be zero by default, unless ##[[KeyPgOptionbase Option Base]]## is used. +{{fbdoc item="section" value="Tableaux + Comme avec la plupart des dialectes BASIC, FreeBasic supporte les tableaux avec des indices allant d'une limite inférieure à une limite supérieure. Dans les différentes syntaxes ci-dessus, ##//lbound//## se réfère à la limite inférieure, ou au plus petit indice. Et ##//Ubound//## se réfère à la limite supérieure, ou au plus grand indice. Si la limite inférieure n'est pas spécifiée, elle sera zéro par défaut, à moins que ##[[KeyPgOptionbase Option Base]]## ne soit utilisée. {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_3.bas"}}%%(freebasic) Const upperbound = 10 @@ -77,7 +77,7 @@ Const upperbound = 10 Dim array(upperbound) As Single %% - Multidimensional arrays can be declared as well. and are stored in row-major order: values with the same last index are contiguous. (This is different from QB's default). The maximum number of dimensions of a multidimensional array is 8. + Les tableaux multi-dimensionnels peuvent être déclarés ainsi et sont stockés dans l'ordre des lignes: les valeurs avec le même dernier indice sont contiguës. (Ceci est différent de QB par défaut. Le nombre maximum de dimensions d'un tableau multi-dimensionnel est de 8. {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_4.bas"}}%%(freebasic) '' declare a three-dimensional array of single @@ -87,36 +87,36 @@ Dim array(1 To 2, 6, 3 To 5) As Single '' The first dimension of the declared array '' has indices from 1 to 2, the second, 0 to 6, '' and the third, 3 to 5. -%% +%% - For more information on arrays see [[ProPgArrays Arrays Overview]]. + Pour plus d'informations sur les tableaux voir [[ProPgArrays Vue d'ensemble sur les tableaux ]]. - If the values used with ##**Dim**## to declare the dimensions of an array are all constants, the array will be created ##[[KeyPgOptionstatic Static]]## (unless ##[[KeyPgOptiondynamic Option Dynamic]]## is specified), while using one or more variables to declare the dimensions of an array makes it variable length, even if ##[[KeyPgOptionstatic Option Static]]## is in effect. + Si les valeurs utilisées avec ##**Dim**## pour déclarer les dimensions d'un tableau sont toutes des constantes, le tableau sera créé ##[[KeyPgOptionstatic Static]]## (sauf si l'##[[KeyPgOptiondynamic Option Dynamic]]## est spécifiée), bien qu'en utilisant une ou plusieurs variables pour déclarer les dimensions d'un tableau cela le rende de longueur variable, même si l'##[[KeyPgOptionstatic Option Static]]## est effective. - Arrays can be declared as variable length in several ways: Using ##**Dim**## with an empty set of indexes (##**Dim** x()##), using ##**Dim**## with indexes that are variables or using the keyword ##[[KeyPgRedim Redim]]##, or declaring it past the metacommand ##[[KeyPgMetaDynamic $Dynamic]]##. Variable length arrays can't use initializers. + Les tableaux peuvent être déclarés de longueur variable de plusieurs façons: en utilisant ##**Dim**## avec un ensemble vide d'indices (##**Dim** x()##), en utilisant ##**Dim**## avec des indices qui sont des variables ou en utilisant le mot-clef ##[[KeyPgRedim ReDim]]##, ou le en déclarant par la méta-commande ##[[KeyPgMetaDynamic $Dynamic]]##. les tableaux de longueur variable ne peuvent pas utiliser des initialiseurs. - Arrays declared with ##**Dim**## having constant indexes and not preceeded by ##[[KeyPgOptiondynamic Option Dynamic]]## are fixed length (not resizable at runtime) and can use initializers. + Les tableaux déclarés avec ##**Dim**## ayant des indices constants et non précédés par ##[[KeyPgOptiondynamic Option Dynamic]]## sont de longueur fixe (non redimensionnables pendant l'exécution) et peuvent utiliser des initialiseurs. - The upper bound can be an ellipsis (##[[KeyPgDots ...]]##, 3 dots). This will cause to upper bound to be set automatically based on the number of elements found in the initializer. When ellipsis is used in this manner, an initializer must be used, and it may not be ##**Any**##. See the [[KeyPgDots Ellipsis]] page for a short example. + La limite supérieure peut être suggérée (##[[KeyPgDots ...]]##, 3 points). Ainsi la limite supérieure sera réglée automatiquement en fonction du nombre d'éléments présents lors de l'initialisation. Lorsque l'ellipse est utilisée de cette manière, un initialiseur doit être utilisé, et il ne peut pas être ##**Any**##. Voir la page [[KeyPgDots Ellipse - suggestion]] pour un court exemple. - See also //[[ProPgFixLenArrays Fixed-Length Arrays]]// and //[[ProPgVarLenArrays Variable-Length Arrays]]//. + Voir aussi //[[ProPgFixLenArrays Tableaux de longueur fixe]]// et //[[ProPgVarLenArrays Tableaux de longueur variable]]//. -{{fbdoc item="section" value="Initializers"}} - Arrays, variables, strings, and user defined types (UDTs) are initialized to zero or null strings by default when they are created. +{{fbdoc item="section" value="Initialiseurs + Tableaux, variables, chaînes et types définis par l'utilisateur sont initialisés à zéro ou avec des chaînes nulles par défaut lors de leur création. - To avoid the overhead of initializing the variables the ##**Any**## initializer can be used with ##**Dim**## to tell the compiler to only reserve the place for the variable in memory but don't initialize it, so the variable will contain garbage. In this case the programmer should not make assumptions about the initial values. + Pour éviter la surcharge des variables à l'initialisation, l'initialiseur ##**Any**## peut être utilisé avec ##**Dim**## pour dire au compilateur de seulement réserver de la place en mémoire pour la variable, mais qu'elle ne doit pas être initialisée, de sorte que la variable contiendra n'importe quoi. Dans ce cas, le programmeur ne doit pas tenir compte des valeurs initiales. - Fixed-length arrays, variables, zstrings and UDTs may be given a value at the time of their declaration by following the variable declaration with an initializer. Note the difference between initializing different types. Arrays, variables and UDTs are initialized as they would in a normal assignment, using an equal ( ##=## ) sign. The ##=>## sign can be used with fixed length strings to avoid the declaration resembling an expression. + Les tableaux à longueur fixe, les variables, les zstrings et les types définis par l'utilisateur peuvent recevoir une valeur au moment de leur déclaration, en faisantsuivre la déclaration de la variable par un initialiseur. Notez la différence entre les différents types d'initialisation. Les tableaux, les variables et les types définis par l'utilisateur sont initialisés comme dans une affectation normale, en utilisant un signe d'égalité ( ##=## ). Le signe ##=>## peut être utilisé avec des chaînes de longueur fixe, pour éviter que la déclaration ne ressemble à une expression. - Array values are given in comma-delimited values enclosed by curly brackets, and UDT values are given in comma delimited values enclosed by parenthesis. These methods of initializing variables can be nested within one another for complex assignments. Nesting allows for arrays of any dimension to be initialized. + Les valeurs d'un tableau sont données par des valeurs séparées par des virgules, l'ensemble délimité par des accolades, et les valeurs des types utilisateur sont données par des valeurs séparées par des virgules, le tout délimité par des parenthèses. Ces méthodes d'initialisation des variables peuvent être imbriquées les unes dans les autres pour des tâches complexes. L'imbrication permet l'initialisation de tableaux de n'importe quelle dimension. {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_5.bas"}}%%(freebasic) '' Declare an array of 2 by 5 elements '' and initialize Dim array(1 To 2, 1 To 5) As Integer => {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}} -%% +%% - {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_6.bas"}}%%(freebasic) + %%(freebasic) '' declare a simple UDT Type mytype var1 As Double @@ -126,13 +126,13 @@ End Type '' declare a 3 element array and initialize the first '' 2 mytype elements Dim myvar(0 To 2) As mytype => {(1.0, 1), (2.0, 2)} -%% - For module-level, fixed-length, or global variables, initialized values must be constant expressions. ""FreeBASIC"" will report a compile-time error if otherwise. +%% + Au niveau module, de longueur fixe ou variables globales, les valeurs d'initialisation doivent être des expressions constantes. FreeBasic signalera autrement une erreur de compilation. - Note: Initializing UDT's with strings is not supported at this time. + Note: L'initialisation de types de données utilisateur avec des chaînes n'est pas supportée pour le moment. -{{fbdoc item="section" value="Explicit Variables with Type Suffixes"}} - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the data type of a variable may be indicated with a type suffix ( ##$## ##%## ##""#""## ##!## ##&## ). +{{fbdoc item="section" value="Variables explicites avec type suffixes + Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, le type de données d'une variable peut être indiquée par un suffixe de type ( ##$## ##%## ##### ##!## ##&## ). {{fbdoc item="filename" value="examples/manual/check/KeyPgDim_7.bas"}}%%(freebasic) '' Compile with -lang qb or fblite @@ -197,17 +197,17 @@ Print "ZString: "; Len(*s3) Deallocate(s3) %% -{{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, variables have procedure scope if the variable is defined inside a procedure, and for the entire module if the variable is defined with ##**Dim Shared**##. - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects, variables defined inside compound block statements (##[[KeyPgFornext For..Next]]##, ##[[KeyPgWhilewend While..Wend]]##, ##[[KeyPgDoloop Do..Loop]]##, ##[[KeyPgScope Scope..End Scope]]##) have local [[ProPgVariableScope scopes]], and are visible only within these blocks. - - In the //[[CompilerOptlang -lang fb]]// dialect, ##**Option**## statements (e.g. ##[[KeyPgOptionbase Option Base]]##, ##[[KeyPgOptiondynamic Option Dynamic]]##), metacommands(e.g. ##[[KeyPgMetaStatic $Static]]##) and ##**Def""###""**## statements (e.g. ##[[KeyPgDefint DefInt]]##) are not allowed. +{{fbdoc item="section" value="Differences de dialectes + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les variables ont une portée procédure si elles sont définies dans une procédure, et pour l'ensemble du module si elles sont définies avec ##**Dim Shared**##. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang deprecated]]//, les variables définies à l'intérieur de blocs composés (##[[KeyPgFornext For..Next]]##, ##[[KeyPgWhilewend While..Wend]]##, ##[[KeyPgDoloop Do..Loop]]##, ##[[KeyPgScope Scope..End Scope]]##) ont une [[ProPgVariableScope portée]] locale, et ne sont visibles que dans ces blocs. + - Dans le dialecte //[[CompilerOptlang -lang fb]]//, la déclaration ##**Option**## (par exemple ##[[KeyPgOptionbase Option Base]]##, ##[[KeyPgOptiondynamic Option Dynamic]]##), les métacommandes (par exemple ##[[KeyPgMetaStatic $Static]]##) et les ##**Def###**## (par exemple ##[[KeyPgDefint DefInt]]##) ne sont pas permises. {{fbdoc item="diff"}} - - Variable Initializers are new to ""FreeBASIC"". - - The alternate syntax ##Dim As DataType //symbolname//, [...]## is new to ""FreeBASIC"". - - Multidimensional arrays are stored in row-major order in ""FreeBASIC"", they were stored in column-major order in QB by default. Row major order: values with the same last index are contiguous. Column-major order: values with the same first index are contiguous. - - Variable length arrays up to 2 ""GiB"" in size are possible in ""FreeBASIC"". In QB, ##$STATIC## arrays were limited to 64 ""KiB"" , or to the DOS memory available (several 100 ""KiB"" at best) if made ##$DYNAMIC## and ///AH// was used. - - The ellipsis form for upper bounds is new to ""FreeBASIC"". + - Les initialiseurs de variables sont nouveaux pour FreeBASIC + - La syntaxe alternative ##Dim As DataType //symbolname//, [...]## est nouvelle pour FreeBASIC + - Les tableaux multidimensionnels sont stockés dans l'ordre ligne-prioritaire dans FreeBASIC, ils sont stockés dans l'ordre des colonnes-prioritaire dans QB par défaut. Ordre ligne-prioritaire: les valeurs avec le même indice de fin sont contiguës. Ordre colonne-prioritaire: les valeurs avec le même indice de début sont contiguës. + - Des tableaux de longueur variable jusqu'à 2 Go de taille sont possibles dans FreeBASIC. Dans QB, ##$STATIC## les tableaux sont limités à 64 KiB , ou à la mémoire DOS libre (quelques 100 KiB, au mieux) si ##$DYNAMIC## et ///AH// sont utilisés. + - La forme elliptique pour les limites supérieures est nouvelle pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgVar Var]]## diff --git a/fbdocs/manual/cache/KeyPgDir.wakka b/fbdocs/manual/cache/KeyPgDir.wakka index d8bd9018db..ac8bf8529f 100644 --- a/fbdocs/manual/cache/KeyPgDir.wakka +++ b/fbdocs/manual/cache/KeyPgDir.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DIR"}}---- -Searches for and returns information about an item in the filesystem, performs a directory search. +Recherche et renvoie des informations sur un élément dans le système de fichiers, effectue une recherche dans les répertoire. {{fbdoc item="syntax"}}## # [[KeyPgInclude include]] "dir.bi" @@ -17,60 +17,60 @@ Searches for and returns information about an item in the filesystem, performs a ## {{fbdoc item="param"}} ##//item_spec//## - The pattern to match an item's name against. + Le modèle correspondant au nom d'un élément. ##//attrib_mask//## - The bit mask to match an item's attributes against. + Le masque de bits correspondant aux attributs d'un élément. ##//out_attrib//## - Reference to a bit mask that's assigned each of the found item's attributes, if any. + Référence à un masque de bits qui est assigné à chacun des attributs de l'objet trouvé, le cas échéant. ##//p_out_attrib//## - Pointer to a bit mask that's assigned each of the found item's attributes, if any. + Pointeur vers un masque de bits qui est assigné à chacun des attributs de l'objet trouvé, le cas échéant. -{{fbdoc item="ret"}} - If no item matching the name ##//item_spec//## or the attribute mask ##//attrib_mask//## was found, then ##//out_attrib//## (or ##*//p_out_attrib//##) is assigned to zero and an empty string is returned. Otherwise, ##//out_attrib//## (or ##*//p_out_attrib//##) is assigned the attribute mask of the item, and the item name, without a path, is returned. +{{fbdoc item="section" value="Valeur retournée + Si aucun item correspondant au nom ##//item_spec//## ou au masque d'attribut ##//attrib_mask//## nest trouvé, alors ##//out_attrib//## (ou ##*//p_out_attrib//##) reçoit la valeur zéro et ue chaîne vide est retournée. Autrement, ##//out_attrib//## (ou ##*//p_out_attrib//##) reçoit le masque d'attribut de l'item, et le nom de l'item, sans chemin, est retourné. {{fbdoc item="desc"}} - If ##//item_spec//## contains an absolute path, then the first procedure searches the filesystem for an item that matches the name ##//item_spec//## and whose attributes are all contained in ##//attrib_mask//##. Otherwise, it searches relative to the current directory (see ##[[KeyPgCurdir CurDir]]##). In any case, if a matching item is not found, ##//out_attrib//## is assigned to zero and an empty string is returned. Otherwise, ##//out_attrib//## is assigned with the attribute flags of the item, and the name of the item, without a path, is returned. + Si ##//item_spec//## contient un chemin absolu, alors la première procédure recherche dans le système de fichiers un item qui correspond au nom ##//item_spec//## et dont tous les attributs sont tous contenus dans ##//attrib_mask//##. Autrement, il recherche par rapport au répertoire courant (voir ##[[KeyPgCurdir CurDir]]##). En tout cas, si aucun élément correspondant n'est trouvé, zéro est attribué à ##//out_attrib//## et une chaîne vide est retournée. Sinon, ##//out_attrib//## est affecté avec les indicateurs d'attribut de l'élément, et le nom de l'élément, sans chemin d'accès, est retourné. - ##//item_spec//## may include an asterisk (##*##, for matching any adjacent characters) or one or more question marks (##?##, for matching any individual character). If it does, the procedure searches for the first such item. If found, subsequent calls with ##//item_spec//## equal to an empty string will return the next item matching the name ##//item_spec//## until no more such items are found. If ##//attrib_mask//## is omitted from these subsequent calls, the procedure searches for items with the same attributes as in the previous call. + ##//item_spec//## peut inclure un astérisque (##*##, pour correspondre à des caractères adjacents) ou un ou plusieurs points d'interrogation (##?##, pour correspondre à tout caractère individuel). Si c'est le cas, la procédure recherche le premier item du genre. S'il est trouvé, les appels suivants avec ##//item_spec//## égal à une chaîne vide retournera l'élément suivant correspondant au nom ##//item_spec//## jusqu'à ce qu'aucun autre item correspondant ne soit trouvé. Si ##//attrib_mask//## est omis de ces appels ultérieurs, la procédure recherche des items avec les mêmes attributs que lors de l'appel précédent. - The second procedure behaves the same as ##**Dir**( //item_spec//, //attrib_mask//, *//p_out_attrib// )##. + La seconde procédure a le même comportement que ##**Dir**( //item_spec//, //attrib_mask//, *//p_out_attrib// )##. - The third procedure behaves the same as ##**Dir**( "####", , //out_attrib// )##. + La troisième procédure a le même comportement que ##**Dir**( "####", , //out_attrib// )##. - The fourth procedure behaves the same as ##**Dir**( "####", , *//p_out_attrib// )##. + La quatrième procédure a le même comportement que ##**Dir**( "####", , *//p_out_attrib// )##. -**File Attributes:** - Files and directories and other items can be said to possess so-called file attributes; metadata that describes the item. The meaning of this metadata varies with operating system and the file system it uses. The following macros are used as bit-flags with ##//attrib_mask//##, ##//out_attrib//## and ##*//p_out_attrib//##. Their values can be combined to form a mask using ##[[KeyPgOpOr Operator Or]]##, or individual values can be checked using ##[[KeyPgOpAnd Operator And]]##. To access them, ##[[KeyPgInclude Include]] "dir.bi"##. +**Attributs des fichiers:** + Les fichiers, répertoires et autres items, si on peut dire, possèdent des sortes d'attributs de fichier; les métadonnées qui décrivent l'item. Le sens de ces métadonnées varie en fonction du système d'exploitation et du système utilisé. Les macros suivantes sont utilisées comme "bit-flags" avec ##//attrib_mask//##, ##//out_attrib//## et ##*//p_out_attrib//##. Leurs valeurs peuvent être combinées pour former un masque en utilisant l'##[[KeyPgOpOr Opérateur Or]]##. Pour y accéder, ##[[KeyPgInclude Include]] "dir.bi"##. - ## # define fbReadOnly &h01 ## - //The item cannot be written to or deleted.// - **DOS & Windows**: The item has the "read-only" attribute set. - **Linux**:The item has no write permissions associated with the current user or group, nor is it globally writable. (Whether or not the user has root permissions is ignored.) + Les items trouvés sans attributs correspondent toujours, indépendamment de la valeur de ##//attrib_mask//##. Un item ne correspondra pas s'il a un ou plusieurs attributs qui ne sont pas spécifiés dans ##//attrib_mask//##. De plus, si ##//attrib_mask// [[KeyPgOpAnd And]] **fbArchive**## égale zéro, alors ##//attrib_mask//## est attribué à ##//attrib_mask// [[KeyPgOpOr Or]] **fbDirectory**## avant de vérifier si les attributs du fichier correspondent. + ## # define fbReadOnly &h01 ## + //L'item ne peut être écrit ou supprimé.// + **DOS & Windows**: L'item a l'attribut "read-only" (lecture seule) validé. - ## # define fbHidden &h02 ## - //The item is hidden in ordinary directory listings.// - **DOS & Windows**: The item has the "hidden" attribute set. - **Linux**: The item's name has a period (##.##) as the first character. + **Linux**:L'item n'a pas de permission d'écriture associée avec l'utilisateur ou le groupe courant, il n'est pas accessible en écriture au niveau global. (Que l'utilisateur ait ou non les permissions "root" n'a aucune importance.) + ## # define fbHidden &h02 ## + //L'item est caché dans dans une liste normale de répertoire.// + **DOS & Windows**: L'item a l'attribut "hidden" (caché) validé. - ## # define fbSystem &h04 ## - //The item is used almost exclusively by the system.// - **DOS & Windows**: The item has the "system" attribute set. - **Linux**: The item is either a character device, block device, named pipe (FIFO) or Unix socket. + **Linux**: Le nom de l'item a un point (##.##) comme premier caractère. + ## # define fbSystem &h04 ## + //L'item est utilisé presque exclusivement par le système.// + **DOS & Windows**: L'item a l'attribut "system" (système) validé. - ## # define fbDirectory &h10 ## - //The item is a directory. Includes the current (##.##) and parent (##..##) directories as well.// - **DOS & Windows & Linux**: The item is a directory. + **Linux**: L'item est soit un périphérique en mode caractère, un périphérique en mode bloc, un tube nommé (FIFO) ou un socket Unix. + ## # define fbDirectory &h10 ## + //L'item est un répertoire. Inclus les répertoire courant (##.##) et parent (##..##).// - ## # define fbArchive &h20 ## - //The item may be backed up after some automated operations.// - **DOS & Windows**: The item has the "archive" attribute set (automatically set after every write access to a file). - **Linux**: The item is not a directory; typical filesystems do not support this metadata. + **DOS & Windows**: L'item a l'attribut "directory" (répertoire) validé. + **Linux**: L'item est un répertoire. + ## # define fbArchive &h20 ## + //L'item peut être sauvegardé après quelque opération automatisée.// - ## # define fbNormal (fbReadOnly or fbArchive) ## - //The item is a file or directory.// + **DOS & Windows**: L'item a l'attribut "archive" validé. + **Linux**: L'item n'est pas un répertoire; les systèmes de fichiers typiques ne supportent pas ces métadonnées. - Items found having no attributes are always matched, regardless of the value of ##//attrib_mask//##. An item will not be matched if it has one or more attributes that aren't specified in ##//attrib_mask//##. - If ##//attrib_mask//## does not include ##**fbArchive**##, then ##**Dir**## may widen the check to include ##**fbDirectory**##, but it is recommended to add ##**fbDirectory**## explicitly, if that is the behaviour sought. Finer control can be gained by checking the ##//out_attrib//## value for the desired set of attributes. + ## # define fbNormal (fbReadOnly ou fbArchive) ## + //L'item est un fichier ou un répertoire.// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/dir.bas"}}%%(freebasic) @@ -118,17 +118,17 @@ Do Until Len(fname) = 0 '' loop until Dir returns empty string Print fname, - If (out_attr And fbDirectory) <> 0 Then + If out_attr And fbDirectory Then Print "- directory"; dircount += 1 Else Print "- file"; filecount += 1 End If - If (out_attr And fbReadOnly) <> 0 Then Print ", read-only"; - If (out_attr And fbHidden) <> 0 Then Print ", hidden"; - If (out_attr And fbSystem) <> 0 Then Print ", system"; - If (out_attr And fbArchive) <> 0 Then Print ", archived"; + If out_attr And fbReadOnly Then Print ", read-only"; + If out_attr And fbHidden Then Print ", hidden"; + If out_attr And fbSystem Then Print ", system"; + If out_attr And fbArchive Then Print ", archived"; Print End If @@ -142,15 +142,15 @@ Print "Found " & filecount & " files and " & dircount & " subdirs" %% {{fbdoc item="target"}} - - Linux requires the ##//filename//## case to match the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes ##/##. Windows uses backslashes ##\## but it allows for forward slashes. DOS uses backslashes. - - In DOS, the attrib mask value of ##&h37## (##&h3F## usually works also, but ##&h37## is safer) returns all files and directories, including "." and "..", but no Volume: the value ##8## returns the Volume, even if current directory is not the main directory. + - Linux requiert que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin, sous Linux, sont des barres obliques ##/##. Windows utilise des anti-slashs ##\## mais il permet de barres obliques. DOS utilise des anti-slashs. + - Sous DOS, une valeur du masque "attrib" de ##&h37## (##&h3F## fonctionne habituellement aussi, mais ##&h37## est plus sûr) retourne tous les fichiers et répertoires, incluant "." and "..", mais pas de "Volume": la valeur ##8## retourne le "Volume", même si le répertoire courant n'est pas dans le répertoire principal. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Dir""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Dir**##. {{fbdoc item="diff"}} - - Not found in ""QBasic"" but present in Visual Basic. The ##//out_attrib//## parameter is new to ""FreeBASIC"". + - N'existe pas en QBasic mais en Basic. Le paramètre ##//out_attrib//## est nouveau pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgDo.wakka b/fbdocs/manual/cache/KeyPgDo.wakka index 0041f37b5e..3c160eb985 100644 --- a/fbdocs/manual/cache/KeyPgDo.wakka +++ b/fbdocs/manual/cache/KeyPgDo.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DO"}}---- -Control flow statement for looping. +Déclaration de contrôle de flux pour une boucle. {{fbdoc item="syntax"}}## **Do** [ { **Until** | **While** } //condition// ] @@ -11,7 +11,7 @@ Control flow statement for looping. **Loop** [ { **Until** | **While** } //condition// ] ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDoloop Do...Loop]]## diff --git a/fbdocs/manual/cache/KeyPgDoloop.wakka b/fbdocs/manual/cache/KeyPgDoloop.wakka index a40088b369..0d7d29debb 100644 --- a/fbdocs/manual/cache/KeyPgDoloop.wakka +++ b/fbdocs/manual/cache/KeyPgDoloop.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="DO...LOOP"}}---- -Control flow statement for looping +Déclaration de contrôle de flux pour une boucle. {{fbdoc item="syntax"}}## **Do** [ { **Until** | **While** } //condition// ] [ //statement block// ] **Loop** -//or// +//ou// **Do** [ //statement block// ] **Loop** [ { **Until** | **While** } //condition// ] ## {{fbdoc item="desc"}} - The ##**Do**## statement executes the statements in the following //statement block// until/while the //condition//, if any, evaluates to true. + L'instruction ##**Do**## exécute les instructions dans le //statement block (= bloc d'instructions)// jusqu'à ce que / tandis que la //condition//, s'il y en a une, soit vraie. - If ##**Until**## is used, the ##**Do**## statement stops repetition of the //statement block// when //condition// evaluates to true. The ##**While**## keyword has opposite effect, stopping the loop if //condition// evaluates to false. If both //condition// and either ##**Until**## or ##**While**## are omitted, the ##**Do**## statement loops indefinitely. + Si ##**Until**## est utilisé, la déclaration ##**Do**## arrête la répétition du //statement block (= bloc d'instructions)// quand //condition// devient vraie. Le mot-clé ##**While**## a un effet contraire, il arrête la boucle si //condition// est vraie. Si les deux //condition// et soit ##**Until**## ou ##**While**## sont omis, l'instruction ##**Do**## boucle indéfiniment. - If an ##[[KeyPgExit Exit]]## ##**Do**## statement is encountered inside the //statement block//, the loop is terminated, and execution resumes immediately following the enclosing ##**Loop**## statement. If a ##[[KeyPgContinue Continue]]## ##**Do**## statement is encountered, the rest of the //statement block// is skipped and execution resumes at the ##**Do**## statement. + Si une instruction ##[[KeyPgExit Exit]]## ##**Do**## est rencontrée à l'intérieur du //statement block (= bloc d'instructions)//, la boucle est terminée, et l'exécution reprend immédiatement après la déclaration ##**Loop**## qui l'enferme. Si une déclaration ##[[KeyPgContinue Continue]]## ##**Do**## est rencontrée, le reste du //statement block (= bloc d'instructions) // est ignoré et l'exécution reprend à l'instruction ##**Do**##. - In the first syntax, the //condition// is checked when the ##**Do**## statement is first encountered, and if the //condition// is met, the //statement block// will be skipped. In the second syntax, //condition// is initially checked //after// the //statement block// is executed. This means that the //statement block// is always guaranteed to execute //at least// once. + Dans la première syntaxe, la //condition// est vérifiée lorsque l'instruction ##**Do**## est rencontrée pour la première fois et si la //condition// est remplie, le //statement block (= bloc d'instructions)// sera ignoré. Dans la seconde syntaxe, la //condition// est d'abord vérifiée //après// l'exécution du //statement block (= bloc d'instructions)//. Cela signifie que le //statement block (= bloc d'instructions)// est toujours garanti d'être exécuté //au moins// une fois. - //condition// may be any valid expression that evaluates to False (zero) or True (non-zero). + //condition// peut être n'importe quelle expression valide qui a la valeur False (zéro) ou True (non nul). {{fbdoc item="ex"}} - In this example, a ##**Do**## loop is used to count the total number of odd numbers from 1 to 10. It will repeat //until// it's //n > 10// condition is met: + Dans cet exemple, une boucle ##**Do**## est utilisée pour compter le nombre total de nombres impairs de 1 à 10. La boucle sera répétée //until = jusqu'à// ce que la condition //n > 10// soit remplie: {{fbdoc item="filename" value="examples/manual/control/do-loop.bas"}}%%(freebasic) dim as integer n = 1 '' number to check dim as integer total_odd = 0 '' running total of odd numbers @@ -35,7 +35,7 @@ print "total odd numbers: " ; total_odd '' prints '5' end 0 %% - Here, an infinite DO loop is used to count the total number of evens. We place the conditional check inside the loop via an ##[[KeyPgIfthen If...Then]]## statement, which exits the loop if and when //n > 10// becomes true: + Ici, une boucle DO infinie est utilisée pour compter le nombre total de nombres pairs. Nous plaçons le test de condition dans la boucle par l'intermédiaire de ##[[KeyPgIfthen If...Then]]##, qui fait sortir de la boucle quand //n > 10// devient vrai: {{fbdoc item="filename" value="examples/manual/control/do-loop2.bas"}}%%(freebasic) dim as integer n = 1 '' number to check dim as integer total_even = 0 '' running total of even numbers @@ -51,11 +51,11 @@ end 0 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, variables declared inside a DO..LOOP block have a function-wide [[ProPgVariableScope scope]] as in QB - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects, variables declared inside a FOR..NEXT block are visible only inside the block, and can't be accessed outside it. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les variables déclarées dans le bloc de la boucle DO..LOOP ont une [[ProPgVariableScope portée]] à l'échelle de la fonction comme dans QB. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang deprecated]]//, les variables déclarées dans un bloc FOR..NEXT ne sont visibles que dans ce bloc et ne peut être consultées à l'extérieur. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgContinue Continue]]## diff --git a/fbdocs/manual/cache/KeyPgDots.wakka b/fbdocs/manual/cache/KeyPgDots.wakka index 12244b7014..da4326971b 100644 --- a/fbdocs/manual/cache/KeyPgDots.wakka +++ b/fbdocs/manual/cache/KeyPgDots.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="... (Ellipsis)"}}---- -Used in place of procedure parameter to pass a variable number of arguments, or as the upper bound in an array declaration to denote that the number of elements will be determined by the initializer. +Utilisé à la place d'un paramètre de procédure pour passer un nombre variable d'arguments, ou comme limite supérieure dans une déclaration de tableau pour indiquer que le nombre d'éléments sera déterminé par l'initialiseur. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //proc_name// [[KeyPgCdecl cdecl]] ( //param// [[KeyPgAs as]] [[DataType datatype]], **...** ) @@ -8,25 +8,35 @@ Used in place of procedure parameter to pass a variable number of arguments, or [[KeyPgPpdefine #define]] //identifier//( [ //parameters//, ] //variadic_parameter//**...** ) //macro_text// ## - {{fbdoc item="desc"}} - The ellipsis (three dots, ##**...**##) is used in procedure declarations and definitions to indicate a variable argument list. A first argument must always be specified and the function must be called with the C calling convention ##[[KeyPgCdecl cdecl]]##. In the procedure body, ##[[KeyPgVaFirst va_first]]##, ##[[KeyPgVaArg va_arg]]## and ##[[KeyPgVaNext va_next]]## are used to handle the variable arguments. + Les points de suspension (trois points, ##**...**##) sont utilisés dans les déclarations de procédure et les définitions pour indiquer une liste d'arguments variable. Un premier argument doit toujours être spécifié et la fonction doit être appelée avec la convention d'appel ##[[KeyPgCdecl cdecl]]## du langage C. Dans le corps de la procédure, ##[[KeyPgVaFirst va_first]]##, ##[[KeyPgVaArg va_arg]]## et ##[[KeyPgVaNext va_next]]## sont utilisés pour traiter les arguments variables. + L'utilisation des points de suspension (##**...**##) pour remplacer la limite supérieure dans une déclaration de tableau, fait que la limite supérieure sera fixée selon les données qui apparaissent dans ##//expression_list//##. Lorsque l'ellipse est utilisée de cette manière, un initialiseur doit apparaître, et ne peut être ##[[KeyPgAny Any]]##. - Using an ellipsis in place of the upper bound in an array declaration causes the upper bound to be set according to the data that appears in the ##//expression_list//##. When the ellipsis is used in this manner, an initializer must appear, and cannot be ##[[KeyPgAny Any]]##. + L'utilisation de l'ellipse dans [[KeyPgPpdefine #define]] ou une déclaration de [[KeyPgPpmacro #macro]] permet de créer une macro variable, voir [[KeyPgPpdefine #define]]. - Using an ellipsis in a [[KeyPgPpdefine #define]] or [[KeyPgPpmacro #macro]] declaration allows to create a variadic macro, see [[KeyPgPpdefine #define]]. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/ellipsis.bas"}}%%(freebasic) -DECLARE FUNCTION FOO CDECL (X AS INTEGER, ...) AS INTEGER +Declare Function FOO cdecl (X As Integer, ...) As Integer %% - {{fbdoc item="ex"}} + {{fbdoc item="filename" value="examples/manual/array/ellipsis.bas"}}%%(freebasic) Dim As Integer myarray(0 To ...) = {0, 1, 2, 3} Print Lbound(myarray), Ubound(myarray) '' 0, 3 %% +{{fbdoc item="diff"}} +- Nouveau pour Freebasic +{{fbdoc item="see"}} +- ##[[KeyPgCdecl cdecl]]## +- ##[[KeyPgVaArg va_arg]]## + +- ##[[KeyPgVaFirst va_first]]## +- ##[[KeyPgVaNext va_next]]## +- ##[[KeyPgDim Dim]]## +- ##[[KeyPgStatic Static]]## + {{fbdoc item="diff"}} - New to ""FreeBASIC"" @@ -37,5 +47,6 @@ Print Lbound(myarray), Ubound(myarray) '' 0, 3 - ##[[KeyPgVaNext va_next]]## - ##[[KeyPgDim dim]]## - ##[[KeyPgStatic static]]## + - ##[[KeyPgPpdefine #define]]## {{fbdoc item="back" value="CatPgProcedures|Procedures"}}{{fbdoc item="back" value="CatPgVarArg|Variable Argument list"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDouble.wakka b/fbdocs/manual/cache/KeyPgDouble.wakka index 1af9200f35..c917426d16 100644 --- a/fbdocs/manual/cache/KeyPgDouble.wakka +++ b/fbdocs/manual/cache/KeyPgDouble.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="DOUBLE"}}---- -Standard data type: 64 bit floating point +Type de données standard: 64 bits à virgule flottante {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Double** ## {{fbdoc item="desc"}} - Double is a 64-bit, floating-point data type used to store more precise decimal numbers. They can hold positive values in the range ##4.940656458412465e-324## to ##1.797693134862316e+308##, or negative values in the range ##-4.940656458412465e-324## to ##-1.797693134862316e+308##, or zero (##0##). They contain at most 53 bits of precision, or about 15 decimal digits. + Double est un type de données 64-bit, à virgule flottante utilisé pour stocker précisément des nombres décimaux. Ils peuvent contenir des valeurs positives de ##4.940656458412465e-324## à ##1.797693134862316e+308##, ou négatives de ##-4.940656458412465e-324## à ##-1.797693134862316e+308##, ou zéro (##0##). Ils contiennent au plus 53 bits de précision ou jusqu'à 15 chiffres décimaux. - ##**Double**##s have a greater range and precision than ##[[KeyPgSingle Single]]##s, they still have limited accuracy which can lead to significant inaccuracies if not used properly. They are dyadic numbers - i.e. they can only accurately hold multiples of powers of two, which will lead to inaccuracies in most base-10 fractions. + Les ##**Double**##s ont une plus grande plage et plus de précision que les ##[[KeyPgSingle Single]]##s, ils ont encore une précision limitée qui peut conduire à des inexactitudes importantes s'ils ne sont pas utilisés correctement. Ce sont des nombres dyadiques - c'est à dire qu'ils ne peuvent représenter correctement que des multiples de puissances de deux, ce qui conduira à des inexactitudes dans la plupart des fractions en base 10. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/double.bas"}}%%(freebasic) @@ -21,11 +21,11 @@ sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgSingle Single]]## Less precise float type + - ##[[KeyPgSingle Single]]## Le moins précis des types à virgule flottante - ##[[KeyPgCdbl Cdbl]]## - - [[TblVarTypes]] Table with variable types overview, limits and suffixes + - ##[[TblVarTypes Types de variables standard et leurs limites]]##: Tableau des types de variables, leurs limites et suffixes {{fbdoc item="back" value="CatPgStdDataTypes|Standard Data Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDraw.wakka b/fbdocs/manual/cache/KeyPgDraw.wakka index 77e429e3a5..46f323f4cf 100644 --- a/fbdocs/manual/cache/KeyPgDraw.wakka +++ b/fbdocs/manual/cache/KeyPgDraw.wakka @@ -1,99 +1,99 @@ -{{fbdoc item="title" value="DRAW"}}---- -Statement for sequenced pixel plotting - -{{fbdoc item="syntax"}}## - **Draw** [//target//,] //cmd// -## -{{fbdoc item="param"}} - ##//target//## - the buffer to draw on - ##//cmd//## - a string containing the sequence of commands - -{{fbdoc item="desc"}} - Drawing will take place onto the current work page set via ##[[KeyPgScreenset ScreenSet]]## or onto the ##//target//## ##[[KeyPgGetgraphics Get]]##/##[[KeyPgPutgraphics Put]]## buffer if specified. - The ##**Draw**## statement can be used to issue several drawing commands all at once; it is useful to quickly draw figures. The command string accepts the following commands: - - Commands to plot pixels: - {{table columns="2" cellpadding="1" cells="Command;Description;###;Commands to plot pixels:;B;Optional prefix: move but do not draw.;N;Optional prefix: draw but do not move.;M x,y;Move to specified screen location. if a '+' or '-' sign precedes x, movement is relative to current cursor position. x's sign has no effect on the sign of y.;U [n];Move n units up. If n is omitted, 1 is assumed.;D [n];Move n units down. If n is omitted, 1 is assumed.;L [n];Move n units left. If n is omitted, 1 is assumed.;R [n];Move n units right. If n is omitted, 1 is assumed.;E [n];Move n units up and right. If n is omitted, 1 is assumed.;F [n];Move n units down and right. If n is omitted, 1 is assumed.;G [n];Move n units down and left. If n is omitted, 1 is assumed.;H [n];Move n units up and left. If n is omitted, 1 is assumed.;###;Commands to color:;C n;Changes current foreground color to n.;P p,b;PAINTs (flood fills) region of border color b with color p.;###;Commands to scale and rotate:;S n;Sets the current unit length, default is 4. A unit length of 4 is equal to 1 pixel.;A n;Rotate n*90 degrees (n ranges 0-3).;TA n;Rotate n degrees (n ranges 0-359).;###;Extra commands:;X p;Executes commands at p, where p is a STRING PTR."}} +{{fbdoc item="title" value="Draw"}}----
    +Déclaration pour l'écriture séquentielle de pixel

    {{fbdoc item="syntax"}}##
    **Draw** [//target//,] //cmd//
    ##
    + +{{fbdoc item="param"}}
    ##//target//##
    le tampon où dessiner
    + ##//cmd//##
    une chaîne contenant une séquence de commandes

    +{{fbdoc item="desc"}}
    Le dessin sera sur la page courante de travail validée par ##[[KeyPgScreenset ScreenSet]]## ou sur le tampon ##//cible (target)//## ##[[KeyPgGetgraphics Get]]##/##[[KeyPgPutgraphics Put]]## s'il est spéecifié.
    La déclaration ##**Draw**##peut être utilisée pour exécuter plusieurs commandes de dessin d'unseul coup; c'est très utile pour dessiner rapidement des figures. Lachaîne contenant les commandes accepte les commandes suivantes:

    Commandes pour écrire des pixels:
    +{{table columns="" cellpadding="2" cells="Commande;Description; Commandes pour écrire des pixels:;B;Préfixe facultatif: déplace mais n'écrit pas.;N;Préfixe facultatif: écrit mais ne déplace pas.;Mx,y;Déplace à la position écran spécifiée. Si + ou - précède x, le mouvement est relatif à la position courante du curseur.;U[n];Déplace de n unités vers le haut. Si n est omis, n = 1 par défaut.;D[n];Déplace de n unités vers le bas. Si n est omis, n = 1 par défaut.;L[n];Déplace de n unités vers la gauche. Si n est omis, n = 1 par défaut.;R[n];Déplace de n unités vers la droite. Si n est omis, n = 1 par défaut.;E[n];Déplace de n unités vers le haut et la droite. Si n est omis, n = 1 par défaut.;F[n];Déplace de n unités vers le bas et la droite. Si n est omis, n = 1 par défaut..;G[n];Déplace de n unités vers le bas et la gauche. Si n est omis, n = 1 par défaut.;H[n];Déplace de n unités vers le haut et la gauche. Si n est omis, n = 1 par défaut.; Commandes de couleur:;Cn;La couleur de premier-plan courante devient n.;Pp,b;Remplit la région avec une bordure de couleur b en utilisant la couleur p.; Commandes pour modifier la taille et effectuer une rotation:;Sn;Valide l'unité courante de longueur, 4 par défaut. Une unité de longueur 4 est égale à 1 pixel.;An;Rotation de n*90 degrés (n de 0 à 3).;TAn;Rotation de n degrés (n de 0 à 359); Commande supplémentaire:;Xp;Exécute la commande à l'addresse p, où p est un STRING PTR.;
    +

    + Les commandes pour régler la couleur, la taille et l'angle auront une incidence sur toutes les opérations ##**Draw**## ultérieures. + {{fbdoc item="ex"}}
    %%(freebasic) + Screen 13 + +'Deplace vers (50,50) sans dessin + Draw "BM 50,50" + 'Valide couleur dessin a 2 (vert) + + Draw "C2" + 'Dessine une boite -Commands to set the color, size and angle will take affect all subsequent ##**Draw**## operations. +Draw "R50 D30 L50 U30" -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/draw.bas"}}%%(freebasic) -screen 13 +'Deplace dans la boite +Draw "BM +1,1" +'Remplit couleur 1 (bleu) jusqu'aux bords couleur 2 -'Move to (50,50) without drawing -draw "BM 50,50" +Draw "P 1,2" +Sleep -'Set drawing color to 2 (green) -draw "C2" +%% +
    'Draw a box -draw "R50 D30 L50 U30" +'' Dessine une fleur sur ecran -'Move inside the box -draw "BM +1,1" +Dim As Integer i, a, c +Dim As String fill, setangle -'Flood fill with color 1 (blue) up to border color 2 -draw "P 1,2" +'' motif pour chaque petale +Dim As Const String petal = _ -sleep -%% -{{image class="center" title="Draw example output" url="/images/draw1.png"}} - -{{fbdoc item="filename" value="examples/manual/gfx/draw2.bas"}}%%(freebasic) -'' Draws a flower on-screen - -dim as integer i, a, c -dim as string fill, setangle - -'' pattern for each petal -dim as const string petal = _ - _ - ("X" & varptr(setangle)) _ '' link to angle-setting string - _ - & "C15" _ '' set outline color (white) - & "M+100,+10" _ '' draw outline - "M +15,-10" _ - "M -15,-10" _ - "M-100,+10" _ - _ +_ +("X" & VarPtr(setangle)) _ '' link to angle-setting string +_ + +& "C15" _ '' set outline color (white) +& "M+100,+10" _ '' draw outline + +"M +15,-10" _ +"M -15,-10" _ + +"M-100,+10" _ +_ & "BM+100,0" _ '' move inside petal - & ("X" & varptr(fill)) _ '' flood-fill petal (by linking to fill string) + & ("X" & VarPtr(fill)) _ '' flood-fill petal (by linking to fill string) & "BM-100,0" '' move back out + '' set screen + ScreenRes 320, 240, 8 + '' move to center + Draw "BM 160, 120" + '' set initial angle and color number + a = 0: c = 32 + For i = 1 To 24 + '' make angle-setting and filling command strings + setangle = "TA" & a -'' set screen -screenres 320, 240, 8 +fill = "P" & c & ",15" +'' draw the petal pattern, which links to angle-setting and filling strings -'' move to center -draw "BM 160, 120" +Draw petal +'' short delay -'' set initial angle and color number -a = 0: c = 32 +Sleep 100 +'' increment angle and color number -for i = 1 to 24 +a += 15: c += 1 - '' make angle-setting and filling command strings - setangle = "TA" & a - fill = "P" & c & ",15" + Next i + Sleep + ##
    - '' draw the petal pattern, which links to angle-setting and filling strings - draw petal +
    + {{fbdoc item="diff"}} - '' short delay - sleep 100 + - ##//target//## est nouveau pour FreeBASIC + - QB utilise le pointeur spécial VARPTR$ avec la commande ##X p##. - '' increment angle and color number - a += 15: c += 1 + - FB ne permet pas actuellement de mouvements de sous-pixels: tous les mouvements sont arrondis à l'entier de coordonnée le plus proche . + {{fbdoc item="see"}} -next i +- ##[[KeyPgDrawString Draw String]]## -sleep -%% -{{image class="center" title="Draw example output" url="/images/draw2.png"}} +- ##[[KeyPgScreengraphics Screen (Graphique)]]## +- ##[[KeyPgOpVarptr VarPtr]]## +- ##[[KeyPgPaint Paint]]## {{fbdoc item="diff"}} - ##//target//## is new to ""FreeBASIC"" diff --git a/fbdocs/manual/cache/KeyPgDrawString.wakka b/fbdocs/manual/cache/KeyPgDrawString.wakka index 31a0217a72..636c49a813 100644 --- a/fbdocs/manual/cache/KeyPgDrawString.wakka +++ b/fbdocs/manual/cache/KeyPgDrawString.wakka @@ -1,31 +1,31 @@ -{{fbdoc item="title" value="DRAW STRING"}}---- -Graphics statement to render text to an image or screen. + {{fbdoc item="title" value="Draw String"}}----
    +Déclaration graphique pour afficher un texte surune image ou à l'écran.

    {{fbdoc item="syntax"}}##
    **Draw String** [//buffer//,] [STEP] (//x//, //y//), //text//[,//color// [, //font// [, //method// [, (//alpha//|//blender//)] ] ] ]
    ##
    -{{fbdoc item="syntax"}}## - **Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// [,//color// [, //font// [, //method// [, (//alpha//|//blender//) [, //parameter//] ] ] ] ] -## {{fbdoc item="usage"}}## **Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// [, //color//] - **Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// , , //font// [, //method// [, //alpha// ] ] - **Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// , , //font//, [[KeyPgCustomgfx Custom]], //blender// [, //parameter//] -## -{{fbdoc item="param"}} - ##//buffer//## - the sprite to draw the string on. If this is not supplied, it will be drawn to the screen. - ##STEP## - use relative coordinates. If ##STEP## is added, the x and y coordinates are translated relative to the last drawn point. - ##//x//##, ##//y//## - the horizontal / vertical position to draw to, relative to the top left hand corner of the screen (unless ##STEP## is used - see above). The top left corner of the text will be drawn at this position. - ##//text//## - the string containing the text to draw - ##//color//## - if no font is supplied, this allows you to choose the color of the text. If omitted, the default foreground ##[[KeyPgColor Color]]## is used. - If a font is supplied, ##//color//## is ignored, and the font itself specifies the color for each pixel. - ##//font//## - an image buffer containing a custom font. If no font is supplied, the standard font for the current text resolution is used, and the following parameters are ignored. - ##//method//## | ##**Custom**## - specifies how the font characters are drawn on top of the target surface. The same methods as found for the ##[[KeyPgPutgraphics Put]]## statement are allowed, with the only difference that the default method is ##[[KeyPgTransGfx Trans]]## for this function. This parameter only applies to custom fonts. - ##//alpha//## +**Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// , , //font// [, //method// [, //alpha// ] ] +**Draw String** [//buffer//,] [STEP] (//x//, //y//), //text// , , //font//, [[KeyPgCustomgfx Custom]], //blender// [, //parameter//] + ## + {{fbdoc item="param"}}
    ##//buffer//##
    le sprite sur lequel écrire la chaîne. S'il n'est pas précisé, l'écriture se fera à l'écran.
    + ##STEP##
    utilise des coordonnées relatives. Si ##STEP## est ajouté, les coordonnées x et y sont calculées par rapport au dernier point tracé.
    +##//x//##, ##//y//##
    les coordonnées horizontales / verticales où dessiner, par rapport au coin en haut à gauche de l'écran (sauf si ##STEP## est utilisé - voir au-dessus). Le coin en haut à gauche du texte sera dessiné à cette position.
    +##//text//##
    la chaîne contenant le texte à dessiner
    + ##//color//##
    si aucune police n'a été précisée, ceci vous permet de choisir la couleur du texte. Si omis, la ##[[KeyPgColor Color]]## d'arrière-plan est utilisée par défaut.
    + ##//font//##
    un tampon image contenant une police personnalisée. Si aucune police n'est fournie, la police standard dans la résolution du texte actuel est utilisée, et les paramétres suivants sont ignorés.
    + ##//method//##
    spécifie comment les caractères de la police sont dessinés sur la surface cible. Les mêmes méthodes utilisées pour la déclaration ##[[KeyPgPutgraphics Put]]## sont permises, avec la seule différence que la méthode par défaut est la fonction ##TRANS##.
    + ##//alpha//##
    valeur alpha, de 0 à 255. Ce paramètre s'applique seulement aux méthodes ##[[KeyPgAddGfx Add]]## ou ##[[KeyPgAlphaGfx Alpha]]##.
    + ##//blender//##
    fonction blender personnelle pour la méthode de dessin ##[[KeyPgCustomgfx Custom]]##; voir la description de la méthode ##[[KeyPgPutgraphics Put (Graphique)]]## pour plus de détails. Ce paramètre s'applique seulement à la méthode ##[[KeyPgCustomgfx Custom]]##.
    + ##//parameter//## + ##[[KeyPgPointer Pointeur]]## facultatif passé à la fonction blender personnelle; si omis, la valeur par défaut est (##0##). +
    + {{fbdoc item="desc"}}
    Ce mot-clef graphique affiche une chaîne à l'écran avec positionnement des pixels, un arrière-plan transparent et peut utiliser une police personnelle. **##Draw String##** ne met pas à jour le curseur texte ou graphique. Il ne coupe pas en fin de ligne. Tabulations, retours chariot et autres caractères spéciaux n'ont pas de comportement spécial dans **##Draw String##**, et sont traîtés comme des caractères normaux.

    En mode graphique, cette fonction procure une alternative flexible à ##[[KeyPgPrint Print]]##. Elle a plusieurs avantages:
    - ##**Draw String**## peut afficher un texte à n'importe quelle position de l'écran , alors que ##[[KeyPgPrint Print]]## est obligé de respecter la grille de caractères accessibles par ##[[KeyPgLocate Locate]]##.
    - ##[[KeyPgPrint Print]]## remplace l'arrière-plan derrière le texte avec la couleur courante d'arrière-plan. ##**Draw String**## ne fait pas cela et laisse les pixels de l'arrière-plan intacts.
    - Comme ##[[KeyPgPutgraphics Put]]##, ##**Draw String**## a différentes méthodes pour afficher un texte, comme ##[[KeyPgAlphaGfx Alpha]]## et ##[[KeyPgCustomgfx Custom]]##.
    - ##**Draw String**## ne se limite pas à un seul jeu de caractères: il est possible de fournir une police personnelle en remplacement.

    Note: Si aucune police n'est fournie, **##Draw String##** utilise par défaut la police standard, comme pour ##[[KeyPgPrint Print]]##, avec la taille de caractères indiquée par ##[[KeyPgWidth Width]]##. ##//method//## - s'il est donné - sera ignoré, et le texte sera dans la couleur sécifiée, avec un arrière-plan transparent.

    **Format de la police personnelle:**
    La police est stockée dans un tampon ##[[KeyPgGetgraphics Get]]##/##[[KeyPgPutgraphics Put]]## standard; la police doit être stockée dans un tampon utilisant la même profondeur que la profondeur de couleur courante, autrement **##Draw String##** provoquera une erreur d'appel illégal à une fonction.

    La première ligne de pixels dans le tampon de la police contient l'en-tête de la police, sur la base d'un octet (**not** pixel). Le premier octet identifie la version en-tête de la police; actuellement, ce doit être 0. Le second octet donne le code ASCII du premier caractère pris en charge par la police; le troisième octet donne le code ASCII du dernier caractère pris en charge. Ainsi si la police prend en charge de 0 à 255, ##0## et ##255## seront le contenu de ces deux octets.
    Puis vient la largeur de chacun des caractères pris en charge, chacune dans un octet. Supposons que la police prenne en charge 96 caractères, de 32 à 127 (inclus), les trois premiers octets de l'en-tête contiendront ##0##, ##32## et ##127##, suivis de 96 octets donnant les largeurs des caractères correspondants.

    La hauteur de la police est obtenue en soustrayant 1 de la hauteur du tampon, ceci étant, tandis que la première ligne de pixels du tampon agit comme un en-tête de la police, les lignes restantes définissent les glyphes. Le tampon doit être assez large pour contenir tous les dessins des caractères supportés dans la même ligne, l'un après l'autre.

    + {{fbdoc item="ex"}}
    Ceci est un exemple de l'usage basic de ##**Draw String**## : on l'utilise pour écrire ##"Hello world"## au centre de l'écran:
    ##
    Const w = 320, h = 200 ''dimensions ecran

    Dim x As Integer, y As Integer, s As String

    '' Ouvre une fenetre graphique
    ScreenRes w, h

    '' Affiche une chaine au centre de l' ecran:

    s = "Hello world"
    x = (w - Len(s) * 8) \ 2
    y = (h - 1 * 8) \ 2

    Draw String (x, y), s

    '' Attente d'une touche appuyee avant sortie du programme
    Sleep
    + ##
    +

    Cet exemple montre comment vous pouvez créer et utiser votre proprepolice. Pour plus de simplicité, on utilise ##**Draw String**##avec la police par défaut pour créer les glyphes.
    ##
    '' Definition espace caracteres
    Const FIRSTCHAR = 32, LASTCHAR = 127

    Const NUMCHARS = (LASTCHAR - FIRSTCHAR) + 1
    Dim As UByte Ptr p, myFont
    Dim As Integer i

    '' Ouvrir un ecran 256 couleurs (320*200)
    ScreenRes 320, 200, 8

    '' Creer police personnelle dans tampon PUT

    myFont = ImageCreate(NUMCHARS * 8, 9)

    '' Place entete police au debut des donnees pixel

    #ifndef ImageInfo '' older versions of FB don't have the ImageInfo feature
    p = myFont + IIf(myFont[0] = 7, 32, 4)
    #else
    ImageInfo( myFont, , , , , p )
    #endif

    p[0] = 0
    p[1] = FIRSTCHAR
    p[2] = LASTCHAR

    '' PUT chaque caractere dans la police et mise-a-jour information longueur
    For i = FIRSTCHAR To LASTCHAR

    '' Ici nous pouvons definir une largeur utilisateur pour chaque lettre, mais par simplicite nous utilisons
    '' une largeur fixe de 8 puisque nous re-utilisons les glyphes par defaut de police
    p[3 + i - FIRSTCHAR] = 8

    '' Creer un caractere dans tampon police utilisateur en dessinant avec police defaut
    Draw String myFont, ((i - FIRSTCHAR) * 8, 1), Chr(i), 32 + (i Mod 24) + 24

    Next i

    '' Maintenant le tampon police est pret; nous pouvons le sauver avec BSAVE pour utilisation ulterieur
    Rem BSave "myfont.bmp", myFont

    '' Ici nous affichons une chaine avec la police personelle
    Draw String (10, 10), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", , myFont
    Draw String (10, 26), "abcdefghijklmnopqrstuvwxyz", , myFont
    Draw String (66, 58), "Hello world!", , myFont

    '' Libere la police de la memoire, maintenant que nous en avons fini
    ImageDestroy myFont

    Sleep
    + ##
    +

    + {{fbdoc item="diff"}}
    - Nouveau pour FreeBASIC

    + {{fbdoc item="see"}}
    - ##[[KeyPgPrint Print]]##
    - ##[[KeyPgDraw Draw]]##
    - ##[[KeyPgImagecreate ImageCreate]]##
    - ##[[KeyPgImageDestroy ImageDestroy]]##
    - ##[[KeyPgImageInfo ImageInfo]]##
    - ##[[KeyPgPutgraphics Put (Graphique)]]##
    - ##[[KeyPgWidth Width]]##

    alpha value, ranging 0-255. This parameter only applies to the ##[[KeyPgAddGfx Add]]## or ##[[KeyPgAlphaGfx Alpha]]## methods. ##//blender//## custom blender function for the ##[[KeyPgCustomgfx Custom]]## drawing method; see ##[[KeyPgPutgraphics Put (Graphics)]]## statement description for details. This parameter only applies to the ##[[KeyPgCustomgfx Custom]]## method. diff --git a/fbdocs/manual/cache/KeyPgDylibfree.wakka b/fbdocs/manual/cache/KeyPgDylibfree.wakka index b29646dfb2..09fcd22ac1 100644 --- a/fbdocs/manual/cache/KeyPgDylibfree.wakka +++ b/fbdocs/manual/cache/KeyPgDylibfree.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DYLIBFREE"}}---- -Unloads a dynamic link library from memory +Décharge une bibliothèque à liens dynamiques de la mémoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Dylibfree** ( [[KeyPgByval byval]] //library// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPointer pointer]] ) @@ -9,33 +9,26 @@ Unloads a dynamic link library from memory ## {{fbdoc item="param"}} ##//library//## - The handle of a library to unload. + Le nom du pointeur d'une bibliothèque à décharger. {{fbdoc item="desc"}} - ##**Dylibfree**## is used to release at runtime libraries previously linked to your program with ##[[KeyPgDylibload Dylibload]]##. The argument is the handle to the library returned by ##[[KeyPgDylibload Dylibload]]##. + ##**DyLibFree**## est utilisé pour libérer les bibliothèques d'exécution préalablement liées à votre programme avec ##[[KeyPgDylibload DyLibLoad]]##. L'argument est le nom du pointeur de la bibliothèque retourné par ##[[KeyPgDylibload DyLibLoad]]##. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/module/dylibfree.bas"}}%%(freebasic) + %%(freebasic) + Dim hndl As Any Ptr + hndl=DyLibLoad("MYLIB.DLL") -hndl=DyLibLoad("MYLIB.DLL") ' ... -DyLibFree(hndl) + DyLibFree(hndl) %% + {{fbdoc item="target"}} -{{fbdoc item="target"}} - - Dynamic link libraries are not available in DOS, as the OS doesn't support them. - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Dylibfree""**##. - -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" - -{{fbdoc item="see"}} - - ##[[KeyPgDylibsymbol Dylibsymbol]]## - - ##[[KeyPgDylibload Dylibload]]## - - ##[[KeyPgExport Export]]## +- Les bibliothèques à liens dynamiques ne sont pas disponibles dans DOS, car le système d'exploitation ne les prend pas en charge. + {{fbdoc item="lang"}} + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Dylibfree**##. + {{fbdoc item="diff"}} -{{fbdoc item="back" value="CatPgModularizing|Modularizing"}} \ No newline at end of file +- Nouveau pour FreeBASIC \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDylibload.wakka b/fbdocs/manual/cache/KeyPgDylibload.wakka index 2830e35a81..c8d0566d9b 100644 --- a/fbdocs/manual/cache/KeyPgDylibload.wakka +++ b/fbdocs/manual/cache/KeyPgDylibload.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DYLIBLOAD"}}---- -Loads to a Dynamic Link Library (DLL) into memory at runtime +Charge, à l'exécution, une bibliothèque à liens dynamiques (DLL) dans la mémoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Dylibload** ( [[KeyPgByref byref]] //filename// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPointer Pointer]] @@ -9,33 +9,29 @@ Loads to a Dynamic Link Library (DLL) into memory at runtime ## {{fbdoc item="param"}} ##//filename//## - A ##[[KeyPgString string]]## containing the filename of the library to load. + Une ##[[KeyPgString String = Chaîne]]## contenant le nom de fichier de la librairie à charger. -{{fbdoc item="ret"}} - The ##[[KeyPgPointer pointer]]## handle of the library loaded. Zero on error +{{fbdoc item="section" value="Valeur retournée + Le ##[[KeyPgPointer Pointer]]## de prise en charge de la librairie chargée. Zéro si erreur. {{fbdoc item="desc"}} - ##[[KeyPgDylibload Dylibload]]## is used to link at runtime libraries to your program. This function does the link and returns a handle that must be used with ##[[KeyPgDylibsymbol Dylibsymbol]]## when calling a function in the library and with ##[[KeyPgDylibfree Dylibfree]]## when releasing the library. + ##[[KeyPgDylibload DyLibLoad]]## est utilisé pour lier au démarrage des librairies à votre programme. Cette fonction réalise le lien et retourne un pointeur qui doit être utilisé avec ##[[KeyPgDylibsymbol DyLibSymbol]]## lorsque vous appelez une fonction dans la bibliothèque et avec ##[[KeyPgDylibfree DyLibFree]]## lors de la libéation de la bibliothèque. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/module/dylibload.bas"}}%%(freebasic) + %%(freebasic) + Dim hndl As Any Ptr + hndl=DyLibLoad("MYLIB.DLL") -hndl=DyLibLoad("MYLIB.DLL") %% + {{fbdoc item="target"}} -{{fbdoc item="target"}} - - Dynamic link libraries are not available in DOS, as the OS doesn't support them. - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Dylibload""**##. - -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Les bibliothèques de liens dynamiques ne sont pas disponibles sous DOS, car l'OS ne les supporte pas. + {{fbdoc item="lang"}} -{{fbdoc item="see"}} - - ##[[KeyPgDylibsymbol Dylibsymbol]]## - - ##[[KeyPgDylibfree Dylibfree]]## - - ##[[KeyPgExport Export]]## +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Dylibload**##. + {{fbdoc item="diff"}} + - Nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="back" value="CatPgModularizing|Modularizing"}} \ No newline at end of file +- ##[[KeyPgDylibsymbol DyLibSymbol]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgDylibsymbol.wakka b/fbdocs/manual/cache/KeyPgDylibsymbol.wakka index d96608bbc1..371a70f807 100644 --- a/fbdocs/manual/cache/KeyPgDylibsymbol.wakka +++ b/fbdocs/manual/cache/KeyPgDylibsymbol.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DYLIBSYMBOL"}}---- -Returns the address of a function or variable in a dll +Renvoie l'adresse d'une fonction ou d'une variable dans une dll {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Dylibsymbol** ( [[KeyPgByval byval]] //library// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByref byref]] //symbol// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -10,74 +10,40 @@ Returns the address of a function or variable in a dll ## {{fbdoc item="param"}} ##//library//## - The [[KeyPgAny any]] [[KeyPgPtr ptr]] handle of a DLL returned by ##[[KeyPgDylibload Dylibload]]## + Le [[KeyPgAny Any]] [[KeyPgPtr Ptr]] de prise en charge de la DLL retourné par ##[[KeyPgDylibload DyLibLoad]]## ##//symbol//## - A [[KeyPgString string]] containing name of the function, or variable in the library to return the address of. In Windows only, can also be a ##[[KeyPgShort short]]## containing the ordinal of the function/variable. + Une [[KeyPgString String = Chaîne]] contenant le nom de la fonction, ou de la variable dans la librairie pour laquelle on retourne l'adresse. Sous Windows seulement, peut aussi être un ##[[KeyPgShort Short]]## contenant l'ordinal de la fonction/variable. -{{fbdoc item="ret"}} - A ##[[KeyPgPtr pointer]]## to the function or variable in the library. +{{fbdoc item="section" value="Valeur retournée + Un ##[[KeyPgPtr Pointer]]## vers la fonction ou la variable dans la librairie. - If the function fails, the return value is 0. + Si la fonction échoue, la valeur retournée est 0. {{fbdoc item="desc"}} - ##**Dylibsymbol**## returns a pointer to the variable or function named ##//symbol//## , in the dll pointed by ##//libhandle//##. ##//libhandle//## is obtained by loading the dll with ##[[KeyPgDylibload Dylibload]]##. The symbol must have been ##[[KeyPgExport Export]]##ed in the dll. - If ##//libhandle//## is 0, the symbol is searched in the current executable or dll. + ##**DyLibSymbol**## renvoie un pointeur sur la variable ou une fonction appelée ##//symbol//## , dans la dll pointée par ##//libhandle//##. ##//libhandle//## est obtenu en chargeant la dll avec ##[[KeyPgDylibload DyLibLoad]]##. Le symbole doit avoir été ##[[KeyPgExport Export]]##é dans la DLL. + Si ##//libhandle//## est 0, le symbole est recherché dans l'exécutable ou la dll courant. - If using ##[[KeyPgCdecl Cdecl]]## functions, only the name of the procedure needs to be specified. If dynamically linking to a function created using STDCALL (default in windows), then the function must be decorated. To decorate a function, use its name, '@', then the number of bytes passed as arguments. For instance if the function ##FOO## takes 3 integer arguments, the decorated function would be 'FOO@12'. Remember, without an explicit ##[[KeyPgAlias alias]]##, the procedure name will be uppercase. + Si on utilise les fonctions ##[[KeyPgCdecl cdecl]]##, seule le nom de la procédure nécessite d'être spécifié. Si lien dynamique à une fonction en utilisant STDCALL (par défaut dans Windows), alors la fonction doit être "decorated". Pour "decorate" une fonction, utilisez son nom, '@', puis le nombre d'octets passé comme arguments. Par exemple, si la fonction ##FOO## prend 3 arguments entiers, la fonction "decorated" serait 'FOO@12'. Rappelez-vous, sans un ##[[KeyPgAlias Alias]]## explicite, le nom de la procédure sera en majuscules. - If linking to a dll created in Visual C""++""(tm), decoration need not be used. For GCC, decoration is needed. + Si lien vers une dll créée dans Visual C++(tm), "decoration" ne doit pas être utilisé. Pour GCC, "decoration" est nécessaire. - **Note:** The dylibsymbol, if failing, will attempt to automatically decorate the procedure, from @0 to @256, in 4 byte increments. + **Note:** Le dylibsymbol, si échec, essaiera automatiquement de "decorate" la procédure, de @0 à @256, en incréments de 4 octets. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/module/mydll2.bas"}}%%(freebasic) -'' mydll.dll + %%(freebasic) -'' in the DLL the function must be declared as CDECL and export +'' mydll.dll + '' in the DLL the function must be declared as CDECL and export + Function AddNumbers cdecl Alias "AddNumbers" _ -Function AddNumbers cdecl Alias "AddNumbers" _ - ( _ +( _ ByVal operand1 As Integer, ByVal operand2 As Integer _ - ) As Integer Export - AddNumbers = operand1 + operand2 +) As Integer Export + AddNumbers = operand1 + operand2 End Function -%% - -{{fbdoc item="filename" value="examples/manual/module/dylibsymbol.bas"}}%%(freebasic) -'' create a function pointer, arguments must be the same -'' as in the original function - -Dim AddNumbers As Function ( ByVal operand1 As Integer, ByVal operand2 As Integer ) As Integer - -Dim hndl As Any Ptr - -hndl=DyLibLoad("mydll.dll") - -'' find the procedure address (case matters!) -AddNumbers = DyLibSymbol( hndl, "AddNumbers" ) - -'' then call it.. -Print "1 + 2 ="; AddNumbers( 1, 2 ) - -DyLibFree hndl - -Sleep -%% - -{{fbdoc item="target"}} - - Dynamic link libraries are not available in DOS ,as the OS doesn't support them. - - Ordinals are not supported on Linux, 0 is always returned. - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Dylibsymbol""**##. - -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" - -{{fbdoc item="see"}} - - ##[[KeyPgDylibload Dylibload]]## - - ##[[KeyPgExport Export]]## + %% + %%(freebasic) -{{fbdoc item="back" value="CatPgModularizing|Modularizing"}} \ No newline at end of file +'' create a function pointer, arguments must be the same \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgElse.wakka b/fbdocs/manual/cache/KeyPgElse.wakka index 03b929753f..c4bfa9ee4d 100644 --- a/fbdocs/manual/cache/KeyPgElse.wakka +++ b/fbdocs/manual/cache/KeyPgElse.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="ELSE"}}---- -Control flow statement for conditional branching +Déclaration de contrôle de flux pour le branchement conditionnel {{fbdoc item="syntax"}}## **If** //expression// **Then** //statement(s)// [**Else** //statement(s)//] -//or// +//ou// **If** //expression// **Then** : //statement(s)// [**Else** //statement(s)//] : **End If** -//or// +//ou// **If** //expression// **Then** //statement(s)// [ **Elseif** //expression// **Then** ] @@ -15,7 +15,7 @@ Control flow statement for conditional branching **End If** ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgIfthen If...Then]]## diff --git a/fbdocs/manual/cache/KeyPgElseif.wakka b/fbdocs/manual/cache/KeyPgElseif.wakka index c3f790bf79..a337eea846 100644 --- a/fbdocs/manual/cache/KeyPgElseif.wakka +++ b/fbdocs/manual/cache/KeyPgElseif.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ELSEIF"}}---- -Control flow statement for conditional branching +Déclaration de contrôle de flux pour le branchement conditionnel {{fbdoc item="syntax"}}## **If** //expression// **Then** @@ -11,7 +11,7 @@ Control flow statement for conditional branching **End If** ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgIfthen If...Then]]## diff --git a/fbdocs/manual/cache/KeyPgEncoding.wakka b/fbdocs/manual/cache/KeyPgEncoding.wakka index 5dda76bef2..ccdf63bf10 100644 --- a/fbdocs/manual/cache/KeyPgEncoding.wakka +++ b/fbdocs/manual/cache/KeyPgEncoding.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="ENCODING"}}---- -Specifies character format of a text file +Spécifie le format des caractères d'un fichier texte {{fbdoc item="syntax"}}## [[KeyPgOpen open]] //filename// for {Input|Output|Append} **Encoding** "//utf-8//"|"//utf-16//"|"//utf-32//"|"//ascii//" as [#]//filenum// ## {{fbdoc item="param"}} ##//filename//## for {Input|Output|Append} - file name to open for ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]##, or ##[[KeyPgAppend Append]]## + nom du fichier à ouvrir pour ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]##, ou ##[[KeyPgAppend Append]]## ##**Encoding** "//utf-8//"|"//utf-16//"|"//utf-32//"|"//ascii//"## - indicates encoding type for the file + indique le type d'encodage du fichier ##//filenum//## - unused file number to associate with the open file + numéro de fichier à associer avec le fichier à ouvrir {{fbdoc item="desc"}} - ##**Encoding**## specifies the format for an Unicode text file, so ##[[KeyPgWinput Winput #]]## and ##[[KeyPgPrintPp Print #]]## use the correct encoding. If omitted from an ##[[KeyPgOpen Open]]## statement, "ascii" encoding is the default. + ##**Encoding**## spécifie le format d'un fichier texte Unicode, pour que ##[[KeyPgWinput Winput #]]## et ##[[KeyPgPrintPp Print #]]## utilisent l'encodage correct. Si omis à partir d'une déclaration ##[[KeyPgOpen Open]]##, l'encodage "ascii" sera utilisé par défaut. - Only little endian character encodings are supported at the moment. - -"utf8", - -"utf16" - -"utf32" - -"ascii" (the default) + Seul, les caractères encodés "little endian" sont pris en charge pour le moment. +
  • "utf8", +
  • "utf16" +
  • "utf32" +
  • "ascii" (par défaut) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/encoding.bas"}}%%(freebasic) @@ -92,26 +92,26 @@ scope print end scope %% -Output: +Affichage: %% Text to write to sample.txt: FreeBASIC Binary contents of sample.txt: -FF FE 46 00 72 00 65 00 65 00 42 00 41 00 53 00 49 00 43 00 0D 00 0A 00 +FF FE 46 00 72 00 65 00 65 00 42 00 41 00 53 00 49 00 43 00 0D 00 0A 00 Text read from sample.txt: FreeBASIC %% {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of FreeBASIC + - Les chaînes Unicode ne sont pas supportées dans le portage DOS de FreeBASIC {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Encoding""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Encoding**##. {{fbdoc item="diff"}} - - QB had no support for Unicode + - QB n'a pas de support d'Unicode {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgEnd.wakka b/fbdocs/manual/cache/KeyPgEnd.wakka index baf34698b3..bdc6323e39 100644 --- a/fbdocs/manual/cache/KeyPgEnd.wakka +++ b/fbdocs/manual/cache/KeyPgEnd.wakka @@ -1,5 +1,5 @@ -{{fbdoc item="title" value="END (Statement)"}}---- -Control flow statement to end the program. +{{fbdoc item="title" value="End (Déclaration)"}}---- +Déclaration de contrôle de flux pour terminer un programme. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **End** ( [[KeyPgByval byval]] //retval// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) @@ -9,12 +9,12 @@ Control flow statement to end the program. ## {{fbdoc item="param"}} ##//retval//## - Error code returned to system. + Le code d'erreur retourné au système. {{fbdoc item="desc"}} - Used to terminate the program, and return to the operating system. An optional integer return value can be specified to indicate an error code to the system. If no return value is given, a value of 0 is automatically returned. + Utilisé pour terminer le programme et retourner au système d'exploitation. Une valeur retournée (entière facultative) peut être spécifiée pour indiquer un code d'erreur au système. Si aucune valeur de retour n'est donnée, une valeur de 0 est automatiquement retournée. - Usage of this statement does not cleanly close scope. Variables and memory are not destroyed automatically and object destructors are not called. Calling the required destructors and other clean-up should be explicitly performed before an ##**End**## statement. + L'utilisation de cette déclaration ne ferme pas proprement le champ d'application. Les variables et la mémoire ne sont pas détruits automatiquement et les destructeurs d'objet ne sont pas appelés. L'appel des destructeurs et autres moyens nécessaires au nettoyage doit être effectué explicitement avant une déclaration ##**End**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/end.bas"}}%%(freebasic) @@ -43,9 +43,9 @@ sleep : end 0 %% {{fbdoc item="diff"}} - - The END statement supports specifying a custom return value to be returned to the operating system. + - La déclaration END permet de spécifier une valeur de retour personnalisée pour la retourner au système d'exploitation. {{fbdoc item="see"}} - - ##[[KeyPgEndblock End (Block)]]## + - ##[[KeyPgEndblock End (Bloc)]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgEndblock.wakka b/fbdocs/manual/cache/KeyPgEndblock.wakka index 7f12cb0155..0a47da8bb6 100644 --- a/fbdocs/manual/cache/KeyPgEndblock.wakka +++ b/fbdocs/manual/cache/KeyPgEndblock.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="END (Block)"}}---- -Indicates the end of a compound statement block. +Indique la fin d'un bloc d'instructions composé. {{fbdoc item="syntax"}}## **End** { [[KeyPgSub Sub]] | [[KeyPgFunction Function]] | [[KeyPgIfthen If]] | [[KeyPgSelectcase Select]] | [[KeyPgType Type]] | [[KeyPgEnum Enum]] | [[KeyPgScope Scope]] | [[KeyPgWith With]] | [[KeyPgNamespace Namespace]] | [[KeyPgExtern Extern]] | [[KeyPgConstructor Constructor]] | [[KeyPgDestructor Destructor]] | [[KeyPgOperator Operator]] | [[KeyPgProperty Property]] } ## {{fbdoc item="desc"}} - Used to indicate the end of the most recent code block. + Utilisé pour indiquer la fin du bloc de code le plus récent. - The type of the block must be included in the command: one of ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgIfthen If]]##, ##[[KeyPgSelectcase Select]]##, ##[[KeyPgType Type]]##, ##[[KeyPgEnum Enum]]##, ##[[KeyPgScope Scope]]##, ##[[KeyPgWith With]]##, ##[[KeyPgNamespace Namespace]]##, ##[[KeyPgExternBlock Extern]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgOperator Operator]]##, or ##[[KeyPgProperty Property]]##. + Le type du bloc doit être inclus dans la commande: soit ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgIfthen If]]##, ##[[KeyPgSelectcase Select]]##, ##[[KeyPgType Type]]##, ##[[KeyPgEnum Enum]]##, ##[[KeyPgScope Scope]]##, ##[[KeyPgWith With]]##, ##[[KeyPgNamespace Namespace]]##, ##[[KeyPgExternBlock Extern]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgOperator Operator]]##, ou ##[[KeyPgProperty Property]]##. - Ending a ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgIfthen If]]##, ##[[KeyPgSelectcase Select]]##, ##[[KeyPgScope Scope]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgOperator Operator]]##, or ##[[KeyPgProperty Property]]## block also closes the scope for variables defined inside that block. When the scope is closed, variables defined inside the scope are destroyed, calling their destructors as needed. + La fin d'un bloc ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgIfthen If]]##, ##[[KeyPgSelectcase Select]]##, ##[[KeyPgScope Scope]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgOperator Operator]]##, ou ##[[KeyPgProperty Property]]## ferme aussi la portée des variables définies dans ce bloc. Quand la portée est fermée, les variables définies dans cette portée sont détruites, l'appel de leur destructeur est demandé. - To end a program, see ##[[KeyPgEnd End (Statement)]]##. + Pour mettre fin à un programme, voir ##[[KeyPgEnd End (Déclaration)]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/endblock.bas"}}%%(freebasic) @@ -33,12 +33,12 @@ End Sub %% {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - ##[[KeyPgConstructor Constructor]]## - ##[[KeyPgDestructor Destructor]]## - - ##[[KeyPgEnd End (Statement)]]## + - ##[[KeyPgEnd End (Déclaration)]]## - ##[[KeyPgEnum Enum]]## - ##[[KeyPgExternBlock Extern]]## - ##[[KeyPgFunction Function]]## diff --git a/fbdocs/manual/cache/KeyPgEndif.wakka b/fbdocs/manual/cache/KeyPgEndif.wakka index 1a1f5a2bb6..01d46b33ce 100644 --- a/fbdocs/manual/cache/KeyPgEndif.wakka +++ b/fbdocs/manual/cache/KeyPgEndif.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="END IF"}}---- -Control flow statement for conditional branching. +Déclaration de contrôle de flux pour le branchement conditionnel. {{fbdoc item="syntax"}}## **If** //expression// **Then** : //statement(s)// [**Else** //statement(s)//] : **End If** -//or// +//ou// **If** //expression// **Then** //statement(s)// **End If** ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgIfthen If...Then]]## diff --git a/fbdocs/manual/cache/KeyPgEnum.wakka b/fbdocs/manual/cache/KeyPgEnum.wakka index e9292c4684..66c34d303c 100644 --- a/fbdocs/manual/cache/KeyPgEnum.wakka +++ b/fbdocs/manual/cache/KeyPgEnum.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ENUM"}}---- -Declares an enumerated type. +Déclare un type énuméré. {{fbdoc item="syntax"}}## **Enum** [//typename// [ Explicit ] ] @@ -9,22 +9,22 @@ Declares an enumerated type. ## {{fbdoc item="param"}} ##//typename//## - Name of the ##**Enum**## + Nom de l'##**Enum**## ##//symbolname//## - Name of the constant + Nom de la constante ##//expression//## - A constant expression + Une expression constante ##Explicit## - Requires that symbols must be explicitly referred to by ##//typename//.//symbolname//## + Exige que les symboles doivent explicitement être référencés par ##//typename//.//symbolname//## {{fbdoc item="desc"}} - ##**Enum**##, short for enumeration, declares a list of symbol names that correspond to discrete values. If no initial value is given, the first item will be set to ##0##. Each subsequent symbol has a value one more than the previous unless ##//expression//## is given. + ##**Enum**##, abréviation de énumération, déclare une liste de noms de symboles qui correspondent à des valeurs discrètes. Si aucune valeur initiale n'est donnée, le premier item sera mis à ##0##. Chaque symbole suivant a une valeur de un de plus que le précédent sauf si ##//expression//## existe. - Symbols may be each on their own line, or separated on a single line by commas. + Ces symboles peuvent être chacun sur leur propre ligne ou sur une seule ligne séparés par des virgules. - An ##**Enum**## is a useful way of grouping together a set of related ##[[KeyPgConst const]]##ants. A symbol can be accessed like constant, e.g: ##a = //symbolname//##. But if the name clashes with another symbol, it must be resolved using ##//typename//.//symbolname//##. This resolution method is always required if you make the enum ##Explicit##. + ##**Enum**## est un moyen utile de regrouper un ensemble de ##[[KeyPgConst Const]]##antes liées. Un symbole peut être consulté comme constante, par exemple: ##a = //symbolname//##. Mais s'il y a conflit de nom avec un autre symbole, il doit être résolu à l'aide de ##//typename//.//symbolname//##. Cette méthode de résolution est toujours nécessaire si l'énumération est ##//Explicit//##. - An ##**Enum**## can be passed as a user defined type to ##[[KeyPgOverload overload]]##ed operator functions. + ##**Enum**## peut être passé comme un type défini par l'utilisateur pour les fonctions de ##[[KeyPgOverload Surcharge]]## d'opérateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/enum.bas"}}%%(freebasic) @@ -49,11 +49,11 @@ end select %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the aliases ##**""__Enum""**## and ##**""__Explicit""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec les alias ##**__Enum**## et ##**__Explicit**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgConst Const]]## diff --git a/fbdocs/manual/cache/KeyPgEnviron.wakka b/fbdocs/manual/cache/KeyPgEnviron.wakka index 3d44848d84..dfe270fbab 100644 --- a/fbdocs/manual/cache/KeyPgEnviron.wakka +++ b/fbdocs/manual/cache/KeyPgEnviron.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ENVIRON"}}---- -Returns the value of a system environment variable +Renvoie la valeur d'une variable d'environnement système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Environ** ( [[KeyPgByref byref]] //varname// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,13 +9,13 @@ Returns the value of a system environment variable ## {{fbdoc item="param"}} ##//varname//## - The name of an environment variable. + Le nom d'une variable d'environnement. -{{fbdoc item="ret"}} - Returns the text value of the environmental variable, or the empty string (##"####"##) if the variable does not exist. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur du texte de la variable d'environnement ou la chaîne vide (##"####"##) si la variable n'existe pas. {{fbdoc item="desc"}} - ##**Environ**## returns the text value of a system environment variable. + ##**Environ**## retourne la valeur texte d'une variable d'environnement système. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/environ.bas"}}%%(freebasic) @@ -25,7 +25,7 @@ print environ("path") %% {{fbdoc item="diff"}} - - The ##**ENVIRON**## statement is now called ##[[KeyPgSetenviron Setenviron]]##. + - La déclaration ##**Environ**## est maintenant appelée ##[[KeyPgSetenviron SetEnviron]]##. {{fbdoc item="see"}} - ##[[KeyPgSetenviron Setenviron]]## diff --git a/fbdocs/manual/cache/KeyPgEof.wakka b/fbdocs/manual/cache/KeyPgEof.wakka index 920d879ab4..654c26fe4c 100644 --- a/fbdocs/manual/cache/KeyPgEof.wakka +++ b/fbdocs/manual/cache/KeyPgEof.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="EOF"}}---- -Checks to see if the end of an open file has been reached +Vérifie si la fin d'un fichier ouvert a été atteinte {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Eof** ( [[KeyPgByval byval]] //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,15 +9,15 @@ Checks to see if the end of an open file has been reached ## {{fbdoc item="param"}} ##//filenum//## - An ##[[KeyPgInteger integer]]## file number of an open file. + Un ##[[KeyPgInteger Integer]]## numéro d'un fichier ouvert. -{{fbdoc item="ret"}} - Returns true (-1) if end-of-file has been reached, zero (0) otherwise. +{{fbdoc item="section" value="Valeur retournée + Retourne vrai (true) (-1) si la fin du fichier (End Of File) a été atteinte, autrement zéro (0). {{fbdoc item="desc"}} - When reading from files opened for ##[[KeyPgInputfilemode Input (File Mode)]]##, it is useful to know when the end of the file has been reached, thus avoiding errors caused by reading past the ends of files. Use EOF to determine this. EOF expects a valid file number from an already opened file. Use ##[[KeyPgFreefile Freefile]]## to retrieve an available file file number. + Lors d'une lecture de fichier ouvert avec ##[[KeyPgInputfilemode Input (File Mode)]]##, il est utile de savoir quand la fin du fichier est atteinte, ceci évite d'avoir une erreur causée par un essai de lecture après la fin du fichier. L'utilisation de ##**EOF**## permet de déterminer quand on a atteint la fin. ##**EOF**## attend un numéro valide de fichier déjà ouvert. Utilisez ##[[KeyPgFreefile FreeFile]]## pour récupérer un numéro de fichier disponible. - For file numbers bound to files opened for ##[[KeyPgOutput Output]]##, EOF always returns 0. + Pour les numéros de fichiers liés aux fichiers ouverts pour ##[[KeyPgOutput Output]]##, EOF retourne toujours 0. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/eof.bas"}}%%(freebasic) @@ -49,11 +49,11 @@ close #file_num '' close file via our file number end 0 %% - Because of underlying differences in the libraries used by the compiler on different platforms, the EOF function can be unreliable when reading text files created in Linux (with LF line endings) in the Windows version of the compiler. The DOS and Linux compilers do not have this problem. One solution is to open the file for Binary access instead of for Input. Line Input# and EOF can still be used as in the above example, and the EOF function will work reliably. This solution will not detect the end of file character, but this is only used to mark the end of text streams that are not disk files. + En raison des différences sous-jacentes dans les librairies utilisées par le compilateur sur les différentes plates-formes, la fonction ##**EOF**## peut être peu fiable lors de la lecture de fichiers texte créés dans Linux (avec des fins de ligne indiquées par LF) dans la version Windows du compilateur. Les compilateur DOS et Linux n'ont pas ce problème. Une solution consiste à ouvrir le fichier pour un accès [[KeyPgBinary Binary]] au lieu d'un [[KeyPgInputfilemode Input]]. [[KeyPgLineinputPp Line Input#]] et ##**EOF**## peuvent encore être utilisés comme dans l'exemple ci-dessus, et la fonction EOF sera fiable. Cette solution ne détecte pas le caractère de fin de fichier, mais ceci n'est utilisé que pour marquer la fin des flux de texte qui ne sont pas des fichiers sur le disque. {{fbdoc item="diff"}} - - In QB the comm port signaled an EOF when there were no chars waiting to be read. - - In QB, for files opened in RANDOM or BINARY mode, EOF returned non-zero only after a read past the end of file has been attempted. In FreeBASIC, EOF returns true after the last item is read. + - Dans QB le port COM signale un EOF quand il n'y a aucun caractère en attente de lecture. + - Dans QB, pour les fichiers ouverts en mode RANDOM ou BINARY, EOF retourne une valeur différente de zéro seulement après une lecture une fois la fin du fichier atteinte. Dans FreeBASIC, EOF retourne "true" (vrai) après la lecture du dernier item. {{fbdoc item="see"}} - ##[[KeyPgLof Lof]]## diff --git a/fbdocs/manual/cache/KeyPgErase.wakka b/fbdocs/manual/cache/KeyPgErase.wakka index 959a2e2d26..017978ee36 100644 --- a/fbdocs/manual/cache/KeyPgErase.wakka +++ b/fbdocs/manual/cache/KeyPgErase.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERASE"}}---- -Statement to erase arrays +Déclaration pour effacer les tableaux {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Erase** ( array [[KeyPgAs as]] [[KeyPgAny any]] [, ... ] ) @@ -9,10 +9,10 @@ Statement to erase arrays ## {{fbdoc item="param"}} ##//array//## - An array to be erase. + Un tableau à effacer. {{fbdoc item="desc"}} - Erases the element data of one or more variable-length arrays from memory, or clears (initializes) all elements in a fixed-length array. + Efface de la mémoire les éléments de données d'un ou plusieurs tableaux de longueur variable, ou remet à zéro (initialise) tous les éléments d'un tableau à longueur fixe. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/array/erase.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ erase MyArray1, MyArray2 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgCommon Common]]## diff --git a/fbdocs/manual/cache/KeyPgErfn.wakka b/fbdocs/manual/cache/KeyPgErfn.wakka index c2a7cf9bef..c1f22d7b0a 100644 --- a/fbdocs/manual/cache/KeyPgErfn.wakka +++ b/fbdocs/manual/cache/KeyPgErfn.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERFN"}}---- -Error reporting function +Signaler une erreur survenue dans une fonction {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Erfn** ( ) [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] @@ -7,13 +7,13 @@ Error reporting function {{fbdoc item="usage"}}## //result// = **Erfn** ( ) ## -{{fbdoc item="ret"}} - Returns a pointer to the string identifying the function where the error occurred. +{{fbdoc item="section" value="Valeur retourné + Retourne un pointeur vers la chaîne de caractères identifiant la fonction où l'erreur s'est produite. - Returns NULL if the source is not compiled with the //[[CompilerOptexx -exx]]// compiler option. + Retourne NULL si la source n'est pas compilé avec l'option de compilation //[[CompilerOptexx -exx]]//. {{fbdoc item="desc"}} - An error reporting function returning a pointer to the name of the function. + Une fonction de rapport d'erreur retournant un pointeur sur le nom de la fonction. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/erfn.bas"}}%%(freebasic) @@ -34,19 +34,19 @@ End Sub Generate_Error %% -**Output:** +**Affichage:** %%Error Function: GENERATE_ERROR Error Module : test.bas %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Erfn""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Erfn**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} +{{fbdoc item="see"}} - ##[[KeyPgErl Erl]]## - ##[[KeyPgErmn Ermn]]## - ##[[KeyPgOnerror On...Error]]## diff --git a/fbdocs/manual/cache/KeyPgErl.wakka b/fbdocs/manual/cache/KeyPgErl.wakka index 16ea77daab..0f211a9567 100644 --- a/fbdocs/manual/cache/KeyPgErl.wakka +++ b/fbdocs/manual/cache/KeyPgErl.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERL"}}---- -Error handling function to return the line where the error occurred +Fonction de gestion d'erreur retournant le numéro de ligne où l'erreur s'est produite {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Erl** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,15 +7,15 @@ Error handling function to return the line where the error occurred {{fbdoc item="usage"}}## //result// = **Erl** ## -{{fbdoc item="ret"}} - An [[KeyPgInteger integer]] return value containing the line number where the last error occurred. +{{fbdoc item="section" value="Valeur retourné + Une valeur retournée [[KeyPgInteger Integer]] contenant le numéro de la ligne où la dernière erreur s'est produite. {{fbdoc item="desc"}} - ##**Erl**## will return the line number where the last error occurred. If no error has occurred, ##**Erl**## will return 0. + ##**Erl**## retournera le numéro de la ligne où la dernière erreur s'est produite. Si aucune erreur ne s'est produite, ##**Erl**## retournera 0. - ##**Erl**## cannot always be used effectively -- QB-like error handling must be enabled. + ##**Erl**## ne peut pas toujours être utilisé efficacement -- la gestion des erreurs QB-like doit être activée. - ##**Erl**## is reset by RESUME and RESUME NEXT + ##**Erl**## est réinitialisé par RESUME et RESUME NEXT {{fbdoc item="ex"}} @@ -43,10 +43,10 @@ ErrorHandler: %% {{fbdoc item="diff"}} - - FreeBASIC returns the source code line number and ignores the values of all explicit line numbers, where as QB returns the last encountered explicit line number, and will return zero (0) when explicit line numbers are not used. + - FreeBasic retourne le numéro de la ligne de code source et ignore les valeurs de tous les numéros de ligne explicites, alors que QB retourne le dernier numéro explicite de la ligne rencontrée, et sera de retour à zéro (0) lorsque les numéros de ligne explicites ne sont pas utilisés. {{fbdoc item="see"}} - - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} - - ##{{fbdoc item="keyword" value="KeyPgErr|Err"}}## + - [[ProPgErrorHandling Error Handling]] + - ##[[KeyPgErr Err]]## {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgErmn.wakka b/fbdocs/manual/cache/KeyPgErmn.wakka index ae8cb6e7e7..ce817ee2cd 100644 --- a/fbdocs/manual/cache/KeyPgErmn.wakka +++ b/fbdocs/manual/cache/KeyPgErmn.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERMN"}}---- -Error reporting function +Signaler une erreur de fonctionnement dans un module {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Ermn** ( ) [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] @@ -8,12 +8,12 @@ Error reporting function //result// = **Ermn** ( ) ## {{fbdoc item="ret"}} - Returns a pointer to the string identifying the module where the error occurred. + Retourne un pointeur vers la chaîne de caractères identifiant le module où l'erreur s'est produite. - Returns NULL if the source is not compiled with the //[[CompilerOptexx -exx]]// compiler option. + Retourne NULL si la source n'est pas compilée avec l'option de compilation //[[CompilerOptexx -exx]]//. {{fbdoc item="desc"}} - An error reporting function returning a pointer to the name of the module. + Une fonction de rapport d'erreur retournant un pointeur sur le nom du module. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/ermn.bas"}}%%(freebasic) @@ -34,17 +34,17 @@ End Sub Generate_Error %% -**Output:** +**Affichage:** %%Error Function: GENERATE_ERROR Error Module : test.bas %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ermn""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ermn**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgErfn Erfn]]## diff --git a/fbdocs/manual/cache/KeyPgErr.wakka b/fbdocs/manual/cache/KeyPgErr.wakka index 142501e5ae..a376e67b0a 100644 --- a/fbdocs/manual/cache/KeyPgErr.wakka +++ b/fbdocs/manual/cache/KeyPgErr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERR"}}---- -Error handling function to return the error number of the last error +Fonction de gestion des erreurs qui renvoie le numéro de la dernière erreur {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Err** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -8,19 +8,19 @@ Error handling function to return the error number of the last error //result// = **Err** ## {{fbdoc item="ret"}} - After an error, returns the error code that occurred. + Après une erreur, retourne le code de l'erreur qui s'est produite. {{fbdoc item="desc"}} - ##**Err**## can always be used, even if QB-like error handling is not enabled. + ##**Err**## peut toujours être utilisé, même si la gestion des erreurs QB-like n'est pas activée. - ##**Err**## is reset by ##[[KeyPgResume Resume]]## and ##[[KeyPgResumenext Resume Next]]##. + ##**Err**## est réinitialisé par ##[[KeyPgResume Resume]]## et ##[[KeyPgResumenext Resume Next]]##. - NOTE: Care should be taken when calling an internal function (such as ##[[KeyPgPrint Print]]##) after an error occurs because it will reset the error value with its own error status. To preserve the ##**Err**## value, it is a good idea to store it in a variable as soon as the error handler is entered. + NOTE: Des précautions doivent être prises lors de l'appel d'une fonction interne (comme ##[[KeyPgPrint Print]]##) après qu'une erreur se soit produite car la valeur d'erreur sera réinitialisée avec son propre statut d'erreur. Pour préserver la valeur ##**Err**##, il faut la copier dans une variable auxiliaire dès que le gestionnaire d'erreurs est lancé. - See [[TblRuntimeErrors Runtime Error Codes]] for a listing of runtime error numbers and their associated meaning. + Voir [[TblRuntimeErrors Codes d'erreur de fonctionnement]] pour une liste des numéros d'erreur d'exécution et leur signification. {{fbdoc item="ex"}} -An example using QBasic style error handling (compile with -ex option) +Un exemple en utilisant le style QBasic de gestion d'erreur (compilation avec l'option -ex) {{fbdoc item="filename" value="examples/manual/error/err1.bas"}}%%(freebasic) '' Compile with -lang fblite or qb @@ -35,7 +35,7 @@ Error_Handler: Print "Error #"; n Resume Next %% -An example using inline error handling (note: ##[[KeyPgOpen Open]]## can also return its own error status when called as a function) +Un exemple en utilisant la gestion des erreurs en ligne (note: ##[[KeyPgOpen Open]]## peut aussi retourner son propre status d'erreur s'il est appelé comme une fonction) {{fbdoc item="filename" value="examples/manual/error/err2.bas"}}%%(freebasic) '' compile without -e switch @@ -52,11 +52,11 @@ close #1 %% {{fbdoc item="diff"}} - - Error numbers are not the same as in QB. + - Les numéros d'erreur sont différents dans QB. {{fbdoc item="see"}} - ##[[KeyPgOnerror On Error]]## - - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} - - [[TblRuntimeErrors Runtime Error Codes]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[TblRuntimeErrors Codes des erreurs de fonctionnement]] {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgError.wakka b/fbdocs/manual/cache/KeyPgError.wakka index 1b3171e431..8685ef57de 100644 --- a/fbdocs/manual/cache/KeyPgError.wakka +++ b/fbdocs/manual/cache/KeyPgError.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ERROR"}}---- -Error handling statement to force an error to be generated +Déclaration de gestion des erreurs qui force la génération d'une erreur {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Error** ( //errno// [[KeyPgAs as]] [[KeyPgInteger integer]] ) @@ -9,27 +9,27 @@ Error handling statement to force an error to be generated ## {{fbdoc item="param"}} ##//errno//## - The error number to generate + Le numéro de l'erreur à générer {{fbdoc item="desc"}} - Generates a run-time error using the specified ##//errno//##. This can be used to simulate custom error numbers. + Génère une erreur de fonctionnement en utilisant le ##//errno//## spécifié. Ceci peut être utilisé pour simuler des numéros d'erreur personnalisés. - No user error code range is defined, so if ##[[KeyPgError Error]]## is used to set an user-defined error code it is wise to use high values, to avoid collisions in case the list of built-in errors list is enhanced. + Aucune gamme de code d'erreur utilisateur n'est définie, ainsi si ##[[KeyPgError Error]]## est utilisé pour définir un code d'erreur utilisateur, il est sage d'utiliser des valeurs élevées, pour éviter des collisions dans le cas où la liste des erreurs intégrées est complètée. - See [[TblRuntimeErrors Runtime Error Codes]] for a listing of runtime error numbers and their associated meaning. + Voir [[TblRuntimeErrors Codes des erreurs de fonctionnement]] pour une liste des erreurs de fonctionnement et de leurs numéros, ainsi que de leur signification. {{fbdoc item="ex"}} - To send an error alert of error 150 (just some arbitrary error code) one would do the following: + Pour envoyer une alerte d'erreur 150 (juste un code d'erreur arbitraire) on ferait ce qui suit: {{fbdoc item="filename" value="examples/manual/error/error.bas"}}%%(freebasic) error 150 %% {{fbdoc item="diff"}} - - Error numbers are not the same as in QB. + - Les numéros d'erreur sont différents dans QB. {{fbdoc item="see"}} - ##[[KeyPgErr Err]]## - - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} - - [[TblRuntimeErrors Runtime Error Codes]] + - [[ProPgErrorHandling Gestion des erreurs]] + - [[TblRuntimeErrors Codes des erreurs de fonctionnement]] {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgEvent.wakka b/fbdocs/manual/cache/KeyPgEvent.wakka index 9e69edb1f9..09f4486f18 100644 --- a/fbdocs/manual/cache/KeyPgEvent.wakka +++ b/fbdocs/manual/cache/KeyPgEvent.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="EVENT"}}---- -Pre-defined structure(UDT) used by [[KeyPgScreenevent Screenevent]] to return event data +Structure prédéfinie (UDT) utilisée par [[KeyPgScreenevent ScreenEvent]] pour retourner les données d'événements {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Event** ## {{fbdoc item="desc"}} - Here we report the ##EVENT## structure for clarity: + Ici, nous décrivons la structure ##EVENT## pour plus de clarté: - {{fbdoc item="filename" value="examples/manual/check/KeyPgScreenevent_1.bas"}}%%(freebasic) + %%(freebasic) Type EVENT Field = 1 Type As Integer Union @@ -28,35 +28,33 @@ Type EVENT Field = 1 End Type %% -The ##Type Field## will contain the event type ID, while the remaining 4 integers will hold sensitive data to the event type. +##Type Field## contiendra l'ID de type d'événement, tandis que les 4 entiers restants stockeront les données sensibles du type d'événement. - __Event types__ - The event type is identified by an ID number returned into the first integer of the ##//event//## buffer (the ##.type## field in the ##EVENT## structure). Known event type IDs - and their values at time of writing - are: + Les types d'événements + Le type d'événement est identifié par un numéro d'identification (ID) retourné dans le premier entier de la mémoire tampon des événements (le champ ##.type## de la structure ##EVENT##). Les ID de type d'événement connus - et leurs valeurs au moment de l'écriture - sont les suivants: - - ##EVENT_KEY_PRESS## (##1##) A key was pressed on the keyboard. The ##.scancode## field contains the platform independent scancode value for the key; if the key has an ascii representation, it is held into the ##.ascii## field, which otherwise has a value of 0. - - ##EVENT_KEY_RELEASE## (##2##) A key was released on the keyboard. The ##.scancode## and ##.ascii## fields have the same meaning as with the ##EVENT_KEY_PRESS## event. - - ##EVENT_KEY_REPEAT## (##3##) A key is being held down repeatedly. The ##.scancode## and ##.ascii## fields have the same meaning as with the ##EVENT_KEY_PRESS## event. - - ##EVENT_MOUSE_MOVE## (##4##) The mouse was moved while it was on the program window. The ##.x## and ##.y## fields contain the new mouse position relative to the upper-left corner of the screen, while the ##.dx## and ##.dy## fields contain the motion deltas. - - ##EVENT_MOUSE_BUTTON_PRESS## (##5##) One of the mouse buttons was pressed. The ##.button## field has one bit set identifying the button that was pressed; bit 0 identifies the left mouse button, bit 1 the right mouse button and bit 2 the middle mouse button. - - ##EVENT_MOUSE_BUTTON_RELEASE## (##6##) One of the mouse buttons was released. The ##.button## field has the same meaning as with the ##EVENT_MOUSE_BUTTON_PRESS## event. - - ##EVENT_MOUSE_DOUBLE_CLICK## (##7##) One of the mouse buttons was double clicked. The ##.button## field has the same meaning as with the ##EVENT_MOUSE_BUTTON_PRESS## event. - - ##EVENT_MOUSE_WHEEL## (##8##) The mouse wheel was used; the new wheel position is returned into the ##.z## field. - - ##EVENT_MOUSE_ENTER## (##9##) The mouse was moved into the program window. - - ##EVENT_MOUSE_EXIT## (##10##) The mouse was moved out of the program window. - - ##EVENT_WINDOW_GOT_FOCUS## (##11##) The program window has got focus. - - ##EVENT_WINDOW_LOST_FOCUS## (##12##) The program window has lost focus. - - ##EVENT_WINDOW_CLOSE## (##13##) The user attempted to close the program window. - - ##EVENT_MOUSE_HWHEEL## (##14##) The horizontal mouse wheel was used; the new horizontal wheel position is returned into the ##.w## field. (Note: currently implemented on Windows only) + - ##EVENT_KEY_PRESS## (##1##) Une touche du clavier a été appuyée. Le champ ##.scancode## contient la valeur du "scancode" indépendante de la plate-forme pour la touche; si la touche a une représentation ascii, elle est stockée dans le champ ##.ascii##, qui sinon a une valeur de 0. + - ##EVENT_KEY_RELEASE## (##2##) Une touche du clavier a été relachée. Les champs ##.scancode## et ##.ascii## ont la même signification que pour l'événement ##EVENT_KEY_PRESS##. + - ##EVENT_KEY_REPEAT## (##3##) Une touche est appuyée répétitivement. Les champs ##.scancode## et ##.ascii## ont la même signification que pour l'événement ##EVENT_KEY_PRESS##. + - ##EVENT_MOUSE_MOVE## (##4##) La souris a été déplacée alors qu'elle était sur la fenêtre du programme. Les champs ##.x## et ##.y## contiennent la nouvelle position de la souris par rapport au coin supérieur gauche de l'écran, tandis que les champs ##.dx## et ##.dy## contiennent les valeurs (deltas) des déplacements. + - ##EVENT_MOUSE_BUTTON_PRESS## (##5##) L'un des boutons de la souris a été appuyé. Le champ ##.button## voit un de ses bits passer à 1, identifiant ainsi le bouton appuyé; le bit 0 identifie le bouton gauche de la souris, le bit 1 le bouton droit et le bit 2 le bouton du milieu. + - ##EVENT_MOUSE_BUTTON_RELEASE## (##6##) L'un des boutons de la souris a été relaché. Le champ ##.button## a la même signification que pour l'événement ##EVENT_MOUSE_BUTTON_PRESS##. + - ##EVENT_MOUSE_DOUBLE_CLICK## (##7##) L'un des boutons de la souris a été double-cliqué. Le champ ##.button## a la même signification que pour l'événement ##EVENT_MOUSE_BUTTON_PRESS##. + - ##EVENT_MOUSE_WHEEL## (##8##) La molette de la souris a été utilisée; la nouvelle position de la molette est retournée dans le champ ##.z##. + - ##EVENT_MOUSE_ENTER## (##9##) La souris a été déplacée dans la fenêtre du programme. + - ##EVENT_MOUSE_EXIT## (##10##) La souris a été déplacée en dehors de la fenêtre du programme. + - ##EVENT_WINDOW_GOT_FOCUS## (##11##) La fenêtre du programme a eu le "focus" (le curseur est sur la fenêtre) + - ##EVENT_WINDOW_LOST_FOCUS## (##12##) La fenêtre du programme a perdu le "focus" (le curseur est sorti de la fenêtre) + - ##EVENT_WINDOW_CLOSE## (##13##) L'utilisateur a tenté de fermer la fenêtre du programme. + - ##EVENT_MOUSE_HWHEEL## (##14##) La molette horizontale de la souris a été utilisée; la nouvelle position horizontale de la molette est stockée dans le champ ##.w##. (Note: actuellement mis en oeuvre uniquement sous Windows) +Le fichier en-tête ##fbgfx.bi## contient une définition du type de donnée utilisateur ##EVENT##. -The ##fbgfx.bi## header file contains a definition of the ##EVENT## user data type. - {{fbdoc item="lang"}} - - In //[[CompilerDialects lang fb]]//, the structure and constants are stored in the ##FB## ##[[KeyPgNamespace Namespace]]##. - + - Dans //[[CompilerDialects lang fb]]//, la structure et les constantes sont stockées dans le ##[[KeyPgNamespace Namespace]]## ##FB##. -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +{{fbdoc item="section" value="Différences pour QB + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreenEvent ScreenEvent]]## diff --git a/fbdocs/manual/cache/KeyPgExec.wakka b/fbdocs/manual/cache/KeyPgExec.wakka index 926ac43885..51a4d1b81c 100644 --- a/fbdocs/manual/cache/KeyPgExec.wakka +++ b/fbdocs/manual/cache/KeyPgExec.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="EXEC"}}---- -Temporarily transfers execution to an external program +Transfère temporairement l'exécution à un programme externe {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub function]] **Exec** ( [[KeyPgByref byref]] //program// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByref byref]] //arguments// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,15 +9,15 @@ Temporarily transfers execution to an external program ## {{fbdoc item="param"}} ##//program//## - The file name (including file path) of the program (executable) to transfer control to. + Le nom de fichier (avec le chemin du fichier) du programme (exécutable) auquel on transfère le contrôle. ##//arguments//## - The command-line arguments to be passed to the program. + Les arguments de la ligne de commande à passer au programme. -{{fbdoc item="ret"}} - The exit status of the program, or negative one (-1) if the program could not be executed. +{{fbdoc item="section" value="Valeur retournée + L'état de sortie du programme, ou une valeur negative (-1) si le programme ne peut pas être exécuté. {{fbdoc item="desc"}} - Transfers control over to an external program. When the program exits, execution resumes immediately after the call to ##**Exec**##. + Transfère le contrôle à un programme externe. Lorsque le programme se termine, l'exécution reprend immédiatement après l'appel à ##**Exec**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/exec.bas"}}%%(freebasic) @@ -33,19 +33,19 @@ ELSE END IF %% {{fbdoc item="target"}} - - Linux requires the //program// case matches the real name of the file. Windows and DOS are case insensitive. The program being executed may be case sensitive for its command line parameters. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. - - Exit code is limited to 8 bits in DOS. + - Linux nécessite que la casse de //program// corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. Le programme en cours d'exécution peut être sensible à la casse pour ses paramètres de ligne de commande. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. + - Le code de sortie est limité à 8 bits sous DOS. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Exec""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Exec**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgChain Chain]]## transfer temporarily, without arguments - - ##[[KeyPgRun Run]]## one-way transfer - - ##[[KeyPgCommand Command]]## pick arguments + - ##[[KeyPgChain Chain]]## transfère temporairement, sans argument + - ##[[KeyPgRun Run]]## transfert une-voie + - ##[[KeyPgCommand Command]]## chercher des arguments {{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgExepath.wakka b/fbdocs/manual/cache/KeyPgExepath.wakka index 2a1ab869dc..a653a0127f 100644 --- a/fbdocs/manual/cache/KeyPgExepath.wakka +++ b/fbdocs/manual/cache/KeyPgExepath.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="EXEPATH"}}---- -Returns the path of the running program +Retourne le chemin du programme en cours {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Exepath** ( ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,11 +7,11 @@ Returns the path of the running program {{fbdoc item="usage"}}## //result// = **Exepath** ## -{{fbdoc item="ret"}} - A ##[[KeyPgString string]]## variable set to the path of the running program. +{{fbdoc item="section" value="Valeur retournée + Une variable ##[[KeyPgString String]]## contenant le chemin du programme en cours. {{fbdoc item="desc"}} - Returns the path (the location) of the calling program. This is not necessarily the same as ##[[KeyPgCurdir Curdir]]##. + Renvoie le chemin (l'emplacement) du programme appelant. Ce n'est pas nécessairement le même que ##[[KeyPgCurdir CurDir]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/exepath.bas"}}%%(freebasic) @@ -21,10 +21,10 @@ Print "This program's initial directory is: " & pathname {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Exepath""**##. +
  • Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Exepath**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCurdir Curdir]]## diff --git a/fbdocs/manual/cache/KeyPgExit.wakka b/fbdocs/manual/cache/KeyPgExit.wakka index dc882bf7ca..58ef2d0af9 100644 --- a/fbdocs/manual/cache/KeyPgExit.wakka +++ b/fbdocs/manual/cache/KeyPgExit.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="EXIT"}}---- -Control flow statement to exit a compound statement block +Déclaration de contrôle de flux pour sortir d'un bloc composé d'instructions {{fbdoc item="syntax"}}## **Exit** {[[KeyPgDoloop Do]] | [[KeyPgFornext For]] | [[KeyPgWhilewend While]] | [[KeyPgSelectcase Select]] } @@ -12,10 +12,10 @@ Control flow statement to exit a compound statement block ## {{fbdoc item="desc"}} - Leaves a code block such as a ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ##[[KeyPgWhilewend While...Wend]]##, or a ##[[KeyPgSelectcase Select Case]]## block. The execution skips the rest of the block and goes to the line after its end. + Quitte un bloc de code comme ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ##[[KeyPgWhilewend While...Wend]]##, ou ##[[KeyPgSelectcase Select Case]]##. L'exécution ignore le reste du bloc et continue sur la ligne après sa fin. - Where there are multiple ##[[KeyPgDoloop Do]]## / ##[[KeyPgFornext For]]## / ##[[KeyPgWhilewend While]]## / ##[[KeyPgSelectcase Select]]## blocks nested, it will skip to the end of the innermost block of that type. You can skip to the end of multiple blocks of that type by giving the word multiple times, separated by commas. - For example: ##**Exit While, While**## + Là où il y a plusieurs blocs ##[[KeyPgDoloop Do]]## / ##[[KeyPgFornext For]]## / ##[[KeyPgWhilewend While]]## / ##[[KeyPgSelectcase Select]]## imbriqués, **exit** fera passer à la fin du bloc de ce type, le plus intérieur. Vous pouvez aller directement à la fin de plusieurs blocs du même type en donnant en même temps plusieurs mots, séparés par des virgules. + Par exemple: ##**Exit While, While**## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/exit.bas"}}%%(freebasic) @@ -43,7 +43,7 @@ Next i %% {{fbdoc item="diff"}} - - EXIT WHILE and EXIT SELECT are new to ""FreeBASIC"". + - EXIT WHILE et EXIT SELECT sont nouveaux pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgSub Sub]]## @@ -53,5 +53,4 @@ Next i - ##[[KeyPgWhilewend While...Wend]]## - ##[[KeyPgContinue Continue]]## -{{fbdoc item="back" value="CatPgControlFlow|Control Flow"}} - +{{fbdoc item="back" value="CatPgControlFlow|Control Flow"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgExp.wakka b/fbdocs/manual/cache/KeyPgExp.wakka index 30f0eff206..74ed808dbb 100644 --- a/fbdocs/manual/cache/KeyPgExp.wakka +++ b/fbdocs/manual/cache/KeyPgExp.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="EXP"}}---- -Returns //**e**// raised to the power of a given number +Retourne //**e**// élevé à la puissance d'un nombre donné {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Exp** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Returns //**e**// raised to the power of a given number ## {{fbdoc item="param"}} ##//number//## - The ##[[KeyPgDouble double]]## ##//number//## that e is raised to the power of. + Le nombre ##[[KeyPgDouble Double]]## ##//number//## qui est l'exposant de la puissace à laquelle //**e**// est élevé. -{{fbdoc item="ret"}} - Returns the [[KeyPgDouble Double]] value of //e// raised to power of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Renvoie la valeur [[KeyPgDouble Double]] qui correspond à //**e**// élevé à la puissance ##//number//##. {{fbdoc item="desc"}} - The mathematical constant //e//, also called Euler's constant, is the base of the ##Exp## and ##[[KeyPgLog Log]]## and is an irrational and transcendental number. The value of //e// to twenty places is: 2.7182818284590452354. The required ##//number//## argument can be any valid numeric expression within range of the function. If ##//number//## is too large, FreeBASIC returns infinity. If ##//number//## is too small, FreeBASIC returns zero. The exact limit on ##//number//## is based on the math processor. If ##//number//## is an uninitialized variable, 1 is returned. + La constante mathématique //**e**//, aussi appelée la constante d'Euler, est la base de ##**Exp**## et ##[[KeyPgLog Log]]## et est un nombre irrationnel et transcendant. La valeur de //**e**// sur 20 chiffres est: 2.7182818284590452354. L'argument obligatoire ##//number//## est n'importe quelle valeur numérique valide dans l'intervalle de valeurs de la fonction. Si ##//number//## est trop grand, FreeBASIC retourne une valeur infinie. Si ##//number//## est trop petit, FreeBASIC retourne zéro. Les limites exactes de ##//number//## dépendent du processeur. Si ##//number//## est une variable non initialisée, 1 est renvoyé. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/exp.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ PRINT "" PRINT "After";t;" years, at an interest rate of"; r * 100; "%, your initial investment of"; p; " would be worth";a %% -The output would look like: +Affichera: %% Please enter the initial investment (principal amount): 100 Please enter the annual interest rate (As a decimal): .08 @@ -43,7 +43,7 @@ After 20 years, at an interest rate of 8%, your initial investment of 100 would %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgLog Log]]## diff --git a/fbdocs/manual/cache/KeyPgExport.wakka b/fbdocs/manual/cache/KeyPgExport.wakka index 86b652498b..98bcc1dab0 100644 --- a/fbdocs/manual/cache/KeyPgExport.wakka +++ b/fbdocs/manual/cache/KeyPgExport.wakka @@ -1,58 +1,27 @@ {{fbdoc item="title" value="EXPORT"}}---- -Declaration specifier to indicate that a procedure in a DLL should be visible from other programs +Spécificateur de déclaration qui indique qu'une procédure dans une DLL doit être visible à partir d'autres programmes {{fbdoc item="syntax"}}## { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //proc_name// ( //argumentlist// ) [ [[KeyPgAs as]] [[DataType datatype]] ] **Export** ## {{fbdoc item="desc"}} - If a function is declared with this clause in a DLL, it is added to the public export table, so external programs can dynamically link to it using [[KeyPgDylibsymbol Dylibsymbol]]. + Si une fonction est déclarée avec cette clause dans une DLL, elle est ajoutée à la table des exportations publiques, afin que les programmes externes puissent être liés dynamiquement à elle en utilisant [[KeyPgDylibsymbol DyLibSymbol]]. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/module/mydll.bas"}}%%(freebasic) -'' mydll.dll + %%(freebasic) -'' in the DLL the function must be declared as export +'' mydll.dll + '' in the DLL the function must be declared as export Function AddNumbers Alias "AddNumbers" _ - ( _ - ByVal operand1 As Integer, ByVal operand2 As Integer _ - ) As Integer Export - - AddNumbers = operand1 + operand2 - -End Function -%% - -{{fbdoc item="filename" value="examples/manual/module/export.bas"}}%%(freebasic) -'' create a function pointer, arguments must be the same type -'' as in the original function - -Dim AddNumbers As Function ( ByVal As Integer, ByVal As Integer ) As Integer -Dim hndl As Any Ptr - -hndl=DyLibLoad("mydll.dll") - -'' find the proc address (case matters!) -AddNumbers = DyLibSymbol( hndl, "AddNumbers" ) - -'' then call it ... -Print "1 + 2 = " & AddNumbers( 1, 2 ) - -Sleep -%% - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Export""**##. - -{{fbdoc item="target"}} - - Dynamic link libraries are not available in DOS, as the OS doesn't support them. + ( _ -{{fbdoc item="diff"}} - - New to Freebasic +ByVal operand1 As Integer, ByVal operand2 As Integer _ + ) As Integer Export -{{fbdoc item="see"}} - - ##[[KeyPgDylibload Dylibload]]## - - ##[[KeyPgDylibsymbol Dylibsymbol]]## - - ##[[KeyPgAlias Alias]]## +AddNumbers = operand1 + operand2 + End Function + %% + %%(freebasic) -{{fbdoc item="back" value="CatPgModularizing|Modularizing"}}{{fbdoc item="back" value="CatPgProcedures|Procedures"}} \ No newline at end of file +'' create a function pointer, arguments must be the same type \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgExtern.wakka b/fbdocs/manual/cache/KeyPgExtern.wakka index ec54e30217..f33f1d8dbd 100644 --- a/fbdocs/manual/cache/KeyPgExtern.wakka +++ b/fbdocs/manual/cache/KeyPgExtern.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="EXTERN"}}---- -Declares a variable, array or object having external linkage +Déclare une variable, un tableau ou un objet ayant une liaison externe {{fbdoc item="syntax"}}## **Extern** [ [[KeyPgImport Import]] ] //symbolname//[ (//subscripts//) ] [ [[KeyPgAlias Alias]] "//aliasname//" ] [[KeyPgAs as]] //[[DataType DataType]]// [, ...] ## {{fbdoc item="param"}} ##//symbolname//## - The name of the variable, array or object. + Le nom de la variable, du tableau ou de l'objet. ##//aliasname//## - An alternate external name for the variable, array or object. + Un autre nom externe pour la variable, le tableau ou l'objet. {{fbdoc item="desc"}} - Declares ##//symbolname//## as an external name, meaning it is global to external modules. ##**Extern**## only declares variables, arrays and objects, and does not define them (different from ##[[KeyPgCommon Common]]## or ##[[KeyPgDim Dim]]##). It also has the effect of making ##//symbolname//## a //shared// name, meaning it is visible within procedures (see ##[[KeyPgShared Shared]]##). + Déclare ##//symbolname//## comme un nom externe, ce qui signifie qu'il est global pour des modules externes. ##**Extern**## déclare seulement des variables, tableaux et objets, et ne les définira pas (différent de ##[[KeyPgCommon Common]]## ou ##[[KeyPgDim Dim]]##). Cela a aussi pour effet de faire de ##//symbolname//## un nom //shared//, ce qui signifie visible dans les procédures (voir ##[[KeyPgShared Shared]]##). - If ##[[KeyPgAlias Alias]]## is used, ##//aliasname//## will be used as the external name rather than ##//symbolname//##, and its case will be preserved. + Si ##[[KeyPgAlias Alias]]## est utilisé, ##//aliasname//## sera utilisé comme le nom externe plutôt que ##//symbolname//## et sa casse sera préservée. - If ##[[KeyPgImport Import]]## is used, the name will be added to the dynamic library import list so its address can be fixed at run-time. + Si ##[[KeyPgImport Import]]## est utilisé, le nom sera ajouté à la liste des bibliothèques dynamiques d'importation de sorte que son adresse ne peut être fixée lors de l'exécution. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/extern1.bas"}}%%(freebasic) @@ -47,10 +47,10 @@ Output: %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgExternBlock Extern...End Extern]]## diff --git a/fbdocs/manual/cache/KeyPgExternBlock.wakka b/fbdocs/manual/cache/KeyPgExternBlock.wakka index cc23fd5585..abf1f68a3a 100644 --- a/fbdocs/manual/cache/KeyPgExternBlock.wakka +++ b/fbdocs/manual/cache/KeyPgExternBlock.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="EXTERN...END EXTERN"}}---- -Statement block to allow calling of functions compiled for specific languages or platforms. +Bloc d'instructions permettant d'appeler des fonctions compilées pour des langages ou des plates-formes spécifiques. {{fbdoc item="syntax"}}## - **Extern { """C""" | """C++""" | """Windows""" | """Windows-MS""" }** [ **[[KeyPgLib Lib]]** "//libname//" ] + **Extern { "C" | "C++" | "Windows" | "Windows-MS" }** [ **[[KeyPgLib Lib]]** "//libname//" ] //declarative statements// **End Extern** ## {{fbdoc item="desc"}} - ##**Extern**## blocks provide default calling conventions for procedures and mandate a certain name decoration. + Les blocs ##**Extern**## fournissent par défaut des conventions d'appel pour les procédures et mandatent une certaine "name decoration". - ##**Extern """C"""**## blocks provide a default ##[[KeyPgCdecl cdecl]]## calling convention to procedures, and also preserve the case of all names declared within them. The same effect can be achieved without the EXTERN block by using ##[[KeyPgCdecl cdecl]]## together with an ##[[KeyPgAlias alias]]## string containing the exact procedure name. + Les blocs ##**Extern "C"**## fournissent par défaut une convention d'appel ##[[KeyPgCdecl cdecl]]## pour les procédures et préservent aussi la casse de tous les noms déclarés dans celles-ci. Le même résultat peut être obtenu en utilisant ##[[KeyPgCdecl cdecl]]## en même temps qu'un ##[[KeyPgAlias Alias]]## chaîne contenant le nom exact de la procédure. - ##**Extern """C++"""**## blocks are exactly like ##**Extern """C"""**## blocks but they also mangle the names declared within them in a way compatible to that of //g""++""-4.x//. + Les blocs ##**Extern "C++"**## sont exactement comme les blocs ##**Extern "C"**## mais ils transforment aussi les noms déclarés à l'intérieur d'une manière compatible avec celle de //g++-4.x//. - ##**Extern """Windows"""**## blocks provide a default ##[[KeyPgStdcall Stdcall]]## calling convention to procedures, preserve the case of all names declared within them, and on the Windows platform, append an ##"@//N//"## suffix to procedure names, where ##//N//## is the total size in bytes of any procedure parameters. Similar to the ##**Extern """C"""**## block, the same effect can be achieved by using ##[[KeyPgStdcall stdcall]]## and ##[[KeyPgAlias alias]]##. + Les blocs ##**Extern "Windows"**## fournissent par défaut une convention d'appel ##[[KeyPgStdcall stdcall]]## pour les procédures, préservent la casse de tous les noms déclarés à l'intérieur de celles-ci et sur les plates-formes Windows, ajoutent un suffixe ##"@//N//"## aux noms des procédures, où ##//N//## est la taille totale en octets des paramètres de la procédure. Similaire au bloc ##**Extern "C"**##, le même effet est obtenu en utilisant ##[[KeyPgStdcall stdcall]]## et ##[[KeyPgAlias Alias]]##. - ##**Extern """Windows-MS"""**## blocks are exactly like ##**Extern """Windows"""**## blocks but do not append the ##"@//N//"## suffix to procedure names on Windows. + Les blocs ##**Extern "Windows-MS"**## sont identiques aux blocs ##**Extern "Windows"**## mais n'ajoutent pas le suffixe ##"@//N//"## aux noms de procédure sur les plates-formes Windows. - ##[[KeyPgLib Lib]] "//libname//"## can be used to specify a library which will be linked in as if ##[[KeyPgInclib #inclib "libname"]]## or ##[[CompilerOptl -l libname]]## had been used. Additionally, all procedure declarations inside the **Extern** block will use the specified ##[[KeyPgLib Lib]] "//libname//"## as if it was specified as part of their declarations (but it can still be overridden with an explicit ##[[KeyPgLib Lib]] "//libname//"##). + ##[[KeyPgLib Lib]] "//libname//"## peut être utilisé pour spécifier une librairie qui sera liée comme si on avait utilisé ##[[KeyPgInclib #Inclib "Libname"]]## ou ##[[CompilerOptl -l libname]]##. De plus, toutes les déclarations de procédures à l'intérieur du bloc **Extern** utiliseront ##[[KeyPgLib Lib]] "//libname//"## comme si cela avait été spécifié dans le cadre de leurs déclarations (mais cela peut être modifié par un ##[[KeyPgLib Lib]] "//libname//"## explicite. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/extern-block.bas"}}%%(freebasic) @@ -48,13 +48,13 @@ end extern %% {{fbdoc item="lang"}} - - ##**Extern**## blocks are only available in the //[[CompilerOptlang -lang fb]]// dialect. +
  • Les blocs ##**Extern**## sont disponibles seulement en dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="target"}} - - On Linux, *BSD and DOS platforms, ##**Extern "Windows"**## blocks never append a ##"@//N//"## suffix to procedure names, and thus are equal to ##**Extern "Windows-MS"**##. + - Dans les plates-formes Linux, *BSD and DOS les blocs ##**Extern "Windows"**## n'ajoutent jamais le suffixe ##"@//N//"## aux noms des procédures et sont donc équivalents à ##**Extern "Windows-MS"**##. {{fbdoc item="see"}} - ##[[KeyPgCdecl Cdecl]]## diff --git a/fbdocs/manual/cache/KeyPgField.wakka b/fbdocs/manual/cache/KeyPgField.wakka index e1a21fae0e..6a44861ab3 100644 --- a/fbdocs/manual/cache/KeyPgField.wakka +++ b/fbdocs/manual/cache/KeyPgField.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FIELD"}}---- -Specifies alignment. +Spécifie l'alignement. {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// **Field** = { 1 | 2 | 4 } @@ -7,9 +7,9 @@ Specifies alignment. End [[KeyPgType Type]] ## {{fbdoc item="desc"}} -~&//Note: The following information is likely incorrect, FB follows the GCC padding rules, which these next sentences do not describe. The source file symb-struct.bas of the compiler shows the exact method.// +//Note: Les informations suivantes sont susceptibles d'être incorrectes, FB suit les règles de remplissage de GCC, que les phrases suivantes ne décrivent pas. Le fichier source symb-struct.bas du compilateur montre la méthode correcte.// - A ##[[KeyPgType Type]]## variable has its fields aligned to the word length of the system, 4 bytes presently. ##**Field**## modifies the default alignment to one byte (##**Field**## 1) or two bytes (##**Field**## 2). This helps ""FreeBASIC"" maintain compatibility with structures created in other languages. + Une variable ##[[KeyPgType Type]]## a ses champs alignés sur la longueur d'un mot dans le système, 4 octets présentement. ##**Field**## modifie l'alignement par défaut à 1 octet (##**Field**## 1) ou 2 octets (##**Field**## 2). Ceci pour aider FreeBASIC à maintenir la compatibilité avec des structures crées dans les autres langages. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/field.bas"}}%%(freebasic) @@ -49,10 +49,10 @@ sleep %% {{fbdoc item="lang"}} - -In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Field**## alignment is always one, no padding is ever done, as in QB. +
  • Dans le dialecte //[[CompilerOptlang -lang qb]]//, l'alignement ##**Field**## est toujours de 1, jamais de remplissage, comme dans QB. {{fbdoc item="diff"}} - - In QB ##**Field**## was used to define fields in a file buffer at run time. This feature is not implemented in FB, so the keyword has been redefined. To define fields in a file buffer, ##**[[KeyPgType Type]]s**## must be used. + - Dans QB, ##**Field**## est utilisé pour définir les champs dans un tampon fichier au démarrage. Cette fonctionnalité n'est pas implémentée dans FB, de sorte que le mot-clé a été redéfini. Pour définir des champs dans un tampon de fichier, il faut utiliser ##**[[KeyPgType Type]]**## plusieurs fois. {{fbdoc item="see"}} - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgFileattr.wakka b/fbdocs/manual/cache/KeyPgFileattr.wakka index 5e894b6446..beab6eb1b7 100644 --- a/fbdocs/manual/cache/KeyPgFileattr.wakka +++ b/fbdocs/manual/cache/KeyPgFileattr.wakka @@ -1,42 +1,42 @@ {{fbdoc item="title" value="FILEATTR"}}---- -Returns information about an open file number +Retourne des informations sur un numéro de fichier ouvert {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""FileAttr""** ( [[KeyPgByval byval]] //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //returntype// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **FileAttr** ( [[KeyPgByval ByVal]] //filenum// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //returntype// [[KeyPgAs As]] [[KeyPgInteger Integer]] = 1 ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "file.bi" - //result// = **""FileAttr""**( //filenum//, [ //returntype// ] ) + //result// = **FileAttr**( //filenum//, [ //returntype// ] ) ## -//or// +//ou// ## #include "vbcompat.bi" - //result// = **""FileAttr""**( //filenum//, [ //returntype// ] ) + //result// = **FileAttr**( //filenum//, [ //returntype// ] ) ## {{fbdoc item="param"}} ##//filenum//## - The file number of a file or device opened with ##[[KeyPgOpen Open]]## + Le numéro de fichier ou périphérique ouvert avec ##[[KeyPgOpen Open]]## ##//returntype//## - An ##[[KeyPgInteger integer]]## indicating the type of information to return. + Un nombre ##[[KeyPgInteger Integer (Entier)]]## indiquant le type d'information à renvoyer. -{{fbdoc item="ret"}} - A value associated with the return type, otherwise 0 on error. +{{fbdoc item="section" value="Valeur retournée + Une valeur associée au type de retour, sinon 0 en cas d'erreur. {{fbdoc item="desc"}} - Information about the file number is returned based on the supplied ##//returntype//## - {{table columns="3" cellpadding="1" cells="Value;Description;constant;1;File Mode;fbFileAttrMode;2;File Handle;fbFileAttrHandle;3;Encoding;fbFileAttrEncoding"}} + Information sur le numéro de fichier est retourné sur la base du ##//returntype//## fourni + {{table columns="" cellpadding="2" cells="Valeur;Description;constante;1;File Mode;fbFileAttrMode;2;File Handle;fbFileAttrHandle;3;Encoding;fbFileAttrEncoding;
    - For File Mode, ##//returntype//## = 1 (##fbFileAttrMode##) the return value is the sum of one or more of the following values: - {{table columns="3" cellpadding="1" cells="Value;File Mode;Constant;1;Input;fbFileModeInput;2;Output;fbFileModeOutput;4;Random;fbFileModeRandom;8;Append;fbFileModeAppend;32;Binary;fbFileModeBinary"}} + Pour "File Mode", ##//returntype//## = 1 (##fbFileAttrMode##) la valeur retournée est la somme d'une ou plusieurs des valeurs suivantes: + {{table columns="" cellpadding="2" cells="Valeur;Mode fichier;Constante;1;Input;fbFileModeInput;2;Output;fbFileModeOutput;4;Random;fbFileModeRandom;8;Append;fbFileModeAppend;32;Binary;fbFileModeBinary;
    - For File Handle, ##//returntype//## = 2 (##fbFileAttrHandle##), the return value is the file handle as supplied by the C Runtime for file-type devices. + Pour "File Handle", ##//returntype//## = 2 (##fbFileAttrHandle##), la valeur de retour est le descripteur de fichier fourni par le "C Runtime" pour les dispositifs de type de fichier. - On Windows only: For File Handle, ##//returntype//## = 2 (##fbFileAttrHandle##), the value returned for COM devices is the handle returned by ##""CreateFile""()## when the device was first opened. The value returned for LPT devices is the handle returned by ##""OpenPrinter""()## when the device was first opened. This handle value can be passed to other Windows API functions. + Sous Windows seulement: Pour "File Handle", ##//returntype//## = 2 (##fbFileAttrHandle##), la valeur retournée pour les périphériques COM est le "handle" retourné par ##CreateFile()## quand le périphérique a été ouvert. La valeur retournée pour les périphériques LPT est le "handle" retourné par ##OpenPrinter()## quand le périphérique a été ouvert. Cette valeur "handle" peut être transmise à d'autres fonctions API de Windows. - On Linux only: For File Handle, ##//returntype//## = 2 (##fbFileAttrHandle##), the value returned for COM devices is the file descriptor returned by open() when the device was first opened. + Sous Linux seulement: Pour "File Handle", ##//returntype//## = 2 (##fbFileAttrHandle##), la valeur retournée pour les périphériques COM est le descripteur de fichier retourné par open() quand le périphérique a été ouvert. - For Encoding, ##//returntype//## = 3 (##fbFileAttrEncoding##), the return value is one of the following values: - {{table columns="3" cellpadding="1" cells="Value;Encoding;Constant;0;Ascii;fbFileEncodASCII;1;UTF-8;fbFileEncodUTF8;2;UTF-16;fbFileEncodUTF16;3;UTF-32;fbFileEncodUTF32"}} + Pour Encoding, ##//returntype//## = 3 (##fbFileAttrEncoding##), la valeur de retour est l'une des valeurs suivantes: + {{table columns="" cellpadding="2" cells="Valeur;Encoding;Constante;0;Ascii;fbFileEncodASCII;1;UTF-8;fbFileEncodUTF8;2;UTF-16;fbFileEncodUTF16;3;UTF-32;fbFileEncodUTF32;
    {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/fileattr.bas"}}%%(freebasic) @@ -66,9 +66,9 @@ close #1 %% {{fbdoc item="diff"}} - - None for ##//returntype//## = 1 - - QBasic and 16-bit Visual Basic returned DOS file handle for ##//returntype//## = 2 - - ##//returntype//## = 3 is new to ""FreeBASIC"" + - Aucune pour ##//returntype//## = 1 + - QBasic et Visual Basic 16-bit retourne le "handle" fichier DOS pour ##//returntype//## = 2 + - ##//returntype//## = 3 nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgFilecopy.wakka b/fbdocs/manual/cache/KeyPgFilecopy.wakka index 3da3d30b48..1b86970484 100644 --- a/fbdocs/manual/cache/KeyPgFilecopy.wakka +++ b/fbdocs/manual/cache/KeyPgFilecopy.wakka @@ -1,30 +1,30 @@ {{fbdoc item="title" value="FILECOPY"}}---- -Copies a file +Copie un fichier {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""FileCopy""** ( [[KeyPgByval byval]] //source// [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //destination// [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **FileCopy** ( [[KeyPgByval ByVal]] //source// [[KeyPgAs As]] [[KeyPgZstring ZString]] [[KeyPgPtr Ptr]], [[KeyPgByval ByVal]] //destination// [[KeyPgAs As]] [[KeyPgZstring ZString]] [[KeyPgPtr Ptr]] ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "file.bi" - **""FileCopy""** //source//, //destination// + **FileCopy** //source//, //destination// ## -//or// +//ou// ## #include "file.bi" - //result// = **""FileCopy""**( //source//, //destination// ) + //result// = **FileCopy**( //source//, //destination// ) ## {{fbdoc item="param"}} ##//source//## - A ##[[KeyPgString string]]## argument specifying the filename of the file to copy from. This file must exist. + Un argument ##[[KeyPgString String (Chaîne)]]## spécifiant le nom du fichier à partir duquel on copie. Ce fichier doit exister. ##//destination//## - A ##[[KeyPgString string]]## argument specifying the filename of the file to copy to. This file will be overwritten if it exists. This file should not be currently referenced by any open file handles. + Un argument ##[[KeyPgString String (Chaîne)]]## spécifiant le nom du fichier vers lequel on copie. Ce fichier sera écrasé s'il existe. Ce fichier ne doit pas être actuellement référencé par un "handle" de fichier ouvert. -{{fbdoc item="ret"}} - Returns ##0## on success, or ##1## if an error occurred. +{{fbdoc item="section" value="Valeur retournée + Retourne ##0## si succès, ou ##1## en cas d'erreur. {{fbdoc item="desc"}} - Copies the contents of the source file into the destination file, overwriting the destination file if it already exists. - It is necessary to ##[[KeyPgInclude #Include]]## either ##"file.bi"## or ##"vbcompat.bi"## in order to gain access to this function. + Copie le contenu du fichier source dans le fichier destination, écrasant le fichier destination s'il existe déjà. + Un ##[[KeyPgInclude #include]]## ##"file.bi"## ou ##"vbcompat.bi"## est nécessaire de façon à avoir accès à cette fonction. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/filecopy.bas"}}%%(freebasic) @@ -33,12 +33,12 @@ FILECOPY "source.txt", "destination.txt" %% {{fbdoc item="target"}} - - Linux requires the ##//filename//## case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes ##/##. Windows uses backward slashes ##\## but it allows forward slashes. DOS uses backward slashes ##\##. + - Linux nécessite que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques. DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - New to ""FreeBASIC"". Existed in Visual Basic. + - Nouveau pour FreeBASIC. Existait dans Visual Basic. {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgFiledatetime.wakka b/fbdocs/manual/cache/KeyPgFiledatetime.wakka index 0c0e3f674b..002d10546a 100644 --- a/fbdocs/manual/cache/KeyPgFiledatetime.wakka +++ b/fbdocs/manual/cache/KeyPgFiledatetime.wakka @@ -1,27 +1,27 @@ {{fbdoc item="title" value="FILEDATETIME"}}---- -Returns the last modified date and time of a file as [[ProPgDates Date Serial]] +Retourne la dernière date et heure de modification d'un fichier sous forme de [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""FileDateTime""** ( [[KeyPgByval byval]] //filename// [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **FileDateTime** ( [[KeyPgByval ByVal]] //filename// [[KeyPgAs As]] [[KeyPgZstring ZString]] [[KeyPgPtr Ptr]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## #include "file.bi" - //result// = **""FileDateTime""**( //filename// ) + //result// = **FileDateTime**( //filename// ) ## -//or// +//ou// ## #include "vbcompat.bi" - //result// = **""FileDateTime""**( //filename// ) + //result// = **FileDateTime**( //filename// ) ## {{fbdoc item="param"}} ##//filename//## - Filename to retrieve date and time for. + Nom du fichier dont on récupère la date et l'heure. -{{fbdoc item="ret"}} - Returns a [[ProPgDates Date Serial]]. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - Returns the file's last modified date and time as [[ProPgDates Date Serial]]. + Retourne la dernière date et heure de modification d'un fichier sous forme de [[ProPgDates Date Serial]]. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/filedatetime.bas"}}%%(freebasic) @@ -48,12 +48,12 @@ end if %% {{fbdoc item="target"}} - - Linux requires the ##//filename//## case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes ##/## . Windows uses backward slashes ##\## but it allows forward slashes. DOS uses backward slashes ##/##. + - Linux nécessite que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques. DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgFileexists.wakka b/fbdocs/manual/cache/KeyPgFileexists.wakka index 3b1f6673c0..7dd50a08b3 100644 --- a/fbdocs/manual/cache/KeyPgFileexists.wakka +++ b/fbdocs/manual/cache/KeyPgFileexists.wakka @@ -1,29 +1,29 @@ {{fbdoc item="title" value="FILEEXISTS"}}---- -Tests the existence of a file +Teste l'existence d'un fichier {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""FileExists""** ( [[KeyPgByval byval]] //filename// [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **FileExists** ( [[KeyPgByval ByVal]] //filename// [[KeyPgAs As]] [[KeyPgZstring ZString]] [[KeyPgPtr Ptr]] ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "file.bi" - //result// = **""FileExists""**( //filename// ) + //result// = **FileExists**( //filename// ) ## -//or// +//ou// ## #include "vbcompat.bi" - //result// = **""FileExists""**( //filename// ) + //result// = **FileExists**( //filename// ) ## {{fbdoc item="param"}} ##//filename//## - Filename to test for existence. + Nom du fichier dont on teste l'existence. -{{fbdoc item="ret"}} - Returns non-zero (##-1##) if the file exists, otherwise returns zero (##0##). +{{fbdoc item="section" value="Valeur retournée + Retourne non-zéro (##-1##) si le fichier existe, autrement retourne zéro (##0##). {{fbdoc item="desc"}} - ##**""FileExists""**## tests for the existence of a file. - Internally, it may issue an Open() and a Close() function, which may have consequences - eg, any existing ##[[KeyPgLock Lock]]##(s) on the file may be released. - Depending on the exact requirements, alternative methods of checking for file existence may be to use the ##[[KeyPgDir Dir]]()## function (being careful of attributes and ensuring the path doesn't contain wildcards), or to try ##[[KeyPgOpen Open]]##ing the file and checking the return value for success. + ##**FileExists**## teste l'existence d'un fichier. + En interne, il peut y avoir émission d'un Open() et d'une fonction close(), qui peut avoir des conséquences - par exemple, tout ##[[KeyPgLock Lock]]## existant sur le fichier peut être libéré. + Selon les besoins exacts, une méthode alternative de vérifier l'existence des fichiers est d'utiliser la fonction ##[[KeyPgDir Dir]]()## (en faisant attention aux attributs et en s'assurant que le chemin ne contient pas jokers), ou d'essayer un ##[[KeyPgOpen Open]]## sur le fichier puis vérifier la valeur de retour et tester la réussite. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/fileexists.bas"}}%%(freebasic) @@ -42,12 +42,12 @@ end if %% {{fbdoc item="target"}} - - Linux requires the ##//filename//## case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes ##/##. Windows uses backward slashes ##\## but it allows for forward slashes. DOS uses backward ##\## slashes. + - Linux nécessite que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques ##/##. Windows utilise des barres obliques vers l'arrière ##\## mais il admet des barres obliques. DOS utilise des barres obliques en arrière ##\##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDir Dir]]## diff --git a/fbdocs/manual/cache/KeyPgFilelen.wakka b/fbdocs/manual/cache/KeyPgFilelen.wakka index eb74c16fd6..e73926e515 100644 --- a/fbdocs/manual/cache/KeyPgFilelen.wakka +++ b/fbdocs/manual/cache/KeyPgFilelen.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="FILELEN"}}---- -Finds the length of a file given its filename +Trouve la longueur d'un fichier dont on a donné le nom {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""FileLen""** ( //filename// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **FileLen** ( //filename// [[KeyPgAs As]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgLongint LongInt]] ## {{fbdoc item="usage"}}## #include "file.bi" - //result// = **""FileLen""**(//filename//) + //result// = **FileLen**(//filename//) ## -//or// +//ou// ## #include "vbcompat.bi" - //result// = **""FileLen""**(//filename//) + //result// = **FileLen**(//filename//) ## {{fbdoc item="param"}} ##//filename//## - A ##[[KeyPgString string]]## argument specifying the filename of the file whose length to return. + Un argument ##[[KeyPgString String (Chaîne)]]## spécifiant le nom du fichier dont on veut retourner la longueur. {{fbdoc item="desc"}} - Returns the size in bytes of the file specified by //filename//. + Retourne la taille en octets du fichier spécifié par //filename//. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/filelen.bas"}}%%(freebasic) @@ -28,11 +28,11 @@ length = FILELEN("file.txt") %% {{fbdoc item="target"}} - - Linux requires the //filename// case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. + - Linux nécessite que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - New to ""FreeBASIC"". Existed in Visual Basic. + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLof Lof]]## diff --git a/fbdocs/manual/cache/KeyPgFix.wakka b/fbdocs/manual/cache/KeyPgFix.wakka index c38587f725..5b3094d5f6 100644 --- a/fbdocs/manual/cache/KeyPgFix.wakka +++ b/fbdocs/manual/cache/KeyPgFix.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FIX"}}---- -Returns the integer part of a number, rounding towards zero +Retourne la partie entière d'un nombre, arrondi vers zéro {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,17 +9,17 @@ Returns the integer part of a number, rounding towards zero ## {{fbdoc item="param"}} ##//number//## - the floating-point number to truncate + le nombre à virgule flottante à tronquer -{{fbdoc item="ret"}} - Returns the integer part of ##//number//##, rounding towards zero. +{{fbdoc item="section" value="Valeur retournée + Retourne la partie entière de ##//number//##, arrondi vers zéro. {{fbdoc item="desc"}} - Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. + Equivalent à: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. Par exemple, ##**Fix**(1.3)## retournera ##1.0##, et ##**Fix**(-4.9)## retournera ##-4.0##. - Note: this function is also equivalent to ##//number// - [[KeyPgFrac Frac]](//number//)##. + Note: cette fonction est également équivalente à ##//number// - [[KeyPgFrac Frac]](//number//)##. - The ##**Fix**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types. + L'##[[KeyPgOperator Operator]]## unaire ##**Fix**## peut être surchargé avec des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/fix.bas"}}%%(freebasic) @@ -28,10 +28,10 @@ Print fix(-1.9) '' will print -1 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgInt Int]]## diff --git a/fbdocs/manual/cache/KeyPgFlip.wakka b/fbdocs/manual/cache/KeyPgFlip.wakka index 5d5853b5fb..3a713e37cd 100644 --- a/fbdocs/manual/cache/KeyPgFlip.wakka +++ b/fbdocs/manual/cache/KeyPgFlip.wakka @@ -1,15 +1,15 @@ -{{fbdoc item="title" value="FLIP"}}---- -Changes the current video display page - -{{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Flip** ( [[KeyPgByval byval]] //frompage// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //topage// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) -## -{{fbdoc item="usage"}}## - **Flip** [ //frompage// ] [, //topage// ] -## -{{fbdoc item="param"}} - ##//frompage//## - previous page +{{fbdoc item="title" value="Flip"}}----
    +Change la page courante de l'affichage vidéo

    {{fbdoc item="syntax"}}##
    [[KeyPgDeclare Declare]] [[KeyPgSub Sub]] **Flip** ( [[KeyPgByval ByVal]] //frompage// [[KeyPgAs As]] [[KeyPgInteger Integer]] = -1, [[KeyPgByval ByVal]] //topage// [[KeyPgAs As]] [[KeyPgInteger Integer]] = -1 )
    ##
    + +{{fbdoc item="usage"}}##
    **Flip** [ //frompage// ] [, //topage// ]
    ##
    + {{fbdoc item="param"}}
    ##//frompage//##
    page précédente
    +##//topage//##
    nouvelle page à afficher

    +{{fbdoc item="desc"}}
    En mode graphique normal, ##**Flip**## est un alias de ##[[KeyPgPcopy PCopy]]## et ##[[KeyPgScreencopy ScreenCopy]]##. Voir ##[[KeyPgScreencopy ScreenCopy]]## pour les détails.

    En mode OpenGL, ##**Flip**## change la page "hardware" et affiche le contenu du "backbuffer". Il est recommandé d'appeler ##**Flip**## regulièrement en mode OpenGL, autrement votre application risque de devenir instable.

    + {{fbdoc item="ex"}}
    %%(freebasic) +ScreenRes 320, 240, 32, 2 'Valide ecran 320x240 en 32-bit couleur avec 2 pages video.


    For n As Integer = 50 To 270

    ScreenSet 2,1 'Valide la page travail a 2 et la page affichage a 1
    Cls
    Circle (n, 50),50 ,RGB(255,255,0) 'Dessine un cercle avec rayon de 50 pixels en jaune sur page 2
    ScreenSet 1,1 'Valide la page travail a 1 et la page affichee a 1
    ScreenSync 'Attend rafraichissement vertical
    Flip 2,1 'Copie du cercle de page 2 vers page 1

    Sleep 25
    Next

    Print "Now wasn't that neat!"
    Print "Push any key."
    Sleep
    +##


    + {{fbdoc item="lang"}}
    - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Flip**##.

  • + {{fbdoc item="diff"}}
    - Nouveau pour FreeBASIC

    ##//topage//## new page to display @@ -25,12 +25,10 @@ ScreenRes 320, 240, 32, 2 'Sets up the screen to be 320x240 in 32-bit color w for n as integer = 50 to 270 - ScreenSet 2,1 'Sets the working page to 2 and the displayed page to 1 + ScreenSet 1,0 'Sets the working page to 1 and the displayed page to 0 Cls - Circle (n, 50),50 ,rgb(255,255,0) 'Draws a circle with a 50 pixel radius in yellow on page 2 - ScreenSet 1,1 'Sets the working page to 1 and the displayed page to 1 - ScreenSync 'Waits for vertical refresh - flip 2,1 'Copies our circle from page 2 to page 1 + Circle (n, 50),50 ,rgb(255,255,0) 'Draws a circle with a 50 pixel radius in yellow on page 1 + flip 1,0 'Copies our circle from page 1 to page 0 Sleep 25 next diff --git a/fbdocs/manual/cache/KeyPgFor.wakka b/fbdocs/manual/cache/KeyPgFor.wakka index ebd803a467..ea178daa8b 100644 --- a/fbdocs/manual/cache/KeyPgFor.wakka +++ b/fbdocs/manual/cache/KeyPgFor.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="FOR"}}---- -Control flow statement, open statement clause, or operator depending on context. +Déclaration de contrôle de flux, ouvre une clause de déclaration ou un opérateur selon le contexte. {{fbdoc item="syntax"}}## **For** //iterator// = //startvalue// To //endvalue// [ Step //increment// ] -//or// +//ou// Open [ //device// ] "//filename//" **For** //filemode// As #handle -//or// +//ou// declare operator **For** ( byref stp as [[DataType datatype]] ) ## {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgFormat.wakka b/fbdocs/manual/cache/KeyPgFormat.wakka index 3ecc7902b2..1594cee05e 100644 --- a/fbdocs/manual/cache/KeyPgFormat.wakka +++ b/fbdocs/manual/cache/KeyPgFormat.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FORMAT"}}---- -Formats a number in a specified format +Formate un nombre dans un format spécifique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Format** ( [[KeyPgByval byval]] //numerical_expression// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByref byref]] //formatting_expression// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] = "####" ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,28 +10,28 @@ Formats a number in a specified format ## {{fbdoc item="param"}} ##//numerical_expression//## - number to format + nombre à formater ##//formatting_expression//## - formatting pattern pattern + expression de formatage -{{fbdoc item="ret"}} - ##**Format**## returns a string with the result of the numerical expression formatted as indicated in the formatting expression. - The formatting expression is a string that can yield numeric or date-time values. +{{fbdoc item="section" value="Valeur retournée + ##**Format**## retourne une chaîne avec le résultat de l'expression numérique formatée comme indiqué dans l'expression de formatage. + L'expression de formatage est une chaîne qui peut donner des valeurs numériques ou de date-heure. {{fbdoc item="desc"}} - To recover meaningful date-time values the numerical expression must be a date serial obtained from the appropriate functions. - This function is part of ""FreeBASIC"", however it is not recognized by the compiler unless ##vbcompat.bi## is included. + Pour récupérer des valeurs significative de date-heure, l'expression numérique doit être une date sérielle obtenue à partir des fonctions appropriées. + Cette fonction fait partie de FreeBASIC, cependant pour être reconnue par le compilateur il faut inclure ##vbcompat.bi##. - "Numeric Formats" - {{table columns="2" cellpadding="1" cells="Symbol ; Description; Null string; General format (no formatting);0; Digit placeholder: If the number has fewer digits than there are zeros (on either side of the decimal) in the format expression, leading or trailing zeros are displayed. If there are more digits to the right of the decimal than zeros in the format, the number is rounded. If there are more digits to the left of the decimal than zeros in the format the digits are all displayed ; #; Digit placeholder: Follows the same rules as for the 0 digit except the leading or trailing zeros are not displayed;.; Placeholder for decimal point.If the format contains only #'s to the left of . then numbers smaller than 1 are begun with a decimal point.; % ; Percentage :The expression is multiplied by 100 and the % character is inserted.;,; Thousands separator. Two adjacent commas, or a comma immediately to the left of the decimal point location (whether there is a decimal specified or not) means 'Omit the three digits that fall between these commas, or between the comma and the decimal point, rounding as needed.' ; E- E+ e- e+ ;Scientific format: If a format contains one digit placeholder (0 or #) to the right of an E-, E+, e-, or e+, the number is displayed in scientific format and an E or e is inserted between the number and its exponent.The number of 0's or #'s to the right determines the number of digits in the exponent. Use E- or e- to place a minus sign next to negative exponents. Use a E+ or e+ to place a minus sign next to negative exponents and a plus sign next to positive exponents.; : ? + $ () space; Display literal character To display a character other than one of these, precede the character with a backslash (\) or enclose the character(s) in double quotation marks;\; Display next character in format string as it is ;text between double quotes; Displays the text inside the double quotes.; :; Time separator is used to separate hours, minutes, and seconds when time values are formatted.; /; The date separator is used to separate day,month, and year when date values are formatted."}} + "Formats numériques" + {{table columns="" cellpadding="2" cells="Symbole ; Description; Chaîne Nulle; Format général (pas de formatage);0; Espace réservé de chiffre: Si le nombre contient moins de chiffres que de zéros (de chaque côté de la virgule) dans l'expression de formatage, des zéros seront affichés en tête ou à la fin. S'il y a davantage de chiffres à droite de la virgule que des zéros dans le format, le nombre est arrondi. S'il y a plus de chiffres à gauche de la virgule que de zéros dans le format, tous les chiffres sont affichés; #; Espace réservé de chiffre: Suit les mêmes règles que le chiffre 0 sauf que les zéros début / fin ne sont pas affichés;.; Espace réservé de chiffre pour le point decimal. Si le format ne contient que des # à la gauche du "." alors les nombres inférieurs à 1 commenceront avec un point décimal.; % ; Pourcentage : L'expression est multipliée par 100 et le caractère % est inséré.;,; Séparateur des milliers. Deux virgules adjacentes, ou une virgule immédiatement à la gauche de l'emplacement du point décimal (qu'il y ait un nombre décimal précisé ou non) signifie 'Omettre les trois chiffres qui se situent entre ces virgules, ou entre la virgule et le point décimal, arrondi si nécessaire." ; E- E+ e- e+ ;Format scientifique: Si un format contient un espace réservé de chiffre (0 or #) à droite d'un E-, E+, e-, or e+, le nombre est affiché au format scientifique et un E ou e est inséré entre le nombre et son exposant. Le nombre de 0 ou de # à droite détermine le nombre de chiffres de l'exposant. Utilisez E- ou e- E-ou e- pour placer un signe moins à côté des exposants négatifs. Utilisez un E+ ou e+ pour placer un signe moins à côté des exposants négatifs et un signe plus à côté des exposants positifs.; : ? + $ () space; Affichage de caractères littéraux. Pour afficher un caractère autre que l'un de ceux-ci, faites précéder le caractère d'une barre oblique inverse (\) ou mettez le(s) caractère(s) entre des guillemets doubles;\; Affichage caractère suivant dans le format de chaîne tel qu'il est ;Texte entre guillemets doubles; Affiche le texte à l'intérieur des guillemets doubles.; :; Séparateur de temps: est utilisé pour séparer les heures, minutes et secondes lorsque les valeurs de temps sont formatées.; /; Séparateur de date: utilisé pour séparer jour, mois et année quand les valeurs de date sont formatées.;
    - "Date-Time formats:" - {{table columns="2" cellpadding="1" cells="Symbol ; Description;d, dd; Display the day as a one-digit/two-digit number (1-31/01-31);ddd; Display the day as an abbreviation (Sun-Sat);dddd; Display the day as a full name (Sunday-Saturday);ddddd; Display a serial date number as a complete date (including day, month and year);m, mm; Display the month as a one-digit/two-digit number (1-12/01-12). If immediately following h or hh, the minute rather than the month is displayed;M, MM; Display the month as a one-digit/two-digit number (1-12/01-12), even if immediately following h or hh;mmm; Display the month as an abbreviation (Jan-Dec);mmmm; Display the month as a full name (January-December);y, yy; Display the year as a two-digit number (00-99);yyyy; Display the year as a four-digit number (1900-2040);h, hh; Display the hour as a one-digit/two-digit number (0-23/00-23);m, mm; Display the minute as a one-digit/two-digit number (0-59/00-59). If not immediately following h or hh, the month rather than the minute is displayed;n, nn; Display the minute as a one-digit/two-digit number (0-59/00-59), even if not immediately following h or hh;s, ss; Display the second as a one-digit/two-digit number (0-59/00-59);ttttt; Display a time serial number as a complete time, including hour, minute and second;AM/PM (Default), am/pm; Use the 12-hour clock displaying AM or am with any hour before noon, PM or pm with any hour between noon and 11:59;A/P, a/p; Use the 12-hour clock displaying A or a with any hour before noon, P or p with any hour between noon and 11:59 "}} + "Formats Date-Temps:" + {{table columns="" cellpadding="2" cells="Symbole ; Description;d, dd; Affiche le jour sous la forme d'un nombre à un-chiffre/deux-chiffres (1-31/01-31);ddd; Affiche l' abréviation du jour (Lun-Sam);dddd; Affiche le nom complet du jour (Lundi-Samedi);ddddd; Affiche, la date complète (jour, mois, année) sous forme d'une série de nombres;m, mm; Affiche le mois sous forme d'un nombre un/deux chiffre(s) (1-12/01-12). S'il suit immédiatement h ou hh, les minutes sont affichées plutôt que le mois;M, MM; Affiche le mois sous forme d'un nombre un/deux chiffre(s) (1-12/01-12), même s'il suit de immédiatement h ou hh;mmm; Affiche le mois sous forme d'abréviation (Jan-Dec);mmmm; Affiche le nom complet du mois (Janvier-Décembre);y, yy; Affiche l'année avec un nombre de deux chiffres (00-99);yyyy; Affiche l'année sous la forme d'un nombre de 4 chiffres (1900-2040);h, hh; Affiche l'heure sous la forme d'un nombre de un/deux chiffre(s) (0-23/00-23);m, mm; Affiche les minutes sous la forme d'un nombre de un/deux chiffre(s) (0-59/00-59). Si ne suit pas immédiatement h ou hh, le mois est affiché plutôt que les minutes;n, nn; Affiche les minutes sous la forme d'un nombre un/deux chiffre(s) (0-59/00-59), même si n'est pas après h ou hh;s, ss; Affiche les secondes sous la forme d'un nombre un/deux chiffre(s) (0-59/00-59);ttttt; Affiche le temps complet sous forme de série de nombres, incluant heure(s), minute(s) et seconde(s);AM/PM (Par défaut), am/pm; Utilise l'horloge de 12 heures affichant "AM" ou "am" pour toute heure avant midi, "PM" ou "pm" avec n'importe quelle heure entre midi et 11:59;A/P, a/p; Utilise l'horloge de 12 heures affichant A ou un a pour toute heure avant midi, P ou p avec n'importe quelle heure entre midi et 11:59 ;
    {{fbdoc item="ex"}} %% -Sample numeric formats +Exemples de formats numériques Format (fmt) 5 -5 .5 Null String 5 -5 0.5 @@ -45,9 +45,9 @@ Format (fmt) 5 -5 .5 0.00% 500.00% -500.00% 50.00% 0.00E+00 5.00E+00 -5.00E+00 5.00E-01 0.00E-00 5.00E00 -5.00E00 5.00E-01 - Sample Date And Time Formats -The following are examples of Date And Time formats: - Format Expression Display + Exemples de formats date et temps +Les exemples ci-dessous concernent les formats date et temps: + Format de l'expression Affichage m/d/yy 12/7/58 d-mmmm-yy 7-December-58 d-mmmm 7-December @@ -56,14 +56,14 @@ The following are examples of Date And Time formats: h:mm:ss AM/PM 8:50:35 PM h:mm 20:50 h:mm:ss 20:50:35 - m/d/yy h:mm 12/7/58 20:50 + m/d/yy h:mm 12/7/58 20:50 %% {{fbdoc item="lang"}} - None +
  • Aucune {{fbdoc item="diff"}} - - Does not exist in QB 4.5. This function appeared first in PDS 7.1 + - N'existe pas dans QB 4.5. Cette fonction est apparue en premier dans PDS 7.1 {{fbdoc item="see"}} - ##[[KeyPgPrintusing Print Using]]## diff --git a/fbdocs/manual/cache/KeyPgFornext.wakka b/fbdocs/manual/cache/KeyPgFornext.wakka index 513013afb7..0c17765938 100644 --- a/fbdocs/manual/cache/KeyPgFornext.wakka +++ b/fbdocs/manual/cache/KeyPgFornext.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FOR...NEXT"}}---- -Control flow statement for looping +Déclaration de contrôle de flux pour boucler {{fbdoc item="syntax"}}## **For** //iterator// [ [[KeyPgAs as]] [[DataType datatype]] ] = //startvalue// **To** //endvalue// [ **Step** //stepvalue// ] @@ -8,34 +8,34 @@ Control flow statement for looping ## {{fbdoc item="param"}} ##//iterator//## - a variable identifier that is used to iterate from an initial value to an end value + Une variable qui est utilisée pour effectuer une itération d'une valeur initiale à une valeur finale ##//datatype//## - If specified, the variable ##//iterator//## will automatically be declared with the type ##//datatype//##. + Si spécifiée, la variable ##//iterator//## sera automatiquement déclarée avec le type ##//datatype//##. ##//startvalue//## - an expression that denotes the starting value of the iterator + Une expression qui désigne la valeur de départ de l'itérateur ##//endvalue//## - an expression used to compare with the value of the iterator + Une expression utilisée pour comparer avec la valeur de l'itérateur ##//stepvalue//## - an expression that is added to the iterator after every iteration + Une expression qui est ajoutée à l'itérateur après chaque itération {{fbdoc item="desc"}} - A ##**For...Next**## loop initializes ##//iterator//## to ##//startvalue//##, then executes the ##//statement block//##'s, incrementing ##//iterator//## by ##//stepvalue//## until it reaches ##//endvalue//##. If ##//stepvalue//## is not explicitly given it will set to 1. + Une boucle ##**For...Next**## initialise l'##//iterator//## avec ##//startvalue//##, puis éxécute le ##//statement block = bloc d'instructions//##, incrémente ##//iterator//## de ##//stepvalue//## jusqu'à ce qu'il atteigne ##//endvalue//##. Si ##//stepvalue//## n'est pas précisé explicitement il sera fixé à 1. - The values of ##//stepvalue//## and ##//endvalue//## are stored internally immediately following execution of the ##**For**## statement and thus neither can be changed inside the ##**For**## loop. (the variables that define them can be changed, but changing those variables inside the ##**for**## loop will not affect its execution. See examples) + Les valeurs de ##//stepvalue//## et ##//endvalue//## sont stockées en interne immédiatement après l'exécution de l'instruction ##**For**## et donc aucune ne peut être changée à l'intérieur de la boucle ##**For**##. (les variables qui les définissent peuvent être changées, mais en changeant ces variables à l'intérieur de la boucle ##**For**## n'affectera pas son exécution. (Voir les exemples) - The ##//iterator//## may be defined having the same scope as the ##**For**## statement by using the ##[[KeyPgAs as]] [[DataType datatype]]## syntax. With this syntax, //iterator// is created and destroyed within the ##**For...Next**## scope. See dialect differences below. + L' ##//iterator//## peut être défini en ayant la même portée que la déclaration ##**For**## en utilisant la syntaxe de ##[[KeyPgAs As]] [[DataType datatype]]##. Avec cette syntaxe, //iterator// est créé et détruit dans la portée de ##**For...Next**##. Voir différences de dialecte ci-dessous. - If ##//endvalue//## is less than ##//startvalue//## then a negative ##//stepvalue//## must be specified or the ##//statement block//## will not execute at all, since ##//startvalue//## compares greater than ##//endvalue//##. + Si ##//endvalue//## est inférieure à ##//startvalue//## alors une ##//stepvalue//## négative doit être précisée ou le ##//statement block//## ne s'exécutera pas du tout, puisque ##//startvalue//## est déjà supérieure à ##//endvalue//##. - The ##**For**## statement causes the execution of the statements in the ##//statement block//## until ##//iterator//## compares **greater than** ##//endvalue//## (or **less than** ##//endvalue//## if ##//stepvalue// < 0##). ##//iterator//## will be incremented the amount of ##//stepvalue//## following each execution of the ##//statement block//##. If an increment is not given, ##//iterator//## will be implicitly incremented by ##1##. + La déclaration ##**For**## provoque l'exécution des instructions du ##//statement block//## tant qu'est effectuée la comparaison ##//iterator//## **plus grand que** ##//endvalue//## (ou **plus petit que** ##//endvalue//## si ##//stepvalue// < 0##). ##//iterator//## sera incrementé de la valeur de ##//stepvalue//## après chaque exécution du ##//statement block//##. Si Aucun incrément n'est donné, ##//iterator//## sera implicitement incrementé de ##1##. - If an ##[[KeyPgExit Exit]]## ##**For**## statement is encountered inside the ##//statement block//##, the loop is terminated, and execution resumes immediately following the enclosing ##**Next**## statement. If a ##[[KeyPgContinue Continue]]## ##**For**## statement is encountered, the rest of the ##//statement block//## is skipped and execution resumes at the FOR statement. + Si un ##[[KeyPgExit Exit]]## ##**For**## est rencontré dans le ##//statement block//##, la boucle se termine et l'exécution reprend immédiatement après la déclaration suivant ##**Next**##. Si ##[[KeyPgContinue Continue]]## ##**For**## est rencontré, le reste du ##//statement block//## est sauté et l'exécution reprend à la déclaration FOR. - Like all control flow statements, the ##**For**## statement can be nested, that is, it can be used in a statement block of another ##**For**## statement. + Comme toutes les déclarations de contrôle de flux, ##**For**## peut être imbriqué, ce qui signifie qu'il peut être utilisé dans un bloc d'instructions d'une autre déclaration ##**For**##. - **note**: When a negative ##//stepvalue//## is specified, the ##**For**## statement loops until ##//iterator//## compares //less than// ##//end_value//##. + **Note**: Quand ##//stepvalue//## est négatif, ##**For**## boucle tant qu'est effectuée la comparaison ##//iterator//## //plus petit que// ##//end_value//##. - ##//For//##, ##//Next//##, and ##//Step//## are operators that can be overloaded inside user defined types. See [[KeyPgOpFor Operator For]], [[KeyPgOpNext Operator Next]], [[KeyPgOpStep Operator Step]] + ##//For//##, ##//Next//## et ##//Step//## sont des opérateurs qui peuvent être surchargés dans des types définis par l'utilisateur. Voir [[KeyPgOpFor Opérateur For]], [[KeyPgOpNext Opérateur Next]], [[KeyPgOpStep Opérateur]] {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/for-next.bas"}}%%(freebasic) @@ -71,11 +71,11 @@ loop print%% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, variables declared inside a FOR..NEXT loop have a function-wide [[ProPgVariableScope scope]] as in QB - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects, variables declared inside a ##**For**##..##**Next**## block are visible only inside the block, and can't be accessed outside it. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les variables déclarées dans une boucle FOR..NEXT ont une [[ProPgVariableScope portée]] à l'échelle de la fonction comme dans QB. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang deprecated]]// les variables déclarées dans une boucle ##**For**##..##**Next**## ne sont visibles que dans le bloc et ne peuvent être utilisées en-dehors de lui. {{fbdoc item="diff"}} - - ##[[KeyPgByref Byref]]## arguments cannot be used as counters. + - Les arguments ##[[KeyPgByref ByRef]]## ne peuvent être utilisés comme compteurs. {{fbdoc item="see"}} - ##[[KeyPgContinue Continue]]## diff --git a/fbdocs/manual/cache/KeyPgFrac.wakka b/fbdocs/manual/cache/KeyPgFrac.wakka index 74d4edf1a5..5e39108071 100644 --- a/fbdocs/manual/cache/KeyPgFrac.wakka +++ b/fbdocs/manual/cache/KeyPgFrac.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FRAC"}}---- -Returns the decimal part of a number +Renvoie la partie décimale d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Frac** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,15 +9,15 @@ Returns the decimal part of a number ## {{fbdoc item="param"}} ##//number//## - the number or expression to get the fraction part of. + nombre ou expression dont on veut obtenir la partie décimale. -{{fbdoc item="ret"}} - Returns the fractional part of a number or expression. +{{fbdoc item="section" value="Valeur retournée + Retourne la partie décimale d'un nombre ou d'une expression. {{fbdoc item="desc"}} - Equivalent to: ##(//number// - [[KeyPgFix Fix]](//number//))##. + Équivalent à: ##(//number// - [[KeyPgFix Fix]](//number//))##. - The ##**Frac**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types. + L'opérateur ##[[KeyPgOperator Operator]]## unaire ##**Frac**## peut être surchargé avec des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/frac.bas"}}%%(freebasic) @@ -26,10 +26,10 @@ Print frac(-10.625) '' will print -0.625 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgFix Fix]]## diff --git a/fbdocs/manual/cache/KeyPgFre.wakka b/fbdocs/manual/cache/KeyPgFre.wakka index 19b418c598..9d606f04e6 100644 --- a/fbdocs/manual/cache/KeyPgFre.wakka +++ b/fbdocs/manual/cache/KeyPgFre.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FRE"}}---- -Returns the amount of free memory available +Renvoie la quantité de mémoire disponible {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fre** ( [[KeyPgByval byval]] //value// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]] @@ -9,13 +9,13 @@ Returns the amount of free memory available ## {{fbdoc item="param"}} ##//value//## - Unused dummy parameter kept for backward compatibility; can be ignored. + Paramètre fictif inutilisé, maintenu pour la compatibilité descendante; peut être ignoré. -{{fbdoc item="ret"}} - Returns the amount of free memory, in bytes. +{{fbdoc item="section" value="Valeur retournée + Renvoie la quantité de mémoire disponible, en octets. {{fbdoc item="desc"}} - Returns the free memory (ram) available, in bytes. + Renvoie la quantité de mémoire (ram) disponible, en octets. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/fre.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ Print mem \ (1024 * 1024); " megabytes" %% {{fbdoc item="diff"}} - - The "value" argument is not checked, ##**Fre**## will always return the free physical memory available + - L'argument "value" n'est pas utilisée, ##**Fre**## retourne toujours la mémoire physique disponible {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/KeyPgFreefile.wakka b/fbdocs/manual/cache/KeyPgFreefile.wakka index aed7bffe9d..b647fddfb6 100644 --- a/fbdocs/manual/cache/KeyPgFreefile.wakka +++ b/fbdocs/manual/cache/KeyPgFreefile.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FREEFILE"}}---- -Returns a free file number +Retourne un numéro de fichier libre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Freefile** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,13 +7,13 @@ Returns a free file number {{fbdoc item="usage"}}## //result// = **Freefile** ## -{{fbdoc item="ret"}} - The next available file number, if any, otherwise zero (##0##). +{{fbdoc item="section" value="Valeur retournée + Le premier numéro de fichier libre, s'il existe, sinon zéro (##0##). {{fbdoc item="desc"}} - Returns the number of the next free file number with valid values ##1## to ##255##, or ##0## if there are already 255 files opened. This value is a required argument to ##[[KeyPgOpen Open]]## a file. ##**Freefile**## is useful when opening files in complex programs where the programmer can't keep track of the used file numbers. - Make sure to always close files when no longer needed, otherwise you will get a file number leak, and won't be able to open any files anymore after 255 filenumbers are exhausted while your program is running. - ##**Freefile**## will always return the smallest free file number. The file number returned by ##**Freefile**## will not change until that file number is ##[[KeyPgOpen Open]]##ed, or until a smaller file number is ##[[KeyPgClose Close]]##d. For this reason, it is wise to use ##**Freefile**## immediately before its corresponding ##[[KeyPgOpen Open]]##, to ensure that the file number is not returned and opened elsewhere first. + Retourne le numéro de fichier libre suivant avec des valeurs valides de ##1## à ##255##, ou ##0## s'il y a déjà 255 fichiers ouverts. Cette valeur est un argument obligatoire de ##[[KeyPgOpen Open]]## un fichier. ##**FreeFile**## est utile lors de l'ouverture de fichiers dans des programmes complexes où le programmeur ne peut pas garder une trace des numéros de fichiers utilisés. + Assurez-vous de toujours fermer les fichiers lorsqu'ils ne sont plus nécessaires, sinon vous aurez une perte de numéros de fichiers, et vous ne serez pas en mesure d'ouvrir des fichiers dès que 255 numéros de fichiers seront utilisés pendant le fonctionnement de votre programme. + ##**FreeFile**## retourne toujours le numéro de fichier libre le plus prtit possible. Le numéro de fichier retourné par ##**FreeFile**## ne changera pas tant que le fichier correspondant reste ##[[KeyPgOpen ouvert (Open)]]##, ou jusqu'à ce qu'un fichier de numéros de fichier plus petit soit ##[[KeyPgClose fermé (Close)]]##. Pour cette raison, il est sage d'utiliser ##** FreeFile**##, immédiatement avant son ##[[KeyPgOpen Open]]## correspondant, afin de s'assurer que le numéro de fichier retourné n'a pas été ouvert ailleurs en premier. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/freefile.bas"}}%%(freebasic) @@ -37,7 +37,7 @@ Close #f End %% - When using multiple ##**Freefile**## statements, ##**Freefile**## should be used immediately before the ##[[KeyPgOpen Open]]## statement: + Lors de l'ouverture de plusieurs ##**FreeFile**##, ##**FreeFile**## doit être utilisé immédiatement avant ##[[KeyPgOpen Open]]##: {{fbdoc item="filename" value="examples/manual/fileio/freefile-good.bas"}}%%(freebasic) dim fr as integer, fs as integer ' The CORRECT way: @@ -48,23 +48,23 @@ fs = FREEFILE OPEN "File2" FOR INPUT AS #fs %% - As opposed to: + Par opposition à: {{fbdoc item="filename" value="examples/manual/fileio/freefile-bad.bas"}}%%(freebasic) dim fr as integer, fs as integer ' The WRONG way: -fr = FREEFILE -fs = FREEFILE '' fs has taken the same file number as fr +Open "file1" For Input As #fr +Open "file2" For Input As #fs '' error: file number already opened OPEN "file1" FOR INPUT AS #fr -OPEN "file2" FOR INPUT AS #fs '' error: file number already opened +Open "file2" For Input As #fs %% {{fbdoc item="target"}} - - On Windows, a file number used in a dynamic link library is not the same as an identical file number used in the main program. File numbers can not be passed or returned and then used between a DLL and an executable. - - Besides ""FreeBASIC's"" limit of 255 files per program opened at same time, there is an OS limit of total amount of opened files, but usually you won't touch it except in DOS, where the limit may be as low as 15 files total. + - Sous Windows, un numéro de fichier utilisé dans une bibliothèque de liens dynamiques n'est pas identique à celui utilisé dans le programme principal. Les numéros de fichier ne peuvent être passés ou renvoyés, puis utilisés entre une DLL et un fichier exécutable. + - Outre la limite FreeBASIC de 255 fichiers ouverts en même temps par le programme, il y a une limite OS du nombre total de fichiers ouverts, mais généralement vous n'aurez pas le modifier, sauf dans le DOS, où la limite peut être très basse (15 fichiers au total). {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgFunction.wakka b/fbdocs/manual/cache/KeyPgFunction.wakka index 0b76ae61d8..fd64ff4f10 100644 --- a/fbdocs/manual/cache/KeyPgFunction.wakka +++ b/fbdocs/manual/cache/KeyPgFunction.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FUNCTION"}}---- -Defines a procedure returning a value +Définit une procédure retournant une valeur {{fbdoc item="syntax"}}## [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] **Function** //identifier// [[[KeyPgCdecl CDecl]]|[[KeyPgPascal Pascal]]|[[KeyPgStdcall StdCall]]] [[[KeyPgOverload Overload]]] [[[KeyPgAlias Alias]] //external_identifier//] [([//parameter_list//])] [[[KeyPgAs As]] //return_type//] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] @@ -10,134 +10,134 @@ Defines a procedure returning a value [[KeyPgEndblock End]] Function ## {{fbdoc item="param"}} - ##//identifier//##: the name of the function - ##//external_identifier//##: externally visible (to the linker) name enclosed in quotes - ##//parameter_list//##: ##//parameter//[, //parameter//[, ...]]## - ##//parameter//##: ##[[[KeyPgByref ByRef]]|[[KeyPgByval ByVal]]] //identifier// [[[KeyPgAs As]] //type//] [= //default_value//]## - ##//identifier//##: the name of the variable referenced in the function. If the argument is an array then the identifier must be followed by an empty parenthesis. - ##//type//##: the type of variable - ##//default_value//##: the value of the argument if none is specified in the call - ##//return_type//##: the type of variable returned by the function - ##//statements//##: one or more statements that make up the function body - ##//return_value//##: the value returned from the function - -{{fbdoc item="desc"}} - A function defines a block of code which can be executed with a single statement (a function call), and provide a value back to the caller when finished (a return value). There are several reasons to use functions: - - Reduces redundancy in your program - - Enables reuse of code in many programs - - Improves readability of the program - - Improves maintainability of the program - - Makes it easy to extend your program - - //Access Rights// : The ##[[KeyPgPublic Public]]## and ##[[KeyPgPrivate Private]]## keywords specify public or private intra module-level access rights, respectively. If neither is given, the function defaults to public access (##[[KeyPgPublic Public]]##). + ##//identifier//## + le nom de la fonction + ##//external_identifier//## + nom visible de l'extérieur (à l'éditeur de liens) entre guillemets + ##//parameter_list//## + ##//parameter//[, //parameter//[, ...]]## + ##//parameter//## + ##[[[KeyPgByref ByRef]]|[[KeyPgByval ByVal]]] //identifier// [[[KeyPgAs As]] //type//] [= //default_value//]## + ##//identifier//## + le nom de la variable référencée dans la fonction. Si l'argument est un tableau, alors l'identificateur doit être suivi de parenthèses vides. + +##//type//## + le type de variable + ##//default_value//## + la valeur de l'argument si rien n'est spécifié dans l'appel + ##//return_type//## + le type de la variable retournée par la fonction + ##//statements//## + + une ou plusieurs déclaration(s) qui compose(nt) le corps de la fonction - //Calling Convention// : Calling convention, or the order in which arguments are pushed and popped from the stack during function calls, is specified with the ##[[KeyPgCdecl CDecl]]##, ##[[KeyPgPascal Pascal]]## and ##[[KeyPgStdcall StdCall]]## keywords. If none is given, the function uses the standard convention by default (##[[KeyPgStdcall StdCall]]##). + ##//return_value//## - //Passing Arguments// : Functions may receive one or more variables, or arguments, when called. These arguments are listed as ##//parameters//## in the ##//parameter_list//##. The ##[[KeyPgByref ByRef]]## and ##[[KeyPgByval ByVal]]## keywords specify whether the argument will be passed by reference or by value, respectively. The argument's type is given by "##[[KeyPgAs As]] //type//##" following the ##//parameter//##. If a parameter in the declaration is given a default value, the parameter is optional. Array parameters are specified by following an identifier with an empty parenthesis. Note that array parameters are always ##[[KeyPgByref ByRef]]## and the ##[[KeyPgByref ByRef]]## keyword is neither required nor allowed for array parameters. When calling a function with an array argument the parenthesis must be supplied there too; see the examples. + la valeur retournée par la fonction - //Overloaded Functions// : An overloaded function may share the same name (##//identifier//##) as another with a different signature. The ##[[KeyPgOverload Overload]]## keyword specifies that a function may be overloaded. A function must be defined - or declared - using the ##[[KeyPgOverload Overload]]## keyword prior to any functions that overload them. + {{fbdoc item="desc"}} - //Returning values// : ##//return_type//## specifies the ##[[DataType data type]]## returned by a function upon exit. If no data type is specified, then the function will return the default data type, which will be Integer unless set to another data type using ##[[KeyPgDefsng DefSng]]##, ##[[KeyPgDefdbl DefDbl]]##, ##[[KeyPgDefstr DefStr]]##, etc. Functions can return values //(and soon, references)// using three methods: the ##[[KeyPgReturn Return]]## keyword followed by a value exits the function immediately, and returns that value to the caller. Functions can also return values by assigning the Function keyword or the function's ##//identifier//## to the desired return value. The latter two methods do not cause the function to exit, however. Since functions return values, function calls evaluate to expressions. Thus, function calls can be made wherever an expression is expected, like in [[KeyPgOpAssignment assignments]] or ##[[KeyPgIfthen If]]## statements. + Une fonction définit un bloc de code qui peut être exécuté par une seule instruction (un appel de fonction) et retourne une valeur à l'appelant lorsqu'elle a terminé (la valeur retournée). Il y a plusieurs raisons d'utiliser les fonctions: - //Local Variable Preservation// : The ##[[KeyPgStatic Static]]## keyword specifies that a function's locally declared variables are preserved between function calls. Upon entering a function defined with ##[[KeyPgStatic Static]]##, local variables have the same value as when the function was last called. + - Réduit les redondances dans votre programme -{{fbdoc item="ex"}} +- Permet la réutilisation de code dans de nombreux programmes + +- Améliore la lisibilité du programme +- Améliore la maintenance du programme +- Facilite l'amélioration de votre programme + +//Droits d'accès// : Les mots-clés ##[[KeyPgPublic Public]]## et ##[[KeyPgPrivate Private]]## spécifient des droits d'accès, respectivement, publics ou privés entre niveaux-modules. Si aucun n'est donné, par défaut la fonction aura un accès (##[[KeyPgPublic Public]]##). -{{fbdoc item="filename" value="examples/manual/procs/func-1.bas"}}%%(freebasic) +//Convention d'appel// : La convention d'appel, ou l'ordre dans lequel les arguments sont entrés et sortis de la pile lors des appels de fonction, est spécifiée avec les mots-clés ##[[KeyPgCdecl cdecl]]##, ##[[KeyPgPascal pascal]]## et ##[[KeyPgStdcall stdcall]]##. Si aucune n'est fournie, la fonction utilise la convention standard par défaut (##[[KeyPgStdcall stdcall]]##). + +//Passage des arguments// : Les fonctions peuvent recevoir une ou plusieurs variables, ou arguments, en cas d'appel. Ces arguments sont répertoriés en tant que ##//parameters//## dans ##//parameter_list//##. Les mots-clés ##[[KeyPgByref ByRef]]## et ##[[KeyPgByval ByVal]]## précisent si l'argument sera passé par référence ou par valeur, respectivement. Le type de l'argument est donnée par "##[[KeyPgAs As]] //type//##" derrière le ##//parameter//##. Si un paramètre est donné dans la déclaration avec une valeur par défaut, le paramètre est facultatif. Les paramètres de tableaux sont spécifiés en plaçant des parenthèses vides après l'identifiant. Notez que les paramètres tableau sont toujours ##[[KeyPgByref ByRef]]## et le mot-clef ##[[KeyPgByref ByRef]]## n'est ni nécessaire ni permis comme paramètre tableau. Lorsque vous appelez une fonction avec un argument de tableau les parenthèses sont de rigueur là aussi, voir les exemples. + //Fonctions surchargées// : Une fonction surchargée peut partager le même nom (##//identifier//##) qu'une autre avec une signature différente. Le mot-clé ##[[KeyPgOverload Overload]]## précise qu'une fonction peut être surchargée. Une fonction peut être définie - ou déclarée - en utilisant le mot-clé ##[[KeyPgOverload Overload]]## avant toutes les fonctions qui les surchargent. +//Les valeurs de retour// : ##//return_type//## spécifie le ##[[DataType data type]]## retourné par une fonction à la sortie. Si aucun type de données n'est spécifié, alors la fonction retournera le type de données par défaut, qui sera ##//Integer//## sauf si a été précisé un autre type de données en utilisant ##[[KeyPgDefsng DefSng]]##, ##[[KeyPgDefdbl DefDbl]]##, ##[[KeyPgDefstr DefStr]]##, etc. Les fonctions peuvent retourner des valeurs //(et bientôt, des références)// en utilisant trois méthodes: le mot-clé ##[[KeyPgReturn Return]]## suivi d'une valeur fait sortir de la fonction immédiatement et renvoie cette valeur à l'appelant. Les fonctions peuvent également renvoyer des valeurs en attribuant le mot clé ##//Function//## ou l'##//identifier//## de la fonction à la valeur de retour souhaitée. Cependant, les deux dernières méthodes ne provoquent pas la sortie de la fonction. Comme les fonctions retournent des valeurs, les appels de fonction évaluent les expressions. Ainsi, les appels de fonction peuvent être faits partout où une expression est attendue, comme dans les déclarations [[KeyPgOpAssignment Affectations]] ou ##[[KeyPgIfthen If]]##. +//Préservation des variables locales// : Le mot-clef ##[[KeyPgStatic Static]]## indique que les variables locales déclarées dans une fonction sont conservées entre les appels de cette fonction. En entrant dans une fonction définie avec ##[[KeyPgStatic Static]]##, les variables locales ont la même valeur que la dernière fois que la fonction a été appelée. + +{{fbdoc item="ex"}} '' This program demonstrates the declaration of a function +'' This program demonstrates the declaration of a function + '' and returning a value using Return command -Declare Function ReturnTen () as integer +Declare Function ReturnTen () As Integer Print ReturnTen () '' ReturnTen returns an integer by default. - -Function ReturnTen() as integer - Return 10 + Function ReturnTen() As Integer +Return 10 End Function + %% +'' This program demonstrates function overloading. -{{fbdoc item="filename" value="examples/manual/procs/func-2.bas"}}%%(freebasic) '' This program demonstrates the declaration of a function '' and returning a value using assignment to function name - -Declare Function ReturnTen () as integer - +Declare Function ReturnTen () As Integer Print ReturnTen () '' ReturnTen returns an integer by default. -Function ReturnTen() as integer - ReturnTen = 10 +Function ReturnTen() As Integer +ReturnTen = 10 End Function -%% -{{fbdoc item="filename" value="examples/manual/procs/func-3.bas"}}%%(freebasic) +%% + %%(freebasic) '' This program demonstrates function overloading. '' The overloaded functions must be FIRST. -Declare Function ReturnTen Overload (a As Single) as integer -Declare Function ReturnTen Overload (a As String) as integer -Declare Function ReturnTen (a as integer) as integer + Declare Function ReturnTen Overload (a As Single) As Integer +Declare Function ReturnTen Overload (a As String) As Integer -Print ReturnTen (10.000!) '' ReturnTen will take a single and return an integer +Declare Function ReturnTen (a As Integer) As Integer + Print ReturnTen (10.000!) '' ReturnTen will take a single and return an integer Print ReturnTen (10) '' ReturnTen will take an integer and return an integer Print ReturnTen ("10") '' ReturnTen will take a string and return an integer -Function ReturnTen Overload (a As Single) as integer - Return Int(a) +Function ReturnTen Overload (a As Single) As Integer +Return Int(a) + End Function + Function ReturnTen Overload (a As String) As Integer +Return Val(a) -Function ReturnTen Overload (a As String) as integer - Return Val(a) End Function +Function ReturnTen (a As Integer) As Integer +Return a -Function ReturnTen (a As Integer) as integer - Return a End Function %% +'' functions taking array arguments. -{{fbdoc item="filename" value="examples/manual/procs/func-4.bas"}}%%(freebasic) '' The following example demonstrates optional parameters. + Function TestFunc(P As String = "Default") As String +Return P -Function TestFunc(P As String = "Default") As String - Return P End Function - Print TestFunc("Testing:") Print TestFunc %% +%% -{{fbdoc item="filename" value="examples/manual/procs/func-5.bas"}}%%(freebasic) '' This example shows how to declare and call -'' functions taking array arguments. - -Function x(b() As Double) As Integer - x = UBound(b)-LBound(b)+1 -End Function + '' functions taking array arguments. + Function x(b() As Double) As Integer + x = UBound(b)-LBound(b)+1 + End Function Dim a(1 To 10) As Double -Print x(a()) -Dim c(10 To 20) As Double -Print x(c()) -%% - -{{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// dialect, ##**Byval**## is the default parameter passing convention for all built-in types except ##[[KeyPgString String]]##; String and user-defined ##[[KeyPgType Type]]##s are passed ##[[KeyPgByref Byref]]## by default. - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##**Byref**## is the default parameter passing convention. - - In the //[[CompilerOptlang -lang qb]]// dialect, the name of the function must be used in an assignment to specify the return value. Using ##**function** = ...##" to specify the return value may not be used. - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##[[KeyPgReturn Return]]## may only be used to return a value when ##[[KeyPgOptiongosub Option Gosub]]## is off. In //[[CompilerOptlang -lang qb]]//, this must be done explicitly using the ##[[KeyPgOptionnogosub Option Nogosub]]## statement. - -{{fbdoc item="diff"}} - - Parameters can be optional in ""FreeBASIC"". - - In QBASIC, the return type could only specified with a suffix, not with ##AS TYPE##, and only allowed functions to return a built-in type. - - Return value can now be specified by a ##[[KeyPgReturn Return]]## statement. - - Function ##[[KeyPgOverload Overload]]##ing is supported in ""FreeBASIC"". - - The return value of ##[[KeyPgInteger Integer]]## functions (all integer types) can be ignored in the calling code. - -{{fbdoc item="see"}} - - ##[[KeyPgSub Sub]]## - - ##[[KeyPgExit Exit]]## - - ##[[KeyPgReturn Return]]## - - ##[[KeyPgDeclare Declare]]## - - ##[[KeyPgPublic Public]]## - - ##[[KeyPgPrivate Private]]## - -{{fbdoc item="back" value="CatPgProcedures|Procedures"}} + Print x(a()) + Dim c(10 To 20) As Double + Print x(c()) + %% + {{fbdoc item="lang"}} + +- Dans le dialecte //[[CompilerOptlang -lang fb]]// dialect, ##**ByVal**## est la convention par défaut de passage de paramètre pour tous les types intégrés sauf ##[[KeyPgString String]]##; ##**String**## et les ##[[KeyPgType Type]]##s définis par l'utilisateur sont passés ##[[KeyPgByref ByRef]]## par défaut. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##**ByRef**## est la convention par défaut de passage de paramètre. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, le nom de la fonction doit être utilisé dans une affectation pour spécifier la valeur de retour. Utiliser ##**Function** = ...##" pour spécifier que la valeur de retour ne peut être utilisée. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##[[KeyPgReturn Return]]## peut être utilisé pour retourner une valeur lorsque ##[[KeyPgOptiongosub Option Gosub]]## n'est pas valide. Dans //[[CompilerOptlang -lang qb]]//, cela doit être fait en utilisant explicitement l'instruction ##[[KeyPgOptionnogosub Option Nogosub]]##. + {{fbdoc item="diff"}} + - Les paramètres peuvent être optionnels en FreeBASIC. + - En QBASIC, le type de retour peut être spécifié seulement avec un suffixe, pas avec ##AS TYPE##, et autoriser seulement les fonctions à retourner un type intégré. + +- La valeur de retour peut maintenant être précisée par une instruction ##[[KeyPgReturn Return]]##. diff --git a/fbdocs/manual/cache/KeyPgGetfileio.wakka b/fbdocs/manual/cache/KeyPgGetfileio.wakka index f0b1a2e901..cf3e36e609 100644 --- a/fbdocs/manual/cache/KeyPgGetfileio.wakka +++ b/fbdocs/manual/cache/KeyPgGetfileio.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="GET (File I/O)"}}---- -Reads data from a file to a buffer +Lit les données d'un fichier vers un tampon {{fbdoc item="syntax"}}## **Get** #//filenum// [[KeyPgAs As]] [[KeyPgInteger Integer]], [//position// [[KeyPgAs As]] [[KeyPgLongint longint]]], [[KeyPgByref ByRef]] //data// [[KeyPgAs As]] [[KeyPgAny Any]] [, [//amount// [[KeyPgAs As]] [[KeyPgInteger Integer]]] [, [[KeyPgByref ByRef]] //bytesread// [[KeyPgAs As]] [[KeyPgUinteger Uinteger]]] ] @@ -12,29 +12,29 @@ Reads data from a file to a buffer ## {{fbdoc item="param"}} ##//filenum//## - The value passed to ##[[KeyPgOpen Open]]## when the file was opened. + La valeur passée à ##[[KeyPgOpen Open]]## quand le fichier a été ouvert. ##//position//## - The position where the read must start. If the file was opened ##[[KeyPgRandom For Random]]##, the position is in records; otherwise, it is in bytes. If omitted, reading starts at the present file pointer position. The position is 1-based: i.e. first record or byte of a file is at position ##1##. - If ##//position//## is omitted or zero (##0##), file reading will start from the current file position. + La position où la lecture doit commencer. Si le fichier a été ouvert ##[[KeyPgRandom For Random]]##, la position est en enregistrements; autrement, elle est en octets. Si omise, la lecture commence à la position actuelle du pointeur. La position est basée sur 1: c'est à dire que le premier enregistrement ou octet est à la position ##1##. + Si ##//position//## est omise ou zéro (##0##), la lecture du fichier commencera à la position courante dans le fichier. ##//data//## - The buffer where data is written. It can be a numeric variable, a string, an array, a user defined type or a dereferenced pointer. The read operation will try to fill completely the variable, unless the ##[[KeyPgEof EOF]]## is reached. - When getting arrays, ##//data//## should be followed by an empty pair of brackets: "##()##". ##**Get**## will read data for all of the values in the array. ##//amount//## is not allowed. - When getting ##[[KeyPgString String]]##s, the number of bytes read is the same as the number of bytes in the string data. ##//amount//## is not allowed. - Note: If you want to read values into a buffer, you should NOT pass a pointer to the buffer; instead you should pass the first variable in the buffer. (This can be done by dereferencing the pointer with ##[[KeyPgOpValueOf Operator * (Value of)]]##.) If you pass a pointer directly, then ##**Get**## will overwrite the pointer variable, not the memory it points to. + Le tampon où les données sont écrites. Il peut être une variable numérique, une chaîne, un tableau, un type défini par l'utilisateur ou un pointeur déréférencé. L'opération de lecture va essayer de remplir complètement la variable, à moins que ##[[KeyPgEof EOF]]## ne soit atteint. + Lors de l'utilisation de tableaux, ##//data//## doit être suivi par une paire de parenthèses vides: "##()##". ##**Get**## lira les données pour toutes les valeurs dans le tableau. ##//amount//## (quantité) n'est pas autorisé. + Lors de l'utilisation de ##[[KeyPgString String]]##s, le nombre d'octets lus est le même que le nombre d'octets dans les données de chaîne. ##//amount//## (quantité) n'est pas autorisé. + Note: Si vous voulez lire des valeurs dans une mémoire tampon, vous NE devez PAS passer un pointeur vers la mémoire tampon; au lieu de cela vous devez passer la première variable dans la mémoire tampon. (Cela peut être fait par le déréférencement du pointeur avec ##[[KeyPgOpValueOf Operator * (Value Of)]]##.) ##**Get**## comprendra automatiquement que le reste de la mémoire tampon se poursuit après la première variable.. Si vous passez un pointeur directement, alors ##**Get**## écrira sur la variable et non à l'emplacement mémoire vers lequel elle pointe. ##//amount//## - Makes ##**Get**## read ##//amount//## consecutive variables from file to memory, i.e. it reads ##(//amount// * [[KeyPgSizeof Sizeof]](//data//) )## bytes of data from file into the memory starting at ##//data//##'s memory location. If ##//amount//## is omitted it defaults to ##1##, meaning that ##**Get**## just reads a single variable. + ##**Get**## lit ##//amount//## variables consécutives du fichier vers la mémoire, c'est à dire qu'il lit ##(//amount// * [[KeyPgSizeof SizeOf]](//data//) )## octets ou données depuis le fichier vers la mémoire commençant à la position ##//data//##. Si ##//amount//## est omis il sera de ##1## par défaut, ce qui signifie que ##**Get**## ne lira qu'une seule variable. ##//bytesread//## - An unsigned integer variable to accept the result of the number of bytes read successfully from the file. + Une variable entière non signée qui contiendra le nombre d'octets lus avec succès à partir du fichier. -{{fbdoc item="ret"}} - Zero (##0##) on success; non-zero on error. Note: if ##[[KeyPgEof EOF]]## (end of file) is reached while reading, ##**Get**## will return success. The amount of bytes actually read can be checked by passing a ##//bytesread//## variable. +{{fbdoc item="section" value="Valeur retournée + Zéro (##0##) si succès; non-zéro si erreur. Note: Si ##[[KeyPgEof EOF]]## (End Of File) est atteint pendant la lecture, ##**Get**## retournera "succès". La quantité d'octets réellement lus peut être vérifiée en passant une variable ##//bytesread//##. {{fbdoc item="desc"}} - Reads binary data from a file to a buffer variable + Lit les données binaires à partir d'un fichier vers une variable tampon - ##**Get**## can be used as a function, and will return ##0## on success or an error code on failure. + ##**Get**## peut être utilisé comme une fonction, et retournera ##0## si succès ou un code d'erreur si échec. - For files opened in ##[[KeyPgRandom Random]]## mode, the size in bytes of the data to read must match the specified record size. + Pour les fichiers ouverts en mode ##[[KeyPgRandom Random]]##, la taille en octets des données à lire doit correspondre à la taille d'enregistrement spécifiée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/get.bas"}}%%(freebasic) @@ -136,18 +136,18 @@ Print ExampleStr %% {{fbdoc item="diff"}} - - ##**Get**## in FB can read full arrays as in VB or, alternatively, read a multiple of the data size into the memory. - - ##**Get**## can be used as a function in FB, to find the success/error code returned without having to use error handling procedures. - - FB allows the ##//bytesread//## parameter, to check how many bytes have been successfully read in. +
  • Dans FB, ##**Get**## peut lire des tableaux pleins comme dans VB ou, alternativement, lire un multiple de la taille des données dans la mémoire. + - ##**Get**## peut être utilisé comme une fonction dans FB, pour obtenir le code succès/erreur renvoyé sans avoir à utiliser les procédures de gestion des erreurs. + - FB permet le paramètre ##//bytesread//##, pour vérifier combien d'octets ont été lus avec succès. {{fbdoc item="see"}} - - ##[[KeyPgGetgraphics Get (Graphics)]]## different usage of same keyword - - ##[[KeyPgPutfileio Put (File I/O)]]## + - ##[[KeyPgGetgraphics Get (Graphiques)]]## utilisation différente du même mot-clé + - ##[[KeyPgPutfileio Put (Entrée/sortie fichiers)]]## - ##[[KeyPgOpen Open]]## - ##[[KeyPgClose Close]]## - ##[[KeyPgBinary Binary]]## - ##[[KeyPgRandom Random]]## - ##[[KeyPgFreefile Freefile]]## - - ##[[ProPgFileIO File I/O methods comparison]]## + - ##[[ProPgFileIO Comparaison des méthodes d'entrée/sortie des fichiers]]## {{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgGetgraphics.wakka b/fbdocs/manual/cache/KeyPgGetgraphics.wakka index 9ba10657bb..0d16816b3d 100644 --- a/fbdocs/manual/cache/KeyPgGetgraphics.wakka +++ b/fbdocs/manual/cache/KeyPgGetgraphics.wakka @@ -1,48 +1,48 @@ {{fbdoc item="title" value="GET (GRAPHICS)"}}---- -Gets a copy of a portion of the current work page or an image buffer +Obtient une copie d'une portion de la page courante de travail ou d'un tampon image {{fbdoc item="syntax"}}## **Get** [//source//,] [Step] (//x1//, //y1//) - [STEP] (//x2//, //y2//), //dest//] ## {{fbdoc item="param"}} ##//source//## - the address of an image buffer. + adresse d'un tampon image. ##Step## - indicates that the following co-ordinates are not absolute co-ordinates. + indique que les coordonnées qui suivent ne sont pas absolues. ##//x1//##, ##//y1//## - co-ordinates of the upper-left corner of the sub-image to copy. + coordonnées du coin en haut à gauche de la sous-image à copier. ##//x2//##, ##//y2//## - co-ordinates of the lower-right corner of the sub-image to copy. + coordonnées du coin en bas à droite de la sous-image à copier. ##//dest//## - the address of a previously allocated buffer to store the image data. + adresse du tampon précédemment alloué pour stocker les données image. {{fbdoc item="desc"}} - ##**Get**## copies a rectangular portion of the current work page specified by the co-ordinates (##//x1//##, ##//y1//##) and (##//x2//##, ##//y2//##), which represent the upper-left and lower-right corners of the rectangle, respectively. ##**Step**## specifies that the upper-left co-ordinates are relative to the current graphics pen location, and/or that the lower-right co-ordinates are relative to the upper-left co-ordinates. The new image buffer is formatted to match the current screen mode [[GfxInternalFormats pixel format]]. + ##**Get**## copie une portion rectangulaire de la page de travail courante, spécifiée par les coordonnées (##//x1//##, ##//y1//##) et (##//x2//##, ##//y2//##), qui représentent respectivement les coins haut-gauche et bas-droite du rectangle. ##**Step**## précise que les coordonnées sont relatives à la position du crayon graphique, et/ou les coordonnées sont relatives aux coordonnées du coin haut-gauche. Le nouveau tampon image est formaté pour correspondre au [[GfxInternalFormats format pixel ]]du mode écran courant. - ##//dest//## can be an address, an [[ProPgArrays array]], or a reference to the first element in an [[ProPgArrays array]] that will receive the new image buffer. This memory must be sufficiently allocated to hold the image buffer; the number of bytes required varies with the [[CompilerOptlang -lang dialect]] used to compile the program. + ##//dest//## peut être une addresse, un [[ProPgArrays tableau]] ou une référence au premier élément d'un [[ProPgArrays tableau]] qui recevra le nouveau tampon image. L'allocation mémoire doit être suffisante pour recevoir le tampon image; le nombre d'octets varie avec le [[CompilerOptlang -lang dialect]] utilisé pour compiler le programme. - ##//source//## can be an address, an [[ProPgArrays array]], or a reference to the first element in an [[ProPgArrays array]] that holds an image buffer to retrieve a portion of. ##//x1//##, ##//y1//##, ##//x2//##, ##//y2//##, ##**Step**## and ##//dest//## have the same meaning in this case. + ##//source//## peut être une addresse, un [[ProPgArrays tableau]] ou une référence au premier élément d'un [[ProPgArrays tableau]] qui contient un tampon image pour recevoir la portion de l'image. ##//x1//##, ##//y1//##, ##//x2//##, ##//y2//##, ##**Step**## et ##//dest//## ont la même signification dans ce cas. - The co-ordinates of the rectangle are affected by the most recent ##[[KeyPgWindow Window]]## and ##[[KeyPgViewgraphics View (Graphics)]]## statements, and must both be within the current clipping region set by ##[[KeyPgViewgraphics View (Graphics)]]##, otherwise an illegal function call runtime error will be triggered, and the function will have no effect. + Les coordonnées du rectangle sont modifiées par les plus récentes déclarations de ##[[KeyPgWindow Window]]## et ##[[KeyPgViewgraphics View (Graphics)]]##, et doivent être toutes les deux dans la région de découpage courante (clipping region) validée par ##[[KeyPgViewgraphics View (Graphics)]]##, autrement sera émise une erreur d'appel illégal à une fonction, et la fonction n'aura aucun effet. -**Runtime errors:** - ##**Get**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de fonctionnement:** + ##**Get**## produit une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes: //(##1##) Illegal function call// - - ##//dest//## is an array, but is not big enough to hold the image buffer. - - The upper-left or lower-right co-ordinates of the rectangle are outside the current clipping region. See ##[[KeyPgViewgraphics View (Graphics)]]##. + - ##//dest//## est un tableau, mais il n'est pas assez grand pour contenir le tampon image. + - Les coordonnées du coin en haut à gauche ou en bas à droite sont en dehors de la région de découpage courante (clipping region). Voir ##[[KeyPgViewgraphics View (Graphics)]]##. {{fbdoc item="lang"}} - There are 2 types of buffers (details see [[GfxInternalFormats]]) depending from FB dialect used: + Il y a 2 types de tampons (voir [[GfxInternalFormats Formats graphiques internes]]) dépendant du dialecte FB qui est utilisé: - - In the //[[CompilerOptlang -lang fb]]// dialect, ##//dest//## receives a new-style image buffer, which consists of a 32-byte image header followed by pixel data which is row-padded to the next paragraph boundary (16 bytes). Use the following formula to calculate the total size, in bytes, required to store the image buffer, where ##w## and ##h## are the respective width and height of the rectangular portion of the current work page or source image buffer, and ##bpp## is the number of bytes per pixel of the current screen mode: + - Dans les dialectes //[[CompilerOptlang -lang fb]]//, ##//dest//## reçoit un tampon image nouveau-style, consistant en une en-tête image de 32 octets suivi par les données pixels data qui est "row-padded" jusqu'à la limite du paragraphe suivant (16 octets). Utilisez la formule suivante pour calculer la taille totale, en octets, nécessaire pour stocker le tampon image, où ##w## et ##h## sont respectivement la largeur et la hauteur de la portion rectangulaire de la page courante de travail ou du tampon image source, et ##bpp## est le nombre d'octets par pixel de l'écran courant: ##size = 32 + (((w * bpp + &hF) and not &hF) * h)## - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, ##//dest//## receives a QB-style image buffer, which consists of a 4-byte image header followed by pixel data which is not row-padded. Use the following formula to calculate the total size, in bytes, required to store the image buffer, where ##w## and ##h## are the respective width and height of the rectangular portion of the current work page or source image buffer, and ##bpp## is the number of bytes per pixel of the current screen mode: + - Dans le dialecte //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, ##//dest//## reçoit un tampon image style-QB, qui consiste en une en-tête image de 4 octets suivi par les données pixel qui ne sont pas "row-padded". Utilisez la formule suivante pour calculer la taille totale, en octets, nécessaire pour stocker le tampon image, où ##w## et ##h## sont respectivement la largeur et la hauteur de la portion rectangulaire de la page courante de travail ou du tampon image source, et ##bpp## est le nombre d'octets par pixel du [[GfxInternalFormats format pixel]] du mode écran courant: ##size = 4 + (w * h * bpp)## {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/gfx/get.bas"}}%%(freebasic) + %%(freebasic) #include once "fbgfx.bi" '' Setup a 400x300 32bit screen @@ -97,6 +97,6 @@ wend - ##[[KeyPgScreengraphics Screen (Graphics)]]## - ##[[KeyPgWindow Window]]## - ##[[KeyPgViewgraphics View (Graphics)]]## - - [[GfxInternalFormats Internal graphics formats]] + - [[GfxInternalFormats Formats graphiques internes]] {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} diff --git a/fbdocs/manual/cache/KeyPgGetjoystick.wakka b/fbdocs/manual/cache/KeyPgGetjoystick.wakka index 597d3ed466..90ad54069e 100644 --- a/fbdocs/manual/cache/KeyPgGetjoystick.wakka +++ b/fbdocs/manual/cache/KeyPgGetjoystick.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="GETJOYSTICK"}}---- -Reads buttons and axis information from attached gaming devices +Lecture des informations des boutons et des axes des dispositifs relatifs au jeu {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Getjoystick** ( [[KeyPgByval byval]] //id// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //buttons// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //a1// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a2// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a3// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a4// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a5// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a6// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a7// [[KeyPgAs as]] [[KeyPgSingle single]] = 0, [[KeyPgByref byref]] //a8// [[KeyPgAs as]] [[KeyPgSingle single]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,35 +9,35 @@ Reads buttons and axis information from attached gaming devices ## {{fbdoc item="param"}} ##//id//## - the device id number (0 - 15) + nombre identificateur du dispositif (0 - 15) ##//buttons//## - the button status + l'état bouton ##//a1//## - first axis value + valeur premier axe ##//a2//## - second axis value + valeur second axe ##//a3//## - third axis value + valeur troisième axe ##//a4//## - fourth axis value + valeur quatrième axe ##//a5//## - fifth axis value + valeur cinquième axe ##//a6//## - sixth axis value + valeur sixième axe ##//a7//## - seventh axis value + valeur septième axe ##//a8//## - eighth axis value + valeur huitième axe -{{fbdoc item="ret"}} - 0 on success or 1 on failure. All of the axis positions are returned in floating point format. +{{fbdoc item="section" value="Valeur renvoyée + 0 si succès ou 1 si échec. Toutes les valeurs des positions des axes sont retournées sous forme de nombres à virgule flottante. {{fbdoc item="desc"}} - ##**Getjoystick**## will retrieves the button state, and the axis positions for up to 8 axes, for the joystick determined by ##//id//##, a number between 0 and 15. Buttons are stored in a similar manner to ##[[KeyPgGetmouse Getmouse]]##, with each bit in ##//buttons//## representing a button. + ##**GetJoystick**## retourne l'état bouton et les positions des axes, jusqu'à 8 axes, pour chaque joystick determiné par ##//id//##, un nombre de 0 à 15. Les valeurs des boutons sont stockées de la même façon que pour ##[[KeyPgGetmouse GetMouse]]##, avec chaque bit //## représentant un bouton. - A single precision value between ##-1.0## and ##1.0## is returned for each valid axis. If the axis does not exist for the controller, a value of ##-1000.00## is returned. + Une valeur simple précision de ##-1.0## à ##1.0## est retournée pour chaque axe valide. Si l'axe n'existe pas pour le contrôleur, une valeur de ##-1000.00## est retournée. - ##**Getjoystick**## will return 0 upon successful completion; It will return 1 upon failure. Failure can be caused by specifying an illegal joystick number, specifying a joystick which doesn't exist, or a failure in the joystick API. + ##**GetJoystick**## renvoie 0 après réussite; renvoie 1 en cas d'échec. L'échec peut être provoqué par un nombre illégal de joystick, en spécifiant un joystick qui n'existe pas, ou un échec de l'API joystick. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/getjoystick.bas"}}%%(freebasic) @@ -51,7 +51,7 @@ dim a as integer const JoystickID = 0 -'This line checks to see if the joystick is ok. +'Cette ligne verifie si joystick est ok. if GETJOYSTICK(JoystickID,buttons,x,y) then print "Joystick doesn't exist or joystick error." @@ -68,7 +68,7 @@ do locate 1,1 print ;"result:";result;" x:" ;x;" y:";y;" Buttons:";buttons,"","","" - 'This tests to see which buttons from 1 to 27 are pressed. + 'Ces tests pour voir quels boutons de 1 a 27 sont appuyes. for a = 0 to 26 if (buttons AND (1 shl a)) then print "Button ";a;" pressed. " @@ -80,13 +80,13 @@ loop %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Getjoystick""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Getjoystick**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + - ##[[KeyPgScreengraphics Screen (Graphique)]]## - ##[[KeyPgSetmouse Setmouse]]## - ##[[KeyPgGetmouse Getmouse]]## - ##[[KeyPgMultikey Multikey]]## diff --git a/fbdocs/manual/cache/KeyPgGetkey.wakka b/fbdocs/manual/cache/KeyPgGetkey.wakka index 765ba5c34b..7fbb53f1ec 100644 --- a/fbdocs/manual/cache/KeyPgGetkey.wakka +++ b/fbdocs/manual/cache/KeyPgGetkey.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="GETKEY"}}---- -Returns the ascii code of the first key in the keyboard buffer +Retourne le code ASCII de la première touche dans la mémoire tampon du clavier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Getkey** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,15 +7,15 @@ Returns the ascii code of the first key in the keyboard buffer {{fbdoc item="usage"}}## //result// = **Getkey** ## -{{fbdoc item="ret"}} - The [[KeyPgInteger integer]] value of the ascii code returned. +{{fbdoc item="section" value="Valeur retournée + La valeur [[KeyPgInteger Integer]] du code ASCII retourné. {{fbdoc item="desc"}} - It returns the ascii code of the first key in the keyboard buffer. The key is removed from the buffer. If no key is present, ##**Getkey**## waits for it. For extended keys (returning two characters), the extended code is returned in the first byte, and the regular code is returned in the second byte. (see example below) + Retourne le code ASCII de la première touche dans la mémoire tampon du clavier. La touche est retirée de la mémoire tampon. Si aucune touche n'est présente, ##**GetKey**## en attend une. Pour les touches étendues (elles retournent deux caractères), le code étendu est retourné dans le premier octet et le code régulier est retourné dans le deuxième octet. (voir l'exemple ci-dessous) - The key read is not echoed to the screen. + La touche lue n'est pas affichée à l'écran. - For a keyword not stopping the program if no key is at the buffer see ##[[KeyPgInkey Inkey]]## or ##[[KeyPgMultikey Multikey]]##. + Pour un mot-clef qui ne bloque pas le programme, si aucune touche ne se trouve dans le tampon mémoire du clavier, voir ##[[KeyPgInkey Inkey]]## ou ##[[KeyPgMultikey MultiKey]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/getkey.bas"}}%%(freebasic) @@ -36,10 +36,10 @@ loop until foo = 27 {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Getkey""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Getkey**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgGetmouse GetMouse]]## diff --git a/fbdocs/manual/cache/KeyPgGetmouse.wakka b/fbdocs/manual/cache/KeyPgGetmouse.wakka index 8dfea20be1..2421db5823 100644 --- a/fbdocs/manual/cache/KeyPgGetmouse.wakka +++ b/fbdocs/manual/cache/KeyPgGetmouse.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="GETMOUSE"}}---- -Retrieves the status of the mouse pointing device +Récupère l'état du dispositif de pointage de la souris {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Getmouse** ( [[KeyPgByref byref]] //x// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //y// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //wheel// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //buttons// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //clip// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,31 +9,31 @@ Retrieves the status of the mouse pointing device ## {{fbdoc item="param"}} ##//x//## - x coordinate value + valeur de la coordonnée x ##//y//## - y coordinate value + valeur de la coordonnée y ##//wheel//## - scroll wheel value + valeur de la molette ##//buttons//## - button status + état des boutons ##//clip//## - clip status + état "clip" -{{fbdoc item="ret"}} - ##0## on success or ##1## on failure. +{{fbdoc item="section" value="Valeur retournée + ##0## si succès ou ##1## si échec. {{fbdoc item="desc"}} - ##**Getmouse**## retrieves the mouse position and buttons status; information is returned in the variables passed to this function by reference. If a mouse is not available, all variables will contain the ##-1## value. + ##**GetMouse**## détermine la position de la souris et l'état des boutons; l'information est retournée dans les variables passées par référence à la fonction. Si aucune souris n'est disponible, toutes les variables contiendront la valeur ##-1##. - If in console mode, the ##//x//## and ##//y//## coordinates are the character cell coordinates the mouse is currently on; the upper left corner of the screen is at coordinates ##0, 0##. If the mouse moves out of the console window, ##**Getmouse**## returns the last coordinate on the window that the mouse was on. + En mode console, les coordonnées ##//x//## et ##//y//## sont les coordonnées de la cellule caractère où se trouve la souris; le coin en haut à gauche de l'écran a les coordonnées ##0,0##.. Si la souris sort de la fenêtre console, ##**GetMouse**## renvoie les dernières coordonnées lorsque la souris était encore sur la fenêtre. - If in graphics mode, ##//x//## and ##//y//## will always be returned in pixel coordinates still relative to the upper left corner of the screen, which is at 0,0 in this case; custom coordinates system set via ##[[KeyPgViewgraphics View]]## or ##[[KeyPgWindow Window]]## do not affect the coordinates returned by ##**Getmouse**##. If the mouse runs off the window, all values are set to ##-1##. + En mode graphique, ##//x//## et ##//y//## retournent toujours les coordonnées en pixels relatives au coin en haut à gauche de l'écran, qui lui a les coordonnées 0,0; un système de coordonnées personnel établi via ##[[KeyPgViewgraphics View]]## ou ##[[KeyPgWindow Window]]## n'affectera pas les coordonnées retournées par ##**GetMouse**##. Si la souris sort de la fenêtre, toutes les valeurs seront mises à ##-1##. - ##//Wheel//## is the mouse wheel counter; rotating the wheel away from you makes the count to increase, rotating the wheel toward you makes it to decrease. At program startup or when a new graphics mode is set via ##[[KeyPgScreengraphics Screen]]##, wheel position is reset to 0. ""FreeBASIC"" may not always support mouse wheels for a given platform, in which case 0 is always returned. + ##//Wheel//## est le compteur de la molette souris; actionner la molette vers l'avant augmentera la valeur du compteur, une rotation vers l'arrière diminuera la valeur du compteur. Au départ du programme ou quand un nouveau mode graphique est validé via ##[[KeyPgScreengraphics Screen]]##, la position de la molette est remise à 0. FreeBASIC ne gère pas toujours la molette pour certaines plates-formes, dans ce cas une valeur 0 est toujours renvoyée. - ##//Buttons//## stores the buttons status as a bitmask: bit 0 is set if left mouse button is down; bit 1 is set if right mouse button is down; bit 2 is set if middle mouse button / wheel is down. + ##//Buttons//## stocke l'état des boutons sous la forme d'un masque de bits: le bit 0 est valide (à 1) si le bouton gauche est appuyé; le bit 1 est valide si le bouton droit est appuyé; le bit 2 est valide si le bouton central / molette est appuyé. - ##//Clip//## stores the mouse clipping status; if ##1##, the mouse is currently clipped to the graphics window; if ##0##, the mouse is not clipped. + ##//Clip//## stocke l'état de "clipping"; si à ##1##, la souris est "clippée" à la fenêtre graphique; si à ##0##, la souris n'est pas "clippée". {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/getmouse.bas"}}%%(freebasic) @@ -42,7 +42,7 @@ DIM AS INTEGER x, y, buttons, res ' Set video mode and enter loop SCREENRES 640, 480, 8 DO - ' Get mouse x, y and buttons. Discard wheel position. + ' Recupere x, y souris et boutons. Discard wheel position. res = GETMOUSE (x, y, , buttons) LOCATE 1, 1 IF res <> 0 THEN '' Failure @@ -92,18 +92,18 @@ loop while inkey = "" %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Getmouse""**##. The variables passed must also be of type ##[[KeyPgLong Long]]## instead of ##[[KeyPgInteger Integer]]##. - -{{fbdoc item="target"}} - - On ""Win32"", scroll wheel changes are not guaranteed to be detected in full-screen console mode. - - In DOS, the "clip" value has no relevance. Additionally the wheel and middle button will not work unless supported and enabled by the mouse driver. See also [[FaqDOS]]. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Getmouse**##. Les variables passées doivent aussi être du type ##[[KeyPgLong Long]]## au lieu de ##[[KeyPgInteger Integer (Entier)]]##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC + {{fbdoc item="see"}} + +- ##[[KeyPgScreenres ScreenRes]]## valide le mode graphique par résolution + - ##[[KeyPgScreengraphics Screen (Graphiques)]]## valide le mode graphique méthode QB -{{fbdoc item="see"}} - - ##[[KeyPgScreenres Screenres]]## setting graph mode by resolution - - ##[[KeyPgScreengraphics Screen (Graphics)]]## setting mode the QB-like way +- ##[[KeyPgSetmouse SetMouse]]## + - ##[[KeyPgMultikey MultiKey]]## + - ##[[KeyPgGetjoystick GetJoystick]]## - ##[[KeyPgSetmouse Setmouse]]## - ##[[KeyPgMultikey Multikey]]## - ##[[KeyPgGetjoystick Getjoystick]]## diff --git a/fbdocs/manual/cache/KeyPgGosub.wakka b/fbdocs/manual/cache/KeyPgGosub.wakka index 7828f05f9e..73b05a1a04 100644 --- a/fbdocs/manual/cache/KeyPgGosub.wakka +++ b/fbdocs/manual/cache/KeyPgGosub.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="GOSUB"}}---- -Control flow statement to use a section of code and return. +Déclaration de contrôle de flux pour partir utiliser une section de code et revenir. {{fbdoc item="syntax"}}## **Gosub** //label// ## {{fbdoc item="desc"}} - Execution jumps to a subroutine marked by a line label. Always use ##[[KeyPgReturn Return]]## to exit a ##**Gosub**##, execution will continue on next statement after ##**Gosub**##. + L'exécution saute vers un sous-programme repéré par une ligne avec une étiquette (label). Toujours utiliser ##[[KeyPgReturn Return]]## pour quitter un ##**GoSub**##, l'exécution se poursuivra sur la déclaration suivante après ##**GoSub**##. - The line label where ##**Gosub**## jumps must be in the same main/function/sub block as ##**Gosub**##. All the variables in the subroutine are shared with the block, no arguments can be used. For this reason Gosub is considered bad programming practice as it can generate unreadable and untraceable code. It is better to use ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## instead. + L'étiquette de la ligne où ##**GoSub**## doit sauter doit être dans la même bloc principal (main)/fonction/sub que ##**GoSub**##. Toutes les variables dans le sous-programme sont partagées avec le bloc, aucun argument ne peut être utilisé. Pour cette raison, Gosub est considéré comme une mauvaise pratique de programmation car cela peut générer du code illisible et introuvable. Il est préférable d'utiliser ##[[KeyPgSub Sub]]## ou ##[[KeyPgFunction Function]]## à la place. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/gosub.bas"}}%%(freebasic) @@ -24,11 +24,11 @@ Return %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. - - ##**Gosub**## support is disabled by default in the //[[CompilerOptlang -lang fblite]]// unless the ##[[KeyPgOptiongosub Option Gosub]]## statement is used. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. + - Le support de ##**GoSub**## est désactivé par défaut dans //[[CompilerOptlang -lang fblite]]// sauf si ##[[KeyPgOptiongosub Option Gosub]]## est utilisé. {{fbdoc item="diff"}} - - None when using the //[[CompilerOptlang -lang qb]]// dialect. + - Aucune en utilisant le dialecte//[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgGoto Goto]]## diff --git a/fbdocs/manual/cache/KeyPgGoto.wakka b/fbdocs/manual/cache/KeyPgGoto.wakka index 2bcfd4386d..4f44e42b36 100644 --- a/fbdocs/manual/cache/KeyPgGoto.wakka +++ b/fbdocs/manual/cache/KeyPgGoto.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="GOTO"}}---- -Control flow statement to jump to another part of the program +Déclaration de contrôle de flux pour sauter vers une autre partie du programme {{fbdoc item="syntax"}}## **Goto** //label// ## {{fbdoc item="desc"}} - Jumps code execution to a line label. + L'exécution du code saute vers une ligne avec une étiquette. - For better source code readability, overuse of ##**Goto**## should be avoided in favor of more modern structures such as ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ##[[KeyPgSub Sub]]##, and ##[[KeyPgFunction Function]]##. + Pour plus de lisibilité du code source, l'utilisation excessive de ##**Goto**## doit être évitée en faveur de structures plus modernes telles que ##[[KeyPgDoloop Do...Loop]]##, ##[[KeyPgFornext For...Next]]##, ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/goto.bas"}}%%(freebasic) @@ -33,10 +33,10 @@ there: %% {{fbdoc item="lang"}} - - Line numbers are allowed only in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang deprecated]]// dialects. + - Les numéros de ligne ne sont permis que dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang deprecated]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgGosub Gosub]]## diff --git a/fbdocs/manual/cache/KeyPgHex.wakka b/fbdocs/manual/cache/KeyPgHex.wakka index 2d23562b2c..16d1e8280f 100644 --- a/fbdocs/manual/cache/KeyPgHex.wakka +++ b/fbdocs/manual/cache/KeyPgHex.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="HEX"}}---- -Returns the hexadecimal of the given number +Retourne la valeur hexadécimale du nombre donné {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Hex** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -18,21 +18,21 @@ Returns the hexadecimal of the given number ## {{fbdoc item="param"}} ##//number//## - A number or expression evaluating to a number. A floating-point number will be converted to a ##[[KeyPgLongint longint]]##. + Un nombre ou expression évalué comme nombre. Un nombre à virgule flottante sera converti en ##[[KeyPgLongint LongInt]]##. ##//digits//## - Optional number of digits to return. + Facultatif: nombre de chiffres à retourner. -{{fbdoc item="ret"}} - A [[KeyPgString string]] containing the unsigned hexadecimal representation of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Une [[KeyPgString String (chaîne)]] contenant la représentation hexadécimale non-signée de ##//number//##. {{fbdoc item="desc"}} - Returns the unsigned hexadecimal string representation of the integer ##//number//##. Hexadecimal digits range from 0-9, or A-F. + Retourne la représentation hexadécimale non-signée de l'entier ##//number//##. Chiffres héxadécimaux de 0 à 9, ou A à F. - If you specify ##//digits//## > 0, the result string will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, la chaîne résultat aura exactement cette longueur. Elle sera tronquée ou complètée avec des zéros sur la gauche, si nécessaire. - The length of the string will not go longer than the maximum number of digits required for the type of ##//number//## (8 for an ##[[KeyPgInteger integer]]##, 16 for a ##[[KeyPgLongint longint]])##. + La longueur de la chaîne ne dépassera pas le nombre de bits maximum requis pour le type de ##//number//## (8 pour un ##[[KeyPgInteger Integer (entier)]]##, 16 pour un ##[[KeyPgLongint LongInt (entier long)]])##. - If you want to do the opposite, i.e. convert a hexadecimal string back into a number, the easiest way to do it is to prepend the string with ##"&H"##, and convert it using ##[[KeyPgValint Valint]]## or ##[[KeyPgVallng Vallng]]##, similarly to a normal numeric string. E.g. ##[[KeyPgValint Valint]]("&HFF")## + Si vous désirez l'opposé, par exemple convertir une chaîne binaire vers un nombre, la meilleure façon de le faire est d'ajouter ##"&H"##, au début de la chaîne, et la convertir en utilisant ##[[KeyPgValint ValInt]]## ou ##[[KeyPgVallng ValLng]]##, de façon similaire à une chaîne numérique normale. Par exemple ##[[KeyPgValint ValInt]]("&HFF")## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/hex.bas"}}%%(freebasic) @@ -41,7 +41,7 @@ Print Hex(54321) Print Hex(54321, 2) Print Hex(54321, 5) %% - will produce the output: + produira la sortie: %%D431 31 @@ -49,12 +49,12 @@ Print Hex(54321, 5) %% {{fbdoc item="lang"}} - - The string type suffix ##"$"## is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix ##"$"## is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type chaîne ##"$"## est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type chaîne ##"$"## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - In QBASIC, there was no way to specify the number of digits returned. - - The size of the string returned was limited to 32 bits, or 8 hexadecimal digits. + - Dans QBASIC, il n'y avait aucun moyen de spécifier le nombre de chiffres retournés. + - La taille de la chaîne retournée était limitée à 32 bits, ou 8 chiffres hexadécimaux. {{fbdoc item="see"}} - ##[[KeyPgBin Bin]]## diff --git a/fbdocs/manual/cache/KeyPgHibyte.wakka b/fbdocs/manual/cache/KeyPgHibyte.wakka index 938ccf4ebc..4599da70d0 100644 --- a/fbdocs/manual/cache/KeyPgHibyte.wakka +++ b/fbdocs/manual/cache/KeyPgHibyte.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="HIBYTE"}}---- -Gets the most-significant byte (MSB, or //hi-byte//) of the least-significant word (LSW, or //lo-word//) of an ##[[KeyPgUinteger Uinteger]]## value. +Obtient la valeur de l'octet le plus significatif (MSB = Most-Significant Byte, ou //hi-byte//) du mot le moins significatif (LSW = Least-Significant Word, ou //lo-word//) d'une valeur ##[[KeyPgUinteger UInteger]]##. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Hibyte**( //expr// ) ( ( [[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//) [[KeyPgOpAnd and]] &h0000FF00 ) [[KeyPgOpShiftRight shr]] 8 ) @@ -9,13 +9,13 @@ Gets the most-significant byte (MSB, or //hi-byte//) of the least-significant wo ## {{fbdoc item="param"}} ##//expr//## - A numeric expression, converted to an ##[[KeyPgUinteger Uinteger]]## value. + A numeric expression, convertie en une valeur ##[[KeyPgUinteger UInteger]]##. -{{fbdoc item="ret"}} - Returns the MSB value of the LSW of `##[[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//)##`. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur de l'octet le plus significatif du mot le moins significatif de `##[[KeyPgCast Cast]]([[KeyPgUinteger UInteger]], //expr//)##`. {{fbdoc item="desc"}} - This macro converts the numeric expression ##//expr//## to an ##[[KeyPgUinteger Uinteger]]## value, then expands to an [[KeyPgUinteger Uinteger]] representing the value of the MSB of its LSW. It behaves as `##[[KeyPgHibyte Hibyte]]([[KeyPgLoWord Loword]](//expr//))##`. + Cette macro convertit l'expression numérique ##//expr//## en une valeur ##[[KeyPgUinteger UInteger]]##, qu'elle développe ensuite en un [[KeyPgUinteger UInteger]] représentant la valeur du MSB de son LSW. Il se comporte comme `##[[KeyPgHibyte HiByte]]([[KeyPgLoWord LoWord]](//expr//))##`. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/hibyte.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ PRINT "The binary representation of the LSB is "; BIN(LOBYTE(N)) SLEEP %% -The output would look like: +La sortie donnera: %% N Is 43905 The Binary representation of N Is 1010101110000001 @@ -43,10 +43,10 @@ The Binary representation of the LSB Is 10000001 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__HIBYTE""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__HIBYTE**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLoByte Lobyte]]## diff --git a/fbdocs/manual/cache/KeyPgHiword.wakka b/fbdocs/manual/cache/KeyPgHiword.wakka index 5a6309fa00..03badd842e 100644 --- a/fbdocs/manual/cache/KeyPgHiword.wakka +++ b/fbdocs/manual/cache/KeyPgHiword.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="HIWORD"}}---- -Gets the most-significant word (MSW, or //hi-word//) of an ##[[KeyPgUinteger Uinteger]]## value. +Obtient la valeur du mot le plus significatif (MSW = Most-Significant Word, ou //hi-word//) d'une valeur ##[[KeyPgUinteger UInteger]]##. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Hiword**( //expr// ) ( [[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//) [[KeyPgOpShiftRight shr]] 16 ) @@ -9,13 +9,13 @@ Gets the most-significant word (MSW, or //hi-word//) of an ##[[KeyPgUinteger Uin ## {{fbdoc item="param"}} ##//expr//## - A numeric expression, converted to an ##[[KeyPgUinteger Uinteger]]## value. + Une expression numérique, convertie en une valeur ##[[KeyPgUinteger UInteger]]##. -{{fbdoc item="ret"}} - Returns the MSW value of `##[[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//)##`. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur du mot le plus significatif (MSW) de `##[[KeyPgCast Cast]]([[KeyPgUinteger UInteger]], //expr//)##`. {{fbdoc item="desc"}} - This macro converts the numeric expression ##//expr//## to an ##[[KeyPgUinteger Uinteger]]## value, then expands to an [[KeyPgUinteger Uinteger]] representing the value of its MSW. + Cette macro convertit l'expression numérique ##//expr//## en une valeur ##[[KeyPgUinteger UInteger]]##, qu'elle développe ensuite en un [[KeyPgUinteger UInteger]] représentant la valeur de son MSW. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/hiword.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ PRINT "The binary representation of the LSW is "; BIN(LOWORD(N)) SLEEP %% -The output would look like: +La sortie sera: %% N Is 2147614719 The Binary representation of N Is 10000000000000011111111111111111 @@ -45,10 +45,10 @@ The Binary representation of the LSW Is 1111111111111111 %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__HIWORD""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__HIWORD**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLoByte Lobyte]]## diff --git a/fbdocs/manual/cache/KeyPgHour.wakka b/fbdocs/manual/cache/KeyPgHour.wakka index af2ff16de1..ed3d6105fd 100644 --- a/fbdocs/manual/cache/KeyPgHour.wakka +++ b/fbdocs/manual/cache/KeyPgHour.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="HOUR"}}---- -Gets the hour of day from a [[ProPgDates Date Serial]] +Récupère l'heure à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Hour** ( [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,28 +10,28 @@ Gets the hour of day from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date serial + la "date serial" -{{fbdoc item="ret"}} - Returns the hour from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Retourne l'heure à partir d'une variable contenant une date sous forme de [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} -. - The compiler will not recognize this function unless ##vbcompat.bi## is included. +Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/dates/hour.bas"}}%%(freebasic) #include "vbcompat.bi" +Dim ds As Double = DateSerial(2005, 11, 28) + TimeSerial(7, 30, 50) -dim ds as double = DateSerial(2005, 11, 28) + TimeSerial(7, 30, 50) +Print Format(ds, "yyyy/mm/dd hh:mm:ss "); Hour(ds) -print format(ds, "yyyy/mm/dd hh:mm:ss "); Hour(ds) %% - {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS -{{fbdoc item="see"}} +- N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS + {{fbdoc item="see"}} + +- [[ProPgDates Date Serials]] - [[ProPgDates Date Serials]] {{fbdoc item="back" value="CatPgDate|Date and Time Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgIfthen.wakka b/fbdocs/manual/cache/KeyPgIfthen.wakka index d574550d0a..e91014de7a 100644 --- a/fbdocs/manual/cache/KeyPgIfthen.wakka +++ b/fbdocs/manual/cache/KeyPgIfthen.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="IF...THEN"}}---- -Control flow statement for conditional branching +Déclaration de contrôle de flux pour le branchement conditionnel {{fbdoc item="syntax"}}## **If** //expression// **Then** [//statement(s)//] [**Else** [//statement(s)//]] [**End If**] -//or// +//ou// **If** //expression// **Then** : [//statement(s)//] [**Else** [//statement(s)//]] : **End If** -//or// +//ou// **If** //expression// **Then** [//statement(s)//] [ **Elseif** //expression// **Then** ] @@ -15,21 +15,21 @@ Control flow statement for conditional branching **End If** ## {{fbdoc item="desc"}} - ##**If...Then**## is a way to make decisions. It is a mechanism to execute code only if a condition is true, and can provide alternative code to execute based on more conditions. + ##**If...Then**## est une méthode pour prendre des décisions. C'est un mécanisme qui permet d'exécuter du code que si une condition est vraie, et peut fournir une alternative de programmation de code à exécuter sur la base de plusieurs conditions. - ##//expression//## can be one of several forms: - - a conditional expression, for example: + ##//expression//## peut avoir une ces formes: + - une expression conditionnelle, par exemple: ##x = 5## - - multiple conditions separated by logical bit-wise operators, for example: + - conditions multiples séparées par des opérateurs logiques bit à bit, par exemple: ##x >= 5 [[KeyPgOpAnd And]] x <= 10## - - multiple conditions separated by logical short-circuit operators, for example: + - conditions multiples séparées par des opérateurs de court-circuit logique, par exemple: ##y <> 0 [[KeyPgOpAndAlso AndAlso]] x \ y = 1## - (in this case, "##x \ y = 1##" will only be evaluated if "##y <> 0##" is True) - - any numerical expression, in which case a value of zero (##0##) represents False, and a non-zero value represents True + (dans ce cas, "##x \ y = 1##" sera évalué seulement si "##y <> 0##" est Vrai (True)) + - toute expression numérique, dans ce cas une valeur de zéro (##0##) représente False (Faux) et une valeur non-nulle représente True (Vrai) - Both multi-line and single-line ##**If**##s can be nested. In the latter case, the optional ##**End If**##s can be useful to control where nested ##**If**##s begin and end. + Les ##**If**## multi/simple ligne peuvent être imbriqués. Dans ce dernier cas, les ##**End If**## facultatifs peuvent être utiles pour contrôler où les ##**If**## imbriqués commencent et finissent. - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, colons (##:##) can be used instead of newlines to construct multi-line ##**If**## blocks on a single line. + Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, deux-points (##:##) peuvent remplacer des lignes nouvelles pour construire des blocs ##**If**## multi-lignes sur une seule ligne. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/if-then.bas"}}%%(freebasic) @@ -61,11 +61,11 @@ loop 'Go back to the start of the loop %% {{fbdoc item="lang"}} - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, if there is a new line, a single-line comment (##'##), a colon (##:##), or a ##[[KeyPgRem Rem]]## statement directly after THEN, then the IF will be multi-line. Any other statement will result in a single-line IF. - In the //[[CompilerOptlang -lang qb]]// dialect, if there is a new line or a single-line comment (##'##) directly after THEN, then the IF will be multi-line. A colon, a ##[[KeyPgRem Rem]]## or any other statement will result in a single-line IF. + Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, s'il y a une nouvelle ligne, un commentaire sur une seule ligne (##'##), deux-points (##:##), ou une déclaration ##[[KeyPgRem Rem]]## directement après THEN, le IF sera multi-ligne. Toute autre déclaration donnera lieu à une seule ligne IF. + Dans le dialecte //[[CompilerOptlang -lang qb]]//, s'il y a une nouvelle ligne ou un commentaire sur une seule ligne (##'##) directement après THEN, le IF sera multi-lignes. Deux-points (##:##), un ##[[KeyPgRem Rem]]## ou toute autre déclaration donnera lieu à une seule ligne IF. {{fbdoc item="diff"}} - - END IF was not supported in single-line IFs in QBASIC. + - END IF n'était pas supporté dans les IF sur une seule ligne dans QBASIC. {{fbdoc item="see"}} - ##[[KeyPgDoloop Do...Loop]]## diff --git a/fbdocs/manual/cache/KeyPgIif.wakka b/fbdocs/manual/cache/KeyPgIif.wakka index d48d9280d7..094e6a205d 100644 --- a/fbdocs/manual/cache/KeyPgIif.wakka +++ b/fbdocs/manual/cache/KeyPgIif.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="IIF"}}---- -Conditional function that returns one of two values. +Fonction conditionnelle qui retourne une des deux valeurs. {{fbdoc item="syntax"}}## **IIf** ( //condition//, //expr_if_true//, //expr_if_false// ) ## {{fbdoc item="param"}} ##//condition//## - The condition to test. - A non-zero value evaluates as true, while a value of zero evaluates as false. + La condition à tester. + Une valeur non-nulle est équivalente à vrai (true), alors qu'une valeur de zéro est équivalente à faux (false). ##//expr_if_true//## - An expression to evaluate and return if ##//condition//## is true. - It must return a numeric value, which can be an integer, floating point number or a pointer. + Une expression à évaluer et à retourner si la ##//condition//## est vrai (true). + Elle doit retourner une valeur numérique, qui peut être un nombre entier, nombre à virgule flottante ou un pointeur. ##//expr_if_false//## - An expression to evaluate and return if ##//condition//## is false. - It must be the same type of number as ##//expr_if_true//##. + Une expression à évaluer et à retourner si la ##//condition//## est fausse (false). + Elle doit avoir le même type de nombre que ##//expr_if_true//##. {{fbdoc item="desc"}} - ##**IIf**## returns a different numeric value depending of the result of a conditional expression. Its typical use is in the middle of an expression; it avoids splitting it to put a conditional in the middle. + ##**IIf**## renvoie une valeur numérique différente selon le résultat d'une expression conditionnelle. Son utilisation typique est au milieu d'une expression; cela évite de la diviser pour placer une condition au milieu. - ##**IIf**## only evaluates the expression that it needs to return. This saves time, and can also be useful to prevent evaluating expressions that might be invalid depending on the ##//condition//##. + ##**IIf**## n'évalue que l'expression dont il a besoin pour la retourner. Cela économise du temps, et peut également être utile pour prévenir l'évaluation d'expressions qui pourraient être invalides en fonction de l'état de ##//condition//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/iif.bas"}}%%(freebasic) dim as integer a, b, x, y, z a = (x + y + iif(b > 0, 4, 7)) \ z %% -is equivalent to: +est équivalent à: {{fbdoc item="filename" value="examples/manual/control/iif2.bas"}}%%(freebasic) dim as integer a, b, x, y, z, temp if b > 0 then temp = 4 else temp = 7 @@ -33,10 +33,10 @@ a = (x + y + temp) \ z %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Iif""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Iif**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgIfthen If...Then]]## diff --git a/fbdocs/manual/cache/KeyPgImageConvertRow.wakka b/fbdocs/manual/cache/KeyPgImageConvertRow.wakka index 12820d66f8..953cdd6112 100644 --- a/fbdocs/manual/cache/KeyPgImageConvertRow.wakka +++ b/fbdocs/manual/cache/KeyPgImageConvertRow.wakka @@ -1,20 +1,20 @@ -{{fbdoc item="title" value="IMAGECONVERTROW"}}---- -Converts a row of image data into another color depth - -{{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgSub sub]] **""ImageConvertRow""** ( [[KeyPgByval byval]] //src// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //src_bpp// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //dst// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //dst_bpp// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //width// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //isrgb// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) -## -{{fbdoc item="usage"}}## - **""ImageConvertRow""**( //src//, //src_bpp//, //dst//, //dst_bpp//, //width// [, //isrgb// ] ) -## -{{fbdoc item="param"}} - ##//src//## - The address of the start of the source row. The source can either be a full-color image with a bit depth of 24 or 32 bits per pixel, or a paletted image with a bit depth of 1-8 bits per pixel. Converting a paletted image will only work properly if you are in a screen mode that is using the correct palette for the image when you do the conversion. - ##//src_bpp//## - The number of bits per pixel in the source row. 1-8, 24 and 32. - ##//dst//## - The address of the start of the destination row. The image can be a full-color image of 16 or 32 bits per pixel. If the source is a paletted image, the destination can also be a paletted image of 1 to 8 bits per pixel. - ##//dst_bpp//## +{{fbdoc item="title" value="ImageConvertRow"}}----
    +Convertit une ligne de données image dans une autre profondeur de couleur

    {{fbdoc item="syntax"}}##
    [[KeyPgDeclare Declare]] [[KeyPgSub Sub]] **ImageConvertRow** ( [[KeyPgByval ByVal]] //src// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]], [[KeyPgByval ByVal]] //src_bpp// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //dst// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]], [[KeyPgByval ByVal]] //dst_bpp// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //width// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //isrgb// [[KeyPgAs As]] [[KeyPgInteger Integer]] = 1 )
    ##
    + +{{fbdoc item="usage"}}##
    **ImageConvertRow**( //src//, //src_bpp//, //dst//, //dst_bpp//, //width// [, //isrgb// ] )
    ##
    + {{fbdoc item="param"}}
    ##//src//##
    L'adresse de départ de la ligne source. Lasource est soit une image pleine couleur (full-color) avec uneprofondeur de couleur de 24 ou 32 bits par pixel, soit une image avecpalette d'une profondeur de 1-8 bits par pixel. Convertir une imageavec palette ne fonctionnera correctement que si vous êtes dans un modeécran utilisant la palette correcte pour l'image lors de la conversion.
    +##//src_bpp//##
    Le nombre de bits par pixel dans la ligne source. 1-8, 24 et 32.
    +##//dst//##
    L'adresse du début de la ligne destination.L'image peut être une image pleine couleur de 16 ou 32 bits par pixel.Si la source est une image avec palette, la destination peut aussi êtreune image avec palette de 1 à 8 bits par pixel.
    + ##//dst_bpp//##
    Le nombre de bits par pixel dans la ligne destination. Valeurs valides: 1-8, 16 et 32.
    +##//width//##
    La longueur de la ligne en pixels.
    +##//isrgb//##
    Une valeur de zéro indique que les canaux Rougeet Bleu sont l'autre voie dans l'image source. Utilisez cet indicateursi vous voulez que les canaux Rouge et Bleu doivent être permutéspendant la conversion.

    + {{fbdoc item="desc"}}
    Copie une ligne d'une image d'uneposition mémoire vers une autre, convertit l'information couleur dechaque pixel pour correspondre à l'image destination.

    + {{fbdoc item="ex"}}
    %%(freebasic) + #include "fbgfx.bi"
    #if __FB_LANG__ = "fb"
    Using FB
    #endif

    Const As Integer w = 64, h = 64
    Dim As IMAGE Ptr img8, img32
    Dim As Integer x, y


    '' Cree une image 32-bit, taille w*h:
    ScreenRes 1, 1, 32, , GFX_NULL
    img32 = ImageCreate(w, h)

    If img32 = 0 Then Print "Imagecreate failed on img32!": Sleep: End


    '' Cree une image 8-bit, taille w*h:
    ScreenRes 1, 1, 8, , GFX_NULL
    img8 = ImageCreate(w, h)

    If img8 = 0 Then Print "Imagecreate failed on img8!": Sleep: End


    '' Remplit image 8-bit avec un motif
    For y = 0 To h - 1
    For x = 0 To w - 1
    PSet img8, (x, y), 56 + (x + y) Mod 24
    Next x
    Next y


    '' Ouvre une fenetre graphique en mode 8-bit, et PUT l' image dans celle-ci:
    ScreenRes 320, 200, 8
    WindowTitle "8-bit color mode"
    Put (10, 10), img8

    Sleep


    '' Copie les donnees image dans une image 32-bit
    Dim As Byte Ptr p8, p32
    Dim As Integer pitch8, pitch32

    #ifndef ImageInfo '' older versions of FB don't have the ImageInfo feature
    #define GETPITCH(img_) IIf(img_->Type=PUT_HEADER_NEW,img_->pitch,img_->old.width*img_->old.bpp)
    #define GETP(img_) CPtr(Byte Ptr,img_)+IIf(img_->Type=PUT_HEADER_NEW,SizeOf(PUT_HEADER),SizeOf(_OLD_HEADER))
    pitch8 = GETPITCH(img8): p8 = GETP(img8)
    pitch32 = GETPITCH(img32): p32 = GETP(img32)
    #else
    ImageInfo( img8, , , , pitch8, p8 )
    ImageInfo( img32, , , , pitch32, p32 )
    #endif

    For y = 0 To h - 1
    ImageConvertRow(@p8 [ y * pitch8 ], 8, _
    @p32[ y * pitch32], 32, _
    w)
    Next y


    '' Ouvre une fenetre graphique en mode 32-bit et PUT l' image sur celle-ci:
    ScreenRes 320, 200, 32
    WindowTitle "32-bit color mode"
    Put (10, 10), img32

    Sleep


    '' Libere la memoire des images:
    ImageDestroy img8
    ImageDestroy img32
    + ##

    + {{fbdoc item="lang"}}
    - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__ImageConvertRow**##.

  • + {{fbdoc item="diff"}}
    - Nouveau pour FreeBASIC

    + {{fbdoc item="see"}}
    - ##[[KeyPgScreenres ScreenRes]]##
    - ##[[KeyPgGetgraphics Get (Graphique)]]##
    - ##[[KeyPgPutgraphics Put (Graphique)]]##
    - ##[[KeyPgImagecreate ImageCreate]]##
    - ##[[KeyPgImageDestroy ImageDestroy]]##
    - ##[[KeyPgImageInfo ImageInfo]]##

    The number of bits per pixel in the destination row. Valid values for this are 1-8, 16 and 32. ##//width//## The length of the row in pixels. diff --git a/fbdocs/manual/cache/KeyPgImageDestroy.wakka b/fbdocs/manual/cache/KeyPgImageDestroy.wakka index c2eea94fb3..9ff39025eb 100644 --- a/fbdocs/manual/cache/KeyPgImageDestroy.wakka +++ b/fbdocs/manual/cache/KeyPgImageDestroy.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="IMAGEDESTROY"}}---- -Destroys and deallocates storage for an image +Détruit et libère une image (stockage en mémoire) {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgSub sub]] **""ImageDestroy""** ( [[KeyPgByval byval]] //image// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) + [[KeyPgDeclare Declare]] [[KeyPgSub Sub]] **ImageDestroy** ( [[KeyPgByval ByVal]] //image// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] ) ## {{fbdoc item="usage"}}## - **""ImageDestroy""**( //image// ) + **ImageDestroy**( //image// ) ## {{fbdoc item="param"}} ##//image//## - The address of the image to destroy. + Adresse de l'image à détruire. {{fbdoc item="desc"}} - Destroys the image pointed to by ##//image//##, which must be an address returned from a call to ##[[KeyPgImagecreate ImageCreate]]##. + Détruit l'image pointée par ##//image//##, qui doit être une adresse retournée par un appel à ##[[KeyPgImagecreate ImageCreate]]##. {{fbdoc item="ex"}} - See ##[[KeyPgImagecreate ImageCreate]]## for an example on using ##**""ImageDestroy""**##. + Voir la fonction ##[[KeyPgImagecreate ImageCreate]]## pour un exemple d'utilisation de ##**ImageDestroy**##. -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Imagedestroy""**##. +{{fbdoc item="section" value="Différences de Dialecte + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Imagedestroy**##. -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +{{fbdoc item="section" value="Differences avec QB + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgImagecreate ImageCreate]]## diff --git a/fbdocs/manual/cache/KeyPgImageInfo.wakka b/fbdocs/manual/cache/KeyPgImageInfo.wakka index ebf0167c94..b9fb4e301b 100644 --- a/fbdocs/manual/cache/KeyPgImageInfo.wakka +++ b/fbdocs/manual/cache/KeyPgImageInfo.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="IMAGEINFO"}}---- -Retrieves information about an image +Récupère les informations sur une image {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Imageinfo** ( [[KeyPgByval byval]] //image// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByref byref]] //width// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //height// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //bypp// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //pitch// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //pixdata// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0, [[KeyPgByref byref]] //size// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,29 +9,94 @@ Retrieves information about an image ## {{fbdoc item="param"}} ##//image//## - The address of the image. + L'addresse de l'image. ##//width//## - Stores the width of the image, in pixels. + Stocke la largeur de l'image, en pixels. ##//height//## - Stores the height of the image, in pixels. + Stocke la hauteur de l'image, en pixels. ##//bypp//## - Stores the bytes per pixel of the image - i.e. the size of a single pixel, in bytes. + Stocke le nombre d'octets par pixel de l'image - c.a.d. la taille d'un seul pixel, en octets. ##//pitch//## - Stores the pitch of the image - i.e. the size of each scanline (row), in bytes. Note that this may be more than just ##//width// * //bypp//##, because the scanlines may be padded to allow them to be aligned better in memory. - ##//pixdata//## - Stores the address of the start of the first scanline of the image. - ##//size//## - Stores the size of the image in memory, in bytes. + Stocke le "pitch" de l'image - c.a.d. la taille de chaque ligne (row), en octets. + Notez que ceci est meilleur que simplement ##//width (largeur)// * //bypp//##, car les lignes peuvent être modifiées pour un meilleur alignement en mémoire. + ##//pixdata//## + Stocke l'adresse de début de la première ligne de l'image. + ##//size//## -{{fbdoc item="ret"}} - If ##//image//## doesn't point to a valid image, one (##1##) is returned. Otherwise, ##//width//##, ##//height//##, ##//bypp//##, ##//pitch//##, ##//pixdata//## and ##//size//## are assigned appropriate values, and zero (##0##) is returned. +Stocke la taille de la mémoire image, en octets. + {{fbdoc item="section" value="Valeur Retournée -{{fbdoc item="desc"}} - ##**""ImageInfo""**## provides various information about an image, such as its dimensions and color depth, but also provides you with the information you need to directly access all the pixel data in the pixel buffer. +Si ##//image//## ne pointe pas sur une image valide, un (##1##) est retourné. Sinon, ##//width//##, ##//height//##, ##//bypp//##, ##//pitch//##, ##//pixdata//## et ##//size//## reçoivent les valeurs appropriées, et zéro (##0##) est retourné. + {{fbdoc item="desc"}} - It can also provide the size of the image in memory, which is useful for allocating memory to copy the existing image, or to write the image to a file. + ##**ImageInfo**## procure des informations variées sur une image, comme ses dimensions et sa profondeur de couleur, mais aussi les informations nécessaires pour accéder directement à toutes les données pixel du tampon. +##**ImageInfo**## procure aussi la taille de l'image en mémoire, ce qui est utile pour l'allocation de mémoire pour copier l'image existante, ou pour écrire l'image dans un fichier. {{fbdoc item="ex"}} +'' pixelptr(): use imageinfo() to find the pointer to a pixel in the image +'' Cree ecran graphique 32-bit et image. +ScreenRes 320, 200, 32 + + Dim image As Any Ptr = ImageCreate( 64, 64 ) + Dim pitch As Integer + Dim pixels As Any Ptr + + '' Obtient assez d'informations pour se deplacer dans donnees pixel. + + If 0 <> ImageInfo( image, ,,, pitch, pixels ) Then + Print "unable to retrieve image information." + Sleep + End + End If + '' Dessine un motif sur l'image en manipulant directement pixel en memoire. + For y As Integer = 0 To 63 + +Dim row As UInteger Ptr = pixels + y * pitch + +For x As Integer = 0 To 63 + +row[x] = RGB(x * 4, y * 4, (x Xor y) * 4) +Next x + +Next y + +'' Dessine l'image sur l'screen. + +Put (10, 10), image + +ImageDestroy( image ) + + Sleep + %% + +
    + + {{fbdoc item="lang"}} + - Non accessible en dialecte //[[CompilerOptlang -lang qb]]// saut si référencé avec l'alias ##**__Imageinfo**##. + {{fbdoc item="diff"}} + + - Nouveau pour FreeBASIC + {{fbdoc item="see"}} + + - ##[[KeyPgImagecreate ImageCreate]]## + + - ##[[KeyPgImageDestroy ImageDestroy]]## + + - ##[[KeyPgImageConvertRow ImageConvertRow]]## + - ##[[KeyPgGetgraphics Get (Graphique)]]## + - ##[[KeyPgPutgraphics Put (Graphique)]]## + + - [[GfxInternalFormats Formats graphiques internes]] + imagedestroy ip + +else + print "Error creating image!" +end if + +sleep +%% +{{image class="center" title="Output image for pixelptr() example" url="/images/pixelptr.png"}} + {{fbdoc item="filename" value="examples/manual/gfx/imageinfo.bas"}}%%(freebasic) '' Create 32-bit graphics screen and image. screenres 320, 200, 32 @@ -65,7 +130,6 @@ sleep %% {{image class="center" title="Output image for ImageInfo example" url="/images/imageinfo.png"}} - {{fbdoc item="lang"}} - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Imageinfo""**##. diff --git a/fbdocs/manual/cache/KeyPgImagecreate.wakka b/fbdocs/manual/cache/KeyPgImagecreate.wakka index c9561a6bb0..b57e37e191 100644 --- a/fbdocs/manual/cache/KeyPgImagecreate.wakka +++ b/fbdocs/manual/cache/KeyPgImagecreate.wakka @@ -1,53 +1,55 @@ -{{fbdoc item="title" value="IMAGECREATE"}}---- -Allocates and initializes storage for an image - -{{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""ImageCreate""** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //width// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //height// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //color// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] = **transparent_color** ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""ImageCreate""** ( [[KeyPgByval byval]] //width// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //height// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //color// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] = **transparent_color**, [[KeyPgByval byval]] //depth// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] -## -{{fbdoc item="usage"}}## - //result// = **""ImageCreate""**( //width//, //height// [, [ //color// ][, //depth// ]] ) -## -{{fbdoc item="param"}} - ##//width//## - The desired width, in number of pixels. - ##//height//## - The desired height, in number of pixels. - ##//color//## - The pixel value to fill the area of the image. - ##//depth//## - The desired color depth, in bits per pixel. - -{{fbdoc item="ret"}} - If the image could not be created, NULL (##0##) is returned. Otherwise, the address of the image is returned. - -{{fbdoc item="desc"}} - Both procedures attempt to allocate memory for an image of the specified ##//width//## and ##//height//##. If not successful, NULL (##0##) is returned. Otherwise, an image of that size is created and initialized by filling the entire area of pixels with the value ##//color//##. If not specified, ##//color//## assumes the value of the transparent color for the current graphics screen, which can be found by calling ##[[KeyPgScreencontrol ScreenControl]]##. In any case, the address of the image is returned, which is then controlled by the user, and must be destroyed using ##[[KeyPgImageDestroy ImageDestroy]]##. - - The first procedure creates an image with a color depth matching that of the current graphics screen, which can be found by calling ##[[KeyPgScreencontrol ScreenControl]]##. The second procedure creates an image with a color depth of ##//depth//##, in bits per pixel. For both procedures, the resulting image can be used in drawing procedures while in any screen mode -- and across mode changes -- as long as the color depth of the image matches that of the graphics screen. - - ##**""ImageCreate""**## is the recommended way to allocate memory for new images. The memory layout -- size, structure, etc. -- while documented, may change from version to version, making manual calculation of the sizes involved error-prone. However, ##[[KeyPgImageInfo ImageInfo]]## can be used to retrieve, among other things, the size, in bytes, of an existing image, allowing memory to be manually allocated for a copy of an image, or to be read from or written to a file or device. - - ##[[KeyPgGetgraphics Get (Graphics)]]## can be used to initialize an image using pre-allocated memory. - -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/imagecreate.bas"}}%%(freebasic) -'' Create a graphics screen. -screenres 320, 200, 32 - -'' Create a 64x64 pixel image with a darkish green background. -dim image as any ptr = imagecreate( 64, 64, rgb(0, 128, 0) ) - -if image = 0 then - print "Failed to create image." - sleep - end -1 -end if - -'' Draw a semi-transparent, red circle in the center of the image. -circle image, (32, 32), 28, rgba(255, 0, 0, 128),,, 1.0, f - -'' Draw the image onto the screen using various blitting methods. +{{fbdoc item="title" value="ImageCreate"}}----
    +Alloue et initialise une image (stockage en mémoire)

    {{fbdoc item="syntax"}}##
    [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **ImageCreate** [[KeyPgOverload Overload]] ( [[KeyPgByval ByVal]] //width// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //height// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //color// [[KeyPgAs As]] [[KeyPgUinteger UInteger]] = **transparent_color** ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] + +[[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **ImageCreate** ( [[KeyPgByval ByVal]] //width// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //height// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //color// [[KeyPgAs As]] [[KeyPgUinteger UInteger]] = **transparent_color**, [[KeyPgByval ByVal]] //depth// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] + ##
    + {{fbdoc item="usage"}}##
    //result// = **ImageCreate**( //width//, //height// [, [ //color// ][, //depth// ]] ) +##
    +{{fbdoc item="param"}}
    ##//width//##
    La largeur désirée, en nombre de pixels.
    + ##//height//##
    La hauteur désirée, en nombre de pixels.
    +##//color//##
    Valeur du pixel pour remplir l'image.
    +##//depth//##
    La profondeur de couleur, en bits par pixel.

    + {{fbdoc item="section" value="Valeur renvoyée +
    Si l'image ne peut être créée NULL (##0##) est renvoyé. Sinon, c'est l'adresse de l'image qui est renvoyée.

    + {{fbdoc item="desc"}}
    Les deux procédures essaient d'allouer de la mémoire pour une image de dimensions: ##//width (largeur)//## et ##//height(hauteur)//##. Si échec, un NULL (##0##) est renvoyé. Sinon, une image est créée et initialisée en la remplissant entièrement avec des pixels de valeur ##//color//##. Si omis, ##//color//## prend la valeur de la couleur transparente pour l'écran graphique courant, qui peut être déterminée en appelant ##[[KeyPgScreencontrol ScreenControl]]##. Dans tous les cas, l'adresse de l'image est retournée, qui est ensuite contrôlée par l'utilisateur, et peut être détruite en utilisant ##[[KeyPgImageDestroy ImageDestroy]]##.]]##.

    La première procédure crée une image avec une profondeur de couleur correspondant à celle de l'écran graphique courant, qui peut être déterminée en appelant ##[[KeyPgScreencontrol ScreenControl]]##. La seconde procédure crée une image avec une profondeur de couleur ##//depth//##, en bits par pixel. Pour chaque procédure, l'image obtenue peut être utilisée dans l'élaboration de procédures dans n'importe quel mode écran - et à travers les changements de mode - tant que la profondeur de couleur de l'image correspond à celle de l'écran graphique. +
    Les images inutiles seront détruites avec ##[[KeyPgImageDestroy ImageDestroy]]##, pour éviter des problèmes de mémoire.

    ##**ImageCreate**## est la méthode recommandée pour allouer de la mémoire pour de nouvelles images. La disposition de la mémoire - la taille, structure, etc - bien que documentée, peut changer d'une version à une autre, rendant le calcul manuel des tailles difficile et sujet à erreurs. Cependant, ##[[KeyPgImageInfo ImageInfo]]## peut être utilisé pour déterminer, entre autres, la taille, en octets, d'une image existant, permettant ainsi d'allouer de la mémoire manuellement pour une copie d'image, ou pour une lecture ou une écriture à partir d'un fichier ou d'un "device". +
    ##[[KeyPgGetgraphics Get (Graphique)]]## peut être utilisé pour initialiser une image en utilisant la mémoire pré-allouée. +
    + {{fbdoc item="ex"}}
    %%(freebasic) + '' Cree un ecran graphique. + +ScreenRes 320, 200, 32 + '' Cree une image 64x64 pixels avec un arriere-plan vert fonce. + + Dim image As Any Ptr = ImageCreate( 64, 64, RGB(0, 128, 0) ) + +If image = 0 Then + Print "Failed to create image." + + Sleep + + End -1 + + End If + +'' Dessine un cercle rouge semi-transparent, au centre de l'image. +Circle image, (32, 32), 28, RGBA(255, 0, 0, 128),,, 1.0, f +'' Dessine l'image sur l'ecran en utilisant differentes methodes. +Put (120, 60), image, PSet + +Put (140, 80), image, Alpha +'' Detruit l'image. + +ImageDestroy image + Sleep + ##
    +


    +{{fbdoc item="section" value="Différences de Dialecte + +
    - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf référencé avec l'alias ##**__Imagecreate**##.

    +{{fbdoc item="diff"}}
    - Nouveau pour FreeBASIC

    + +{{fbdoc item="see"}}
    - ##[[KeyPgGetgraphics Get (Graphique)]]##
    - ##[[KeyPgImageInfo ImageInfo]]##
    - ##[[KeyPgImageDestroy ImageDestroy]]##
    - [[GfxInternalFormats Formats graphiques internes]]

    put (120, 60), image, pset put (140, 80), image, alpha diff --git a/fbdocs/manual/cache/KeyPgImport.wakka b/fbdocs/manual/cache/KeyPgImport.wakka index f50a2f83cb..422b12218b 100644 --- a/fbdocs/manual/cache/KeyPgImport.wakka +++ b/fbdocs/manual/cache/KeyPgImport.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="IMPORT"}}---- -External linkage attribute for public data located in DLL's +Attribut de liaison externe pour des données publiques situées dans une DLL {{fbdoc item="syntax"}}## [[KeyPgExtern Extern]] **Import** //symbolname//[( //subscripts//)] [ [[KeyPgAlias alias]] "//aliasname//"] [ [[KeyPgAs as]] [[DataType DataType]]] [, ...] ## {{fbdoc item="desc"}} - Is used only on Win32 platforms with the ##[[KeyPgExtern Extern]]## keyword and is needed to access global variables in DLLs. This is due to the level of indirection on any such access: an implicit pointer dereference. + Est utilisé seulement sur les plates-formes Win32 avec le mot-clef ##[[KeyPgExtern Extern]]## et est nécessaire pour accéder aux variables globales dans les DLLs. Cela est dû au niveau d'indirection sur un tel accès: une déréférence de pointeur implicite. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/mydll.c"}}%%(c) @@ -33,10 +33,10 @@ Print "&h" + Hex( MyDll_Data ) {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Import""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Import**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgExtern Extern]]## diff --git a/fbdocs/manual/cache/KeyPgInclib.wakka b/fbdocs/manual/cache/KeyPgInclib.wakka index dc347bd2f7..e129b98169 100644 --- a/fbdocs/manual/cache/KeyPgInclib.wakka +++ b/fbdocs/manual/cache/KeyPgInclib.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="#INCLIB"}}---- -Preprocessor directive +Directive du préprocesseur {{fbdoc item="syntax"}}## **#inclib** //"libname"// ## {{fbdoc item="desc"}} - Includes a library in the linking process as if the user specified ##[[CompilerOptl -l libname]]## on the command line. + Inclusion d'une librairie dans le processus de lien comme si l'utilisateur spécifiait ##[[CompilerOptl -l libname]]## sur la ligne de commande. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/inclib.bas"}}%%(freebasic) @@ -16,11 +16,11 @@ Preprocessor directive %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgInclude #include]]## - - [[CompilerOptl Compiler Option: -l]] - - [[CompilerOptp Compiler Option: -p]] + - [[CompilerOptl Option du compilateur: -l]] + - [[CompilerOptp Option du compilateur: -p]] {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgInclude.wakka b/fbdocs/manual/cache/KeyPgInclude.wakka index f0ac96d6cc..36815a6090 100644 --- a/fbdocs/manual/cache/KeyPgInclude.wakka +++ b/fbdocs/manual/cache/KeyPgInclude.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="#INCLUDE"}}---- -Preprocessor statement to include contents of another source file +Directive du préprocesseur pour inclure le contenu d'un autre fichier source {{fbdoc item="syntax"}}## **#include** [once] //"file"// ## {{fbdoc item="desc"}} - ##**#include**## inserts source code from another file at the point where the ##**#include**## directive appears. This has the effect of compiling the source code from the include file as though it were part of the source file that includes it. Once the compiler has reached the end of the include file, the original source file continues to be compiled. + ##**#include**## insère le code source d'un autre fichier à l'endroit où la directive ##**#include**## apparaît. Cela revient à compiler le code source du fichier inclus comme si c'était une partie du fichier source où il est inclus. Dès que le compilateur a atteint la fin du fichier inclus, la compilation du fichier source d'origine continue. - This is useful to remove code from a file and separate it into more files. It is useful to have a single file with declarations in a program formed by several modules. You may include files within an include file, although avoid including the original file into itself, this will not produce valid results. Typically, include files will have an extension of ##.bi## and are mainly used for declaring subs/functions/variables of a library, but any valid source code may be present in an include file. + Ceci est utile pour supprimer du code d'un fichier et le séparer en plusieurs fichiers. Il est utile d'avoir les déclarations dans un seul fichier dans un programme constitué de plusieurs modules. Vous pouvez inclure des fichiers dans un "fichier include", afin d'éviter d'inclure le fichier d'origine en lui-même, cela pas produira pas des résultats valides. En règle générale, les fichiers "include" ont une extension ##.bi## et sont principalement utilisés pour déclarer des sous-programmes / fonctions / variables d'une librairie, mais n'importe quel code source valide peut être présent dans un "fichier include". - The ##**once**## specifier tells the compiler to include the file only once even if it is included several times by the source code. + Le spécificateur ##**once**## indique au compilateur de n'inclure le fichier qu'une seule fois, même s'il est inclus à plusieurs reprises dans le code source. - ##[[KeyPgMetaInclude $Include]]## is an alternative form of ##**include**##, existing only for compatibility with ""QuickBASIC"". It is recommended to use ##**#include**## instead. + ##[[KeyPgMetaInclude $Include]]## est une forme alternative pour ##**include**## qui n'existe que pour la compatibilité avec QuickBASIC. Il est recommandé d'utiliser ##**#include**## à la place. - The compiler will automatically convert path separator characters ( '**##/##**' and '**##\##**' ) as needed to properly load the file. The filename name may be an absolute or relative path. + Le compilateur va automatiquement convertir les caractères séparateur de chemin ( '**##/##**' et '**##\##**' ) comme nécessaire pour charger correctement le fichier. Le nom de fichier peut être un chemin absolu ou relatif. - For relative paths, or where no path is given at all, the include file is search for in the following order: - - Relative from the directory of the source file - - Relative from the current working directory - - Relative from addition directories specified with the //[[CompilerOpti -i]]// command line option - - The include folder of the ""FreeBASIC"" installation (##**""FreeBASIC""\inc**##, where ##**""FreeBASIC""**## is the folder where the ##**fbc**## executable is located) + Pour les chemins relatifs, ou si aucun chemin d'accès n'est donné, le fichier d'inclusion est recherché dans l'ordre suivant: + - Relatif par rapport au répertoire du fichier source + - Relatif par rapport au répertoire de travail courant + - Relatif par rapport aux répertoires additionnels specifiés avec l'option //[[CompilerOpti -i]]// de la ligne de commande + - Le dossier "include" de l'installation de FreeBASIC (##**FreeBASIC\inc**##, où ##**FreeBASIC**## est le dossier où est situé l'exécutable ##**fbc**##) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/header.bi"}}%%(freebasic) @@ -40,11 +40,11 @@ Foo.Bar = 1 Foo.Barbeque = 2 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## - ##[[KeyPgInclib #inclib]]## - - [[CompilerOpti Compiler Option: -i]] + - [[CompilerOpti Option du compilateur: -i]] {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgInkey.wakka b/fbdocs/manual/cache/KeyPgInkey.wakka index 27941d12e2..8f2fa6c30e 100644 --- a/fbdocs/manual/cache/KeyPgInkey.wakka +++ b/fbdocs/manual/cache/KeyPgInkey.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="INKEY"}}---- -Returns a string representing the first key waiting in the keyboard buffer +Renvoie une chaîne représentant la première touche en attente dans la mémoire tampon du clavier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Inkey** ( ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,17 +7,17 @@ Returns a string representing the first key waiting in the keyboard buffer {{fbdoc item="usage"}}## //result// = **Inkey**[$] ## -{{fbdoc item="ret"}} - The first character found in the keyboard buffer, or an empty string (##"####"##) if none found. +{{fbdoc item="section" value="Valeur retournée + Le premier caractère trouvé dans le tampon de clavier ou une chaîne vide (##"####"##) si rien n'est trouvé. {{fbdoc item="desc"}} - Peeks into the keyboard buffer and returns a ##[[KeyPgString String]]## representation of the first character, if any, found. The key is then removed from the buffer, and is not echoed to the screen. If the keyboard buffer is empty, an empty string (##"####"##) is immediately returned without waiting for keys. + Vérifie rapidement dans la mémoire tampon du clavier et retourne une représentation ##[[KeyPgString String]]## du premier caractère, s'il y en a un de trouvé. La touche est ensuite retirée de la mémoire tampon et n'est pas envoyée à l'écran. Si la mémoire tampon du clavier est vide, une chaîne vide (##"####"##) est retournée immédiatement, sans attendre d'autres touches. - If the key is in the ASCII character set, a one-character ##[[KeyPgString String]]## consisting of that character is returned. If the key is an "extended" one (numeric pad, cursors, functions) a two-character ##[[KeyPgString String]]## is returned, the first of which is the extended character (//See dialect differences below//) + Si la valeur est dans le jeu de caractères ASCII, une ##[[KeyPgString String]]## d'un seul caractère correspondant à cette valeur est retournée. Si la touche est une touche "étendue" (pavé numérique, curseur, fonctions) une ##[[KeyPgString String]]## de deux caractères est retournée, dans laquelle le premier représente le caractère étendu (//Voir ci-dessous différences de dialecte//) - The ""Shift"", ""Ctrl"", ""Alt"", and ""AltGr"" keys can't be read independently by this function as they never enter the keyboard buffer (although, perhaps obviously, Shift-A will be reported by ##**Inkey**## differently than Control-A et cetera; Alt-A is an extended key a la the above). + Les touches Shift, Ctrl, Alt et AltGr ne peut pas être lues indépendamment par cette fonction car elles n'entrent jamais dans la mémoire tampon du clavier (bien que, de toute évidence, Shift-A sera signalé par ##**Inkey**## différemment de Control-A et ainsi de suite; Alt-A est une touche étendue comme ci-dessus). - See also ##[[KeyPgInputnum Input()]]## or ##[[KeyPgGetkey Getkey]]##, or ##[[KeyPgSleep Sleep]]## to wait for a key press if the keyboard buffer is empty. + Voir aussi ##[[KeyPgInputnum Input()]]## ou ##[[KeyPgGetkey GetKey]]##, ou ##[[KeyPgSleep Sleep]]## pour attendre une touche si la mémoire tampon du clavier est vide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/inkey.bas"}}%%(freebasic) @@ -50,51 +50,61 @@ Do Case Chr$(27): Print "Escape" Case Chr$(32) To Chr$(127) - Print "Printable character: " & k + + Print "Printable character: " & k Case EXTCHAR & "G": Print "Up Left / Home" - Case EXTCHAR & "H": Print "Up" - Case EXTCHAR & "I": Print "Up Right / PgUp" + Case EXTCHAR & "H": Print "Up" + Case EXTCHAR & "I": Print "Up Right / PgUp" Case EXTCHAR & "K": Print "Left" Case EXTCHAR & "L": Print "Center" - Case EXTCHAR & "M": Print "Right" + Case EXTCHAR & "M": Print "Right" Case EXTCHAR & "O": Print "Down Left / End" Case EXTCHAR & "P": Print "Down" - Case EXTCHAR & "Q": Print "Down Right / PgDn" + Case EXTCHAR & "Q": Print "Down Right / PgDn" Case EXTCHAR & Chr$(59) To EXTCHAR & Chr$(68) - Print "Function key: F" & Asc(k, 2) - 58 + Print "Function key: F" & Asc(k, 2) - 58 Case EXTCHAR & Chr$(133) To EXTCHAR & Chr$(134) - Print "Function key: F" & Asc(k, 2) - 122 + Print "Function key: F" & Asc(k, 2) - 122 + Case Else - If Len(k) = 2 Then - Print Using "Extended character: chr$(###, ###)"; Asc(k, 1); Asc(k, 2) - ElseIf Len(k) = 1 Then - Print Using "Character chr$(###)"; Asc(k) - End If - End Select + If Len(k) = 2 Then + Print Using "Extended character: chr$(###, ###)"; Asc(k, 1); Asc(k, 2) - If k = Chr$(27) Then Exit Do + ElseIf Len(k) = 1 Then + Print Using "Character chr$(###)"; Asc(k) - Sleep 1, 1 + End If + End Select + If k = Chr$(27) Then Exit Do + Sleep 1, 1 + Loop + %% -Loop -%% + {{fbdoc item="lang"}} + + - Le caractère étendu est ##[[KeyPgChr Chr]](255)## dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//. + + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, le caractère étendu dépend de la façon dont le mot-clé est écrit. Si la forme ##**Inkey$**## est utilisée, le caractère étendu est ##[[KeyPgChr Chr]](0)##. Si elle est référencée comme ##**__Inkey**##, le char est étendu ##[[KeyPgChr Chr]](255)##. -{{fbdoc item="lang"}} - - The extended character is ##[[KeyPgChr Chr]](255)## in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects. - - In the //[[CompilerOptlang -lang qb]]// dialect, the extended character depends on how the keyword is written. If the QB form ##**Inkey$**## is used, the extended character is ##[[KeyPgChr Chr]](0)##. If it is referenced as ##**""__Inkey""**##, the extended char is ##[[KeyPgChr Chr]](255)##. - - In all other dialects, the extended char is always ##[[KeyPgChr Chr]](255)##. - - The string type suffix ##$## is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects, but required in the //[[CompilerOptlang -lang qb]]// dialect. +- Dans tous les autres dialectes, le caractère étendu est toujours ##[[KeyPgChr Chr]](255)##. +- Le suffixe de type chaîne ##$## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//, mais nécessaire en dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - None in the //[[CompilerOptlang -lang qb]]// dialect. - - QBasic returned a ##[[KeyPgChr Chr]](0)## as the first character for an extended key, but FreeBASIC returns ##[[KeyPgChr Chr]](255)## as the first character in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Aucune dans le dialecte //[[CompilerOptlang -lang qb]]//. + - QBasic retourne un ##[[KeyPgChr Chr]](0)## comme premier caractère pour une touche étendue, mais FreeBASIC retourne ##[[KeyPgChr Chr]](255)## comme premier caractère dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//. + {{fbdoc item="see"}} + - ##[[KeyPgSleep Sleep]]## + +- ##[[KeyPgGetkey GetKey]]## + - ##[[KeyPgInputnum Input()]]## + - ##[[KeyPgMultikey MultiKey]]## {{fbdoc item="see"}} - ##[[KeyPgSleep Sleep]]## diff --git a/fbdocs/manual/cache/KeyPgInp.wakka b/fbdocs/manual/cache/KeyPgInp.wakka index ff2190001f..ddc5aa179a 100644 --- a/fbdocs/manual/cache/KeyPgInp.wakka +++ b/fbdocs/manual/cache/KeyPgInp.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="INP"}}---- -Returns a value at a hardware port. +Retourne une valeur depuis un port "hardware". {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Inp** ( [[KeyPgByval byval]] //port// [[KeyPgAs as]] [[KeyPgUshort ushort]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,24 +9,24 @@ Returns a value at a hardware port. ## {{fbdoc item="param"}} ##//port//## - Port number to read. + Numéro du port à lire. -{{fbdoc item="ret"}} - The value at the specified port. +{{fbdoc item="section" value="Valeur renvoyée + La valeur lue sur le port spécifié. {{fbdoc item="desc"}} - This function retrieves the value at 'port' and returns immediately. + Cette fonction récupère la valeur sur 'port' et la renvoie immédiatement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/hardware/inp.bas"}}%%(freebasic) '' Turn off PC speaker out &h61,inp(&h61) and &hfc -%% +%% {{fbdoc item="target"}} - - In the Windows and Linux versions three port numbers (&H3C7, &H3C8, &H3C9) are hooked by the graphics library when a graphics mode is in use to emulate QB's VGA palette handling. This use is deprecated; use ##[[KeyPgPalette Palette]]## to retrieve and set palette colors. + - Dans les versions Windows et Linux trois numéros de port (&H3C7, &H3C8, &H3C9) sont réservés par la librairie graphique quand un mode graphique est utilisé pour émuler une palette VGA QB. Cette utilisation est obsolète; utilisez ##[[KeyPgPalette Palette]]## pour récupérer ou valider une palette de couleurs. - - Using true port access in the Windows version requires the program to install a device driver for the present session. For that reason, Windows executables using hardware port access should be run with administrator permits each time the computer is restarted. Further runs don't require admin rights as they just use the already installed driver. The driver is only 3K in size and is embedded in the executable. + - L'utilisation d'un accès "true port" dans la version Windows implique que le programme installe un "driver" de "device" pour la session en cours. Pour cette raison, les exécutables Windows utilisant un accès port "hardware" doivent être lancés avec des permissions administrateur pour chaque redémarrage de l'ordinateur. Les lancements ultérieurs n'auront pas besoin de ces droits car il ne font qu'utiliser le driver déjà installé. Le driver n'a qu'une taille de 3K et est intégré dans l'exécutable. {{fbdoc item="see"}} - ##[[KeyPgOut Out]]## diff --git a/fbdocs/manual/cache/KeyPgInputPp.wakka b/fbdocs/manual/cache/KeyPgInputPp.wakka index 7d2ab44506..88cef914b3 100644 --- a/fbdocs/manual/cache/KeyPgInputPp.wakka +++ b/fbdocs/manual/cache/KeyPgInputPp.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="INPUT #"}}---- -Reads a list of values from a text file +Lit une liste de valeurs à partir d'un fichier texte {{fbdoc item="syntax"}}## **Input** # //filenum//, //variable_list// ## {{fbdoc item="param"}} ##//filenum//## - a file number of a file or device opened for ##[[KeyPgInputfilemode Input]]## + un numéro de fichier d'un fichier ou d'un dispositif ouvert avec ##[[KeyPgInputfilemode Input]]## ##//variable_list//## - a list of variables used to hold the values read + une liste des variables utilisées pour stocker les valeurs lues {{fbdoc item="desc"}} - Reads from a text file through a bound file number a delimiter-separated set of values and writes them in reading order into the variables in ##//variable_list//##. If a variable is numeric the read value is converted from its string representation into the corresponding type. + Lit à partir d'un fichier texte par l'intermédiaire d'un numéro de fichier un ensemble de valeurs séparées par un délimiteur et les écrit dans l'ordre de la lecture dans les variables de ##//variable_list//##. Si une variable est numérique la valeur lue est convertie à partir de sa représentation sous forme de chaîne dans son type correspondant. - Numeric values are converted in a similar way to the procedures ##[[KeyPgVal Val]]## and ##[[KeyPgVallng ValLng]]##, using the most appropriate function for the number format. + Les valeurs numériques sont converties de la même façon que les procédures ##[[KeyPgVal Val]]## et ##[[KeyPgVallng ValLng]]##, en utilisant la fonction la plus appropriée pour le format du nombre. - Delimiters may be commas or line breaks. Whitespace is also treated as a separator after numbers. A string including a comma or a whitespace must be surrounded by double quotes. + Les délimiteurs peuvent être des virgules ou des sauts de ligne. Un espace blanc est considéré comme séparateur après les nombres. Une chaîne contenant des virgules ou espaces blancs doit être encadrée par des guillemts doubles. - To read an entire line into a string, use ##[[KeyPgLineinputPp Line Input]]## instead. - [[KeyPgWritePp Write #]] can be used to create a file readable with ##**""Input #""**##. + Pour lire une ligne entière dans une chaîne, utilisez plutôt ##[[KeyPgLineinputPp Line Input]]##. + [[KeyPgWritePp Write #]] peut être utilisé pour créer un fichier lisible avec ##**Input #**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/input.bas"}}%%(freebasic) @@ -37,13 +37,13 @@ print a, b, c %% {{fbdoc item="diff"}} - - QB has a bug in INPUT # that causes it to read past the end of the line if it does not find a matching end-quote when reading a string. If you are porting QB code that relies upon this bug, you may need to edit your data files to remove newlines from inside quoted strings, or to use a custom function to piece back together the multiline string. + - QB a un "bug" dans INPUT # qui l'amène à lire au-delà de la fin de la ligne s'il ne trouve pas des guillemets de fin quand il lit une chaîne. Si vous avez du code QB qui repose sur ce bug, vous devez éditer vos fichiers de données pour supprimer les chaînes multi-lignes à l'intérieur des guillemets ou utiliser une fonction personnalisée qui rassemble sur une seule ligne les éléments d'une chaîne multi-lignes. {{fbdoc item="see"}} - ##[[KeyPgInput Input]]## - ##[[KeyPgLineinputPp Line Input #]]## - ##[[KeyPgWritePp Write #]]## - ##[[KeyPgOpen Open]]## - - ##[[KeyPgInputfilemode Input (file mode)]]## + - ##[[KeyPgInputfilemode Input (Mode fichier)]]## {{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgInputfilemode.wakka b/fbdocs/manual/cache/KeyPgInputfilemode.wakka index 8cd1072683..6c8fb1613f 100644 --- a/fbdocs/manual/cache/KeyPgInputfilemode.wakka +++ b/fbdocs/manual/cache/KeyPgInputfilemode.wakka @@ -1,40 +1,40 @@ {{fbdoc item="title" value="INPUT (FILE MODE)"}}---- -Specifies text file to be opened for input mode +Spécifie un fichier texte à ouvrir en mode entrée {{fbdoc item="syntax"}}## [[KeyPgOpen open]] //filename// for **Input** [[[KeyPgEncoding encoding]] //encoding_type//] [[[KeyPgLock lock]] //lock_type//] as [#]//filenum// ## {{fbdoc item="param"}} ##//filename//## - file name to open for input + nom de fichier à ouvrir en entrée ##//encoding_type//## - indicates encoding type for the file + indique le type d'encodage du fichier ##//lock_type//## - locking to be used while the file is open + verrouillage à utiliser pendant que le fichier est ouvert ##//filenum//## - unused file number to associate with the open file + numéro de fichier à associer au fichier ouvert {{fbdoc item="desc"}} - A file mode used with ##[[KeyPgOpen Open]]## to open a text file for reading. + Un mode fichier utilisé avec ##[[KeyPgOpen Open]]## pour ouvrir un fichier texte en lecture. - This mode allows to read sequentially lines of text with ##[[KeyPgLineinputPp Line Input #]]##, or to read comma separated values with ##[[KeyPgInputPp Input #]]##. + Ce mode permet de lire séquentiellement les lignes de texte avec ##[[KeyPgLineinputPp Line Input #]]##, ou de lire des valeurs séparées par des virgules avec ##[[KeyPgInputPp Input #]]##. - Text files can't be simultaneously read and written in ""FreeBASIC"", so if both functions are required on the same file, it must be opened twice. + Les fichiers texte ne peuvent pas être simultanément en lecture et en écriture dans FreeBASIC, donc si les deux fonctions sont nécessaires sur le même fichier, il doit être ouvert deux fois. - ##//filename//## must be a string expression resulting in a legal file name in the target OS, without wildcards. The file will be sought for in the present directory, unless the ##//filename//## contains a path . If the file does not exist, an error is issued. The pointer is set at the first character of the file. + ##//filename//## doit être une expression chaîne contenant un nom de fichier acceptable dans l'OS cible, sans joker de remplacement. Le fichier sera recherché dans le répertoire courant, sauf si ##//filename//## contient un chemin. Si le fichier n'existe pas, une erreur est émise. Le pointeur est placé sur le premier caractère du fichier. - ##//Encoding_type//## indicates the Unicode ##[[KeyPgEncoding Encoding]]## of the file, so characters are correctly read. If omitted, "ascii" encoding is defaulted. Only little endian character encodings are supported at the moment. - -##"utf8"##, - -##"utf16"## - -##"utf32" ## - -##"ascii"## (the default) + ##//Encoding_type//## indique l'##[[KeyPgEncoding Encoding (= encodage)]]## Unicode du fichier, ainsi les caractères sont correctement lus. Si omis, l'encodage "ascii" est employé par défaut. Seuls, les caractères encodés "little endian" sont pris en charge pour le moment. +
  • ##"utf8"##, +
  • ##"utf16"## +
  • ##"utf32" ## +
  • ##"ascii"## (par défaut) - ##//Lock_type//## indicates the way the file is locked for other processes, it is one of: - - ##**Read**## - the file can be opened simultaneously by other processes, but not for reading - - ##**Write**## - the file can be opened simultaneously by other processes, but not for writing - - ##**Read Write**## - the file cannot be opened simultaneously by other processes (the default) + ##//Lock_type//## indique la façon dont le fichier est verrouillé pour d'autres processus: + - ##**Read**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas pour la lecture + - ##**Write**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas pour l'écriture + - ##**Read Write**## - le fichier ne peut pas être ouvert simultanément par d'autres processus (par défaut) - ##//filenum//## is a valid ""FreeBASIC"" file number (in the range ##1..255##) not being used for any other file presently open. The file number identifies the file for the rest of file operations. A free file number can be found using the ##[[KeyPgFreefile Freefile]]## function. + ##//filenum//## est un numéro de fichier valide FreeBASIC (dans la plage ##1..255##) non utilisé actuellement par un autre fichier ouvert. Le numéro de fichier identifie le fichier pour le reste des opérations. Un numéro de fichier libre peut être trouvé par la fonction ##[[KeyPgFreefile FreeFile]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/for-input.bas"}}%%(freebasic) diff --git a/fbdocs/manual/cache/KeyPgInputnum.wakka b/fbdocs/manual/cache/KeyPgInputnum.wakka index 40759aec7a..5b0904f5ed 100644 --- a/fbdocs/manual/cache/KeyPgInputnum.wakka +++ b/fbdocs/manual/cache/KeyPgInputnum.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="INPUT()"}}---- -Reads a number of characters from console or file +Lit un nombre de caractères à partir de la console ou d'un fichier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Input** [[KeyPgOverload overload]] ( //n// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,19 +10,19 @@ Reads a number of characters from console or file ## {{fbdoc item="param"}} ##//n//## - Number of bytes to read. + Nombre d'octets à lire. ##//filenum//## - File number of a bound file or device. + Numéro d'un fichier ou d'un dispositif. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString String]]## of the characters read. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String]]## des caractères lus. {{fbdoc item="desc"}} - Reads a number of characters from the console, or a bound file/device specified by ##//filenum//##. + Lit un nombre de caractères de la console ou un fichier / périphérique spécifié par ##//filenum//##. - The first version waits for and reads ##//n//## characters from the keyboard buffer. Extended keys are not read. The characters are not echoed to the screen. + La première version attend et lit ##//n//## caractères de la mémoire tampon du clavier. Les touches étendues ne sont pas lues. Les caractères ne sont pas affichés à l'écran. - The second version waits for and reads ##//n//## characters from a file or device. The file position is updated. + Le deuxième version attend et lit ##//n//## caractères à partir d'un fichier ou d'un périphérique. La position dans le fichier est mise à jour. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/input-n.bas"}}%%(freebasic) @@ -37,7 +37,7 @@ loop until choice >= "1" and choice <= "3" %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWinput Winput()]]## diff --git a/fbdocs/manual/cache/KeyPgInstr.wakka b/fbdocs/manual/cache/KeyPgInstr.wakka index 99ebf5e172..63cadc65cd 100644 --- a/fbdocs/manual/cache/KeyPgInstr.wakka +++ b/fbdocs/manual/cache/KeyPgInstr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="INSTR"}}---- -Locates the first occurrence of a substring or character within a string +Repère la position de la première occurence d'une sous-chaîne ou d'un caractère dans une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Instr** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [ **Any** ] [[KeyPgByref byref]] //substring// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -12,31 +12,31 @@ Locates the first occurrence of a substring or character within a string ## {{fbdoc item="param"}} ##//str//## - The string to be searched. + La chaîne où chercher. ##//substring//## - The substring to find. + La sous-chaîne à trouver. ##//start//## - The position in ##//str//## at which the search will begin. + La position dans ##//str//## où la recherche va commencer. -{{fbdoc item="ret"}} - The position of the first occurrence of ##//substring//## in ##//str//##. +{{fbdoc item="section" value="Valeur retournée + La position de la première occurrence de ##//substring//## dans ##//str//##. {{fbdoc item="desc"}} - Locates the position of the first occurrence of a substring or character within a string. In the first form of ##**Instr**##, the search begins at the first character. + Repère la position de la première occurence d'une sous-chaîne ou d'un caractère dans une chaîne de caractères. Dans la première forme de ##**InStr**##, la recherche commence dès le premier caractère. - Zero (0) is returned if ##//substring//## is not found, either ##//str//## or ##//substring//## are empty strings, or ##//start//## < 1. + Zéro (0) est retourné si ##//substring//## n'est pas trouvée, soit ##//str//## ou ##//substring//## sont des chaînes vides, ou ##//start//## < 1. - If the ##**Any**## keyword is specified, ##**Instr**## returns the first occurrence of any character in ##//substring//##. + Si le mot clé ##**Any**## est spécifié, ##**InStr**## renvoie la première occurrence de n'importe quel caractère dans ##//substring//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/instr.bas"}}%%(freebasic) -' It will return 4 +' Retournera 4 Print InStr("abcdefg", "de") -' It will return 0 +' Retournera 0 Print InStr("abcdefg", "h") -' It will search for any of the characters "f", "b", "c", and return 2 as "b" is encountered first +' Cherchera chacun des caracteres "f", "b", "c", et retournera 2 car "b" est rencontre en premier Print InStr("abcdefg", Any "fbc") %% {{fbdoc item="filename" value="examples/manual/strings/instr2.bas"}}%%(freebasic) @@ -51,20 +51,20 @@ do while idx > 0 'if not found loop will be skipped idx = instr(idx + 1, Test, "b") loop %% -<<'A Unicode example: +##
    'Un exemple Unicode: dim text as wstring*20 text = "Привет, мир!" -print instr(text,"ет") ' displays 5 -<<::c:: -{{fbdoc item="target"}} - - The wide-character string version of ##**Instr**## is not supported for DOS target. +print instr(text,"ет") ' affiche 5 +%% +;
    + {{fbdoc item="target"}} -{{fbdoc item="diff"}} - - QB returns ##//start//## if ##//search//## is a zero length string. - - QB does not support Unicode. +- La version ##**WString**## (chaîne large) de ##**InStr**## n'est pas supportée par la cible DOS. + {{fbdoc item="diff"}} + - QB retourne ##//start//## si ##//search//## est une chaîne de longueur zéro. -{{fbdoc item="see"}} - - ##[[KeyPgInstrrev Instrrev]]## - - ##[[KeyPgMidfunction Mid (Function)]]## +- QB ne supporte pas Unicode. + {{fbdoc item="see"}} + - ##[[KeyPgInstrrev InStrRev]]## -{{fbdoc item="back" value="CatPgString|String Functions"}} \ No newline at end of file +- ##[[KeyPgMidfunction Mid (Fonction)]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgInstrrev.wakka b/fbdocs/manual/cache/KeyPgInstrrev.wakka index f06009a5c7..ba3e331306 100644 --- a/fbdocs/manual/cache/KeyPgInstrrev.wakka +++ b/fbdocs/manual/cache/KeyPgInstrrev.wakka @@ -1,7 +1,7 @@ {{fbdoc item="title" value="INSTRREV"}}---- -Locates the last occurrence of a substring or character within a string +Repère la position de la dernière occurrence d'une sous-chaîne ou d'un caractère dans une chaîne de caractères -~&//**Important note**: In versions up to and including v0.20.0b, ##**Instrrev**## contains a bug which may cause it to skip some matches. This is corrected as of v0.21.0b.// +//**Note importante**: Dans les versions jusqu'à et y compris v0.20.0b, ##**InStrRev**## contient un bug qui fait que certaines occurences sont omises. Ceci est corrigé à partir de v0.21.0b.// {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Instrrev** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [ **Any** ] [[KeyPgByref byref]] //substring// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //start// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -12,28 +12,28 @@ Locates the last occurrence of a substring or character within a string ## {{fbdoc item="param"}} ##//str//## - The string to be searched. + La chaîne où chercher. ##//substring//## - The substring to find. + La sous-chaîne à trouver. ##//start//## - The position in ##//str//## at which the search will begin. + La position dans ##//str//## où la recherche va commencer. -{{fbdoc item="ret"}} - The position of the last occurrence of ##//substring//## in ##//str//##. +{{fbdoc item="section" value="Valeur retournée + La position de la dernière occurrence de ##//substring//## dans ##//str//##. {{fbdoc item="desc"}} - Locates the position of the last occurrence of a substring or character within a string. If ##//start//## parameter is not given or is -1, the search begins at the last character. + Repère la position de la dernière occurence d'une sous-chaîne ou d'un caractère dans une chaîne de caractères. Si le paramètre ##//start//## est omis ou est -1, la recherche commence au dernier caractère. - Zero (0) is returned if ##//substring//## is not found, or either ##//str//## or ##//substring//## are empty strings, or ##//start//## is less than 1 (except for -1), or start is greater than the length of ##//str//##. + Zéro (0) est retourné si ##//substring//## n'est pas trouvée, ou si ##//str//## ou ##//substring//## sont des chaînes vides, ou ##//start//## est inférieur à 1 (sauf pour -1), ou ##//start//## est plus grand que la longueur de ##//str//##. - If the ##**Any**## keyword is specified, ##**Instrrev**## returns the last occurrence of any character in ##//substring//##. + Si le mot-clef ##**Any**## est specifié, ##**InStrRev**## retourne la dernière occurence de n'importe quel caractère de ##//substring//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/instrrev.bas"}}%%(freebasic) -' It will return 4 +' Retournera 4 PRINT INSTRREV("abcdefg", "de") -' It will return 0 +' Retournera 0 PRINT INSTRREV("abcdefg", "h") %% {{fbdoc item="filename" value="examples/manual/strings/instrrev2.bas"}}%%(freebasic) @@ -49,22 +49,22 @@ do while idx > 0 'if not found loop will be skipped loop %% -<<'A Unicode example: +##
    'Un exemple Unicode: dim text as wstring*20 text = "Привет, мир!" -print instrrev(text,"ет") ' displays 5 -<<::c:: -{{fbdoc item="target"}} - - The wide-character string version of ##**Instrrev**## is not supported for DOS target. +print instrrev(text,"ет") ' affiche 5 +%% +;
    + {{fbdoc item="target"}} -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Instrrev""**##. +- La version ##**WString**## (chaîne large) de ##**InStrRev**## n'est pas supportée par la cible DOS. + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Instrrev**##. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} - - ##[[KeyPgInstr Instr]]## - - ##[[KeyPgMidfunction Mid (Function)]]## +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} + - ##[[KeyPgInstr InStr]]## -{{fbdoc item="back" value="CatPgString|String Functions"}} \ No newline at end of file +- ##[[KeyPgMidfunction Mid (Fonction)]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgInt.wakka b/fbdocs/manual/cache/KeyPgInt.wakka index 6d9edc04b1..9e59637d8d 100644 --- a/fbdocs/manual/cache/KeyPgInt.wakka +++ b/fbdocs/manual/cache/KeyPgInt.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="INT"}}---- -Returns the floor of a number +Renvoie le plus grand entier qui est inférieur ou égal à un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Int** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,15 +9,15 @@ Returns the floor of a number ## {{fbdoc item="param"}} ##//number//## - the floating-point number to round + le nombre à virgule flottante à arrondir {{fbdoc item="ret"}} - Returns the floor of ##//number//##, i.e. the largest integer that is less than or equal to it. + Retourne le plus grand entier qui est inférieur ou égal à ##//number//##. {{fbdoc item="desc"}} - ##**Int**## returns the floor of x. For example, ##**Int**(4.9)## will return ##4.0##, and ##**Int**(-1.3)## will return ##-2.0##. + ##**Int**## retourne le plus grand entier qui est inférieur ou égal à ##//number//##. Par exemple, ##**Int**(4.9)## retournera ##4.0## et ##**Int**(-1.3)## retournera ##-2.0##. - The ##**Int**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types. + L'##[[KeyPgOperator Operator]]## unaire ##**Int**## peut être surchargé par un type défini par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/int.bas"}}%%(freebasic) @@ -26,10 +26,10 @@ Print int(-1.9) '' will print -2 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgFix Fix]]## diff --git a/fbdocs/manual/cache/KeyPgInteger.wakka b/fbdocs/manual/cache/KeyPgInteger.wakka index 3760b03104..8bacbff3bc 100644 --- a/fbdocs/manual/cache/KeyPgInteger.wakka +++ b/fbdocs/manual/cache/KeyPgInteger.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="INTEGER"}}---- -Standard data type: 32 bit signed +Type de données standard: 32 bits signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Integer** ## {{fbdoc item="desc"}} - 32-bit signed whole-number data type. Can hold values from -2147483648 to 2147483647. + Type de données: nombre entier signé de 32 bits. Peut contenir des valeurs de -2147483648 à 2147483647. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/integer.bas"}}%%(freebasic) @@ -13,20 +13,21 @@ Standard data type: 32 bit signed Dim y As Integer = &H7FFFFFFF Print "Integer Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%Integer Range = -2147483648 to 2147483647%% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the ##**Integer**## data type is 32-bit. - - In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Integer**## data type is 16-bit. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, le type de donnée ##**Integer**## a 32 bits. + - Dans les dialecte //[[CompilerOptlang -lang qb]]//, le type de donnée ##**Integer**## a 16 bits. {{fbdoc item="diff"}} - - The INTEGER type is 16-bit wide in QB. - - None, if compiled in the //[[CompilerOptlang -lang qb]]// dialect. + - Le type INTEGER a une largeur de 16 bits dans QB. + - Aucune, si compilation dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgLong Long]]## - - ##[[KeyPgUinteger Uinteger]]## + - ##[[KeyPgUinteger UInteger]]## + - ##[[KeyPgCint CInt]]## - ##[[KeyPgCint Cint]]## {{fbdoc item="back" value="CatPgStdDataTypes|Standard Data Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgIs.wakka b/fbdocs/manual/cache/KeyPgIs.wakka index 703e11938d..3898412b46 100644 --- a/fbdocs/manual/cache/KeyPgIs.wakka +++ b/fbdocs/manual/cache/KeyPgIs.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Is"}}---- -Clause in the ##[[KeyPgSelectcase Select Case]]## statement block. +Clause dans le bloc d'instructions ##[[KeyPgSelectcase Select Case]]##. {{fbdoc item="syntax"}}## **Case Is** //expression// ## {{fbdoc item="desc"}} - Is specifies that a particular case inside a Select Case block will be evaluated based on an expression including the greater than (>) or less than (<) operator and a value. + ##**Is**## précise qu'un cas particulier dans un bloc ##[[KeyPgSelectcase Select Case]]## sera évalué sur la base d'une expression incluant l'opérateur plus grand que (>) ou plus petit que (<) et une valeur. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgSelectcase Select Case]]## diff --git a/fbdocs/manual/cache/KeyPgIsDate.wakka b/fbdocs/manual/cache/KeyPgIsDate.wakka index 1784b8ba5a..b5aa3e7d01 100644 --- a/fbdocs/manual/cache/KeyPgIsDate.wakka +++ b/fbdocs/manual/cache/KeyPgIsDate.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="ISDATE"}}---- -Tests if a string can be converted to a [[ProPgDates Date Serial]] +Teste si une chaîne est convertible en [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""IsDate""** ( [[KeyPgByref byref]] //stringdate// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **IsDate** ( [[KeyPgByref ByRef]] //stringdate// [[KeyPgAs As]] [[KeyPgConstQualifier Const]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""IsDate""**( //stringdate// ) + //result// = **IsDate**( //stringdate// ) ## {{fbdoc item="param"}} ##//stringdate//## - the string to test + la chaîne à tester -{{fbdoc item="ret"}} - Returns non-zero (-1) if the date string can be converted to a [[ProPgDates Date Serial]], otherwise returns zero (0). +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur non-nulle (-1) si la chaîne-date est convertible en [[ProPgDates Date Serial]], sinon retourne zéro (0). {{fbdoc item="desc"}} - Date strings must be in the format set in the regional settings of the OS to be considered valid dates. + Les chaines-date doivent être dans le format enregistré dans les paramètres régionaux du système d'exploitation pour être considérées comme des dates valides. - ##**""IsDate""([[KeyPgDate Date]])**## will return non-zero (-1) only if the regional settings specify the same date format that QB used. + ##**IsDate([[KeyPgDate Date]])**## retournera une valeur non-nulle (-1) seulement si les paramètres régionaux spécifient le même format de date que celui utilisé par QB. - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/isdate.bas"}}%%(freebasic) @@ -49,7 +49,7 @@ loop %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgKill.wakka b/fbdocs/manual/cache/KeyPgKill.wakka index bbd384cb70..366e386588 100644 --- a/fbdocs/manual/cache/KeyPgKill.wakka +++ b/fbdocs/manual/cache/KeyPgKill.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="KILL"}}---- -Deletes a file from disk / storage media. +Supprime un fichier à partir d'un disque / d'un support de stockage. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Kill** ( [[KeyPgByref byref]] //filename// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Deletes a file from disk / storage media. ## {{fbdoc item="param"}} ##//filename//## - The //filename// is the name of the disk file to delete. If the file is not in the current directory, the path must also be given as ##**//path/file//**##. + //filename// est le nom du fichier disque à supprimer. Si le fichier n'est pas dans le répertoire courant, le chemin doit aussi être donné sous la forme ##**//chemin/nom-de-fichier//**##. -{{fbdoc item="ret"}} - Returns zero (##0##) on success, or non-zero on error. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (##0##) si succès, ou non-zéro si erreur. {{fbdoc item="desc"}} - ##**Kill**## deletes a file from disk / storage media. + ##**Kill**## supprime un fichier du disque/médium de stockage. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/kill.bas"}}%%(freebasic) @@ -26,10 +26,10 @@ If result <> 0 Then Print "error trying to kill " ; filename ; " !" %% {{fbdoc item="target"}} - On some platforms, ##**Kill**## may be able to remove folders and read-only files. Whether it succeeds or fails here is not currently defined. It may be necessary to check the attributes of the file you are deleting, and decide accordingly whether you want to try ##**Kill**##ing it. + Sur certaines plates-formes, ##**Kill**## peut être en mesure de supprimer des dossiers et fichiers en lecture seule. La réussite ou l'échec ici n'est pas défini actuellement. Il peut être nécessaire de vérifier les attributs du fichier que vous supprimez et décider en conséquence si vous voulez essayer de le ##**Kill**##er. {{fbdoc item="diff"}} - - KILL can optionally be used as function in ""FreeBASIC"". + - KILL peut éventuellement être utilisé comme fonction en FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgShell Shell]]## diff --git a/fbdocs/manual/cache/KeyPgLbound.wakka b/fbdocs/manual/cache/KeyPgLbound.wakka index cbee97ff61..cf37f8b25a 100644 --- a/fbdocs/manual/cache/KeyPgLbound.wakka +++ b/fbdocs/manual/cache/KeyPgLbound.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LBOUND"}}---- -Returns the lower bound of an array's dimension +Renvoie la limite inférieure d'une dimension d'un tableau {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Lbound** ( array() [[KeyPgAs as]] [[KeyPgAny any]], [[KeyPgByval byval]] //dimension// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Returns the lower bound of an array's dimension ## {{fbdoc item="param"}} ##//array//## - an array of any type + n'importe quel type de tableau ##//dimension//## - the dimension to get lower bound of + la dimension dont on veut obtenir la limite inférieure -{{fbdoc item="ret"}} - Returns the lower bound of an array's dimension. +{{fbdoc item="section" value="Valeur retournée + Renvoie la limite inférieure d'une dimension d'un tableau. {{fbdoc item="desc"}} - ##**Lbound**## returns the lowest value that can be used as an index into a particular dimension of an array. + ##**LBound**## retourne la valeur la plus petite pouvant servir d'indice d'une dimension particulière d'un tableau. - Array dimensions are numbered from one (1) to //n//, where //n// is the total number of dimensions. If ##//dimension//## is not specified, ##**Lbound**## will return the lower bound of the first dimension. If ##//dimension//## is less than one (1) or greater than the total number of dimensions (//n//) in the array, the result is undefined. + Les dimensions d'un tableau sont numérotées de un (1) à //n//, dans lequel //n// est le nombre total de dimensions. Si ##//dimension//## n'est pas spécifié, ##**LBound**## retournera la limite inférieure de la première dimension. Si ##//dimension//## est inférieur à un (1) ou supérieur au nombre total de dimensions (//n//) du tableau, le résultat est indéfini. {{fbdoc item="ex"}} diff --git a/fbdocs/manual/cache/KeyPgLcase.wakka b/fbdocs/manual/cache/KeyPgLcase.wakka index 434ffae8c4..a3fdc1a81d 100644 --- a/fbdocs/manual/cache/KeyPgLcase.wakka +++ b/fbdocs/manual/cache/KeyPgLcase.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LCASE"}}---- -Returns a lower case copy of a string +Retourne une copie en lettres minuscules d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Lcase** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,34 +10,34 @@ Returns a lower case copy of a string ## {{fbdoc item="param"}} ##//str//## - String to convert to lowercase. + Chaîne de caractères à convertir en minuscules. -{{fbdoc item="ret"}} - Lowercase copy of ##//str//##. +{{fbdoc item="section" value="Valeur retournée + Copie en lettres minuscules de ##//str//##. {{fbdoc item="desc"}} - Returns a copy of ##//str//## with all of the letters converted to lower case. + Retourne une copie de ##//str//## avec toutes les lettres converties en lettres minuscules. - If ##//str//## is empty, the null string (##"####"##) is returned. + Si ##//str//## est vide, une chaîne nulle (##"####"##) est retournée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/lcase.bas"}}%%(freebasic) print lcase("AbCdEfG") %% -Output: +Sortie: %% abcdefg %% {{fbdoc item="target"}} - - The wide-character string version of ##**Lcase**## is not supported for DOS target. + - La version large chaîne ##**WString**## de ##**LCase**## n'est pas supportée pour la cible DOS. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - QB does not support Unicode. + - QB ne supporte pas Unicode. {{fbdoc item="see"}} - ##[[KeyPgUcase Ucase]]## diff --git a/fbdocs/manual/cache/KeyPgLeft.wakka b/fbdocs/manual/cache/KeyPgLeft.wakka index 910bbdead2..a9b7046b6c 100644 --- a/fbdocs/manual/cache/KeyPgLeft.wakka +++ b/fbdocs/manual/cache/KeyPgLeft.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LEFT"}}---- -Returns the leftmost substring of a string +Retourne la sous-chaîne la plus à gauche d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Left** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //n// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,44 +10,44 @@ Returns the leftmost substring of a string ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne de caractères source. ##//n//## - The number of characters to return from the source string. + Le nombre de caractères à retourner à partir de la chaîne de caractères source. -{{fbdoc item="ret"}} - Returns the leftmost substring from ##//str//##. +{{fbdoc item="section" value="Valeur retournée + Retourne la sous-chaîne la plus à gauche à partir de ##//str//##. {{fbdoc item="desc"}} - Returns the leftmost ##//n//## characters starting from the left (beginning) of ##//str//##. If ##//str//## is empty, then the null string (##"####"##) is returned. If ##//n// <= 0## then the null string (##"####"##) is returned. If ##//n// > len(//str//)## then the entire source string is returned. + Retourne les ##//n//## caractères les plus à gauche à partir du début de ##//str//##. Si ##//str//## est vide, alors la chaîne nulle (##"####"##) est retournée. Si ##//n// <= 0## alors la chaîne nulle (##"####"##) est retournée. Si ##//n// > len(//str//)## alors la chaîne entière est retournée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/left.bas"}}%%(freebasic) dim text as string = "hello world" print left(text, 5) %% - will produce the output: + produira la sortie: %%hello -%% -An Unicode example: -<< -dim text as wstring*20 +%%Un exemple Unicode: +##
    dim text as wstring*20 text = "Привет, мир!" print left(text, 6) 'displays "Привет" -<<::c:: - +##;
    {{fbdoc item="target"}} - - DOS does not support the wide-character string version of **##Left##**. +- DOS ne supporte pas la version large **##WString##** de la chaîne de **##Left##**. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. -{{fbdoc item="diff"}} - - QB does not support Unicode. +- Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. + {{fbdoc item="diff"}} + - QB ne supporte pas Unicode. {{fbdoc item="see"}} - ##[[KeyPgRight Right]]## + +- ##[[KeyPgMidfunction Mid (Function)]]## + - ##[[KeyPgRight Right]]## - ##[[KeyPgMidfunction Mid (Function)]]## {{fbdoc item="back" value="CatPgString|String Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgLen.wakka b/fbdocs/manual/cache/KeyPgLen.wakka index 19add610a7..149909132b 100644 --- a/fbdocs/manual/cache/KeyPgLen.wakka +++ b/fbdocs/manual/cache/KeyPgLen.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LEN"}}---- -Returns the length of a variable or data type +Retourne la longueur d'un type de variable ou de données {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //variable// [[KeyPgAs as]] [[KeyPgAny any]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,26 +7,26 @@ Returns the length of a variable or data type ## {{fbdoc item="usage"}}## //result// = **Len**( //variable// ) - ##//or//## + ##//ou//## //result// = **Len**( [[DataType DataType]] ) ## {{fbdoc item="param"}} ##//variable//## - A variable of any type. + Une variable de n'importe quel type. ##//datatype//## - A [[DataType DataType]]. + Un [[DataType DataType]]. -{{fbdoc item="ret"}} - Returns the size of a variable or [[DataType DataType]] in bytes. +{{fbdoc item="section" value="Valeur retournée + Retourne la taille en octets d'une variable ou d'un [[DataType DataType]]. {{fbdoc item="desc"}} - ##**Len**## returns the length of a variable or [[DataType DataType]], in bytes. + ##**Len**## retourne la longueur en octets d'une variable ou d'un [[DataType DataType]]. - In the first form, if ##//variable//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. Otherwise, the size of ##//variable//##'s type in bytes is returned. + Dans la première forme, si ##//variable//## est du type ##[[KeyPgString String]]##, ##[[KeyPgWstring WString]]## ou ##[[KeyPgZstring ZString]]##, la longueur de la chaîne, en caractères, est retournée. Sinon, la taille du type de ##//variable//## est retournée. - In the second form, if ##//datatype//## is ##[[KeyPgZstring Zstring]]## or ##[[KeyPgWstring Wstring]]##, the size of an ASCII or Unicode character is returned, respectively. If ##//datatype//## is ##[[KeyPgString String]]##, the size of the string descriptor type is returned. + Dans la seconde forme, si ##//datatype//## est ##[[KeyPgZstring ZString]]## ou ##[[KeyPgWstring WString]]##, la taille d'un caractère ASCII ou Unicode est retournée, respectivement. Si ##//datatype//## est ##[[KeyPgString String]]##, la taille du descripteur de type est retournée. - If there is both a user defined type and a variable both having the same name in the same scope, the user defined type takes precedence over the variable. To ensure that the ##**Len**## takes the variable instead of the user defined type, wrap the argument to ##**Len**## with parentheses to force it to be seen as an expression. For example ##Len((variable))##. + S'il y a, à la fois, un type défini par l'utilisateur et une variable qui ont le même nom dans le même champ d'application, le type défini par l'utilisateur a la priorité sur la variable. Pour s'assurer que ##**Len**## prend la variable au lieu du type défini par l'utilisateur, mettez l'argument de ##**Len**## entre parenthèses pour le forcer à être considéré comme une expression. Par exemple ##Len((variable))##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/len.bas"}}%%(freebasic) @@ -42,12 +42,12 @@ print len(xyz) ' returns 8 %% {{fbdoc item="lang"}} - - ##**Len**## only allows expressions in the //[[CompilerOptlang -lang qb]]// dialect. - - Can be used with built-in types and user-defined types in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - ##**Len**## n'admet que des expressions dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Peut être utilisé avec les types intégrés et les types définis par l'utilisateur dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - Can be used with built-in types and user-defined types in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects. - - None in the //[[CompilerOptlang -lang qb]]// dialect. + - Peut être utilisé avec les types intégrés et les types définis par l'utilisateur dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//. + - Aucune dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgSizeof Sizeof]]## diff --git a/fbdocs/manual/cache/KeyPgLet.wakka b/fbdocs/manual/cache/KeyPgLet.wakka index b64cfcce4d..c92dbf9180 100644 --- a/fbdocs/manual/cache/KeyPgLet.wakka +++ b/fbdocs/manual/cache/KeyPgLet.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="LET"}}---- -Indicates the assignment operator. +Indique l'opérateur d'affectation. {{fbdoc item="syntax"}}## **Let** //variable// = //value// -//or// +//ou// **Let**( //variable1// [, //variable2// [, ... ]] ) = //udt// -//or// +//ou// [[KeyPgOperator operator]] //typename//.**Let** ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] rhs [[KeyPgAs as]] [[DataType datatype]] ) //statements// end operator ## {{fbdoc item="desc"}} - Command intended to help the programmer to distinguish an assignment statement (e.g. ##**Let** a = 1##) from an equality test (e.g. ##If a = 1 then ...##). As the compiler does not require it, it is usually omitted. + Commande ayant pour but d'aider le programmeur à distinguer une instruction d'affectation (par exemple, ##**Let** a = 1##) d'un test d'égalité (par exemple, ##If a = 1 then ...##). Comme le compilateur ne l'exige pas, il est souvent omis. - **Let** can be used as a left-hand side operator to assign the members of a user defined type to multiple variables. //See ##[[KeyPgOpLetlist Operator Let() (Assignment)]]##// + **Let** peut être utilisé comme un opérateur de gauche pour affecter les membres d'un type défini par l'utilisateur à plusieurs variables. //Voir ##[[KeyPgOpLetlist Operator Let() (Affectation)]]##// - **Let** is used with operator overloading to refer the assignment operator. //##See [[KeyPgOpLet Operator Let (Assignment)]]##// + **Let** est utilisé avec un opérateur surchargé pour désigner l'opérateur d'affectation. //##Voir [[KeyPgOpLet Operator Let (Affectation)]]##// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/misc/let.bas"}}%%(freebasic) @@ -29,19 +29,19 @@ x = 100 %% {{fbdoc item="lang"}} - - The use of ##**let**## to indicate an assignment statement (##//**Let** variable = expr//##) is not allowed in the //[[CompilerOptlang -lang fb]]// dialect. - - The UDT to multi-variable Let assignment is only available in the //[[CompilerOptlang -lang fb]]// dialect. - - Overloading of operators is not available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - L'utilisation de ##**Let**## pour indiquer une instruction d'affectation (##//**Let** variable = expr//##) n'existe pas dans le dialecte //[[CompilerOptlang -lang fb]]//. + - L'affectation multi-variables définie par l'utilisateur ##**Let**## n'est disponible que dans le dialecte //[[CompilerOptlang -lang fb]]//. + - La surcharge des opérateurs n'est pas disponible dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - None in the //[[CompilerOptlang -lang fb]]// dialect. - - The Let operator is new to ""FreeBASIC"". - - The UDT to multi-variable Let assignment is new to ""FreeBASIC"". + - Aucune dans le dialecte //[[CompilerOptlang -lang fb]]//. + - L'opérateur ##**Let**## est nouveau pour FreeBASIC. + - L'affectation multi-variables définie par l'utilisateur est nouvelle pour FreeBASIC. {{fbdoc item="see"}} - - ##[[KeyPgOpAssignment Operator = (Assignment)]]## - - ##[[KeyPgOpLet Operator Let (Assignment)]]## - - ##[[KeyPgOpLetlist Operator Let() (Assignment)]]## - - ##[[KeyPgOperator Operator]]## + - ##[[KeyPgOpAssignment Opérateur = (Affectation)]]## + - ##[[KeyPgOpLet Opérateur Let (Affectation)]]## + - ##[[KeyPgOpLetlist Opérateur Let() (Affectation)]]## + - ##[[KeyPgOperator Opérateur]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgLib.wakka b/fbdocs/manual/cache/KeyPgLib.wakka index 8761df5746..8b46d462d4 100644 --- a/fbdocs/manual/cache/KeyPgLib.wakka +++ b/fbdocs/manual/cache/KeyPgLib.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="LIB"}}---- -Specifies the library where a sub or function can be found as part of a declaration +Spécifie où un sous-programme / une fonction peut trouver une DLL dans le cadre d'une déclaration {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] { [[KeyPgSub sub]] | [[KeyPgFunction function]] } //proc_name// **lib** "//libname//" [ [[KeyPgAlias alias]] "//symbol_name//" ] ( //arguments list// ) [[KeyPgAs as]] //return_type// + [[KeyPgDeclare Declare]] { [[KeyPgSub Sub]] | [[KeyPgFunction Function]] } //proc_name// **Lib** "//dllname//" [[KeyPgAlias Alias]] "//symbol_name//" ( //arguments list// ) [[KeyPgAs As]] //return_type// [[KeyPgExternBlock extern]] "//mangling//" lib "//libname//" //declarative statements// @@ -15,9 +15,9 @@ Specifies the library where a sub or function can be found as part of a declarat ## {{fbdoc item="desc"}} - In ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## declarations, and also in class method declarations (including constructors and destructors), ##**lib**## indicates the library containing the function. Libraries specified in this way are linked in as if ##[[KeyPgInclib #inclib "libname"]]## or ##[[CompilerOptl -l libname]]## had been used. + Dans les déclarations ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]##, ##**Lib**## indique la "dll" contenant la fonction. Les bibliothèques spécifiées de cette manière sont liées, comme si elles avaient été spécifiées avec [[KeyPgInclib #inclib]]. - ##**lib**## can also be used with [[KeyPgExternBlock Extern ... End Extern blocks]] to specifiy a ##**lib**## for all declarations inside. + ##**Lib**## peut aussi être utilisé avec des [[KeyPgExternBlock blocs Extern ... End Extern]] pour spécifier ##**Lib**## pour toutes les déclarations internes. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/mydll.bas"}}%%(freebasic) @@ -40,7 +40,7 @@ Print "GetValue = &h"; Hex(GetValue()) %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgLinegraphics.wakka b/fbdocs/manual/cache/KeyPgLinegraphics.wakka index 01762dc106..9927e7902e 100644 --- a/fbdocs/manual/cache/KeyPgLinegraphics.wakka +++ b/fbdocs/manual/cache/KeyPgLinegraphics.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LINE (GRAPHICS)"}}---- -Draws a line +Dessine une ligne {{fbdoc item="syntax"}}## **Line** [//target//,] [[STEP] (//x1//, //y1//)]-[STEP] (//x2, y2//) [, [//color//][, [B|BF][, //style//]]] @@ -8,36 +8,36 @@ Draws a line ## {{fbdoc item="param"}} ##//target//## - specifies buffer to draw on + spécifie le tampon sur lequel dessiner ##STEP## - indicates that the starting coordinates are relative + indique que les coordonnées de départ sont relatives ##//(x1, y1)//## - starting coordinates of the line + coordonnées de départ de la ligne ##STEP## - indicates that ending coordinates are relative + indique que les coordonnées de fin sont relatives ##//(x2, y2)//## - ending coordinates of the line + coordonnées de fin de la ligne ##//color//## - the color attribute. + l'attribut de couleur. ##B|BF## - specifies box or box filled mode + spécifie boîte ou boîte remplie ##//style//## - line style + style de la ligne {{fbdoc item="desc"}} - Graphics statement that draws a straight line or a box between two points. The action will take place on the current work page set via [[KeyPgScreenset ScreenSet]], or onto the buffer [[KeyPgGetgraphics Get]]/[[KeyPgPutgraphics Put]] buffer if specified. + Déclaration graphique qui dessine une ligne droite ou une boîte entre deux points. Cela se passera sur la page de travail courante via [[KeyPgScreenset ScreenSet]] ou sur un tampon [[KeyPgGetgraphics Get]]/[[KeyPgPutgraphics Put]] si c'est spécifié. - **Line** coordinates are affected by custom coordinates system set via [[KeyPgWindow Window]] and [[KeyPgViewgraphics View (Graphics)]] statements, and respect clipping rectangle set by [[KeyPgViewgraphics View (Graphics)]]. If a pair of coordinates is preceded by the ##STEP## keyword, the coordinates are assumed to be relative to the last graphics cursor position. If the ##B## flag is specified, a rectangle will be drawn instead of a line, with ##(//x1//,//y1//)-(//x2//,//y2//)## as the coordinates of the opposite rectangle corners. If ##BF## is specified, a filled rectangle will be drawn. + Les coordonnées de **Line** sont affectées par le système de coordonnées personnel établi via [[KeyPgWindow Window]] et [[KeyPgViewgraphics View (Graphique)]] et respecte le rectangle de découpage (clipping rectangle) établi par [[KeyPgViewgraphics View (Graphics)]]. Si une paire de coordonnées est précédée par le mot-clef ##STEP##, les coordonnées sont considérées comme relatives à la dernière position du curseur graphique. Si l'indicateur ##B## est spécifié, un rectangle sera tracé au lieu d'une ligne, avec ##(//x1//,//y1//)-(//x2//,//y2//)## comme coordonnées des coins opposés du rectangle. Si ##BF## est spécifié, un rectangle plein sera tracé. - ##//Color//## denotes the color attribute, which is mode specific (see [[KeyPgColor Color]] and [[KeyPgScreengraphics Screen (Graphics)]] for details). If omitted, the current foreground color as set by the [[KeyPgColor Color]] statement is used. + ##//Color//## correspond à l'attribut de couleur, qui est spécifique au mode (voir [[KeyPgColor Color]] et [[KeyPgScreengraphics Screen (Graphique)]] pour plus de détails). Si omis, la couleur courante d'avant-plan validée par [[KeyPgColor Color]] sera utilisée. - ##//Style//##, if specified, allows styled line drawing; its value is interpreted as a 16bit bitmask, and **Line** will use it to skip pixel drawing. Starting at ##(//x1//,//y1//)##, the most significant bit of the style mask is checked: if 1, the pixel is drawn, if 0, it's skipped. This repeats for all the line pixels with the other bits, with the mask being reused when the 16 bits are all checked. + Si ##//Style//## est spécifié, cela permet de tracer une ligne avec un certain style; sa valeur est interprétée comme un masque de 16 bits et **Line** sera utilisé pour interpréter le dessin de pixels. Débutant à ##(//x1//,//y1//)##, le bit de poids le plus fort du masque de style est utilisé: s'il est à 1, le pixel est dessiné, s'il est à 0, il ne l'est pas. Ceci sera répété pour tous les pixels de la ligne en utilisant les autres bits, le masque étant réutilisé depuis le début quand ses 16 bits auront été utilisés. - When **Line** is used as //Line - (x2, y2)//, a line is drawn from the current cursor position to the ##(//x2//,//y2//)## coordinates specified by LINE. Alternatively, [[KeyPgPoint Point]] can be used to get the current cursor position. + Quand **Line** est utilisé de cette façon: //Line - (x2, y2)//, une ligne est tracée de la position courante du curseur aux coordonnées ##(//x2//,//y2//)## spécifiées par LINE. Alternativement, [[KeyPgPoint Point]] peut être utilisé pour obtenir la position courante du curseur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/line.bas"}}%%(freebasic) -'' draws a diagonal red line with a white box, and waits for 3 seconds +'' Dessine une ligne diagonale rouge avec une boite blanche, et attend 3 secondes screen 13 line (20, 20)-(300, 180), 4 line (140, 80)-(180, 120), 15, b @@ -46,23 +46,23 @@ sleep 3000 %% {{fbdoc item="filename" value="examples/manual/gfx/line_style.bas"}}%%(freebasic) -' Draws 2 lines with 2 different line styles in 2 different colors +' Dessine 2 lignes avec 2 styles de ligne differents dans 2 couleurs differentes screenres 320, 240 -Line (10, 100)-(309, 140), 4, B, &b1010101010101010 ' red box with dashed border +Line (10, 100)-(309, 140), 4, B, &b1010101010101010 ' boite rouge avec bords pointilles -Line (20, 115)-(299, 115), 9, , &b1111000011111111 ' blue dashed line -Line (20, 125)-(299, 125), 10, , &b0000000011110000 ' green dashed line +Line (20, 115)-(299, 115), 9, , &b1111000011111111 ' ligne bleue tirets +Line (20, 125)-(299, 125), 10, , &b0000000011110000 ' ligne verte tirets Sleep %% {{fbdoc item="diff"}} - - ##//target//## is new to ""FreeBASIC"" + - ##//target//## est nouveau pour FreeBASIC {{fbdoc item="see"}} - [[KeyPgCircle Circle]] - [[KeyPgWindow Window]] - - [[KeyPgViewgraphics View (Graphics)]] + - [[KeyPgViewgraphics View (Graphique)]] {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgLineinput.wakka b/fbdocs/manual/cache/KeyPgLineinput.wakka index 9f48e55e5d..6e80d9fbdf 100644 --- a/fbdocs/manual/cache/KeyPgLineinput.wakka +++ b/fbdocs/manual/cache/KeyPgLineinput.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="LINE INPUT"}}---- -Reads one line of input from the keyboard +Lit une ligne d'entrée à partir du clavier {{fbdoc item="syntax"}}## **Line Input** [;] [//promptstring// {;|,} ] //stringvariable// ## {{fbdoc item="param"}} ##//promptstring//## - prompt to display before waiting for input + invite à afficher avant d'attendre pour l'entrée ##//stringvariable//## - variable to receive the line of text + variable pour recevoir la ligne de texte {{fbdoc item="desc"}} - Reads a line of text from the keyboard and stores it in a string variable. + Lit une ligne de texte à partir du clavier et la stocke dans une variable chaîne. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/lineinput.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ print "You entered '"; x; "'" %% {{fbdoc item="diff"}} - - QBASIC only allowed literal strings for the prompt text. FreeBASIC allows any variable or constant string expression. + - QBASIC permet seulement des chaînes littérales pour le texte de l'invite. FreeBASIC permet n'importe quelle expression chaîne variable ou constante. {{fbdoc item="see"}} - ##[[KeyPgLineinputPp Line Input #]]## diff --git a/fbdocs/manual/cache/KeyPgLineinputPp.wakka b/fbdocs/manual/cache/KeyPgLineinputPp.wakka index bfc05bf8a0..3dd4f12e8c 100644 --- a/fbdocs/manual/cache/KeyPgLineinputPp.wakka +++ b/fbdocs/manual/cache/KeyPgLineinputPp.wakka @@ -1,19 +1,19 @@ {{fbdoc item="title" value="LINE INPUT #"}}---- -Reads one line of text from a file +Lit une ligne de texte à partir d'un fichier {{fbdoc item="syntax"}}## **Line Input** #//file number//, //string_variable// ## {{fbdoc item="param"}} ##//file number//## - file number of an file opened for ##[[KeyPgInputfilemode Input]]## + numéro de fichier d'un fichier ouvert pour ##[[KeyPgInputfilemode Input]]## ##//string_variable//## - variable to receive the line of text + variable pour recevoir la ligne de texte {{fbdoc item="desc"}} - Reads a line from an open text file (opened for ##[[KeyPgInputfilemode Input]]## through a bound file number) and stores it in a string variable. + Lit une ligne d'un fichier texte ouvert (ouvert pour ##[[KeyPgInputfilemode Input]]## grâce à un numéro de fichier lié) et les stocke dans une variable chaîne. - A line of text ends at, but does not include the end of line characters. An end of line character may be the ##LF## character (##[[KeyPgChr Chr]](10)##) or the ##CRLF## character pair (##[[KeyPgChr Chr]](13,10)##). + Une ligne de texte se termine à un certain endroit, mais ne comprend pas les caractères de fin de ligne. Le caractère de fin de ligne peut être le caractère ##LF## (##[[KeyPgChr Chr]](10)##) ou le double caractère ##CRLF## (##[[KeyPgChr Chr]](13,10)##). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/lineinput.bas"}}%%(freebasic) @@ -46,12 +46,12 @@ Resume Next %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgInputPp Input #]]## - ##[[KeyPgLineinputPp Line Input #]]## - ##[[KeyPgOpen Open]]## - - ##[[KeyPgInputfilemode Input (file mode)]]## + - ##[[KeyPgInputfilemode Input (Mode fichier)]]## {{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgLoByte.wakka b/fbdocs/manual/cache/KeyPgLoByte.wakka index 72ebbb0993..a92014f7d5 100644 --- a/fbdocs/manual/cache/KeyPgLoByte.wakka +++ b/fbdocs/manual/cache/KeyPgLoByte.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOBYTE"}}---- -Gets the least-significant byte (LSB, or //lo-byte//) of an ##[[KeyPgUinteger Uinteger]]## value. +Obtient la valeur de l'octet le moins significatif (LSB = Least-Significant Byte, ou //lo-byte//) d'une valeur ##[[KeyPgUinteger UInteger]]##. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Lobyte**( //expr// ) ( [[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//) [[KeyPgOpAnd and]] &h000000FF ) @@ -9,13 +9,13 @@ Gets the least-significant byte (LSB, or //lo-byte//) of an ##[[KeyPgUinteger Ui ## {{fbdoc item="param"}} ##//expr//## - A numeric expression, converted to an ##[[KeyPgUinteger Uinteger]]## value. + Une expression numérique, convertie en une valeur ##[[KeyPgUinteger UInteger]]##. -{{fbdoc item="ret"}} - Returns the LSB value of `##[[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//)##`. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur de l'octet le moins significatif (LSB) de `##[[KeyPgCast Cast]]([[KeyPgUinteger UInteger]], //expr//)##`. {{fbdoc item="desc"}} - This macro converts the numeric expression ##//expr//## to an ##[[KeyPgUinteger Uinteger]]## value, then expands to an [[KeyPgUinteger Uinteger]] representing the value of its LSB. + Cette macro convertit l'expression numérique ##//expr//## en une valeur ##[[KeyPgUinteger UInteger]]##, qu'elle développe ensuite en un [[KeyPgUinteger UInteger]] représentant la valeur de son LSB. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/lobyte.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ PRINT "The binary representation of the LSB is "; BIN(LOBYTE(N)) SLEEP %% -The output would look like: +La sortie sera: %% N Is 43905 The Binary representation of N Is 1010101110000001 @@ -44,10 +44,10 @@ The Binary representation of the LSB Is 10000001 {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__LOBYTE""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__LOBYTE**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgHibyte Hibyte]]## diff --git a/fbdocs/manual/cache/KeyPgLoWord.wakka b/fbdocs/manual/cache/KeyPgLoWord.wakka index c6bb9de9c4..e4ac355784 100644 --- a/fbdocs/manual/cache/KeyPgLoWord.wakka +++ b/fbdocs/manual/cache/KeyPgLoWord.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOWORD"}}---- -Gets the least-significant word (LSW, or //lo-word//) of an ##[[KeyPgUinteger Uinteger]]## value. +Obtient la valeur du mot le moins significatif (LSW = Least-Significant Word, ou //lo-word//) d'une valeur ##[[KeyPgUinteger UInteger]]##. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Loword**( //expr// ) ( [[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//) [[KeyPgOpAnd and]] &h0000FFFF ) @@ -9,13 +9,13 @@ Gets the least-significant word (LSW, or //lo-word//) of an ##[[KeyPgUinteger Ui ## {{fbdoc item="param"}} ##//expr//## - A numeric expression, converted to an ##[[KeyPgUinteger Uinteger]]## value. + Une expression numérique, convertie en une valeur ##[[KeyPgUinteger UInteger]]##. -{{fbdoc item="ret"}} - Returns the LSW value of `##[[KeyPgCast Cast]]([[KeyPgUinteger Uinteger]], //expr//)##`. +{{fbdoc item="section" value="Valeur retournée + Retourne la valeur du mot le moins significatif (LSW) de `##[[KeyPgCast Cast]]([[KeyPgUinteger UInteger]], //expr//)##`. {{fbdoc item="desc"}} - This macro converts the numeric expression ##//expr//## to an ##[[KeyPgUinteger Uinteger]]## value, then expands to an [[KeyPgUinteger Uinteger]] representing the value of its LSW. + Cette macro convertit l'expression numérique ##//expr//## en une valeur ##[[KeyPgUinteger UInteger]]##, qu'elle développe ensuite en un [[KeyPgUinteger UInteger]] représentant la valeur de son LSW. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/bits/loword.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ PRINT "The binary representation of the LSW is "; BIN(LOWORD(N)) SLEEP %% -The output would look like: +La sortie sera: %% N Is 2147614719 The Binary representation of N Is 10000000000000011111111111111111 @@ -46,10 +46,10 @@ The Binary representation of the LSW Is 1111111111111111 {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__LOWORD""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__LOWORD**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLoByte Lobyte]]## diff --git a/fbdocs/manual/cache/KeyPgLoc.wakka b/fbdocs/manual/cache/KeyPgLoc.wakka index 759c18445c..b0fca41a64 100644 --- a/fbdocs/manual/cache/KeyPgLoc.wakka +++ b/fbdocs/manual/cache/KeyPgLoc.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOC"}}---- -Returns the file position where the last file read/write was performed +Retourne la position où la dernière opération de lecture/écriture du fichier a été réalisée {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Loc** ( [[KeyPgByval byval]] //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] @@ -9,22 +9,22 @@ Returns the file position where the last file read/write was performed ## {{fbdoc item="param"}} ##//filenum//## - The file number of an open file. + Le numéro d'un fichier ouvert. -{{fbdoc item="ret"}} - The file position where the last read/write was performed. +{{fbdoc item="section" value="Valeur retournée + La position où la dernière opération de lecture/écriture du fichier a été réalisée. {{fbdoc item="desc"}} - Returns the position where the last file read/write was performed. + Retourne la position où la dernière opération de lecture/écriture du fichier a été réalisée. - The position is indicated in records: - In files opened FOR RANDOM the record length specified when file was opened is used - In text files (FOR INPUT|OUTPUT|APPEND, a record length of 128 bytes is supposed. - In files opened for BINARY a 1 byte record length is used. + La position est indiquée en enregistrements: + Dans les fichiers ouverts FOR RANDOM la longueur en enregistrements est spécifiée quand le fichier qui a été ouvert est utilisé. + Dans les fichiers texte (FOR INPUT|OUTPUT|APPEND, un enregistrement est supposé avoir une longueur de 128 octets. + Dans les fichiers ouverts BINARY la longueur d'un enregistrement est de 1 octet. - In FreeBASIC the file position is 1 based, the first record of a file is record 1. + Dans FreeBASIC la position dans le fichier est basée sur 1, le premier enregistrement d'un fichier a le numéro 1. - When used with a serial device, ##**Loc**## returns the number of bytes waiting to be read from the serial device's input buffer. + Lorsqu'il est utilisé avec un périphérique série, ##**LOC**## renvoie le nombre d'octets en attente de lecture dans la mémoire tampon d'entrée du dispositif série. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/loc.bas"}}%%(freebasic) @@ -52,12 +52,12 @@ close #1 %% {{fbdoc item="diff"}} - - !!WRITEME!! ? + - !! À écrire !! ? {{fbdoc item="see"}} - ##[[KeyPgLof Lof]]## - ##[[KeyPgEof Eof]]## - - ##[[KeyPgSeekreturn Seek (Function)]]## + - ##[[KeyPgSeekreturn Seek (Fonction)]]## - ##[[KeyPgOpen Open]]## {{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgLocal.wakka b/fbdocs/manual/cache/KeyPgLocal.wakka index 8890091d0b..45d7c70df2 100644 --- a/fbdocs/manual/cache/KeyPgLocal.wakka +++ b/fbdocs/manual/cache/KeyPgLocal.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOCAL"}}---- -Error handling statement to set the current error handler +Instruction de gestion des erreurs pour définir le gestionnaire d'erreur courant {{fbdoc item="syntax"}}## On **Local** Error Goto //label// @@ -7,14 +7,14 @@ Error handling statement to set the current error handler {{fbdoc item="usage"}}## On **Local** Error Goto //label// ## -{{fbdoc item="param"}} +{{fbdoc item="section" value="Paramétres ##//label//## - label to jump to when error occurs + label où sauter en cas d'erreur {{fbdoc item="desc"}} - The ##**Local**## clause in an ##[[KeyPgOnerror On Error]]## construction allows to define an error handler in the same ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## the ##**On Local Error**## is. ##[[KeyPgExit Exit]]## ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## must be used before the start of the error handler. + La clause ##**Local**## dans une construction de type ##[[KeyPgOnerror On Error]]## permet de définir un gestionnaire d'erreur dans le même style ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## que ##**On Local Error**##. ##[[KeyPgExit Exit]]## ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## doit être utilisé avant le début du gestionnaire d'erreur. - Notice the program must be compiled with //[[CompilerOpte -e]]// or //[[CompilerOptex -ex]]// option for the QB-like error handling to work. + Notez que le programme doit être compilé avec l'option //[[CompilerOpte -e]]// ou //[[CompilerOptex -ex]]// pour que fonctionne la gestion de type QB des erreurs. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/local.bas"}}%%(freebasic) @@ -41,9 +41,9 @@ fail: ' here starts the error handler End Sub %% {{fbdoc item="diff"}} - - The LOCAL clause comes from PDS 7.1. QB 4.5 does not allow local error handling. + - La clause LOCAL vient de PDS 7.1. QB 4.5 ne permet pas la gestion locale des erreurs. {{fbdoc item="see"}} - - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} + - [[ProPgErrorHandling Gestion des erreurs]] {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} diff --git a/fbdocs/manual/cache/KeyPgLocate.wakka b/fbdocs/manual/cache/KeyPgLocate.wakka index 5010743df0..6812a07ed0 100644 --- a/fbdocs/manual/cache/KeyPgLocate.wakka +++ b/fbdocs/manual/cache/KeyPgLocate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOCATE"}}---- -Sets the current cursor position +Fixe la position ligne et colonne du cuseur ainsi que sa visibilité {{fbdoc item="syntax"}}## **Locate** [//row// [[KeyPgAs as]] [[KeyPgInteger integer]] ][, [//column// [[KeyPgAs as]] [[KeyPgInteger integer]] ][, [//cursorstate// [[KeyPgAs as]] [[KeyPgInteger integer]] ]][, [//start// [[KeyPgAs as]] [[KeyPgInteger integer]] ][, [//stop// [[KeyPgAs as]] [[KeyPgInteger integer]] ] @@ -9,23 +9,42 @@ Sets the current cursor position ## {{fbdoc item="param"}} ##//row//## - the 1-based vertical character position in the console. + position verticale (en caractères), dans la console, du curseur (1ère position = 1 non pas 0). ##//column//## - the 1-based horizontal character position in the console. + position horizonale (en caractères), dans la console, du curseur (1ère position = 1 non pas 0). ##//cursorstate//## - the state of the cursor. ##0## is off, ##1## is on (console-mode only). + l'état du curseur. ##0## est invisible (off), ##1## est visible (on) (mode console seulement). ##//start//## - Ignored. Allowed for //[[CompilerOptlang -lang qb]]// dialect compatibility only. + Ignoré. Alloué seulement pour compatibilité avec le dialecte //[[CompilerOptlang -lang qb]]//. ##//stop//## - Ignored. Allowed for //[[CompilerOptlang -lang qb]]// dialect compatibility only. + Ignoré. Alloué seulement pour compatibilité avec le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="desc"}} - Sets the text cursor in both graphics and console modes. + Valide le curseur texte aussi bien dans les modes graphiques que console. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/console/locate.bas"}}%%(freebasic) + %%(freebasic) locate 10 print "Current line:"; CSRLIN +%% + + {{fbdoc item="diff"}} +- Les arguments ##//start//## et ##//stop//## n'ont aucun effet dans FreeBASIC. +{{fbdoc item="see"}} + +- ##[[KeyPgCsrlin CsrLin]]## +- ##[[KeyPgPos Pos]]## + +- ##[[KeyPgPrint Print]]## + getmouse dx, dy + if( dx <> x or dy <> y ) then + locate y+1, x+1: print " "; + x = dx + y = dy + locate 1, 1: print x, y, "" + locate y+1, x+1: print "X"; + end if +wend %% {{fbdoc item="diff"}} diff --git a/fbdocs/manual/cache/KeyPgLock.wakka b/fbdocs/manual/cache/KeyPgLock.wakka index 42bb50668c..12527fa47b 100644 --- a/fbdocs/manual/cache/KeyPgLock.wakka +++ b/fbdocs/manual/cache/KeyPgLock.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOCK"}}---- -Restricts read/write access to a file or portion of a file +Limite l'accès en lecture/écriture sur un fichier ou une partie d'un fichier {{fbdoc item="syntax"}}## **Lock** #//filenum//, //record// @@ -7,20 +7,20 @@ Restricts read/write access to a file or portion of a file ## {{fbdoc item="param"}} ##//filenum//## - The file number used to ##[[KeyPgOpen Open]]## the file. + Le numéro du fichier pour ##[[KeyPgOpen Open (=ouvrir)]]## le fichier. ##//record//## - The record (##[[KeyPgRandom Random]]## files) to lock. + L'enregistrement (fichiers ##[[KeyPgRandom Random]]##) à verrouiller. ##//start//## - The first byte position (##[[KeyPgBinary Binary]]## files) to lock from. + La position du premier octet (##[[KeyPgBinary Binary]]## files) à partir duquel verrouiller. ##//end//## - The last byte position (##[[KeyPgBinary Binary]]## files) to lock to. + La position du dernier octet (##[[KeyPgBinary Binary]]## files) jusqu'où verrouiller. {{fbdoc item="desc"}} - ##**Lock**## temporarily restricts access by other threads or programs to a file, or portion of a file, usually to allow safe writing to it. + ##**Lock**## restreint temporairement l'accès par d'autres ##//threads//## ou programmes dans un fichier, ou une partie d'un fichier, généralement pour permettre une écriture sécurisée dans ce fichier (ou partie de...). - After modifying the data, an ##[[KeyPgUnlock Unlock]]## with the same parameters as the ##**Lock**## should be issued. + Après avoir modifié les données, un ##[[KeyPgUnlock Unlock]]## avec les mêmes paramètres que ##**Lock**## doit être effectué. - **Note: This command does not always work, neither as documented nor as expected. It appears to be broken at the moment.** + **Note: Cette commande ne fonctionne toujours pas, ni comme documentée, ni comme prévu. Elle semble être "cassée" pour le moment.** {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/lock.bas"}}%%(freebasic) @@ -41,8 +41,8 @@ close #f %% {{fbdoc item="diff"}} - - Currently, FB cannot implicitly lock the entire file - - In ##[[KeyPgRandom Random]]## mode, FB cannot lock a range of records + - Actuellement, FB ne peut pas verrouiller implicitement tout le fichier. + - En mode ##[[KeyPgRandom Random]]##, FB ne peut pas verrouiller une plage d'enregistrements. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgLof.wakka b/fbdocs/manual/cache/KeyPgLof.wakka index 5b481a3758..0d0a623117 100644 --- a/fbdocs/manual/cache/KeyPgLof.wakka +++ b/fbdocs/manual/cache/KeyPgLof.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOF"}}---- -Returns the length of an open disk file +Retourne la longueur d'un fichier disque ouvert {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Lof** ( [[KeyPgByval byval]] //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] @@ -9,15 +9,15 @@ Returns the length of an open disk file ## {{fbdoc item="param"}} ##//filenum//## - The file number of an open disk file. + Le numéro de fichier d'un fichier ouvert sur le disque. -{{fbdoc item="ret"}} - The length in bytes of an open disk file. +{{fbdoc item="section" value="Valeur retournée + La longueur en octets d'un fichier ouvert sur le disque. {{fbdoc item="desc"}} - Returns the length, in bytes, of a file opened previously with ##[[KeyPgOpen Open]]## using the given ##//filenum//##. + Renvoie la longueur, en octets, d'un fichier ouvert précédemment avec ##[[KeyPgOpen Open (=ouvrir)]]## en utilisant ##//filenum//##. - With ##[[KeyPgOpenCom Open Com]]## it returns the length of the data pending to be read in the receive buffer. + Avec ##[[KeyPgOpenCom Open Com]]##, il renvoie la longueur des données en attente d'être lues, dans le tampon de réception. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/lof.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ close #f %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgLoc Loc]]## diff --git a/fbdocs/manual/cache/KeyPgLog.wakka b/fbdocs/manual/cache/KeyPgLog.wakka index 3c2e245c45..1e0b589736 100644 --- a/fbdocs/manual/cache/KeyPgLog.wakka +++ b/fbdocs/manual/cache/KeyPgLog.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOG"}}---- -Returns the natural logarithm of a given number +Retourne le logarithme naturel d'un nombre donné {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Log** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Returns the natural logarithm of a given number ## {{fbdoc item="param"}} ##//number//## - The number to calculate the natural log. + Le nombre pour lequel on calcule le logarithme naturel. -{{fbdoc item="ret"}} - Returns the logarithm with the base //e// (also know as the natural logarithm) of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Retourne le logarithme avec la base //**e**// (connu aussi sous le nom de logarithme naturel) de ##//number//##. {{fbdoc item="desc"}} - There can be some confusion with this notation given that in mathematics the natural logarithm function is usually denoted **LN**, while the logarithm of base 10 is often denoted as LOG. FreeBASIC, like most computer programming languages, uses LOG to denote the natural logarithm. The required //number// argument can be any valid numeric expression greater than zero. If ##//number//## is zero, FreeBASIC returns a special value representing "-infinity", printing like "-Inf". If ##//number//## is less than zero, **Log** returns a special value representing "not defined", printing like """NaN""" or "IND", exact text is platform dependent. If ##//number//## is an uninitialized variable, -infinity is returned. + Il peut y avoir une certaine confusion avec cette notation étant donné que dans les mathématiques la fonction logarithme naturel est généralement notée **LN**, tandis que le logarithme de base 10 est souvent notée comme LOG. FreeBasic, comme la plupart des langages de programmation informatique, utilise LOG pour désigner le logarithme naturel. Si ##//number//## est égal à zéro, FreeBasic retourne une valeur spéciale qui représente "-infinity", affiché "-Inf". Si ##//number//## est inférieur à zéro, **Log** retourne une valeur spéciale représentant "non défini", affichée "NaN" ou "IND", le texte exact dépend de la plate-forme de travail. Si ##//number//## est une variable non initialisée, "-infinity" est retourné. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/log.bas"}}%%(freebasic) @@ -31,14 +31,14 @@ PRINT "The log base 2 of 16 is:"; LogBaseX ( 16 , 2 ) SLEEP %% -The output would look like: +Affichera: %% The log base 10 of 20 is: 1.301029995663981 The log base 2 of 16 is: 4 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgExp Exp]]## diff --git a/fbdocs/manual/cache/KeyPgLong.wakka b/fbdocs/manual/cache/KeyPgLong.wakka index 56f8498261..87cfdce9f2 100644 --- a/fbdocs/manual/cache/KeyPgLong.wakka +++ b/fbdocs/manual/cache/KeyPgLong.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="LONG"}}---- -Standard data type: signed integer having same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## +Type de données standard: nombre entier signé ayant la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Long** ## {{fbdoc item="desc"}} - Depending on the platform, same as ##[[KeyPgInteger Integer]]## or ##[[KeyPgLongint Longint]]##. A 32-bit or 64-bit signed whole-number data type. + Selon la plate-forme, identique à un ##[[KeyPgInteger Integer]]## ou un ##[[KeyPgLongint LongInt]]##. Type de données: nombre entier signé de 32 bits ou 64 bits. - ##**Long**## has the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. + ##**Long**## a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/long.bas"}}%%(freebasic) @@ -15,16 +15,16 @@ Standard data type: signed integer having same size as ##[[KeyPgSizeof Sizeof]]( Dim y As Long = &H7FFFFFFF Print "Long Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%Long Range = -2147483648 to 2147483647%% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the ##**Long**## data type has the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. - - In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Long**## data type is always 32-bit. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, le type de données ##**Long**## a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, le type de données ##**Long**## a toujours 32 bits. {{fbdoc item="diff"}} - - In QB, LONG is always 32-bit. - - None, if compiled in the //[[CompilerOptlang -lang qb]]// dialect. + - Dans QB, LONG est toujours 32 bits. + - Aucune, si compilé dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgInteger Integer]]## diff --git a/fbdocs/manual/cache/KeyPgLongint.wakka b/fbdocs/manual/cache/KeyPgLongint.wakka index a3e5e3301e..8bfb298157 100644 --- a/fbdocs/manual/cache/KeyPgLongint.wakka +++ b/fbdocs/manual/cache/KeyPgLongint.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="LONGINT"}}---- -Standard data type: 64 bit signed +Type de données standard: entier signé de 64 bits {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Longint** ## {{fbdoc item="desc"}} - A 64-bit signed whole-number data type. Can hold values from -9 223 372 036 854 775 808 to 9 223 372 036 854 775 807 + Un nombre entier signé de 64 bits. Peut contenir des valeurs de -9 223 372 036 854 775 808 à 9 223 372 036 854 775 807. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/longint.bas"}}%%(freebasic) @@ -13,15 +13,15 @@ Standard data type: 64 bit signed Dim y As Longint = &H7FFFFFFFFFFFFFFF Print "LongInt Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%LongInt Range = -9223372036854775808 to 9223372036854775807%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Longint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Longint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgUlongint Ulongint]]## diff --git a/fbdocs/manual/cache/KeyPgLoop.wakka b/fbdocs/manual/cache/KeyPgLoop.wakka index 34feb229d8..4be5042e7b 100644 --- a/fbdocs/manual/cache/KeyPgLoop.wakka +++ b/fbdocs/manual/cache/KeyPgLoop.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LOOP"}}---- -Control flow statement for looping. +Déclaration de contrôle de flux pour une boucle. {{fbdoc item="syntax"}}## **Do** diff --git a/fbdocs/manual/cache/KeyPgLpos.wakka b/fbdocs/manual/cache/KeyPgLpos.wakka index 59fa180f5b..6b2bbf7272 100644 --- a/fbdocs/manual/cache/KeyPgLpos.wakka +++ b/fbdocs/manual/cache/KeyPgLpos.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LPOS"}}---- -Returns the number of characters sent to the printer port in the last ##[[KeyPgLprint Lprint]]## statement. +Retourne le nombre de caractères envoyés au port d'imprimante depuis la dernière déclaration ##[[KeyPgLprint LPrint]]##. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Lpos** ( [[KeyPgByval byval]] //printer// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Returns the number of characters sent to the printer port in the last ##[[KeyPgL ## {{fbdoc item="param"}} ##//printer//## - Either 0, 1, 2 or 3. Represents the printer port (LPT#) + 0, 1, 2 ou 3. Représente le port imprimante (LPT#) -{{fbdoc item="ret"}} - Returns the number of characters sent. +{{fbdoc item="section" value="Valeur retournée + Retourne le nombre de caractères envoyés. {{fbdoc item="desc"}} - Used to determine, from the last ##[[KeyPgLprint Lprint]]##, how many characters were sent to the printer port. + Utilisé pour déterminer, à partir du dernier ##[[KeyPgLprint LPrint]]##, combien de caractères ont été envoyés au port d'imprimante. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/hardware/lpos.bas"}}%%(freebasic) @@ -34,7 +34,7 @@ Sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgLprint Lprint]]## diff --git a/fbdocs/manual/cache/KeyPgLprint.wakka b/fbdocs/manual/cache/KeyPgLprint.wakka index b85d3113ee..39b63402b9 100644 --- a/fbdocs/manual/cache/KeyPgLprint.wakka +++ b/fbdocs/manual/cache/KeyPgLprint.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="LPRINT"}}---- -Writes text to the default printer. +Écrit du texte vers l'imprimante par défaut. {{fbdoc item="syntax"}}## **Lprint** [ [[KeyPgPrintusing Using]] //formatstring//,] [//expressionlist//] [(, | ;)] ... ## {{fbdoc item="param"}} ##//formatstring//## - String specifying the output format. + Chaîne spécifiant le format de sortie. ##//expressionlist//## - List of variables to output according to the specified format. + Liste des variables pour une sortie selon le format spécifié. {{fbdoc item="desc"}} - Prints ##//expressionlist//## to the printer attached to the parallel port LPT1, or if it does not exist, to the default printer. To print to a printer different from the default one, use ##[[KeyPgOpenLpt OPEN LPT]]##. + Imprime ##//expressionlist//## sur l'imprimante connectée au port parallèle LPT1, ou si elle n'existe pas, à l'imprimante par défaut. Pour imprimer sur une imprimante différente de celle par défaut, utilisez ##[[KeyPgOpenLpt Open Lpt]]##. - The ##[[KeyPgPrintusing Using]]## clause formats ##//expressionlist//## according to ##//formatstring//##. Any data type but a UDT can be passed to **##Lprint##** ##//expressionlist##//, expressions do **not** have to be converted to strings first. + La clause ##[[KeyPgPrintusing Using]]## formate ##//expressionlist//## en accord avec ##//formatstring//##. Tout type de données sauf un type défini par l'utilisateur peut être passé à **##LPrint##** ##//expressionlist##//, les expressions n'ont pas à être converties en chaînes avant. - Using a comma (##,##) as separator or in the end of the ##//expressionlist//## will place the cursor in the next column (every 14 characters), using a semi-colon (##;##) won't move the cursor. If neither of them are used in the end of the ##//expressionlist//##, then a new-line will be printed. + L'utilisation d'une virgule (##,##) comme séparateur ou à la fin de ##//expressionlist//## placera le curseur au début de la colonne suivante (tous les 14 caractères), l'utilisation d'un point-virgule (##;##) ne déplacera pas le curseur. Si ni l'un ni l'autre n'est placé à la fin de ##//expressionlist//##, alors une spécification de nouvelle ligne sera envoyée. - Some printers will not print at all until a ##[[KeyPgChr Chr]](12)## (End of Page) character is printed. + Certaines imprimantes n'impriment rien tant qu'un caractère ##[[KeyPgChr Chr]](12)## (Fin de Page) n'est pas envoyé. - Internally, FreeBASIC uses the special file number ##-1## for printing using **##Lprint##**. This file number may be safely closed using ##[[KeyPgClose Close]] -1##. The next use of **##Lprint##** will automatically reopen it as needed. + En interne, FreeBASIC utilise le numéro de fichier spécial ##-1## pour l'impression en utilisant **##LPrint##**. Ce numéro de fichier peut être fermé en toute sécurité avec ##[[KeyPgClose Close]] -1##. L'utilisation suivante de **##LPrint##** le réouvrira automatiquement si nécessaire. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/hardware/lprint.bas"}}%%(freebasic) @@ -43,10 +43,10 @@ LPrint Chr$(12) %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="lang"}} - - ##**Lprint**## is not supported in the //[[CompilerOptlang -lang fb]]// dialect. In this dialect the printer must be properly opened with ##[[KeyPgOpenLpt Open LPT]]## and ##[[KeyPgPrintPp Print #]]## must be used to print. + - ##**LPrint**## n'est pas supporté par le dialecte //[[CompilerOptlang -lang fb]]//. Dans ce dialecte, l'imprimante doit être ouverte correctement avec ##[[KeyPgOpenLpt Open Lpt]]## et ##[[KeyPgPrintPp Print #]]## doit être utilisé pour imprimer. {{fbdoc item="see"}} - ##[[KeyPgOpenLpt Open LPT]]## diff --git a/fbdocs/manual/cache/KeyPgLset.wakka b/fbdocs/manual/cache/KeyPgLset.wakka index 8b4acdf60e..31ccce0626 100644 --- a/fbdocs/manual/cache/KeyPgLset.wakka +++ b/fbdocs/manual/cache/KeyPgLset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LSET"}}---- -Left-justifies a string +Justification à gauche d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Lset** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //dst// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //src// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) @@ -10,19 +10,19 @@ Left-justifies a string **Lset** //dst_udt//, //src_udt// ## {{fbdoc item="param"}} - ##//src//## - String variable to receive the data. ##//dst//## - Source string to get the data. + Variable chaîne pour recevoir les données. + ##//src//## + Chaîne source pour obtenir les données. ##//dst_udt//## - User defined ##[[KeyPgType Type]]## to receive the data. + ##[[KeyPgType Type]]## défini par l'utilisateur pour recevoir les données. ##//src_udt//## - User defined ##[[KeyPgType Type]]## to copy the data from. + ##[[KeyPgType Type]]## défini par l'utilisateur pour fournir les données. {{fbdoc item="desc"}} - ##**Lset**## left justifies text into the string buffer ##//dst//##, filling the left part of the string with ##//src//## and the right part with spaces. The string buffer size is not modified. + ##**LSet**## justifie à gauche un texte dans un tampon chaîne ##//dst//##, en remplissant sa partie gauche avec ##//src//## et sa partie droite avec des espaces. La taille du tampon chaîne n'est pas modifiée. - For compatibility with QBasic, ##**Lset**## can also copy a user defined type variable into another one. The copy is made byte for byte, without any care for fields or alignment. It's up to the programmer to take care for the validity of the result. + Pour une compatibilité avec QBasic, ##**LSet**## peut aussi copier une variable définie par l'utilisateur dans une autre. La copie est effectuée octet par octet, sans se préoccuper des champs ou de l'alignement. C'est au programmeur de s'occuper de la validité des résultats. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/lset.bas"}}%%(freebasic) @@ -50,7 +50,7 @@ print a.x %% {{fbdoc item="diff"}} - -In QB, the syntax was ##**Lset** //dst// = //src//## +
  • Dans QB, la syntaxe est ##**LSet** //dst// = //src//## {{fbdoc item="see"}} - ##[[KeyPgRset Rset]]## diff --git a/fbdocs/manual/cache/KeyPgLtrim.wakka b/fbdocs/manual/cache/KeyPgLtrim.wakka index 27f418f329..a58af4d5f6 100644 --- a/fbdocs/manual/cache/KeyPgLtrim.wakka +++ b/fbdocs/manual/cache/KeyPgLtrim.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="LTRIM"}}---- -Removes surrounding substrings or characters on the left side of a string +Enlève les sous-chaines qui entourent ou les caractères sur le côté gauche d'une chaîne. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Ltrim** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [ **Any** ] [[KeyPgByref byref]] //trimset// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] = " " ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,19 +10,19 @@ Removes surrounding substrings or characters on the left side of a string ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne source. ##//trimset//## - The substring to trim. + La sous-chaîne à enlever. -{{fbdoc item="ret"}} - Returns the trimmed string. +{{fbdoc item="section" value="Valeur retournée + Retourne la chaîne "nettoyée" à gauche. {{fbdoc item="desc"}} - This procedure trims surrounding characters from the left (beginning) of a source string. Substrings matching ##//trimset//## will be trimmed if specified, otherwise spaces ([[CptAscii ASCII]] code 32) are trimmed. + Cette procédure élimine les caractères entourant à gauche (début) de la chaîne source. Les sous-chaînes correspondant à ##//trimset//## seront éliminées si spécifiées, autrement les espaces (code [[CptAscii ASCII]] 32) sont éliminés. - If the ##**Any**## keyword is used, any character matching a character in ##//trimset//## will be trimmed. + Si le mot-clef ##**Any**## est utilisé, chaque caractère correspondant à un caractère dans ##//trimset//## sera éliminé. - All comparisons are case-sensitive. + Toutes les comparaisons sont sensibles à la casse. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/ltrim.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ dim s2 as string = "BaaBaaBAA Test Pattern" Print "'" + ltrim(s2, "Baa") + "'" Print "'" + ltrim(s2, any "BaA") + "'" %% - will produce the output: + produira la sortie: %%'101 Things to do.' ' 101 Things to do.' @@ -45,14 +45,14 @@ Print "'" + ltrim(s2, any "BaA") + "'" %% {{fbdoc item="target"}} - - DOS version/target of ""FreeBASIC"" does not support the wide-character version of ##**LTrim**##. + - La version/cible DOS de FreeBASIC ne supporte pas la version larges-caractères de ##**LTrim**##. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - QB does not support specifying a ##//trimset//## string or the ##ANY## clause. + - QB ne supporte pas les spécifications ##//trimset//## ou ##ANY##. {{fbdoc item="see"}} - ##[[KeyPgRtrim Rtrim]]## diff --git a/fbdocs/manual/cache/KeyPgMemberFunction.wakka b/fbdocs/manual/cache/KeyPgMemberFunction.wakka index 7edcc61a54..10dbd35b82 100644 --- a/fbdocs/manual/cache/KeyPgMemberFunction.wakka +++ b/fbdocs/manual/cache/KeyPgMemberFunction.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="FUNCTION (Member)"}}---- -Declares or defines a member procedure returning a value. +Déclare ou définit une procédure membre qui renvoie une valeur. {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] } //typename// @@ -12,24 +12,24 @@ Declares or defines a member procedure returning a value. ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]## + nom de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]## ou ##[[KeyPgUnion Union]]## ##//fieldname//## - name of the procedure + nom de la procédure ##//external_name//## - name of field as seen when externally linked + nom de champ vu quand on établit des liens externes ##//parameters//## - the parameters to be passed to the procedure + les paramètres à passer à la procédure ##//calling convention specifier//## - can be one of: ##[[KeyPgCdecl Cdecl]]##, ##[[KeyPgStdcall Stdcall]]## or ##[[KeyPgPascal Pascal]]## + peut être: ##[[KeyPgCdecl cdecl]]##, ##[[KeyPgStdcall stdcall]]## ou ##[[KeyPgPascal pascal]]## {{fbdoc item="desc"}} - ##**Function**## members are accessed with ##[[KeyPgOpMemberAccess Operator . (Member access)]]## or ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]## to call a member procedure that returns a value. The procedure may optionally accept parameters either ##[[KeyPgByval byval]]## or ##[[KeyPgByref byref]]##. ##//typename//## be overloaded without explicit use of the ##[[KeyPgOverload Overload]]## keyword. + Les membres de ##**Function**## sont accessibles avec ##[[KeyPgOpMemberAccess Operator . (Accès de membre)]]## ou ##[[KeyPgOpPtrMemberAccess Operator -> (Pointeur vers Accès de membre)]]## pour appeler une procédure membre qui retourne une valeur. La procédure peut éventuellement accepter des paramètres ##[[KeyPgByval ByVal]]## ou ##[[KeyPgByref ByRef]]##. ##//typename//## peut être surchargé, sans utilisation explicite du mot-clé ##[[KeyPgOverload Overload]]##. - ##//typename//## is the name of the type for which the ##**Function**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace Namespace]]##. + ##//typename//## est le nom du type avec lequel la ##**Function**## est déclarée et définie. La résolution de noms pour ##//typename//## suit les mêmes règles que pour les procédures en cas d'utilisation dans un ##[[KeyPgNamespace Namespace = Espace de noms]]##. - A hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//## is passed to non-static member procedures. ##[[KeyPgThis this]]## is used to access the fields of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]##. + Un paramètre caché ##[[KeyPgThis This]]## ayant le même type que ##//typename//## est passé aux procédures membres non statiques. ##[[KeyPgThis This]]## est utilisé pour accéder aux champs de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]## ou ##[[KeyPgUnion Union]]##. - A ##[[KeyPgStaticMember Static (Member)]]## may be declared using the ##**Static**## specifier. A ##[[KeyPgConstMember Const (Member)]]## may be declared using the ##**Const**## specifier. + Un ##[[KeyPgStaticMember Static (Membre)]]## peut être déclaré en utilisant le spécificateur ##**Static**##. A ##[[KeyPgConstMember Const (Membre)]]## peut être déclaré en utilisant le spécificateur ##**Const**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/function.bas"}}%%(freebasic) @@ -72,12 +72,12 @@ print "Day = "; d.Day %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## - ##[[KeyPgFunction Function]]## - - ##[[KeyPgMemberSub Sub (Member)]]## + - ##[[KeyPgMemberSub Sub (Membre)]]## - ##[[KeyPgType Type]]## {{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgMemberSub.wakka b/fbdocs/manual/cache/KeyPgMemberSub.wakka index 0302f07e71..8f0ee26441 100644 --- a/fbdocs/manual/cache/KeyPgMemberSub.wakka +++ b/fbdocs/manual/cache/KeyPgMemberSub.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SUB (Member)"}}---- -Declares or defines a member procedure. +Déclare ou définit un membre de procédure. {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] } //typename// @@ -12,24 +12,24 @@ Declares or defines a member procedure. ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]## + nom de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ou ##[[KeyPgUnion Union]]## ##//fieldname//## - name of the procedure + nom de la procédure ##//external_name//## - name of field as seen when externally linked + nom du champ tel qu'il est vu quand lié extérieurement ##//parameters//## - the parameters to be passed to the procedure - ##//calling convention specifier//## - can be one of: ##[[KeyPgCdecl Cdecl]]##, ##[[KeyPgStdcall Stdcall]]## or ##[[KeyPgPascal Pascal]]## + les paramètres à passer à la procèdure + ##//spécificateur de convention d'appel//## + peut être: ##[[KeyPgCdecl cdecl]]##, ##[[KeyPgStdcall stdcall]]## ou ##[[KeyPgPascal pascal]]## {{fbdoc item="desc"}} - ##**Sub**## members are accessed with ##[[KeyPgOpMemberAccess Operator . (Member access)]]## or ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]## to call a member procedure and may optionally accept parameters either ##[[KeyPgByval byval]]## or ##[[KeyPgByref byref]]##. ##//typename//## be overloaded without explicit use of the ##[[KeyPgOverload Overload]]## keyword. + Les membres de ##**Sub**## sont accessibles avec ##[[KeyPgOpMemberAccess "Operator . (Accès de membre)"]]## ou ##[[KeyPgOpPtrMemberAccess "Operator -> (Pointeur vers Accès membre)"]]## pour appeler des membres de procédure et peuvent éventuellement accepter des paramètres comme ##[[KeyPgByval ByVal]]## ou ##[[KeyPgByref ByRef]]##. ##//typename//## peut être surchargé sans l'utilisation explicite du mot-clef ##[[KeyPgOverload Overload]]##. - ##//typename//## is the name of the type for which the ##**Sub**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace Namespace]]##. + ##//typename//## est le nom du type sous lequel la méthode ##**Sub**## a été déclarée et définie. La résolution de nom de ##//typename//## suit les mêmes règles que les procèdures quand elles sont utilisées dans un ##[[KeyPgNamespace Namespace]]##. - A hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//## is passed to non-static member procedures. ##[[KeyPgThis this]]## is used to access the fields of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]##. + Le paramètre caché ##[[KeyPgThis This]]## qui a le même type que ##//typename//## est passé aux membres non-statics des procédures. ##[[KeyPgThis This]]## est utilisé pour accéder aux champs du ##[[KeyPgType Type]]##, de la ##[[KeyPgClass Class]]##, ou de l'##[[KeyPgUnion Union]]##. - A ##[[KeyPgStaticMember Static (Member)]]## may be declared using the ##**Static**## specifier. A ##[[KeyPgConstMember Const (Member)]]## may be declared using the ##**Const**## specifier. + Un ##[[KeyPgStaticMember Static (Membre)]]## peut être déclaré en utilisant le spécificateur ##**Static**##. Un ##[[KeyPgConstMember Const (Membre)]]## peut être déclaré en utilisant le spécificateur ##**Const**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/sub.bas"}}%%(freebasic) @@ -64,18 +64,18 @@ stats.AddValue 16.9 stats.ShowResults %% -**Output:** +**Affichage:** %% Number of Values = 4 Average = 19.2 %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## - - ##[[KeyPgMemberFunction Function (Member)]]## + - ##[[KeyPgMemberFunction Function (Membre)]]## - ##[[KeyPgSub Sub]]## - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgMetaDynamic.wakka b/fbdocs/manual/cache/KeyPgMetaDynamic.wakka index 16c9b76a91..b8242d0685 100644 --- a/fbdocs/manual/cache/KeyPgMetaDynamic.wakka +++ b/fbdocs/manual/cache/KeyPgMetaDynamic.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="$DYNAMIC"}}---- -Metacommand to change the way arrays are allocated +Métacommande pour changer la façon dont les tableaux sont alloués {{fbdoc item="syntax"}}## **'$Dynamic** - //or// + //ou// [[KeyPgRem rem]] **$Dynamic** ## {{fbdoc item="desc"}} - **'$Dynamic** is metacommand that specifies that any following array declarations are variable-length, whether they are declared with constant subscript ranges or not. This remains in effect for the rest of the module in which **'$Dynamic** is used, and can be overridden with ##[[KeyPgMetaStatic $Static]]##. + **'$Dynamic** est une métacommande qui implique que toutes les déclarations de tableaux qui suivent, qu'elles aient été déclarées avec un intervalle d'indices constant ou non, sont de longueur variable. Ceci demeure en vigueur pour le reste du module dans lequel **'$Dynamic** est utilisé, et peut être modifié avec ##[[KeyPgMetaStatic $Static]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/meta/dynamic.bas"}}%%(freebasic) @@ -21,10 +21,10 @@ Dim a(100) ReDim a(200) %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - When used inside comments it must be the first token + - Lorsqu'il est utilisé dans les commentaires il doit être le premier symbole {{fbdoc item="see"}} - ##[[KeyPgMetaStatic $Static]]## diff --git a/fbdocs/manual/cache/KeyPgMetaInclude.wakka b/fbdocs/manual/cache/KeyPgMetaInclude.wakka index 8f35bcc922..9c1fa3c7a8 100644 --- a/fbdocs/manual/cache/KeyPgMetaInclude.wakka +++ b/fbdocs/manual/cache/KeyPgMetaInclude.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="$INCLUDE"}}---- -Metacommand statement to include contents of another source file +Métacommande pour inclure le contenu d'un autre fichier source {{fbdoc item="syntax"}}## '$Include [once]: '//file//' @@ -7,11 +7,11 @@ Metacommand statement to include contents of another source file [[KeyPgRem rem]] $Include [once]: '//file//' ## {{fbdoc item="desc"}} - ##**$include**## inserts source code from another file at the point where the ##**$include**## metacommand appears. This has the effect of compiling the source code from the include file as though it were part of the source file that includes it. Once the compiler has reached the end of the include file, the original source file continues to be compiled. + ##**$Include**## insère le code source d'un autre fichier à l'endroit où la métacommande ##**$Include**## apparaît. Cela a pour effet de compiler le code source du fichier à inclure, comme s'il faisait partie du fichier source qui l'inclut. Une fois que le compilateur a atteint la fin du fichier d'inclusion, le fichier source d'origine continue à être compilé. - The ##**once**## specifier tells the compiler to include the file only once even if it is included several times by the source code. + Le spécificateur ##**once**## indique au compilateur de n'inclure le fichier qu'une seule fois, même s'il est inclus à plusieurs reprises dans le code source. - ##**'$Include:**## exists for compatibility with QuickBASIC. It is recommended to use ##[[KeyPgInclude #include]]## instead. + ##**'$Include:**## existe pour la compatibilité avec QuickBASIC. Il est recommandé d'utiliser ##[[KeyPgInclude #include]]## à la place. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/meta/header.bi"}}%%(freebasic) @@ -36,10 +36,10 @@ Foo.Bar = 1 Foo.Barbeque = 2 %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgInclude #include]]## diff --git a/fbdocs/manual/cache/KeyPgMetaLang.wakka b/fbdocs/manual/cache/KeyPgMetaLang.wakka index 8c44225510..94fcd101bb 100644 --- a/fbdocs/manual/cache/KeyPgMetaLang.wakka +++ b/fbdocs/manual/cache/KeyPgMetaLang.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="$LANG"}}---- -Metacommand statement to set the compiler dialect. +Métacommande pour définir le dialecte du compilateur. {{fbdoc item="syntax"}}## **'$lang:** "//lang//" - //or// + //ou// [[KeyPgRem rem]] **$lang:** "//lang//" ## {{fbdoc item="param"}} ##"//lang//"## - The dialect to set, enclosed in double quotes, and must be one of ##"fb"##, ##"fblite"##, ##"qb"##, or ##"deprecated"##. + Le dialecte à fixer, entre guillemets, doit être l'un de ceux-ci: ##"fb"##, ##"fblite"##, ##"qb"##, ou ##"deprecated"##. {{fbdoc item="desc"}} - If the //[[CompilerOptforcelang -forcelang]]// option was not given on the command line, ##**$lang**## can be used to set the dialect for the source module in which it appears. At most two passes will be made on the source module. On the first pass, if the specified dialect is anything other than the default dialect (chosen with //[[CompilerOptlang -lang]]//, or ##"fb"## by default), the compiler will reset the parser for another pass and restart compilation at the beginning of the source module. If this metacommand is encountered again on the second pass, and the specified dialect does not match the new current dialect, a warning is issued and compilation continues. If any errors were encountered on the first pass, the compiler will not attempt a second pass. + Si l'option //[[CompilerOptforcelang -forcelang]]// n'est pas donnée sur la ligne de commande, ##**$Lang**## peut être utilisé pour fixer le dialecte du module source dans lequel il apparaît. Tout au plus deux passes seront effectuées sur le module source. Au premier passage, si le dialecte spécifié est est différent du dialecte par défaut (choisi avec //[[CompilerOptlang -lang]]//, ou ##"fb"## par défaut), le compilateur réinitialisera l'analyseur pour un nouveau passage et redémarrera la compilation au début du module source. Si cette métacommande est rencontrée à nouveau lors du second passage, et que le dialecte spécifié ne correspond pas au nouveau dialecte courant, un avertissement est émis et la compilation continue. Si des erreurs ont été rencontrées lors du premier passage, le compilateur ne tentera pas une seconde passe. - ##**$lang**## may not be used in any compound statement, scope, or subroutine. However, it may be nested in module level preprocessor statements or used in an include file. + ##**$Lang**## ne peut pas être utilisé dans toute instruction composée, portée ou sous-routine. Cependant, il peut être imbriqué dans le module niveau préprocesseur ou utilisé dans un fichier inclus. - There is currently no restriction on where this directive may be placed in a source module. In future this may change, therefore best practice would be to use this directive before the first declaration, definition, or executable statement in the source. + Il n'existe actuellement aucune restriction sur l'endroit où cette directive peut être placée dans un module source. À l'avenir, cela pourrait changer, la meilleure pratique serait donc d'utiliser cette directive avant la première déclaration, définition ou déclaration exécutable dans la source. - This directive overrides the //[[CompilerOptlang -lang]]// option if it was given on the command line. However, if the //[[CompilerOptforcelang -forcelang]]// option was given on the command line, this directive will have no effect. A warning is issued, the directive is ignored, and compilation will continue. This allows the user to explicitly override ##**$lang**## metacommands. + Cette directive remplace l'option //[[CompilerOptlang -lang]]//, si elle a été donnée sur la ligne de commande. Toutefois, si l'option //[[CompilerOptforcelang -forcelang]]// a été donnée sur la ligne de commande, cette directive n'aura aucun effet. Un avertissement est émis, la directive est ignorée et la compilation va se poursuivre. Cela permet à l'utilisateur de remplacer explicitement les métacommandes ##**$Lang**##. - This metacommand was introduced in ""FreeBASIC"" version 0.20.0. Older versions of FB, and ""QuickBASIC"", will treat it as a comment and silently ignore it. + Cette métacommande a été introduite dans la version 0.20.0 de FreeBasic. Dans les anciennes versions de FB et QuickBASIC, elle sera traitée comme un commentaire et ignorée silencieusement . {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/meta/lang.bas"}}%%(freebasic) @@ -27,8 +27,8 @@ Metacommand statement to set the compiler dialect. %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" - - QB handles ##'$lang:## as a normal comment + - Nouveau pour FreeBASIC + - QB considère ##'$lang:## comme un commentaire normal {{fbdoc item="see"}} - ##[[KeyPgPplang #lang]]## diff --git a/fbdocs/manual/cache/KeyPgMetaStatic.wakka b/fbdocs/manual/cache/KeyPgMetaStatic.wakka index 4ab1b763b6..7b5570444a 100644 --- a/fbdocs/manual/cache/KeyPgMetaStatic.wakka +++ b/fbdocs/manual/cache/KeyPgMetaStatic.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="$STATIC"}}---- -Metacommand to change the way arrays are allocated +Métacommande pour changer la façon dont les tableaux sont alloués {{fbdoc item="syntax"}}## **'$Static** - //or// + //ou// [[KeyPgRem rem]] **$Static** ## {{fbdoc item="desc"}} - ##**'$Static**## is a metacommand that overrides the behavior of ##[[KeyPgMetaDynamic $Dynamic]]##, that is, arrays declared with constant subscript ranges are fixed-length. This remains in effect for the rest of the module in which ##**'$Static**## is used, and can be overridden with ##[[KeyPgMetaDynamic $Dynamic]]##. + ##**'$Static**## est une métacommande qui annule le comportement de ##[[KeyPgMetaDynamic $Dynamic]]##, c'est à dire que les tableaux déclarés avec une gamme d'indices constante sont de longueur fixe. Ceci demeure en vigueur pour le reste du module dans lequel ##**'$Static**## est utilisé, et peut être modifié avec ##[[KeyPgMetaDynamic $Dynamic]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/meta/static.bas"}}%%(freebasic) @@ -22,10 +22,10 @@ Dim b(100) '<= len(//str//)## then all of the remaining characters are returned. + Dans la première forme de ##**Mid**##, tous les autres caractères sont retournés. Dans la seconde forme, si ##//n// < 0## ou ##//n// >= len(//str//)## alors tous les autres caractères sont retournés. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mid-func.bas"}}%%(freebasic) @@ -29,31 +29,31 @@ PRINT MID("abcdefg", 3, 2) PRINT MID("abcdefg", 3) PRINT MID("abcdefg", 2, 1) %% - will produce the output: + produira la sortie: %%cd cdefg b -%% -A Unicode example: -~&Wiki: code rendered this way to allow display of the Unicode characters. +%%Un exemple Unicode: +Wiki: Code rendu de cette façon pour permettre l'affichage des caractères Unicode. +
    - < result Then Print "error: unable to create folder " & pathname & " in the current path." %% {{fbdoc item="target"}} - - Linux requires the //filename// case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. + - Linux nécessite que la casse de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgShell Shell]]## diff --git a/fbdocs/manual/cache/KeyPgMki.wakka b/fbdocs/manual/cache/KeyPgMki.wakka index 93525ed39d..96590349e0 100644 --- a/fbdocs/manual/cache/KeyPgMki.wakka +++ b/fbdocs/manual/cache/KeyPgMki.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MKI"}}---- -Does a binary copy from a ##[[KeyPgInteger integer]]## variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes +Copie binaire d'une variable ##[[KeyPgInteger Integer (entière)]]## en une ##[[KeyPgString String (chaîne)]]##, réglage de sa longueur à 4 octets {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mki** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,15 +9,15 @@ Does a binary copy from a ##[[KeyPgInteger integer]]## variable to a ##[[KeyPgSt ## {{fbdoc item="param"}} ##//number//## - A ##[[KeyPgInteger integer]]## variable to binary copy to a ##[[KeyPgString string]]##. + Une variable ##[[KeyPgInteger Integer (entière)]]## dont on fait une copie binaire vers une ##[[KeyPgString String (chaîne)]]##. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString string]]## with a binary copy of the ##[[KeyPgInteger integer]]##. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String (chaîne)]]## copie binaire d'un nombre ##[[KeyPgInteger Integer (entier)]]##. {{fbdoc item="desc"}} - Does a binary copy from an ##[[KeyPgInteger Integer]]## variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes. The resulting string can be read back to an ##[[KeyPgInteger Integer]]## by ##[[KeyPgCvi Cvi]]## + Exécute une copie binaire d'une variable ##[[KeyPgInteger Integer (entière)]]## vers une ##[[KeyPgString String (chaîne)]]## dont la longueur est de 4 octets. La chaîne résultat peut être lue à nouveau comme un ##[[KeyPgInteger Integer (entier)]]## par ##[[KeyPgCvi CVI]]## - This function is useful to write numeric values to buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour écrire une valeur numérique dans un tampon sans utiliser de définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mki.bas"}}%%(freebasic) @@ -29,9 +29,9 @@ sleep %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, ##**Mki**## returns a 2-byte-string, since a QB integer is only 16 bits. - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, ##**MKI**## retourne une chaîne de 2 octets, car un entier QB n'a que 16 bits. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - ##[[KeyPgCvi Cvi]]## diff --git a/fbdocs/manual/cache/KeyPgMkl.wakka b/fbdocs/manual/cache/KeyPgMkl.wakka index 012f646bb4..859d60e0a0 100644 --- a/fbdocs/manual/cache/KeyPgMkl.wakka +++ b/fbdocs/manual/cache/KeyPgMkl.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MKL"}}---- -Does a binary copy from a ##[[KeyPgInteger long]]## variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes +Copie binaire d'une variable ##[[KeyPgInteger Long]]## en une ##[[KeyPgString String (chaîne)]]##, réglage de sa longueur à 4 octets {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mkl** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,15 +9,15 @@ Does a binary copy from a ##[[KeyPgInteger long]]## variable to a ##[[KeyPgStrin ## {{fbdoc item="param"}} ##//number//## - A ##[[KeyPgInteger integer]]## variable to binary copy to a ##[[KeyPgString string]]##. + Une variable ##[[KeyPgInteger Integer (entière)]]## dont on fait une copie binaire vers une ##[[KeyPgString String (chaîne)]]##. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString string]]## with a binary copy of the ##[[KeyPgInteger long]]##. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String (chaîne)]]## copie binaire d'un nombre entier ##[[KeyPgInteger Long]]##. {{fbdoc item="desc"}} - Does a binary copy from a long variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes. The resulting string can be read back to a ##[[KeyPgLong Long]]## by ##[[KeyPgCvl Cvl]]##. + Exécute une copie binaire d'une variable entière long(ue) vers une ##[[KeyPgString String (chaîne)]]## dont la longueur est de 4 octets. La chaîne résultat peut être lue à nouveau comme un ##[[KeyPgLong Long]]## par ##[[KeyPgCvl CVL]]##. - This function is useful to write numeric values to buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour écrire une valeur numérique dans un tampon sans utiliser de définition de TYPE. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mkl.bas"}}%%(freebasic) @@ -29,11 +29,11 @@ sleep %% {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgMkd Mkd]]## diff --git a/fbdocs/manual/cache/KeyPgMklongint.wakka b/fbdocs/manual/cache/KeyPgMklongint.wakka index 698d796e41..15aa57d8a7 100644 --- a/fbdocs/manual/cache/KeyPgMklongint.wakka +++ b/fbdocs/manual/cache/KeyPgMklongint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MKLONGINT"}}---- -Does a binary copy from a ##[[KeyPgLongint longint]]## variable to a ##[[KeyPgString string]]##, setting its length to 8 bytes +Copie binaire d'une variable ##[[KeyPgDouble LongInt]]## en une ##[[KeyPgString String (chaîne)]]##, réglage de sa longueur à 8 octets {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mklongint** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,15 +9,15 @@ Does a binary copy from a ##[[KeyPgLongint longint]]## variable to a ##[[KeyPgSt ## {{fbdoc item="param"}} ##//number//## - A ##[[KeyPgLongint longint]]## variable to binary copy to a ##[[KeyPgString string]]##. + Une variable ##[[KeyPgDouble LongInt]]## dont on fait une copie binaire vers une ##[[KeyPgString String (chaîne)]]##. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString string]]## with a binary copy of the ##[[KeyPgLongint longint]]##. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String (chaîne)]]## copie binaire d'un nombre ##[[KeyPgDouble LongInt]]##. {{fbdoc item="desc"}} - Does a binary copy from a ##[[KeyPgLongint Longint]]## variable to a string, setting its length to 8 bytes. The resulting string can be read back to a longint by ##[[KeyPgCvlongint Cvlonging]]## + Exécute une copie binaire d'une variable ##[[KeyPgLongint LongInt]]## vers une chaîne dont la longueur est de 8 octets. La chaîne résultat peut être lue à nouveau comme un ##[[KeyPgLongint LongInt]]## par ##[[KeyPgCvlongint Cvlonging]]## - This function is useful to write numeric values to buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour écrire une valeur numérique dans un tampon sans utiliser de définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mklongint.bas"}}%%(freebasic) @@ -30,10 +30,10 @@ sleep {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Mklongint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé par l'alias ##**__Mklongint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCvlongint Cvlongint]]## diff --git a/fbdocs/manual/cache/KeyPgMks.wakka b/fbdocs/manual/cache/KeyPgMks.wakka index 41f6e198d8..93b94700a6 100644 --- a/fbdocs/manual/cache/KeyPgMks.wakka +++ b/fbdocs/manual/cache/KeyPgMks.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MKS"}}---- -Does a binary copy from a ##[[KeyPgSingle single]]## variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes +Copie binaire d'une variable ##[[KeyPgSingle Single]]## en une ##[[KeyPgString String (chaîne)]]##, réglage de sa longueur à 4 octets {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mks** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgSingle single]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,15 +9,15 @@ Does a binary copy from a ##[[KeyPgSingle single]]## variable to a ##[[KeyPgStri ## {{fbdoc item="param"}} ##//number//## - A ##[[KeyPgSingle single]]## variable to binary copy to a ##[[KeyPgString string]]##. + Une variable ##[[KeyPgDouble Single]]## dont on fait une copie binaire vers une ##[[KeyPgString String (chaîne)]]##. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString string]]## with a binary copy of the ##[[KeyPgSingle single]]##. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String (chaîne)]]## copie binaire d'un nombre ##[[KeyPgDouble Single]]##. {{fbdoc item="desc"}} - Does a binary copy from a ##[[KeyPgSingle Single]]## variable to a ##[[KeyPgString string]]##, setting its length to 4 bytes. The resulting string can be read back to a single by ##[[KeyPgCvs Cvs]]##. + Exécute une copie binaire d'une variable ##[[KeyPgSingle Single]]## vers une ##[[KeyPgString String (chaîne)]]## dont la longueur est de 4 octets. La chaîne résultat peut être lue à nouveau comme un ##[[KeyPgSingle Single]]## par ##[[KeyPgCvs CVS]]## - This function is useful to write numeric values to buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour écrire une valeur numérique dans un tampon sans utiliser de définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mks.bas"}}%%(freebasic) @@ -28,11 +28,11 @@ print n, cvs(e) %% {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - -None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgMki Mki]]## diff --git a/fbdocs/manual/cache/KeyPgMkshort.wakka b/fbdocs/manual/cache/KeyPgMkshort.wakka index 9806959124..0d25a02720 100644 --- a/fbdocs/manual/cache/KeyPgMkshort.wakka +++ b/fbdocs/manual/cache/KeyPgMkshort.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MKSHORT"}}---- -Does a binary copy from a ##[[KeyPgShort short]]## variable to a ##[[KeyPgString string]]##, setting its length to 2 bytes +Copie binaire d'une variable ##[[KeyPgSingle Short]]## en une ##[[KeyPgString String (chaîne)]]##, réglage de sa longueur à 2 octets {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mkshort** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgShort short]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,15 +9,15 @@ Does a binary copy from a ##[[KeyPgShort short]]## variable to a ##[[KeyPgString ## {{fbdoc item="param"}} ##//number//## - A ##[[KeyPgShort short]]## variable to binary copy to a ##[[KeyPgString string]]##. + Une variable ##[[KeyPgDouble Short]]## dont on fait une copie binaire vers une ##[[KeyPgString String (chaîne)]]##. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgString string]]## with a binary copy of the ##[[KeyPgShort short]]##. +{{fbdoc item="section" value="Valeur retournée + Retourne une ##[[KeyPgString String (chaîne)]]## copie binaire d'un nombre ##[[KeyPgDouble Short]]##. {{fbdoc item="desc"}} - Does a binary copy from a SHORT variable to a string, setting its length to 2 bytes. The resulting string can be read back to a ##[[KeyPgShort short]]## by ##[[KeyPgCvshort Cvshort]]## + Exécute une copie binaire d'une variable ##[[KeyPgSingle Short]]## vers une ##[[KeyPgString String (chaîne)]]## dont la longueur est de 2 octets. La chaîne résultat peut être lue à nouveau comme un ##[[KeyPgSingle Short]]## par ##[[KeyPgCvs CVShort]]## - This function is useful to write numeric values to buffers without using a ##[[KeyPgType Type]]## definition. + Cette fonction est utile pour écrire une valeur numérique dans un tampon sans utiliser de définition de ##[[KeyPgType Type]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/mkshort.bas"}}%%(freebasic) @@ -30,10 +30,10 @@ sleep {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Mkshort""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé par l'alias ##**__Mkshort**##. {{fbdoc item="diff"}} - - In QBasic this function is called ##**Mki**##. + - Dans QBasic cette fonction est appelée ##**MKI**##. {{fbdoc item="see"}} - ##[[KeyPgCvshort Cvshort]]## diff --git a/fbdocs/manual/cache/KeyPgModuleConstructor.wakka b/fbdocs/manual/cache/KeyPgModuleConstructor.wakka index d58faba72d..3f1904551c 100644 --- a/fbdocs/manual/cache/KeyPgModuleConstructor.wakka +++ b/fbdocs/manual/cache/KeyPgModuleConstructor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="CONSTRUCTOR (Module)"}}---- -Specifies execution of a procedure before module-level code +Spécifie l'exécution d'une procédure avant le code niveau module {{fbdoc item="syntax"}}## [[[KeyPgPublic Public]] | [[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgAlias Alias]] "//external_identifier//"] [()] **Constructor** [//priority//] [[[KeyPgStatic Static]]] @@ -7,17 +7,17 @@ Specifies execution of a procedure before module-level code [[KeyPgEndblock End]] [[KeyPgSub Sub]] ## {{fbdoc item="desc"}} - The ##**Constructor**## keyword is used in ##[[KeyPgSub Sub]]## definitions to force execution of the procedure prior to that of module-level code. Procedures defined as constructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures. + Le mot-clé ##**Constructor**## est utilisé dans les définitions de ##[[KeyPgSub Sub]]## pour forcer l'exécution de la procédure avant celle du code au niveau module. Les procédures définies comme des constructeurs peuvent être utilisés de la même manière que les procédures ordinaires, c'est à dire, qu'elles peuvent être appelées à partir du code au niveau du module, ainsi que d'autres procédures. - The procedure must have an empty parameter list. A compile-time error will be generated if the ##**Constructor**## keyword is used in a Sub definition having one or more parameters. In a set of overloaded procedures, only one (1) constructor may be defined because of the ambiguity of having multiple Subs which take no arguments. + La procédure doit avoir une liste de paramètres vide. Une erreur de compilation sera générée si le mot-clef ##**Constructor**## est utilisé dans une définition de ##[[KeyPgSub Sub]]## ayant un ou plusieurs paramètres. Dans un ensemble de procédures surchargées, un seul (1) constructeur peut être défini en raison de l'ambiguïté d'avoir plusieurs ##[[KeyPgSub Sub]]## qui n'ont aucun argument. - In a single module, constructors normally execute in the order in which they are defined. + Dans un seul module, les constructeurs sont normalement exécutés dans l'ordre dans lequel ils ont été définis. - The ##//priority//## attribute, an integer between 101 and 65535, can be used to force constructors to be executed in a certain order. The value of ##//priority//## has no specific meaning, only the relationship of the number with other constructor priorities. 101 is the highest priority and is executed first. All constructors having a ##//priority//## attribute are executed before constructors with no attribute. The priority value of 65535 is the same as not assigning a priority value. + L'attribut ##//priority//##, un entier compris entre 101 et 65535, peut être utilisé pour forcer les constructeurs à être exécutés dans un certain ordre. La valeur de ##//priority//## n'a pas de signification particulière, que la relation entre le numéro et les priorités des autres constructeurs. 101 est la plus haute priorité et est exécuté en premier. Tous les constructeurs ayant un attribut de ##//priority//## sont exécutés avant les constructeurs n'ayant pas cet attribut. La valeur de priorité de 65535 est équivalente à "ne pas attribuer une valeur de priorité". - A module may define multiple constructor procedures, and multiple modules may define additional constructors provided no two ##[[KeyPgPublic Public]]## constructors share the same //procedure_name//. + Un module peut définir des procédures constructeur multiples, et plusieurs modules peuvent définir des constructeurs supplémentaires à condition que deux constructeurs ##[[KeyPgPublic Public]]## ne partagent pas la même //procedure_name//. - When linking with modules that also define constructors, the order of execution is not guaranteed at link-time unless the ##//priority//## attribute is used. Therefore, special care should be taken when using constructors that may call on a secondary module also defining a constructor. In such a case it is advisable to use a single constructor that explicitly calls initialization procedures in those modules. + Lors de l'édition de liens avec des modules qui définissent également les constructeurs, l'ordre d'exécution n'est pas garanti au moment de la liaison sauf si l'attribut ##//priority//## est utilisé. Par conséquent, une attention particulière doit être prise lors de l'utilisation de constructeurs qui font appel à un module secondaire qui également définit un constructeur. Dans un tel cas, il est conseillé d'utiliser un seul constructeur qui appelle explicitement les procédures d'initialisation dans ces modules. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/mod-ctor.bas"}}%%(freebasic) @@ -47,7 +47,7 @@ end sub end 0 '' ---------------------- %% - **Output:** + **Affichage:** %% Constructor1() called Constructor2() called @@ -57,10 +57,10 @@ Destructor2() called %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[KeyPgConstructor Constructor (Class)]] + - [[KeyPgConstructor Constructor (Classe)]] - [[KeyPgModuleDestructor Destructor (Module)]] - [[KeyPgSub Sub]] diff --git a/fbdocs/manual/cache/KeyPgModuleDestructor.wakka b/fbdocs/manual/cache/KeyPgModuleDestructor.wakka index 937f67f429..5641bcd430 100644 --- a/fbdocs/manual/cache/KeyPgModuleDestructor.wakka +++ b/fbdocs/manual/cache/KeyPgModuleDestructor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="DESTRUCTOR (Module)"}}---- -Specifies execution of a procedure at program termination +Spécifie l'exécution d'une procédure à la fin du programme {{fbdoc item="syntax"}}## [[[KeyPgPublic Public]] | [[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //identifier// [[[KeyPgAlias Alias]] "//external_identifier//"] [()] **Destructor** [//priority//] [[[KeyPgStatic Static]]] @@ -7,22 +7,22 @@ Specifies execution of a procedure at program termination [[KeyPgEnd End]] [[KeyPgSub Sub]] ## {{fbdoc item="desc"}} - Defines a procedure to be automatically called from a compiled program's end-code. End-code is generated by the compiler and is executed when the program terminates normally. Procedures defined as destructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures. + Définit une procédure qui sera appelée automatiquement en "fin-du-code" d'un programme compilé. "Fin-du-code" est générée par le compilateur et est exécutée quand le programme se termine normalement. Les procédures définies comme des destructeurs peuvent être utilisées de la même manière que les procédures ordinaires, c'est à dire, qu'elles peuvent être appelées à partir du code au niveau du module, comme d'autres procédures. - The procedure must have an empty parameter list. A compile-time error will be generated if the ##**Destructor**## keyword is used in a Sub definition having one or more parameters. In a set of overloaded procedures, only one (1) destructor may be defined because of the ambiguity of having multiple Subs which take no arguments. + La procédure doit avoir une liste de paramètres vide. Une erreur de compilation sera générée si le mot-clef ##**Destructor**## est utilisé dans une définition de ##[[KeyPgSub Sub]]## ayant un ou plusieurs paramètres. Dans un ensemble de procédures surchargées, un seul (1) constructeur peut être défini en raison de l'ambiguïté d'avoir plusieurs ##[[KeyPgSub Sub]]## qui n'ont aucun argument. - In a single module, destructors normally execute in the order in which they are defined. + Dans un seul module, les destructeurs sont normalement exécutés dans l'ordre dans lequel ils ont été définis. - The ##//priority//## attribute, an integer between 101 and 65535, can be used to force destructors to be executed in a certain order. The value of ##//priority//## has no specific meaning, only the relationship of the number with other destructor priorities. 101 is the lowest priority and is executed last. All destructors having a ##//priority//## attribute are executed after destructors with no attribute. The priority value of 65535 is the same as not assigning a priority value. + L'attribut ##//priority//##, un entier compris entre 101 et 65535, peut être utilisé pour forcer les destructeurs à être exécutés dans un certain ordre. La valeur de ##//priority//## n'a pas de signification particulière, que la relation entre le numéro et les priorités des autres constructeurs. 101 est la plus basse priorité et est exécuté en dernier. Tous les destructeurs ayant un attribut de ##//priority//## sont exécutés après les destructeurs n'ayant pas cet attribut. La valeur de priorité de 65535 est équivalente à ne pas attribuer une valeur de priorité. - A module may define multiple destructor procedures. Destructor procedures may also appear in more than one module. All procedures defined with the syntax shown above will be added to the list of procedures to be called during the program's termination. + Un module peut définir des procédures destructeur multiples. Des procédures destructeur peuvent aussi apparaître dans plusieurs modules. Toutes les procédures définies avec la syntaxe ci-dessus seront ajoutées à la liste des procédures à appeler lorsque le programme se terminera. - The order in which destructors defined in multiple modules are executed is known only at link time. Therefore, special care should be taken when using destructors that may call on a secondary module also defining a destructors. In such a case it is advisable to use a single destructor that explicit calls termination procedures in multiple modules to ensure a graceful termination of the application. + L'ordre dans lequel les destructeurs définis dans plusieurs modules sont exécutés est connu uniquement au moment de l'édition de lien. Par conséquent, des précautions particulières doivent être prises lors de l'utilisation des destructeurs qui peuvent faire appel à un module secondaire qui lui aussi définit des destructeurs. Dans un tel cas, il est conseillé d'utiliser un destructeur unique qui explicite les procédures d'appel de fin de programme dans plusieurs modules pour assurer une fin de programme correcte. - Destructors will be called if the program terminates normally or if error-checking is enabled and the program terminates abnormally. + Les destructeurs seront appelés si le programme se termine normalement ou si une vérification des erreurs est activée et que le programme se termine anormalement. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/procs/mod-dtor.bas"}}%%(freebasic) + %%(freebasic) sub pauseonexit destructor '' If the program reaches the end, or aborts with an error, @@ -42,10 +42,10 @@ print array(i, j) %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgDestructor Destructor (Class)]]## + - ##[[KeyPgDestructor Destructor (Classe)]]## - ##[[KeyPgModuleConstructor Constructor (Module)]]## - ##[[KeyPgSub Sub]]## diff --git a/fbdocs/manual/cache/KeyPgMonth.wakka b/fbdocs/manual/cache/KeyPgMonth.wakka index a5d947548a..59db8e89d5 100644 --- a/fbdocs/manual/cache/KeyPgMonth.wakka +++ b/fbdocs/manual/cache/KeyPgMonth.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MONTH"}}---- -Gets the month of the year from a [[ProPgDates Date Serial]] +Récupère le mois de l'année à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Month** ( [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,16 +10,16 @@ Gets the month of the year from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date + la date -{{fbdoc item="ret"}} - Returns the month number from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Retourne le numéro du mois à partir d'une variable contenant une date sous forme de [[ProPgDates Date Serial]]. - The month values are in the range 1-12 being 1 for January and 12 for December. + Les valeurs du mois sont comprises entre 1 et 12; 1 pour Janvier et 12 pour Décembre. {{fbdoc item="desc"}} - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/month.bas"}}%%(freebasic) @@ -31,7 +31,7 @@ Print Format(a, "yyyy/mm/dd hh:mm:ss "); Month(a) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgMonthname.wakka b/fbdocs/manual/cache/KeyPgMonthname.wakka index 08ecc4e315..394efb0830 100644 --- a/fbdocs/manual/cache/KeyPgMonthname.wakka +++ b/fbdocs/manual/cache/KeyPgMonthname.wakka @@ -1,27 +1,27 @@ {{fbdoc item="title" value="MONTHNAME"}}---- -Gets the name of a month from it's integral representation +Récupère le nom d'un mois à partir de sa représentation entière {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""MonthName""** ( [[KeyPgByval byval]] //month// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //abbreviate// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **MonthName** ( [[KeyPgByval ByVal]] //month// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //abbreviate// [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0 ) [[KeyPgAs As]] [[KeyPgString String]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""MonthName""**( //month_number// [, //abreviate// ] ) + //result// = **MonthName**( //month_number// [, //abreviate// ] ) ## {{fbdoc item="param"}} ##//month//## - the number of the month of the year - 1:January through 12:December + le numéro du mois de l'année --> 1: Janvier jusqu'à 12: Décembre ##//abbreviate//## - flag to indicate that name should be abbreviated + drapeau indiquant que le nom doit être abrégé -{{fbdoc item="ret"}} - Returns the local operating system language month name from ##//month//## value 1 to 12. +{{fbdoc item="section" value="Valeur retournée + Retourne le nom du mois en fonction du langage du système d'exploitation local à partir de ##//month//## dont la valeur va de 1 à 12. {{fbdoc item="desc"}} - If ##//abbreviate//## is true, the month name abbreviation is returned. If omitted or false, the whole name is returned. + Si ##//abbreviate//## est vrai, l'abréviation du nom du mois est retournée. Si omis ou faux, le nom complet est retourné. - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/monthname.bas"}}%%(freebasic) @@ -33,7 +33,7 @@ Print Format(ds, "yyyy/mm/dd hh:mm:ss "); MonthName(Month(ds)) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in Visual Basic. + - N'existe pas dans QB. Cette fonction est apparue dans Visual Basic. {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgMultikey.wakka b/fbdocs/manual/cache/KeyPgMultikey.wakka index 575a81d3b5..4abded4b36 100644 --- a/fbdocs/manual/cache/KeyPgMultikey.wakka +++ b/fbdocs/manual/cache/KeyPgMultikey.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MULTIKEY"}}---- -Detects the status of keys by keyboard scancode. +Détecte l'état des touches par scancode du clavier. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Multikey** ( [[KeyPgByval byval]] //scancode// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,18 +9,18 @@ Detects the status of keys by keyboard scancode. ## {{fbdoc item="param"}} ##//scancode//## - The [[GfxScancodes scan code]] of the key to check. + Le [[GfxScancodes scan code]] de la touche à détecter. -{{fbdoc item="ret"}} - Returns ##-1## if the key for the specified [[GfxScancodes scan code]] is pressed, otherwise returns ##0##. +{{fbdoc item="section" value="Valeur renvoyée + Retourne ##-1## si la touche correspondant au [[GfxScancodes scan code]] est appuyée, autrement retourne ##0##. {{fbdoc item="desc"}} - ##**Multikey**## is a function which will detect the status of any key, determined by scancode, at any time. It will return ##-1## if the key is pressed, otherwise it will return ##0##. The keyboard input buffer is not disabled while you use ##**Multikey**##; that is, pressed keys will be stored and subsequently returned by your next call to ##[[KeyPgInkey Inkey]]##. This means you have to empty ##[[KeyPgInkey Inkey]]## manually when you finish using ##**Multikey**##, using something like the following method: + ##**MultiKey**## est une fonction qui détecte l'état de n'importe quelle touche, déterminé par scancode, à n'importe quel moment. Retournera ##-1## si la touche est appuyée, autrement retournera ##0##. Le tampon d'entrée clavier n'est pas désactivé lorsque vous utilisez ##**MultiKey**##; les touches appuyées seront stockées et ensuite retournées par votre prochain appel à ##[[KeyPgInkey Inkey]]##. Ceci signifie que vous devez vider manuellement ##[[KeyPgInkey Inkey]]## quand vous avez fini d'utiliser ##**MultiKey**##, en utilisant quelque chose de semblable à la méthode ci-dessous: {{fbdoc item="filename" value="examples/manual/check/KeyPgMultikey_1.bas"}}%%(freebasic) -While Inkey <> "": Wend '' loop until the Inkey buffer is empty +While Inkey <> "": Wend '' boucle tant que le tampon inkey est vide %% - Keeping ##[[KeyPgInkey Inkey]]## to work while you use ##**Multikey**## allows more flexibility and can be useful to detect ##[[KeyPgChr Chr]](255)+"k"## combo returned on window close button click, if a windowed graphics mode has been set via the ##[[KeyPgScreengraphics Screen]]## statement. For a list of accepted scancodes, see [[GfxScancodes DOS keyboard scancodes]]; these are guaranteed to be valid for all ""FreeBASIC"" supported platforms. - ##**Multikey**## should always work in graphics mode, as long as the screen is [[KeyPgScreenunlock unlocked]]. Support in the console depends on the platform the program is run on though, and cannot be guaranteed. + Garder ##[[KeyPgInkey Inkey]]## au travail pendant l'utilisation de ##**MultiKey**## vous donne plus de flexibilité et peut être très utile pour détecter une combinaison ##[[KeyPgChr Chr]](255)+"k"## renvoyée par le clic sur le bouton de fermeture d'une fenêtre, si un mode graphique fenêtré a été validé par ##[[KeyPgScreengraphics Screen]]##. Pour une liste des scancodes acceptés, voir [[GfxScancodes Scancodes clavier DOS]]; ceci garantit la validité pour toutes les plates-formes supportées par FreeBASIC. + ##**MultiKey**## devrait toujours fonctionner en mode graphique, aussi longtemps que l'écran est [[KeyPgScreenunlock Unlock]]é. Le fonctionnement en console dépend de la plate-forme sur laquelle fonctionne le programme, et ne peut être garanti. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/multikey.bas"}}%%(freebasic) @@ -37,23 +37,23 @@ Color 2, 15 x = 320: y = 240 Do - ' Check arrow keys and update the (x, y) position accordingly + ' Surveille touches fleches et met a jour position (x, y) If MultiKey(SC_LEFT ) And x > 0 Then x = x - 1 If MultiKey(SC_RIGHT) And x < 639 Then x = x + 1 If MultiKey(SC_UP ) And y > 0 Then y = y - 1 If MultiKey(SC_DOWN ) And y < 479 Then y = y + 1 - ' Lock the page while we work on it + ' Verouille page pendante travail sur elle Screenlock - ' Clear the screen and draw a circle at the position (x, y) + ' Efface ecran et trace cercle a la position (x, y) Cls Circle(x, y), 30, , , , ,F ScreenUnlock - ' Run loop until user presses Escape + ' Boucle jusqu'a Echappement appuye Loop Until MultiKey(SC_ESCAPE) -' Clear Inkey buffer +' Vide tampon Inkey While Inkey <> "": Wend @@ -62,23 +62,23 @@ Print "Press CTRL and H to exit..." Do Sleep 25 - '' Stay in loop until user holds down CTRL and H at the same time + '' Boucle jusqu'a appui sur CTRL et H ensemble If MultiKey(SC_CONTROL) And MultiKey(SC_H) Then Exit Do Loop %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Multikey""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Multikey**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[GfxScancodes Keyboard scancodes]] + - [[GfxScancodes Scancodes clavier]] - ##[[KeyPgGetmouse Getmouse]]## - ##[[KeyPgGetjoystick Getjoystick]]## - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + - ##[[KeyPgScreengraphics Screen (Graphique)]]## - ##[[KeyPgInkey Inkey]]## {{fbdoc item="back" value="CatPgGfxInput|User Input Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgMutexCreate.wakka b/fbdocs/manual/cache/KeyPgMutexCreate.wakka index 60c9601165..a2d7bcd3ce 100644 --- a/fbdocs/manual/cache/KeyPgMutexCreate.wakka +++ b/fbdocs/manual/cache/KeyPgMutexCreate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MUTEXCREATE"}}---- -Creates a mutex used for synchronizing the execution of threads +Crée un "mutex" utilisé pour synchroniser l'exécution des "threads" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Mutexcreate** ( ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -7,103 +7,37 @@ Creates a mutex used for synchronizing the execution of threads {{fbdoc item="usage"}}## //result// = **Mutexcreate** ## -{{fbdoc item="ret"}} - The ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle of the mutex created, or the null pointer (0) on failure. +{{fbdoc item="section" value="Valeur retournée + Le ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## "handle" du "mutex" créé, ou le pointeur nul (0) en cas d'échec. {{fbdoc item="desc"}} - Mutexes, short for "Mutually Exclusive", are a way of synchronizing shared data within threads. If there is a global variable used by multiple threads (or a local variable used by a single thread, called multiple times), it should be "locked" during its use with a mutex. This halts all threads using ##[[KeyPgMutexLock Mutexlock]]## with that mutex, until it is unlocked with ##[[KeyPgMutexUnlock Mutexunlock]]##. + Les "Mutex", abréviation de "Mutually Exclusive" (Mutuellement exclusive), sont un moyen de synchroniser les données partagées dans les "threads". S'il y a une variable globale utilisée par plusieurs "threads" (ou une variable locale utilisée par un "thread" unique, appelée plusieurs fois), elle devrait être "verrouillée" lors de son utilisation avec un "mutex". Ceci arrête tous les "threads" en utilisant ##[[KeyPgMutexLock MutexLock]]## avec ce "mutex", jusqu'à ce qu'il soit déverrouillé avec ##[[KeyPgMutexUnlock MutexUnlock]]##. - ##Mutexcreate## creates a mutex, returning a handle which is to be referred to when locking, unlocking, or destroying the mutex. Mutexes created with ##Mutexcreate## should be destroyed when no longer needed or before the end of the program with ##[[KeyPgMutexDestroy Mutexdestroy]]##. + ##Mutexcreate## crée un "mutex", et retourne un "handle" qui sert de référence lors du verrouillage, du déverrouillage ou de la destruction du "mutex". Les "mutex" créés avec ##Mutexcreate## doivent être détruits lorsqu'ils ne sont plus nécessaires ou avant la fin du programme avec ##[[KeyPgMutexDestroy MutexDestroy]]##. - A mutex is a lock that guarantees three things: - 1. Atomicity - Locking a mutex is an atomic operation, meaning that the operating system (or threads library) assures you that if you locked a mutex, no other thread succeeded in locking this mutex at the same time. - 2. Singularity - If a thread managed to lock a mutex, it is assured that no other thread will be able to lock the thread until the original thread releases the lock. - 3. Non-Busy Wait - If a thread attempts to lock a thread that was locked by a second thread, the first thread will be suspended (and will not consume any CPU resources) until the lock is freed by the second thread. At this time, the first thread will wake up and continue execution, having the mutex locked by it. + Un "mutex" est un verrou qui garantit trois choses: + 1. Atomicité - Le verrouillage d'un "mutex" est une opération atomique, ce qui signifie que le système d'exploitation (ou la bibliothèque "threads") vous assure que si vous avez verrouillé un "mutex", aucun autre "thread" réussira à verrouiller ce "mutex" en même temps. + 2. Singularité - Si un "thread" a réussi à verrouiller un "mutex", il est assuré qu'aucun autre "thread" ne sera en mesure de bloquer le "thread" jusqu'à ce que le "thread" d'origine ne libère le verrou. + 3. Attente non-occupée - Si un "thread" tente de verrouiller un "thread" qui a été verrouillé par un second "thread", le premier "thread" sera suspendu (et ne consommera aucune ressource CPU) jusqu'à ce que le verrou soit libéré par le second "thread". A ce moment-là, le premier "thread" va se réveiller et poursuivre l'exécution, après avoir lui-même verrouillé le "mutex". {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/mutexcreate.bas"}}%%(freebasic) -'' Threading syncronyzation using Mutexes -'' If you comment out the lines containing "MutexLock" and "MutexUnlock", -'' the threads will not be in sync and some of the data may be printed -'' out of place. - -const MAX_THREADS = 10 - -DECLARE SUB thread( byval id_ptr as any ptr ) -DECLARE SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - -DIM SHARED threadsync AS any ptr - -dim i as integer - -DIM handleTb(0 to MAX_THREADS-1) AS any ptr - -'' Create a mutex to syncronize the threads -threadsync = MUTEXCREATE - -'' Create threads -for i = 0 to MAX_THREADS-1 - handleTb(i) = THREADCREATE(@thread, @i) - IF handleTb(i) = 0 THEN - PRINT "Error creating thread:"; i - exit for - END IF -next - -'' Wait until all threads are finished -for i = 0 to MAX_THREADS-1 - if( handleTb(i) <> 0 ) then - THREADWAIT( handleTb(i) ) - end if -next + %%(freebasic) -teletype "Testing.................", 1, 1 -teletype "Testing again...........", 10, 1 - -'' Discard the mutex when we are through using teletype -MUTEXDESTROY threadsync - -SUB thread( byval id_ptr as any ptr ) - dim id as integer - id = *cast( integer ptr, id_ptr ) - teletype "Thread (" & id & ").........", 1, 1+id -END SUB - -'' Teletype unfurls some text across the screen at a given location -SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - DIM i AS INTEGER - - FOR i = 0 TO LEN(text)-1 - '' MutexLock prevents the two simultaneously running - '' threads from sharing "x", "y", and "a" - MUTEXLOCK threadsync - - LOCATE y, x+i - PRINT CHR(text[i]) - - '' MutexUnlock releases these variables for other use - MUTEXUNLOCK threadsync - - SLEEP 25 - NEXT -END SUB -%% - -{{fbdoc item="lang"}} - - Threading is not allowed in the //[[CompilerOptlang -lang qb]]// dialect. +'' Threading syncronyzation using Mutexes + '' If you comment out the lines containing "MutexLock" and "MutexUnlock", -{{fbdoc item="target"}} - - The DOS version of FreeBASIC does not allow for threads, as the OS does not support them. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. +'' the threads will not be in sync and some of the data may be printed + '' out of place. + Const MAX_THREADS = 10 -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +Declare Sub thread( ByVal id_ptr As Any Ptr ) + Declare Sub teletype (ByVal text As String, ByVal x As Integer, ByVal y As Integer) -{{fbdoc item="see"}} - - ##[[KeyPgMutexDestroy Mutexdestroy]]## - - ##[[KeyPgMutexLock Mutexlock]]## - - ##[[KeyPgMutexUnlock Mutexunlock]]## - - ##[[KeyPgThreadCreate Threadcreate]]## - - ##[[KeyPgThreadWait Threadwait]]## +Dim Shared threadsync As Any Ptr + Dim i As Integer + Dim handleTb(0 To MAX_THREADS-1) As Any Ptr + '' Create a mutex to syncronize the threads + threadsync = MutexCreate + '' Create threads -{{fbdoc item="back" value="CatPgThreading|Threading Support Functions"}} \ No newline at end of file +For i = 0 To MAX_THREADS-1 \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgMutexDestroy.wakka b/fbdocs/manual/cache/KeyPgMutexDestroy.wakka index d9a2606ba9..71d432bcc1 100644 --- a/fbdocs/manual/cache/KeyPgMutexDestroy.wakka +++ b/fbdocs/manual/cache/KeyPgMutexDestroy.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MUTEXDESTROY"}}---- -Destroys a mutex +Détruit un "mutex" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Mutexdestroy** ( [[KeyPgByval byval]] //id// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,103 +9,31 @@ Destroys a mutex ## {{fbdoc item="param"}} ##//id//## - The ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle of the mutex to be destroyed. + Le ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## handle du "mutex" à détruire. {{fbdoc item="desc"}} - ##Mutexdestroy## discards a mutex created by ##[[KeyPgMutexCreate Mutexcreate]]##. This call should be executed after any threads using the mutex are no longer in use. + ##Mutexdestroy## détruit un "mutex" créé par ##[[KeyPgMutexCreate MutexCreate]]##. Cet appel doit être exécuté lorsque tous les "threads" utilisant le "mutex" ne sont plus en cours d'utilisation. - See ##[[KeyPgMutexCreate Mutexcreate]]## for more general information on mutexes. + Voir ##[[KeyPgMutexCreate MutexCreate]]## pour plus d'information générale sur les "mutex". {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/mutexdestroy.bas"}}%%(freebasic) -'' Threading synchronization using Mutexes -'' If you comment out the lines containing "MutexLock" and "MutexUnlock", -'' the threads will not be in sync and some of the data may be printed -'' out of place. - -DECLARE SUB thread1( param as any ptr ) -DECLARE SUB thread2( param as any ptr ) -DECLARE SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - -DIM SHARED threadsync AS any ptr -DIM SHARED thread1handle AS any ptr -DIM SHARED thread2handle AS any ptr - -'' Create a mutex to syncronize the threads -threadsync = MUTEXCREATE - -'' Call thread 1 -thread1handle = THREADCREATE(@thread1) -IF thread1handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Call thread 2 -thread2handle = THREADCREATE(@thread2) -IF thread2handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Wait until both threads are finished -THREADWAIT(thread1handle) -THREADWAIT(thread2handle) - -teletype "Testing.................", 1, 1 -teletype "Testing again...........", 10, 1 - -'' Discard the mutex when we are through using teletype -MUTEXDESTROY threadsync + %%(freebasic) -SLEEP -END - -'' Thread 1 calls a simple "teletype" routine -SUB thread1( param as any ptr ) - teletype "This is a test...", 4, 1 -END SUB - -'' ...As does thread 2 -SUB thread2( param as any ptr ) - teletype "This is another test...", 7, 1 -END SUB - -'' Teletype unfurls some text across the screen at a given location -SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - DIM i AS INTEGER, a AS INTEGER - DIM text_length AS INTEGER - - text_length = LEN(text) - FOR a = 0 TO text_length - '' MutexLock prevents the two simultaneously running - '' threads from sharing "x", "y", and "a" - MUTEXLOCK threadsync - - LOCATE x,(y+a) - PRINT CHR(text[a]) - - '' MutexUnlock releases these variables for other use - MUTEXUNLOCK threadsync - - SLEEP 25 - NEXT a -END SUB -%% - -{{fbdoc item="lang"}} - - Threading is not allowed in the //[[CompilerOptlang -lang qb]]// dialect. +'' Threading synchronization using Mutexes + '' If you comment out the lines containing "MutexLock" and "MutexUnlock", -{{fbdoc item="target"}} - - The DOS version of FreeBASIC does not allow for threads, as the OS does not support them. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. +'' the threads will not be in sync and some of the data may be printed + '' out of place. + Declare Sub thread1( param As Any Ptr ) -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +Declare Sub thread2( param As Any Ptr ) + Declare Sub teletype (ByVal text As String, ByVal x As Integer, ByVal y As Integer) -{{fbdoc item="see"}} - - ##[[KeyPgMutexCreate Mutexcreate]]## - - ##[[KeyPgMutexLock Mutexlock]]## - - ##[[KeyPgMutexUnlock Mutexunlock]]## - - ##[[KeyPgThreadCreate Threadcreate]]## - - ##[[KeyPgThreadWait Threadwait]]## +Dim Shared threadsync As Any Ptr + Dim Shared thread1handle As Any Ptr + Dim Shared thread2handle As Any Ptr + '' Create a mutex to syncronize the threads + threadsync = MutexCreate + '' Call thread 1 -{{fbdoc item="back" value="CatPgThreading|Threading Support Functions"}} \ No newline at end of file +thread1handle = ThreadCreate(@thread1) \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgMutexLock.wakka b/fbdocs/manual/cache/KeyPgMutexLock.wakka index 04c99fa3ed..bf4cb1fa63 100644 --- a/fbdocs/manual/cache/KeyPgMutexLock.wakka +++ b/fbdocs/manual/cache/KeyPgMutexLock.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MUTEXLOCK"}}---- -Acquires a mutex +Acquiert un "mutex" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Mutexlock** ( [[KeyPgByval byval]] //id// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,103 +9,31 @@ Acquires a mutex ## {{fbdoc item="param"}} ##//id//## - The ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle of the mutex to be locked. + Le ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## "handle" du "mutex" à verrouiller. {{fbdoc item="desc"}} - ##Mutexlock## halts any other threads using a mutex "handle", generated by ##[[KeyPgMutexCreate Mutexcreate]]##, until the handle is unlocked with ##[[KeyPgMutexUnlock Mutexunlock]]##. + ##Mutexlock## arrête tous les autres "threads" utilisant un "handle" de "mutex" généré par ##[[KeyPgMutexCreate MutexCreate]]##, jusqu'à ce que le "handle" soit déverrouillé avec ##[[KeyPgMutexUnlock MutexUnlock]]##. - See ##[[KeyPgMutexCreate Mutexcreate]]## for more general information on mutexes. + Voir ##[[KeyPgMutexCreate MutexCreate]]## pour plus d'information générale sur les "mutex". {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/mutexlock.bas"}}%%(freebasic) -'' Threading synchronization using Mutexes -'' If you comment out the lines containing "MutexLock" and "MutexUnlock", -'' the threads will not be in sync and some of the data may be printed -'' out of place. - -DECLARE SUB thread1( param as any ptr ) -DECLARE SUB thread2( param as any ptr ) -DECLARE SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - -DIM SHARED threadsync AS any ptr -DIM SHARED thread1handle AS any ptr -DIM SHARED thread2handle AS any ptr - -'' Create a mutex to synchronize the threads -threadsync = MUTEXCREATE - -'' Call thread 1 -thread1handle = THREADCREATE(@thread1) -IF thread1handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Call thread 2 -thread2handle = THREADCREATE(@thread2) -IF thread2handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Wait until both threads are finished -THREADWAIT(thread1handle) -THREADWAIT(thread2handle) - -teletype "Testing.................", 1, 1 -teletype "Testing again...........", 10, 1 - -'' Discard the mutex when we are through using teletype -MUTEXDESTROY threadsync + %%(freebasic) -SLEEP -END - -'' Thread 1 calls a simple "teletype" routine -SUB thread1( param as any ptr ) - teletype "This is a test...", 4, 1 -END SUB - -'' ...As does thread 2 -SUB thread2( param as any ptr ) - teletype "This is another test...", 7, 1 -END SUB - -'' Teletype unfurls some text across the screen at a given location -SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - DIM i AS INTEGER, a as INTEGER - DIM text_length AS INTEGER - - text_length = LEN(text) - FOR a = 0 TO text_length - '' MutexLock prevents the two simultaneously running - '' threads from sharing "x", "y", and "a" - MUTEXLOCK threadsync - - LOCATE x,(y+a) - PRINT CHR(text[a]) - - '' MutexUnlock releases these variables for other use - MUTEXUNLOCK threadsync - - SLEEP 25 - NEXT a -END SUB -%% - -{{fbdoc item="lang"}} - - Threading is not allowed in the //[[CompilerOptlang -lang qb]]// dialect. +'' Threading synchronization using Mutexes + '' If you comment out the lines containing "MutexLock" and "MutexUnlock", -{{fbdoc item="target"}} - - The DOS version of FreeBASIC does not allow for threads, as the OS does not support them. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. +'' the threads will not be in sync and some of the data may be printed + '' out of place. + Declare Sub thread1( param As Any Ptr ) -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +Declare Sub thread2( param As Any Ptr ) + Declare Sub teletype (ByVal text As String, ByVal x As Integer, ByVal y As Integer) -{{fbdoc item="see"}} - - ##[[KeyPgMutexCreate Mutexcreate]]## - - ##[[KeyPgMutexDestroy Mutexdestroy]]## - - ##[[KeyPgMutexUnlock Mutexunlock]]## - - ##[[KeyPgThreadCreate Threadcreate]]## - - ##[[KeyPgThreadWait Threadwait]]## +Dim Shared threadsync As Any Ptr + Dim Shared thread1handle As Any Ptr + Dim Shared thread2handle As Any Ptr + '' Create a mutex to synchronize the threads + threadsync = MutexCreate + '' Call thread 1 -{{fbdoc item="back" value="CatPgThreading|Threading Support Functions"}} \ No newline at end of file +thread1handle = ThreadCreate(@thread1) \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgMutexUnlock.wakka b/fbdocs/manual/cache/KeyPgMutexUnlock.wakka index 2caa491b03..46d56b9dcb 100644 --- a/fbdocs/manual/cache/KeyPgMutexUnlock.wakka +++ b/fbdocs/manual/cache/KeyPgMutexUnlock.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="MUTEXUNLOCK"}}---- -Releases a mutex lock +Détruit un verrouillage de "mutex" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Mutexunlock** ( [[KeyPgByval byval]] //id// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,103 +9,31 @@ Releases a mutex lock ## {{fbdoc item="param"}} ##//id//## - The ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle of the mutex to be unlocked. + Le ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## "handle" du "mutex" à déverrouiller. {{fbdoc item="desc"}} - ##Mutexunlock## releases a mutex "handle" created by ##[[KeyPgMutexCreate Mutexcreate]]##, and locked with ##[[KeyPgMutexLock Mutexlock]]##. This allows other threads sharing the mutex to continue execution. + ##Mutexlock## arrête tous les autres "threads" utilisant un "handle" de "mutex" généré par ##[[KeyPgMutexCreate MutexCreate]]##, jusqu'à ce que le "handle" soit déverrouillé avec ##[[KeyPgMutexUnlock MutexUnlock]]##. - See ##[[KeyPgMutexCreate Mutexcreate]]## for more general information on mutexes. + Voir ##[[KeyPgMutexCreate MutexCreate]]## pour plus d'information générale sur les "mutex". {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/mutexunlock.bas"}}%%(freebasic) -'' Threading synchronization using Mutexes -'' If you comment out the lines containing "MutexLock" and "MutexUnlock", -'' the threads will not be in sync and some of the data may be printed -'' out of place. - -DECLARE SUB thread1( param as any ptr ) -DECLARE SUB thread2( param as any ptr ) -DECLARE SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - -DIM SHARED threadsync AS any ptr -DIM SHARED thread1handle AS any ptr -DIM SHARED thread2handle AS any ptr - -'' Create a mutex to synchronize the threads -threadsync = MUTEXCREATE - -'' Call thread 1 -thread1handle = THREADCREATE(@thread1) -IF thread1handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Call thread 2 -thread2handle = THREADCREATE(@thread2) -IF thread2handle = 0 THEN - PRINT "Error creating thread1" -END IF - -'' Wait until both threads are finished -THREADWAIT(thread1handle) -THREADWAIT(thread2handle) - -teletype "Testing.................", 1, 1 -teletype "Testing again...........", 10, 1 - -'' Discard the mutex when we are through using teletype -MUTEXDESTROY threadsync + %%(freebasic) -SLEEP -END - -'' Thread 1 calls a simple "teletype" routine -SUB thread1( param as any ptr ) - teletype "This is a test...", 4, 1 -END SUB - -'' ...As does thread 2 -SUB thread2( param as any ptr ) - teletype "This is another test...", 7, 1 -END SUB - -'' Teletype unfurls some text across the screen at a given location -SUB teletype (BYVAL text AS STRING, BYVAL x AS INTEGER, BYVAL y AS INTEGER) - DIM i AS INTEGER, a as INTEGER - DIM text_length AS INTEGER - - text_length = LEN(text) - FOR a = 0 TO text_length - '' MutexLock prevents the two simultaneously running - '' threads from sharing "x", "y", and "a" - MUTEXLOCK threadsync - - LOCATE x,(y+a) - PRINT CHR(text[a]) - - '' MutexUnlock releases these variables for other use - MUTEXUNLOCK threadsync - - SLEEP 25 - NEXT a -END SUB -%% - -{{fbdoc item="lang"}} - - Threading is not allowed in the //[[CompilerOptlang -lang qb]]// dialect. +'' Threading synchronization using Mutexes + '' If you comment out the lines containing "MutexLock" and "MutexUnlock", -{{fbdoc item="target"}} - - The DOS version of FreeBASIC does not allow for threads, as the OS does not support them. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. +'' the threads will not be in sync and some of the data may be printed + '' out of place. + Declare Sub thread1( param As Any Ptr ) -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +Declare Sub thread2( param As Any Ptr ) + Declare Sub teletype (ByVal text As String, ByVal x As Integer, ByVal y As Integer) -{{fbdoc item="see"}} - - ##[[KeyPgMutexCreate Mutexcreate]]## - - ##[[KeyPgMutexDestroy Mutexdestroy]]## - - ##[[KeyPgMutexLock Mutexlock]]## - - ##[[KeyPgThreadCreate Threadcreate]]## - - ##[[KeyPgThreadWait Threadwait]]## +Dim Shared threadsync As Any Ptr + Dim Shared thread1handle As Any Ptr + Dim Shared thread2handle As Any Ptr + '' Create a mutex to synchronize the threads + threadsync = MutexCreate + '' Call thread 1 -{{fbdoc item="back" value="CatPgThreading|Threading Support Functions"}} \ No newline at end of file +thread1handle = ThreadCreate(@thread1) \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgNaked.wakka b/fbdocs/manual/cache/KeyPgNaked.wakka index f542a57d1f..9bc6e941e8 100644 --- a/fbdocs/manual/cache/KeyPgNaked.wakka +++ b/fbdocs/manual/cache/KeyPgNaked.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="NAKED"}}---- -Write functions without prolog/epilog code +Ecrire des fonctions sans code prologue / épilogue {{fbdoc item="syntax"}}## [[KeyPgSub Sub]] //identifier// **Naked** [//calling_convention//] ( //param_list// ) @@ -10,14 +10,14 @@ Write functions without prolog/epilog code [[KeyPgEndblock End]] [[KeyPgFunction Function]] ## {{fbdoc item="param"}} - ##//identifier//## - name of the procedure. - ##//calling_convention//## - calling convention of the procedure - can be ##[[KeyPgCdecl CDecl]]##, ##[[KeyPgPascal Pascal]]##, or ##[[KeyPgStdcall StdCall]]## - ##//asm_statements//## - the code in the procedure body. The code for handling parameters and returning values must all be done manually. Note that the methods for doing these can change, depending on the calling convention. - ##//param_list//## - parameters to be passed to the procedure. - ##//data_type//## - the [[DataType data type]] of the function. + ##//identifier//## nom de la procédure. + ##//calling_convention//## convention d'appel de la procédure - peut être ##[[KeyPgCdecl cdecl]]##, ##[[KeyPgPascal pascal]]## ou ##[[KeyPgStdcall stdcall]]## + ##//asm_statements//## le code dans le corps de la procédure. Le code pour gérer les paramètres et retourner les valeurs doit être fait entièrement manuellement. Notez que les méthodes pour faire ceci peuvent changeer en fonction de la convention d'appel. + ##//param_list//## paramètres à passer à la procédure. + ##//data_type//## le [[DataType data type]] de la fonction. {{fbdoc item="desc"}} - ##**Naked**## allows the programmer to write procedures without the compiler generating any prolog/epilog code. This is useful when writing small, fast functions in ##[[KeyPgAsm Asm]]## without any unnecessary overhead. + ##**Naked**## permet au programmeur d'écrire des procédures sans que le compilateur génére de code prologue / épilogue. Ceci est utile lors de l'écriture de petites fonctions rapides en ##[[KeyPgAsm Asm]]## sans surcharge inutile. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/naked.bas"}}%%(freebasic) @@ -39,10 +39,10 @@ end function print add( 1, 5 )%% {{fbdoc item="target"}} - - The default calling convention can change depending on the platform used. Additionally, ##[[KeyPgStdcall StdCall]]## does not behave the same on all platforms - on Linux, it behaves like ##[[KeyPgCdecl Cdecl]]##. It may be necessary to check the [[CatPgDddefines Intrinsic Defines]] (such as ##[[KeyPgDdfbwin32 __FB_WIN32__]]##), and write different code depending on them. + - La convention d'appel par défaut peut changer en fonction de la plate-forme utilisée. En outre, ##[[KeyPgStdcall stdcall]]## ne se comporte pas de la même façon sur toutes les plateformes - sur Linux, il se comporte comme ##[[KeyPgCdecl cdecl]]##. Il peut être nécessaire de vérifier [[CatPgDddefines les définitions intrinsèques]] ((comme ##[[KeyPgDdfbwin32 __FB_WIN32__]]##) et d'écrire du code différent en fonction d'elles. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAsm Asm]]## diff --git a/fbdocs/manual/cache/KeyPgName.wakka b/fbdocs/manual/cache/KeyPgName.wakka index 35cac8327c..e4dfd5d4f8 100644 --- a/fbdocs/manual/cache/KeyPgName.wakka +++ b/fbdocs/manual/cache/KeyPgName.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="NAME"}}---- -Renames a file on disk +Renomme un fichier sur le disque {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Name**( [[KeyPgByref byref]] //oldname// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByref byref]] //newname// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,15 +9,15 @@ Renames a file on disk ## {{fbdoc item="param"}} ##//oldname//## - Name of an existing file. + Nom d'un fichier existant. ##//newname//## - New name of the file. + Nouveau nom du fichier. -{{fbdoc item="ret"}} - Returns zero (0) on success and non-zero on failure. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si succès et non-zéro en cas d'échec. {{fbdoc item="desc"}} - Renames a file or folder originally called ##//oldname//## to ##//newname//##. + Renomme ##//newname//## un fichier ou un dossier appelé à l'origine ##//oldname//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/name.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ End If %% {{fbdoc item="diff"}} - - In QB, NAME required AS rather than a comma between the old and new names. + - Dans QB, NAME nécessite AS plutôt qu'une virgule entre ancien et nouveau noms. {{fbdoc item="see"}} - ##[[KeyPgKill Kill]]## diff --git a/fbdocs/manual/cache/KeyPgNamespace.wakka b/fbdocs/manual/cache/KeyPgNamespace.wakka index f13cc49b82..0862cc1f99 100644 --- a/fbdocs/manual/cache/KeyPgNamespace.wakka +++ b/fbdocs/manual/cache/KeyPgNamespace.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="NAMESPACE"}}---- -Declares a namespace block +Déclare un bloc d'espace de noms {{fbdoc item="syntax"}}## **Namespace** //identifier// [ [[KeyPgAlias Alias]] "//aliasname//" ] @@ -8,16 +8,16 @@ Declares a namespace block ## {{fbdoc item="param"}} ##//identifier//## - The name of the namespace. + Le nom de l'espace de noms. ##//aliasname//## - An alternate external name for the namespace. + Un autre nom externe pour l'espace de noms. {{fbdoc item="desc"}} - Namespaces are commonly used in libraries where you don't want all the symbols from that library to crowd the user's space (called the Global Namespace). + Les espaces de noms sont couramment utilisés dans les bibliothèques si vous ne voulez pas que tous les symboles de celle-ci s'entassent et s'ajoutent sur l'espace de l'utilisateur (appelé Global Namespace = Espace de noms global). - For example, if you used the "Forms" library, it might define the Point type for describing an X and Y coordinate, and you might also define it for another purpose. This can be resolved by creating the namespace Forms for the library, and then referring to its Point type as Forms.Point, and yours as just Point. + Par exemple, si vous utilisez la librairie "Forms", elle pourrait définir le type de Point pour décrire les coordonnées X et Y, et vous pourriez également le définir dans un autre but. Cela peut être résolu par la création de l'espace de noms pour la bibliothèque "Forms", puis se référer à son type Point comme Forms.Point, et le vôtre en tant que Point. - To access duplicated symbols defined in the global namespace use: ##.""SomeSymbol""## (or ##..""SomeSymbol""## if inside a [[KeyPgWith With..End With]] block). + Pour accéder aux symboles dupliqués définis dans l'espace global de noms utilisez: ##.UnSymbole## (ou ##..UnSymbole## si à l'intérieur d'un bloc [[KeyPgWith With..End With]]). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/namespace.bas"}}%%(freebasic) @@ -49,6 +49,36 @@ Dim pt1 As Point AdjustPoint( pt1, 1, 1, 1 ) Dim pt2 As Forms.Point Forms.AdjustPoint( pt2, 1, 1 ) +%% + + {{fbdoc item="lang"}} + - Les espaces de noms ne sont pas permis dans le dialecte //[[CompilerOptlang -lang qb]]//. +{{fbdoc item="diff"}} +- Nouveau pour FreeBASIC +{{fbdoc item="see"}} +- [[KeyPgUsing Using (Espaces de noms)]] + +#include +#include + +namespace mylib +{ + int test() + { + return 123; + } +} +%% + %%(freebasic) +'' test.bas + +extern "c++" lib "mylib" + namespace mylib alias "mylib" + declare function test() as integer + end namespace +end extern + +print mylib.test() %% {{fbdoc item="lang"}} diff --git a/fbdocs/manual/cache/KeyPgNext.wakka b/fbdocs/manual/cache/KeyPgNext.wakka index 161bfc0a4c..08398f003b 100644 --- a/fbdocs/manual/cache/KeyPgNext.wakka +++ b/fbdocs/manual/cache/KeyPgNext.wakka @@ -1,47 +1,47 @@ {{fbdoc item="title" value="NEXT"}}---- -Control flow statement to mark the end of a ##[[KeyPgFornext For...Next]]## loop. +Déclaration de contrôle de flux pour marquer la fin d'une boucle ##[[KeyPgFornext For...Next]]##. {{fbdoc item="syntax"}}## **Next** [ //identifier_list// ] ## {{fbdoc item="desc"}} - Indicates the end of a statement block associated with a matching ##[[KeyPgFornext For]]## statement. + Indique la fin d'un bloc d'instructions associé à une déclaration ##[[KeyPgFornext For]]##. - When ##**Next**## is used on its own without an //identifier_list//, it closes the most recent ##[[KeyPgFornext For]]## statement block. + Quand ##**Next**## est utilisé seul sans //identifier_list//, il ferme le bloc d'instructions ##[[KeyPgFornext For]]## le plus récent. - ##//identifier_list//## is optional and may be one or more variable names separated by commas. This form of the ##**Next**## statement is retained for compatibility with QB. ##//identifier_list//##, if given, must match the identifiers used in the associated ##[[KeyPgFornext For]]## statements in reverse order. + ##//identifier_list//## est facultatif et correspond à une ou plusieurs variables séparées par des virgules. Cette forme de déclaration de ##**Next**## est conservée pour la compatibilité avec QB. +##//identifier_list//##, s'il existe, doit correspondre aux identifiants utilisés dans la déclaration ##[[KeyPgFornext For]]## associée, dans l'ordre inverse. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/control/next.bas"}}%%(freebasic) dim i as integer, j as integer -for i=1 to 10 -for j=1 to 2 - ' ... +Dim i As Integer, j As Integer +For i=1 To 10 + For j=1 To 2 +' ... next -next -%% +Next -{{fbdoc item="filename" value="examples/manual/control/next2.bas"}}%%(freebasic) -dim i as integer, j as integer -for i=1 to 10 -for j=1 to 2 - ' ... -next j -next i %% - -{{fbdoc item="filename" value="examples/manual/control/next3.bas"}}%%(freebasic) dim i as integer, j as integer -for i=1 to 10 -for j=1 to 2 - ' ... -next j,i +Dim i As Integer, j As Integer +For i=1 To 10 + For j=1 To 2 +' ... +Next j +Next i + %% +dim i as integer, j as integer +Dim i As Integer, j As Integer +For i=1 To 10 + For j=1 To 2 +' ... +Next j,i -{{fbdoc item="diff"}} - - ##[[KeyPgByref Byref]]## arguments cannot be used as counters. +%% + {{fbdoc item="diff"}} -{{fbdoc item="see"}} - - ##[[KeyPgFornext For...Next]]## +- Les arguments ##[[KeyPgByref ByRef]]## ne peuvent être utilisés comme compteurs. + {{fbdoc item="see"}} -{{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file +- ##[[KeyPgFornext For...Next]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgNow.wakka b/fbdocs/manual/cache/KeyPgNow.wakka index 941cf494ff..1cdb36fa14 100644 --- a/fbdocs/manual/cache/KeyPgNow.wakka +++ b/fbdocs/manual/cache/KeyPgNow.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="NOW"}}---- -Gets the current system time as a [[ProPgDates Date Serial]] +Récupère une [[ProPgDates Date Serial]] de la date et de l'heure du système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Now** ( ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -8,13 +8,13 @@ Gets the current system time as a [[ProPgDates Date Serial]] #include "vbcompat.bi" //result// = **Now** ## -{{fbdoc item="ret"}} - Returns a date serial containing the system's date and time at execution time. +{{fbdoc item="section" value="Valeur retournée + Retourne une "date serial" contenant la date et l'heure au moment de l'exécution. {{fbdoc item="desc"}} - As the time is the decimal part of a date serial, if the value of **Now** is saved to an integer, the time in it will be reset to 00:00:00 + Comme l'heure est la partie décimale d'une "date serial", si la valeur de **Now** est sauvée dans un nombre entier, l'heure sera mise à zéro 00:00:00 - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/now.bas"}}%%(freebasic) @@ -26,7 +26,7 @@ print format(a, "yyyy/mm/dd hh:mm:ss") %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgOct.wakka b/fbdocs/manual/cache/KeyPgOct.wakka index 6cd79bd105..0d0a2f1e0d 100644 --- a/fbdocs/manual/cache/KeyPgOct.wakka +++ b/fbdocs/manual/cache/KeyPgOct.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="OCT"}}---- -Converts a number to octal representation +Conversion d'un nombre dans sa représentation octale {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgString string]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgByte Byte]] ) [[KeyPgAs As]] [[KeyPgString String]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgByte Byte]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgString String]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgShort short]] ) [[KeyPgAs as]] [[KeyPgString string]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgShort short]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgShort Short]] ) [[KeyPgAs As]] [[KeyPgString String]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgShort Short]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgString String]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgString String]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgString String]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgString string]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Oct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgLongint LongInt]] ) [[KeyPgAs As]] [[KeyPgString String]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **Oct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgLongint LongInt]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgString String]] ## {{fbdoc item="usage"}}## //result// = **Oct**[$]( //number// [, //digits// ] ) ## {{fbdoc item="param"}} ##//number//## - A number or expression evaluating to a number. A floating-point number will be converted to a ##[[KeyPgLongint longint]]##. + Un nombre ou une expression numérique représentant un nombre. Un nombre à virgule flottante sera converti en ##[[KeyPgLongint LongInt (entier long)]]##. ##//digits//## - Desired number of digits in the returned string. + Nombre de chiffres désirés pour la chaîne retournée. -{{fbdoc item="ret"}} - A string containing the unsigned octal representation of ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Une chaîne contenant la représentation octale non-signée de ##//number//##. {{fbdoc item="desc"}} - Returns the unsigned octal string representation of ##//number//##. Octal digits range from 0 to 7. + Retourne la représentation octale non-signée de ##//number//##. Chiffres octals de 0 à 7. - If you specify ##//digits//## > 0, the result string will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, la chaîne résultat aura exactement cette longueur. Elle sera tronquée ou complétée avec des zéros sur la gauche, si nécessaire. - The length of the returned string will not be longer than the maximum number of digits required for the type of ##//number//## (3 characters for ##[[KeyPgByte Byte]]##, 6 for ##[[KeyPgShort Short]]##, 11 for ##[[KeyPgInteger Integer]]##, and 22 for ##[[KeyPgLongint Longint]]##) + La longueur de la chaîne ne dépassera pas le nombre de bits maximum requis pour le type de ##//number//## (3 caractères pour ##[[KeyPgByte Byte (octet)]]##, 6 pour ##[[KeyPgShort Short (entier court)]]##, 11 pour ##[[KeyPgInteger Integer (entier)]]##, et 22 pour ##[[KeyPgLongint LongInt (entier long)]]##) - If you want to do the opposite, i.e. convert an octal string back into a number, the easiest way to do it is to prepend the string with ##"&O"##, and convert it using ##[[KeyPgValint Valint]]## or ##[[KeyPgVallng Vallng]]##, similarly to a normal numeric string. E.g. ##[[KeyPgValint Valint]]("&O77")## + Si vous désirez l'opposé, par exemple convertir une chaîne octale vers un nombre, la meilleure façon de le faire est d'ajouter ##"&O"##, au début de la chaîne, et la convertir en utilisant ##[[KeyPgValint ValInt]]## ou ##[[KeyPgVallng ValLng]]##, de façon similaire à une chaîne numérique normale. Par exemple ##[[KeyPgValint ValInt]]("&O77")## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/oct.bas"}}%%(freebasic) @@ -41,7 +41,7 @@ Print Oct(54321) Print Oct(54321, 4) Print Oct(54321, 8) %% - will produce the output: + produira la sortie: %%152061 2061 @@ -49,12 +49,12 @@ Print Oct(54321, 8) %% {{fbdoc item="lang"}} - - The string type suffix ##"$"## is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix ##"$"## is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type chaîne ##"$"## est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type chaîne ##"$"## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - In QBASIC, there was no way to specify the number of digits returned. - - The size of the string returned was limited to 32 bits, or 11 octal digits. + - Dans QBASIC, il n'y avait aucun moyen de spécifier le nombre de chiffres retournés. + - La taille de la chaîne retournée était limitée à 32 bits, ou 11 chiffres octals. {{fbdoc item="see"}} - ##[[KeyPgBin Bin]]## diff --git a/fbdocs/manual/cache/KeyPgOffsetof.wakka b/fbdocs/manual/cache/KeyPgOffsetof.wakka index 33a7ef823a..27bf516af6 100644 --- a/fbdocs/manual/cache/KeyPgOffsetof.wakka +++ b/fbdocs/manual/cache/KeyPgOffsetof.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OFFSETOF"}}---- -Returns the offset of a field within a type. +Retourne la position (offset) d'un champ dans un type. {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **Offsetof**(//typename//, //fieldname//) [[KeyPgCint cint]]( @[[KeyPgCast cast]]( //typename// [[KeyPgPtr ptr]], 0 )->//fieldname// ) @@ -9,12 +9,12 @@ Returns the offset of a field within a type. ## {{fbdoc item="param"}} ##//typename//## - Name of the type as defined using the ##[[KeyPgType Type...End Type]]## statements. + Nom du type qui a été défini avec ##[[KeyPgType Type...End Type]]##. ##//fieldname//## - Name of the field as defined within the type. + Nom du type de champ qui a été défini dans le type. {{fbdoc item="desc"}} - ##**Offsetof**## will return the location ##//fieldname//## as offset in bytes from the beginning of ##//typename//##. + ##**OffsetOf**## retournera la position, en octets, de ##//fieldname//## depuis le début de ##//typename//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/misc/offsetof.bas"}}%%(freebasic) @@ -42,10 +42,10 @@ OffsetOf i = 8 {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Offsetof""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Offsetof**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type...End Type]]## diff --git a/fbdocs/manual/cache/KeyPgOnerror.wakka b/fbdocs/manual/cache/KeyPgOnerror.wakka index 7529bd918a..5ef1194b6f 100644 --- a/fbdocs/manual/cache/KeyPgOnerror.wakka +++ b/fbdocs/manual/cache/KeyPgOnerror.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="ON ERROR"}}---- -Error handling statement to set the current error handler +Instruction de gestion des erreurs pour définir le gestionnaire d'erreur courant {{fbdoc item="syntax"}}## **On [Local] Error Goto** //label// @@ -9,18 +9,18 @@ Error handling statement to set the current error handler ## {{fbdoc item="param"}} ##//label//## - label to jump to when error occurs + label où sauter en cas d'erreur {{fbdoc item="desc"}} - ##[[KeyPgOnerror On Error]]## triggers a jump to an error handler when an error occurs. + ##[[KeyPgOnerror On Error]]## déclenche un saut vers un gestionnaire d'erreur lorsqu'une erreur se produit. - If ##[[KeyPgLocal Local]]## is not used the handler must be in the main part of the module. Using ##[[KeyPgLocal Local]]## allows to have the error handler inside the ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## where the ##**On Error**## is located. + Si ##[[KeyPgLocal Local]]## n'est pas utilisé le gestionnaire doit être dans la partie principale du module. L'utilisation de ##[[KeyPgLocal Local]]## permet d'avoir un gestionnaire d'erreur dans ##[[KeyPgSub Sub]]##/##[[KeyPgFunction Function]]## où ##**On Error**## est situé. - ##**On Error GOTO 0**## deactivates the current error handler. + ##**On Error GOTO 0**## désactive le gestionnaire d'erreur courant. - The use of QB-like error handling requires compilation with switch //[[CompilerOpte -e]]//, //[[CompilerOptex -ex]]// or //[[CompilerOptexx -exx]]// activated. + L'utilisation d'un gestionnaire d'erreur de type QB nécessite une compilation avec le commutateur //[[CompilerOpte -e]]//, //[[CompilerOptex -ex]]// ou //[[CompilerOptexx -exx]]// activé. - See [[TblRuntimeErrors Runtime Error Codes]] for a listing of runtime error numbers and their associated meaning. + Voir [[TblRuntimeErrors Codes des erreurs de fonctionnement]] pour une liste des erreurs de fonctionnement et de leurs numéros, ainsi que de leur signification. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/onerror.bas"}}%%(freebasic) @@ -38,7 +38,44 @@ End %% {{fbdoc item="lang"}} - - ON ERROR is supported in the //[[CompilerOptlang -lang qb]]// dialect only. In the //[[CompilerOptlang -lang fb]]// dialect, statements can be used in function form to return an error code +- ON ERROR n'est utilisable que dans le dialecte //[[CompilerOptlang -lang qb]]//. Dans le dialecte //[[CompilerOptlang -lang fb]]//, des déclarations peuvent être utilisées sous forme de fonction pour retourner un code d'erreur. + +#lang "fblite" + +'' Compile with FB default (-lang fb) dialect + If Open( "text" For Input As #1 ) <> 0 Then + + Print "Unable to open file" + + End If + + %% + {{fbdoc item="diff"}} + + - QB n'a pas de clause LOCAL et nécessite que le label soit dans la partie principale du module. + + {{fbdoc item="see"}} + +- ##[[KeyPgError Error]]## + - ##[[KeyPgLocal Local]]## +- ##[[KeyPgErr Err]]## + + + - [[TblRuntimeErrors Codes des erreur de fonctionnement]] + + on error goto errhandler + error 1234 + print "back from resume next" + end 0 + +errhandler: + print "error number: " + str( err ) + " at line: " + str( erl ) + resume next +%% + +{{fbdoc item="lang"}} + - ON ERROR is supported in any //[[CompilerOptlang -lang]]// dialect. + - In the //[[CompilerOptlang -lang fb]]// dialect, statements can be used preferably in function form to return an error code: in that case ON ERROR being ineffective but consuming CPU time must be unused. {{fbdoc item="filename" value="examples/manual/check/KeyPgOnerror_2.bas"}}%%(freebasic) '' Compile with FB default (-lang fb) dialect If Open( "text" For Input As #1 ) <> 0 Then @@ -55,5 +92,6 @@ End If - ##[[KeyPgLocal Local]]## - ##[[KeyPgErr Err]]## - [[TblRuntimeErrors Runtime Error Codes]] + - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOngosub.wakka b/fbdocs/manual/cache/KeyPgOngosub.wakka index bf6e006af7..4e9c509be1 100644 --- a/fbdocs/manual/cache/KeyPgOngosub.wakka +++ b/fbdocs/manual/cache/KeyPgOngosub.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="ON...GOSUB"}}---- -Calls a label based on an expression +Appel (basé sur une expression) d'une ligne avec une étiquette {{fbdoc item="syntax"}}## **On** //expression// **Gosub** //label1//[, ...] ## {{fbdoc item="desc"}} - Branches to different labels depending on the value of //expression//. An expression value of 1 will branch to the first label, a value of 2 to the second, etc. If the value of //expression// is zero (0) or greater than the number of items in the list, execution continues on the next statement following the ##**On...Gosub**##. + Branchement vers différents labels dépendant de la valeur de //expression//. Une valeur de l'expression de 1 effectuera un branchement vers la première étiquette, une valeur de 2 vers la seconde, etc. Si la valeur de //expression// est zéro (0) ou plus grande que le nombre d'éléments dans la liste, l'exécution se poursuit sur la déclaration qui suit immédiatement ##**On...Gosub**##. - This statement behaves exactly like ##[[KeyPgGosub Gosub]]## and execution may return to the statement following the ##**On...Gosub**## using ##[[KeyPgReturn Return]]##. + Cette déclaration comporte exactement comme ##[[KeyPgGosub GoSub]]## et l'exécution peut revenir à l'instruction qui suit ##**On...Gosub**## en utilisant ##[[KeyPgReturn Return]]##. - It is recommended that the structured ##[[KeyPgSelectcase Select Case]]## conditional statement be used instead of ##**On...Gosub**##. + Il est recommandé d'utiliser l'instruction conditionnelle et structurée ##[[KeyPgSelectcase Select Case]]## à la place de ##**On...Gosub**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/ongosub.bas"}}%%(freebasic) @@ -36,11 +36,11 @@ Return %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. - - ##**On Gosub**## support is disabled by default in the //[[CompilerOptlang -lang fblite]]// unless the ##[[KeyPgOptiongosub Option Gosub]]## statement is used. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. + - Le support de ##**On Gosub**## est invalide par défaut dans le dialecte //[[CompilerOptlang -lang fblite]]// sauf si ##[[KeyPgOptiongosub Option Gosub]]## est utilisé. {{fbdoc item="diff"}} - - FreeBASIC does not generate a run-time error if ##//expression//## is negative or greater than 255. + - FreeBASIC ne génère pas d'erreur de fonctionnement si ##//expression//## est négative ou supérieure à 255. {{fbdoc item="see"}} - ##[[KeyPgSelectcase Select Case]]## diff --git a/fbdocs/manual/cache/KeyPgOngoto.wakka b/fbdocs/manual/cache/KeyPgOngoto.wakka index 0ca4d0b552..83f09db5c9 100644 --- a/fbdocs/manual/cache/KeyPgOngoto.wakka +++ b/fbdocs/manual/cache/KeyPgOngoto.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="ON...GOTO"}}---- -Jumps to a label based on an expression. +Saut (basé sur une expression) vers une ligne avec une étiquette {{fbdoc item="syntax"}}## **On** //expression// **Goto** label1[, ...] ## {{fbdoc item="desc"}} - Branches to different labels depending on the value of //expression//. An expression value of 1 will branch to the first label, a value of 2 to the second, etc. If the value of //expression// is zero (0) or greater than the number of items in the list, execution continues on the next statement following the ##**On...Goto**##. + Branchement vers différents labels dépendant de la valeur de //expression//. Une valeur de l'expression de 1 effectuera un branchement vers la première étiquette, une valeur de 2 vers la seconde, etc. Si la valeur de //expression// est zéro (0) ou plus grande que le nombre d'éléments dans la liste, l'exécution se poursuit sur la déclaration qui suit immédiatement ##**On...Goto**##. - It is recommended that the structured ##[[KeyPgSelectcase Select Case]]## conditional statement be used instead of ##**On...Goto**##. + Il est recommandé d'utiliser l'instruction conditionnelle et structurée ##[[KeyPgSelectcase Select Case]]## à la place de ##**On...Goto**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/on-goto.bas"}}%%(freebasic) @@ -31,7 +31,7 @@ End %% {{fbdoc item="diff"}} - - FreeBASIC does not generate a run-time error if ##//expression//## is negative or greater than 255. + - FreeBASIC ne génère pas d'erreur de fonctionnement si ##//expression//## est négative ou supérieure à 255. {{fbdoc item="see"}} - ##[[KeyPgSelectcase Select Case]]## diff --git a/fbdocs/manual/cache/KeyPgOpAdd.wakka b/fbdocs/manual/cache/KeyPgOpAdd.wakka index cb15ac9536..037df0840e 100644 --- a/fbdocs/manual/cache/KeyPgOpAdd.wakka +++ b/fbdocs/manual/cache/KeyPgOpAdd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator + (Addition)"}}---- -Sums two expressions +Somme de deux expressions {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **+** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgByte byte]] @@ -22,25 +22,25 @@ Sums two expressions ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to sum. + L'argument de gauche de la somme. ##//rhs//## - The right-hand side expression to sum. + L'argument de droite de la somme. ##//T//## - Any pointer type. + Tout type de pointeur. -{{fbdoc item="ret"}} - Returns the sum of two expressions. +{{fbdoc item="section" value="Valeur retournée + Renvoie la somme de deux expressions. {{fbdoc item="desc"}} - When the left and right-hand side expressions are numeric values, **##Operator +## (Add)** returns the sum of the two values. + Lorsque les expressions à gauche et à droite sont des valeurs numériques, **##Operator +## (Add)** renvoie la somme des deux valeurs. - When the left and right-hand side expressions are string values, **##Operator +## (Add)** concatenates the two strings and returns the result. + Lorsque les expressions à gauche et à droite sont des valeurs chaîne, **##Operator +## (Add)** réalise la concaténation des deux chaînes et renvoie le résulat. - If either the left or right-hand side expressions is of [[KeyPgPointer Pointer]] type, **##Operator +## (Add)** performs pointer arithmetic on the address, returning the result. + Si les expressions de droite ou de gauche sont de type [[KeyPgPointer Pointer]], **##Operator +## (Add)** exécute une opération arithmétique pointeur sur l'adresse, et renvoie le résulat. - Neither operand is modified in any way. + Dans tous les cas, aucun opérande n'est modifié - This operator can be overloaded to accept user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/add.bas"}}%%(freebasic) @@ -49,20 +49,20 @@ n = 4.54 + 5.46 PRINT n SLEEP %% - will produce the output: + produira l'affichage: %% 10 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[KeyPgOpConcat Operator + (String concatenation)]] - - [[CatPgMath Mathematical Functions]] + - [[KeyPgOpConcat Operator + (Concaténation de chaînes)]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpAnd.wakka b/fbdocs/manual/cache/KeyPgOpAnd.wakka index 9f0fb15006..924fdce8ac 100644 --- a/fbdocs/manual/cache/KeyPgOpAnd.wakka +++ b/fbdocs/manual/cache/KeyPgOpAnd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator AND (Conjunction)"}}---- -Returns the bitwise-and (conjunction) of two numeric values +Retourne la manipulation de bits AND (conjonction) de deux valeurs numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **And** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// @@ -9,31 +9,31 @@ Returns the bitwise-and (conjunction) of two numeric values ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + L'expression du côté gauche. ##//T1//## - Any numeric type. + N'importe quel type numérique. ##//rhs//## - The right-hand side expression. + L'expression du côté droit. ##//T2//## - Any numeric type. + N'importe quel type numérique. ##//Ret//## - A numeric type (varies with ##//T1//## and ##//T2//##). + Un type numérique (varie avec ##//T1//## et ##//T2//##). -{{fbdoc item="ret"}} - Returns the bitwise-and (conjunction) of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits AND (conjonction) des deux opérandes. {{fbdoc item="desc"}} - This operator returns the bitwise-and of its operands, a logical operation that results in a value with bits set depending on the bits of the operands. + Cet opérateur retourne la manipulation de bits AND de ses opérandes, une opération logique dont le résultat est une valeur dont les bits dépendent de la valeur des bits des deux opérandes. - The truth table below demonstrates all combinations of a boolean-and operation: + La table de vérité ci-dessous montre les différentes combinaisons d'une opération AND booléenne: - {{table columns="3" cellpadding="2" cells="Lhs Bit;Rhs Bit;Result;0;0;0;1;0;0;0;1;0;1;1;1"}} + {{table columns="" cellpadding="2" cells="Bit côté gauche;Bit côté droit;Résultat;0;0;0;1;0;0;0;1;0;1;1;1;
    - No short-circuiting is performed - both expressions are always evaluated. + Aucun court-circuit n'est exécuté - les deux expressions sont toujours évaluées. - The return type depends on the types of values passed. ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]## and floating-point type values are first converted to ##[[KeyPgInteger Integer]]##. If the left and right-hand side types differ only in signedness, then the return type is the same as the left-hand side type (##//T1//##), otherwise, the larger of the two types is returned. + Le type de la valeur retournée dépend des types des valeurs passées. Les valeurs de types ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]## et à virgule flottante sont en premier converties en ##[[KeyPgInteger Integer]]##. Si les types des deux côtés diffèrent seulement par le fait d'être signé ou non, alors le type de la valeur retournée sera le même que le type le l'opérande côté gauche (##//T1//##), autrement, le plus large des deux types sera utilisé. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/and-bitwise.bas"}}%%(freebasic) @@ -64,12 +64,12 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Table de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpAndAlso.wakka b/fbdocs/manual/cache/KeyPgOpAndAlso.wakka index d670b522f8..9a26602fbd 100644 --- a/fbdocs/manual/cache/KeyPgOpAndAlso.wakka +++ b/fbdocs/manual/cache/KeyPgOpAndAlso.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="Operator ANDALSO (Short Circuit Conjunction)"}}---- -Returns the short circuit-and (conjunction) of two numeric values +Retourne le circuit-court (conjonction) de deux valeurs numériques {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **""AndAlso""** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// + [[KeyPgDeclare Declare]] [[KeyPgOperator Operator]] **AndAlso** ( [[KeyPgByref ByRef]] //lhs// [[KeyPgAs As]] //T1//, [[KeyPgByref ByRef]] //rhs// [[KeyPgAs As]] //T2// ) [[KeyPgAs As]] //Ret// ## {{fbdoc item="usage"}}## - //result// = //lhs// **""AndAlso""** //rhs// + //result// = //lhs// **AndAlso** //rhs// ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Expression côté gauche. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Expression côté droit. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - An Integer. + Un nombre entier. -{{fbdoc item="ret"}} - Returns the short circuit-and (conjunction) of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne le circuit-court (conjonction) des deux opérandes. {{fbdoc item="desc"}} - This operator evaluates the left hand side expression. If the result is zero, then zero is immediately returned. If the result is non zero then the right hand side is evaluated, and the logical result from that is returned. + Cet opérateur évalue l'expression à gauche. Si le résultat est nul, zéro est retourné immédiatement. Si le résultat est non nul alors l'expression de droite est évaluée et le résultat logique des deux expressions est retourné. - The truth table below demonstrates all combinations of a short circuit-and operation, the '-' denotes that the operand is not evaluated. + La table de vérité ci-dessous montre toutes les combinaisons d'un circuit-court, le signe '-' indique que l'opérande n'est pas évalué. - {{table columns="3" cellpadding="2" cells="Lhs Value;Rhs Value;Result;0;-;0;1;0;0;1;1;1"}} + {{table columns="" cellpadding="2" cells="Valeur côté gauche;Valeur côté droit;Résultat;0;-;0;1;0;0;1;1;1;
    - Short-circuiting is performed - only expressions needed to calculate the result are evaluated. + Un court-circuit est exécuté - seules les expressions nécessaires pour calculer le résultat sont évaluées. - The return type is always an Integer, of the value 0 or -1, denoting false and true respectively. + Le type de retour est toujours un entier, de valeur 0 ou -1, indiquant faux et vrai, respectivement. - This operator cannot be overloaded for user-defined types. + Cet opérateur ne peut pas être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/andalso.bas"}}%%(freebasic) @@ -48,10 +48,10 @@ SLEEP %% {{fbdoc item="diff"}} - - This operator was not available in QB. + - Cet opérateur n'est pas disponible sous QB. {{fbdoc item="see"}} - ##[[KeyPgOpOrElse OrElse]]## - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs de manipulation de bits]] {{fbdoc item="back" value="CatPgOpShortCircuit|Short Circuit Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpArrayIndex.wakka b/fbdocs/manual/cache/KeyPgOpArrayIndex.wakka index b56b92a2ce..006e5a36e9 100644 --- a/fbdocs/manual/cache/KeyPgOpArrayIndex.wakka +++ b/fbdocs/manual/cache/KeyPgOpArrayIndex.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="Operator () (Array index)"}}---- -Returns a reference to an element in an array +Retourne une référence à un élément d'un tableau {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **()** ( //lhs//() [[KeyPgAs as]] //T//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]], ... ) [[KeyPgAs as]] //T// ## -~&//Note that **##Operator ()## (Array index)** returns a reference. See [[CompilerFAQ Compiler FAQ]].// +//Notez que **##Opérateur ()## (Indice de tableau)** retourne une référence. Voir [[CompilerFAQ FAQ du compilateur]].// {{fbdoc item="usage"}}## //result// = //lhs// **(** //rhs// [, ...] **)** ## {{fbdoc item="param"}} ##//lhs//## - An array. + Un tableau. ##//rhs//## - An index of an element in the array. + L'indice d'un élément du tableau. ##//T//## - Any data type. + N'importe quel type de donnée. {{fbdoc item="desc"}} - This operator returns a reference to an element in an array. For multidimensional arrays, multiple indexes must be specified (up to the total number of dimensions of the array). + Cet opérateur retourne une référence à un élément d'un tableau. Pour les tableaux multi-dimensionnels, des indices multiples seront spécifiés (au maximum égal au nombre total des dimensions du tableau). - For any one dimension //d// in array //a//, any index outside of the range (##[[KeyPgLbound Lbound]](//a//(), //d//), [[KeyPgUbound Ubound]](//a//(), //d//)##) will result in a runtime error. + Pour toute dimension //d// dans un tableau //a//, tout indice en dehors de la plage (##[[KeyPgLbound LBound]](//a//(), //d//), [[KeyPgUbound UBound]](//a//(), //d//)##) donnera une erreur de fonctionnement. {{fbdoc item="ex"}} @@ -31,14 +31,14 @@ for index as integer = 0 to 4 print array(index) next %% - will produce the output: + produira l'affichage: %% 0 1 2 3 4 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgOpAssignment.wakka b/fbdocs/manual/cache/KeyPgOpAssignment.wakka index b2370fc707..4ae401d1c9 100644 --- a/fbdocs/manual/cache/KeyPgOpAssignment.wakka +++ b/fbdocs/manual/cache/KeyPgOpAssignment.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator = (Assign)"}}---- -Assigns a value to a variable +Affecte une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Let** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -7,26 +7,26 @@ Assigns a value to a variable {{fbdoc item="usage"}}## //lhs// **=** //rhs// - ##//or, in the //QB// dialect,//## + ##//ou, dans le dialecte //QB//,//## [ [[KeyPgLet Let]] ] //lhs// **=** //rhs// ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable qui reçoit l'affectation. ##//T1//## - Any numeric, string or pointer type. + Une chaîne ou un type pointeur. ##//rhs//## - The value to assign to ##//lhs//##. + La valeur à assigner à ##//lhs//##. ##//T2//## - Any type convertible to ##//T2//##. + Tout type convertible##//T2//##. {{fbdoc item="desc"}} - This operator assigns the value of its right-hand side operand (##//rhs//##) to its left-hand side operand (##//lhs//##). The right-hand side operand must be implicitly convertible to the left-hand side type (##//T1//##). For example, you cannot assign a numeric value to a string type; to do that, first convert the numeric value to a string using ##[[KeyPgStr Str]]## or ##[[KeyPgWstr Wstr]]##. + Cet opérateur affecte la valeur de son opérande de droite (##//rhs//##) à son opérande de gauche (##//lhs//##). L'opérande de droite doit être implicitement convertible dans le type de celui de gauche (##//T1//##). Par exemple, vous ne pouvez pas assigner une valeur numérique à un type de chaîne; pour le faire, vous devez d'abord convertir la valeur numérique en une chaîne à l'aide de ##[[KeyPgStr Str]]## ou ##[[KeyPgWstr WStr]]##. - Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '=' symbol. + Evitez la confusion avec ##[[KeyPgOpEqual Opérateur = (Egal)]]##, qui utilise également le symbole '='. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/assign.bas"}}%%(freebasic) @@ -52,15 +52,15 @@ Let i = 300 ' <-alternate syntax %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. - - In the //[[CompilerOptlang -lang qb]]// dialect, an assignment expression can be preceded by the ##[[KeyPgLet Let]]## keyword. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, une expression d'affectation peut être précédée par le mot-clé ##[[KeyPgLet Let]]##. {{fbdoc item="diff"}} - None -{{fbdoc item="see"}} - - ##[[KeyPgOpEqual Operator = (Equal)]]## - - ##[[KeyPgOpLet Operator Let (Assignment)]]## +{{fbdoc item="see"}} + - ##[[KeyPgOpEqual Opérateur = (Egal)]]## + - ##[[KeyPgOpLet Opérateur Let (Affectation)]]## - ##[[KeyPgSwap Swap]]## {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpAt.wakka b/fbdocs/manual/cache/KeyPgOpAt.wakka index 0ec42a90a7..d0dbb43519 100644 --- a/fbdocs/manual/cache/KeyPgOpAt.wakka +++ b/fbdocs/manual/cache/KeyPgOpAt.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator @ (Address of)"}}---- -Returns the address of a string literal, variable, object or procedure +Retourne l'addresse d'une chaîne de caractères, d'une variable, d'un objet ou d'une procédure {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **@** ( [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T// ) [[KeyPgAs as]] //T// [[KeyPgPointer pointer]] @@ -9,21 +9,21 @@ Returns the address of a string literal, variable, object or procedure ## {{fbdoc item="param"}} ##//rhs//## - The string literal, variable, object or procedure to retrieve the address of. + La chaîne de caractères, variable, objet ou procédure dont on veut récupérer l'adresse. ##//T//## - Any [[CatPgStdDataTypes standard]], [[CatPgUserDefTypes user-defined]] or procedure type. + N'importe quel type [[CatPgStdDataTypes standard]], [[CatPgUserDefTypes défini par l'utilisateur]] ou procédure. -{{fbdoc item="ret"}} - Returns the address of the right-hand side (##//rhs//##) operand. +{{fbdoc item="section" value="Valeur retournée + Retourne l'adresse de l'opérande côté droit (##//rhs//##). {{fbdoc item="desc"}} - **##Operator @## (Address of)** returns the memory address of its operand. + **##L'opérateur @## (Adresse de)** retourne l'adresse mémoire de son opérande. - When the operand is of type ##[[KeyPgString String]]##, the address of the internal string descriptor is returned. Use ##[[KeyPgOpStrptr Operator Strptr]]## (String pointer) to retrieve the address of the string data. + Quand l'opérande est de type ##[[KeyPgString String (Chaîne)]]##, est retournée l'adresse du descripteur interne de la chaîne. Utilisez l'##[[KeyPgOpStrptr Opérateur Strptr]]## (Pointeur de chaîne) pour récupérer l'adresse de la chaîne. - The operand cannot be an array, but may be an array element. For example, ##"@myarray(0)"## returns the address of ##"myarray(0)"##. + L'opérande ne peut être un tableau, mais peut être un élément d'un tableau. Par exemple, ##"@myarray(0)"## retourne l'adresse de ##"myarray(0)"##. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/address-var.bas"}}%%(freebasic) @@ -73,13 +73,13 @@ End Sub %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpValueOf Operator * (Value of)]]## - - [[ProPgPointers Pointers]] + - ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]## + - [[ProPgPointers Pointeurs]] {{fbdoc item="back" value="CatPgOpPoint|Pointer Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineAdd.wakka b/fbdocs/manual/cache/KeyPgOpCombineAdd.wakka index 0a57ec868c..ea290347fe 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineAdd.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineAdd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator += (Add and Assign)"}}---- -Adds and assigns a value to a variable +Ajoute et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **+=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -14,26 +14,26 @@ Adds and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to add to ##//lhs//##. + La valeur à ajouter à ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. ##//T//## - Any data type. + Tout type de données. {{fbdoc item="desc"}} - This operator adds and assigns a value to a variable. It is functionally equivalent to: + Cet opérateur ajoute et attribue une valeur à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpAdd +]] //rhs// ## - For numeric types, the right-hand side expression (##//rhs//##) will be converted to the left-hand side type (##//T1//##). + Pour les types numériques, l'expression de droite (##//rhs//##) sera convertie dans le type de gauche (##//T1//##). - For string types, this operator is functionally equivalent to ##[[KeyPgOpCombineConcat Operator &= (Concatenate and assign)]]##. + Pour les types chaîne, cet opérateur est fonctionnellement équivalent à ##[[KeyPgOpCombineConcat Opérateur &= (Concaténation et Affectation)]]##. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/add-assign.bas"}}%%(freebasic) @@ -43,19 +43,19 @@ n += 1 PRINT n SLEEP %% -Output: +Affiche: %% 7 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpAdd Operator + (Add)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpAdd Opérateur + (Addition)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineAnd.wakka b/fbdocs/manual/cache/KeyPgOpCombineAnd.wakka index 38aa7147f3..cb52c5cdcf 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineAnd.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineAnd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator AND= (Conjunction and Assign)"}}---- -Performs a bitwise-and (conjunction) and assigns the result to a variable +Effectue une manipulation de bits AND (conjonction) et attribue le résultat à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **And=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,24 +9,24 @@ Performs a bitwise-and (conjunction) and assigns the result to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to perform a bitwise-and (conjunction) with ##//lhs//##. + La valeur qui sert à effectuer le AND avec ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator performs a bitwise-and and assigns the result to a variable. It is functionally equivalent to: + Cet opérateur effectue un AND et attribue le résultat à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpAnd and]] //rhs// ## - ##**And=**## compares each bit of its operands, ##//lhs//## and ##//rhs//##, and if both bits are 1, then the corresponding bit in the first operand, ##//lhs//##, is set to 1, otherwise it is set to 0. + ##**And=**## compare chaque bit de ses opérandes, ##//lhs//## et ##//rhs//##, et si les deux bits sont 1, alors le bit correspondant dans le premier opérande, ##//lhs//##, est mis à 1, sinon il est mis à 0. - ##**And=**## cannot be used in conditional expressions. + ##**And=**## ne peut pas être utilisé dans des expressions conditionnelles. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/and-assign.bas"}}%%(freebasic) @@ -43,10 +43,10 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpAnd And]]## diff --git a/fbdocs/manual/cache/KeyPgOpCombineConcat.wakka b/fbdocs/manual/cache/KeyPgOpCombineConcat.wakka index 223c381e16..9191929d52 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineConcat.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineConcat.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator &= (Concatenate and Assign)"}}---- -Appends and assigns a string onto another string +Ajoute et affecte une chaîne à une autre chaîne {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **&=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -10,20 +10,20 @@ Appends and assigns a string onto another string ## {{fbdoc item="param"}} ##//lhs//## - The string to assign to. + La chaîne à assigner. ##//rhs//## - The value to append to ##//lhs//##. + La valeur à ajouter à ##//lhs//##. ##//T2//## - Any numeric, string or user-defined type that can be converted to a string. + Tout nombre, chaîne ou type défini par l'utilisateur qui peut être converti en une chaîne. {{fbdoc item="desc"}} - This operator appends one string onto another. The right-hand side expression (##//rhs//##) is converted to a string before concatenation. It is functionally equivalent to, + Cet opérateur ajoute une chaîne à une autre. L'expression à droite (##//rhs//##) est convertie en une chaîne avant la concaténation. C'est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpAdd &]] //rhs// ## - where the result is assigned back to the left-hand side string. + où le résultat est de nouveau assigné à la chaîne de gauche. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/concat-assign.bas"}}%%(freebasic) @@ -31,20 +31,20 @@ dim s as string = "Hello, " s &= " world!" print s %% - will produce the output: + produira la sortie: %% Hello, world! %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpConcatConvert Operator & (String concatenation with conversion)]]## - - ##[[KeyPgOpCombineAdd Operator += (Add and Assign)]]## + - ##[[KeyPgOpConcatConvert Opérateur & (Concaténation de chaînes avec conversion)]]## + - ##[[KeyPgOpCombineAdd Opérateur += (Addition et Affectation)]]## {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineDivide.wakka b/fbdocs/manual/cache/KeyPgOpCombineDivide.wakka index 58af38b668..199501fdd8 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineDivide.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineDivide.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator /= (Divide and Assign)"}}---- -Divides and assigns a value to a variable +Divise et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **/=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Divides and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to divide ##//lhs//## by. + La valeur pour diviser ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator divides and assigns a value to a variable. It is functionally equivalent to: + Cet opérateur divise et attribue une valeur à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpDivide /]] //rhs// ## - The right-hand side expression (##//rhs//##) will be converted to the left-hand side type (##//T1//##). + L'expression de droite (##//rhs//##) sera convertie dans le type de gauche (##//T1//##). - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/divide-assign.bas"}}%%(freebasic) @@ -34,19 +34,19 @@ n /= 2.2 PRINT n SLEEP %% -Output: +Affiche: %% 2.727272727272727 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpDivide Operator / (Divide)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpDivide Opérateur / (Diviser)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineEqv.wakka b/fbdocs/manual/cache/KeyPgOpCombineEqv.wakka index 5fbd15fcbf..8cdfe42649 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineEqv.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineEqv.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator EQV= (Equivalence and Assign)"}}---- -Performs a bitwise-eqv (equivalence) and assigns the result to a variable +Effectue une manipulation de bits EQV (équivalence) et attribue le résultat à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **And=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Performs a bitwise-eqv (equivalence) and assigns the result to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to perform a bitwise-eqv (equivalence) with ##//lhs//##. + La valeur qui sert à effectuer un EQV avec ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator performs a bitwise-eqv and assigns the result to a variable. It is functionally equivalent to: + Cet opérateur effectue un EQV et attribue le résultat à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpEqv eqv]] //rhs// ## - ##**Eqv=**## compares each bit of its operands, ##//lhs//## and ##//rhs//##, and if both bits are the same (either both 0 or both 1), then the corresponding bit in the first operand, ##//lhs//##, is set to 1, otherwise it is set to 0. + ##**Eqv=**## compare chaque bit de ses opérandes, ##//lhs//## et ##//rhs//##, et si les deux bits sont les mêmes (soit les deux à 0 ou à 1), alors le bit correspondant dans le premier opérande, ##//lhs//##, est mis à 1, sinon il est mis à 0. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/eqv-assign.bas"}}%%(freebasic) @@ -36,10 +36,10 @@ print bin(a) %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpEqv Eqv]]## diff --git a/fbdocs/manual/cache/KeyPgOpCombineExponentiate.wakka b/fbdocs/manual/cache/KeyPgOpCombineExponentiate.wakka index 236a1c0168..bdb19c354e 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineExponentiate.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineExponentiate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator ^= (Exponentiate and Assign)"}}---- -Exponentiates and assigns a value to a variable +Élève à la puissance et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **^=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgDouble double]] ) @@ -9,16 +9,16 @@ Exponentiates and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//rhs//## - The value to exponentiate ##//lhs//## by. + La valeur de la puissance à laquelle on élève ##//lhs//##. {{fbdoc item="desc"}} - This operator exponentiates and assigns a value to a variable. It is functionally equivalent to: + Cet opérateur élève à la puissance et attribue une valeur à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpExponentiate ^]] //rhs// ## - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/exponent-assign.bas"}}%%(freebasic) @@ -28,19 +28,19 @@ n ^= 2 PRINT n SLEEP %% -Output: +Affiche: %% 36 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpExponentiate Operator ^ (Exponentiate)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpExponentiate Opérateur ^ (Puissance)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineImp.wakka b/fbdocs/manual/cache/KeyPgOpCombineImp.wakka index 425fadad21..b4f5dddf0f 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineImp.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineImp.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator IMP= (Implication and Assign)"}}---- -Performs a bitwise-imp (implication) and assigns the result to a variable +Effectue une manipulation de bits IMP (implication) et attribue le résultat à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Imp=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Performs a bitwise-imp (implication) and assigns the result to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to perform a bitwise-imp (implication) with ##//lhs//##. + La valeur qui sert à effectuer un IMP avec ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator performs a bitwise-imp and assigns the result to a variable. It is functionally equivalent to: + Cet opérateur effectue un IMP et attribue le résultat à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpImp imp]] //rhs// ## - ##**Imp**## is a bitwise operator which is the same as (##[[KeyPgOpNot Not]]## ##//lhs//##) ##[[KeyPgOpOr Or]]## ##//rhs//##. ##**Imp=**## compares each bit of its operands, ##//lhs//## and ##//rhs//##, and if the bit in ##//lhs//## is 0 or the bit in ##//rhs//## is 1, then the corresponding bit in the first operand, ##//lhs//##, is set to 1, otherwise it is set to 0. + ##**Imp**## est un opérateur de manipulation de bits équivalent : (##[[KeyPgOpNot Not]]## ##//lhs//##) ##[[KeyPgOpOr Or]]## ##//rhs//##. ##**Imp=**## compare chaque bit de ses opérandes, ##//lhs//## et ##//rhs//##, et si le bit de ##//lhs//## est 0 ou le bit de ##//rhs//## est 1, alors le bit correspondant dans le premier opérande, ##//lhs//##, est mis à 1, sinon il est mis à 0. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/imp-assign.bas"}}%%(freebasic) @@ -36,13 +36,13 @@ print bin(a) %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpImp Imp]]## - - [[CatPgOpAssignment Assignment Operators]] + - [[CatPgOpAssignment Opérateurs d'affectation]] {{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineIntegerDivide.wakka b/fbdocs/manual/cache/KeyPgOpCombineIntegerDivide.wakka index 2a41e4b617..469c8aa5ff 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineIntegerDivide.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineIntegerDivide.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator \= (Integer divide and Assign)"}}---- -Integer divides and assigns a value to a variable +Division entière et attribution d'une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **\=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,20 +9,20 @@ Integer divides and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to divide ##//lhs//## by. + La valeur pour diviser ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator multiplies and assigns a value to a variable. It is functionally equivalent to: -## - //lhs// = //lhs// [[KeyPgOpIntegerDivide \]] //rhs// -## - This operator can be overloaded for user-defined types. + Cet opérateur divise et attribue une valeur à une variable. Il est fonctionnellement équivalent à:## +//lhs// = //lhs// [[KeyPgOpIntegerDivide \]] //rhs// + ## +L'expression de droite (##//rhs//##) sera convertie dans le type de gauche (##//T1//##). + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/integer-divide-assign.bas"}}%%(freebasic) @@ -32,19 +32,19 @@ n \= 2.2 PRINT n SLEEP %% -Output: +Affiche: %% 3 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpIntegerDivide Operator \ (Integer divide)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpIntegerDivide Opérateur \ (Division entière)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineModulus.wakka b/fbdocs/manual/cache/KeyPgOpCombineModulus.wakka index bc96f93201..134a41fd26 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineModulus.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineModulus.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Mod= (Modulus and Assign)"}}---- -Divides a value and assigns the remainder to a variable +Divise une valeur et assigne le reste à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Mod=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) @@ -9,16 +9,16 @@ Divides a value and assigns the remainder to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//rhs//## - The value to divide ##//lhs//## by. + La valeur pour diviser##//lhs//##. {{fbdoc item="desc"}} - This operator divides two values of ##[[KeyPgInteger Integer]]## type and assigns the remainder to its left-hand side (##//lhs//##) variable. It is functionally equivalent to: + Cet opérateur divise deux valeurs de type ##[[KeyPgInteger Integer]]## et attribue le reste à la variable de son côté gauche (##//lhs//##). C'est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpModulus Mod]] //rhs// ## - This operator can be overloaded for user-defined types. + Cet opérateur élève à la puissance et attribue une valeur à une variable. Il est fonctionnellement équivalent à: {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/mod-assign.bas"}}%%(freebasic) @@ -31,13 +31,13 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpModulus Operator + (Modulus)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpModulus Operator + (Modulo)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineMultiply.wakka b/fbdocs/manual/cache/KeyPgOpCombineMultiply.wakka index a0df7b9cb8..86eecabc13 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineMultiply.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineMultiply.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator *= (Multiply and Assign)"}}---- -Multiplies and assigns a value to a variable +Multiplie et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] ***=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Multiplies and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to multiply ##//lhs//## by. + La valeur pour multiplier ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator multiplies and assigns a value to a variable. It is functionally equivalent to: + Cet opérateur multiplie et attribue une valeur à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpMultiply *]] //rhs// ## - The right-hand side expression (##//rhs//##) will be converted to the left-hand side type (##//T1//##). + L'expression de droite (##//rhs//##) sera convertie dans le type de gauche (##//T1//##). - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/multiply-assign.bas"}}%%(freebasic) @@ -34,19 +34,19 @@ n *= 2 PRINT n SLEEP %% -Output: +Affiche: %% 12 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpMultiply Operator * (Multiply)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpMultiply Opérateur * (Multiplication)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineOr.wakka b/fbdocs/manual/cache/KeyPgOpCombineOr.wakka index c99d325c7c..a21dd1765c 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineOr.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineOr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator OR= (Inclusive Disjunction and Assign)"}}---- -Performs a bitwise-or (inclusive disjunction) and assigns the result to a variable +Effectue une manipulation de bits OR (disjonction inclusive) et attribue le résultat à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Or=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Performs a bitwise-or (inclusive disjunction) and assigns the result to a variab ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to perform a bitwise-or (inclusive disjunction) with ##//lhs//##. + La valeur qui sert à effectuer un OR (disjonction inclusive) avec ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator performs a bitwise-or and assigns the result to a variable. It is functionally equivalent to: + Cet opérateur effectue un OR et attribue le résultat à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpOr or]] //rhs// ## - ##**Or=**## compares each bit of its operands, ##//lhs//## and ##//rhs//##, and if either bits are 1, then the corresponding bit in the first operand, ##//lhs//##, is set to 1, otherwise it is set to 0. + ##**Or=**## compare chaque bit de ses opérandes, ##//lhs//## et ##//rhs//##, et si l'un des bits est à 1, alors le bit correspondant dans le premier opérande, ##//lhs//##, est mis à 1, sinon il est mis à 0. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/or-assign.bas"}}%%(freebasic) @@ -36,10 +36,10 @@ print bin(a) %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpOr Or]]## diff --git a/fbdocs/manual/cache/KeyPgOpCombineShiftLeft.wakka b/fbdocs/manual/cache/KeyPgOpCombineShiftLeft.wakka index f286611483..b2b9c0f421 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineShiftLeft.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineShiftLeft.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Shl= (Shift left and Assign)"}}---- -Shifts left and assigns a value to a variable +Décalage de bits vers la gauche et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Shl=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) @@ -12,16 +12,16 @@ Shifts left and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//rhs//## - The value to shift ##//lhs//## left by. + La valeur du décalage vers la gauche des bits de ##//lhs//##. {{fbdoc item="desc"}} - This operator shifts the bits in its left-hand side (##//lhs//##) parameter a number of times specified by its right-hand side (##//rhs//##) parameter, and assigns the result to ##//lhs//##. It is functionally equivalent to: + Cet opérateur décale vers la gauche les bits du paramètre de gauche (##//lhs//##) un nombre de fois indiqué par le paramètre de droite (##//rhs//##), et attribue le résultat à ##//lhs//##. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpShiftLeft Shl]] //rhs// ## - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/shl-assign.bas"}}%%(freebasic) @@ -34,14 +34,14 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Shl=""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Shl=**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpShiftLeft Operator Shl (Shift left)]]## - - ##[[KeyPgOpCombineShiftRight Operator Shr= (Shift right and Assign)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpShiftLeft Opérateur Shl (Décalage vers la gauche)]]## + - ##[[KeyPgOpCombineShiftRight Opérateur Shr= (Décalage vers la droite et Affectation)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineShiftRight.wakka b/fbdocs/manual/cache/KeyPgOpCombineShiftRight.wakka index eaafdd3edb..8a44c714a3 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineShiftRight.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineShiftRight.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Shr= (Shift right and Assign)"}}---- -Shifts right and assigns a value to a variable +Décalage de bits vers la droite et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Shr=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) @@ -12,16 +12,16 @@ Shifts right and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//rhs//## - The value to shift ##//lhs//## right by. + La valeur du décalage vers la droite des bits de ##//lhs//##. {{fbdoc item="desc"}} - This operator shifts the bits in its left-hand side (##//lhs//##) parameter a number of times specified by its right-hand side (##//rhs//##) parameter, and assigns the result to ##//lhs//##. It is functionally equivalent to: + Cet opérateur décale vers la droite les bits du paramètre de gauche (##//lhs//##) un nombre de fois indiqué par le paramètre de droite (##//rhs//##), et attribue le résultat à ##//lhs//##. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpShiftRight Shr]] //rhs// ## - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/shr-assign.bas"}}%%(freebasic) @@ -34,14 +34,14 @@ SLEEP %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Shr=""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Shr=**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpShiftRight Operator Shr (Shift right)]]## - - ##[[KeyPgOpCombineShiftLeft Operator Shl= (Shift Left and Assign)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpShiftRight Opérateur Shr (Décalage vers la droite)]]## + - ##[[KeyPgOpCombineShiftLeft Opérateur Shl= (Décalage vers la droite et Affectation)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineSub.wakka b/fbdocs/manual/cache/KeyPgOpCombineSub.wakka index b8077e8413..25d43352d0 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineSub.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineSub.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator -= (Subtract and Assign)"}}---- -Subtracts and assigns a value to a variable +Soustrait et attribue une valeur à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -11,24 +11,24 @@ Subtracts and assigns a value to a variable ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à affecter. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to subtract from ##//lhs//##. + La valeur à soustraire à ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. ##//T//## - Any data type. + Tout type de données. {{fbdoc item="desc"}} - This operator subtracts and assigns a value to a variable. It is functionally equivalent to: + Cet opérateur soustrait et attribue une valeur à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpSubtract -]] //rhs// ## - For numeric types, the right-hand side expression (##//rhs//##) will be converted to the left-hand side type (##//T1//##). + Pour les types numériques, l'expression de droite (##//rhs//##) sera convertie dans le type de gauche (##//T1//##). - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/subtract-assign.bas"}}%%(freebasic) @@ -38,19 +38,19 @@ n -= 2.2 PRINT n SLEEP %% -Output: +Affiche: %% 3.8 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpSubtract Operator - (Subtract)]]## - - [[CatPgMath Mathematical Functions]] + - ##[[KeyPgOpSubtract Opérateur - (Soustraction)]]## + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpCombineXor.wakka b/fbdocs/manual/cache/KeyPgOpCombineXor.wakka index 62941de448..af9202d29e 100644 --- a/fbdocs/manual/cache/KeyPgOpCombineXor.wakka +++ b/fbdocs/manual/cache/KeyPgOpCombineXor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator XOR= (Exclusive Disjunction and Assign)"}}---- -Performs a bitwise-xor (exclusive disjunction) and assigns the result to a variable +Effectue une manipulation de bits XOR (disjonction exclusive) et attribue le résultat à une variable {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Xor=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) @@ -9,22 +9,22 @@ Performs a bitwise-xor (exclusive disjunction) and assigns the result to a varia ## {{fbdoc item="param"}} ##//lhs//## - The variable to assign to. + La variable à assigner. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The value to perform a bitwise-xor (exclusive or) with ##//lhs//##. + La valeur qui sert à effectuer un XOR (disjonction exclusive) avec ##//lhs//##. ##//T2//## - Any numeric type. + Tout type numérique. {{fbdoc item="desc"}} - This operator performs a bitwise-or and assigns the result to a variable. It is functionally equivalent to: + Cet opérateur effectue un XOR et attribue le résultat à une variable. Il est fonctionnellement équivalent à: ## //lhs// = //lhs// [[KeyPgOpXor xor]] //rhs// ## - ##**Xor=**## compares each bit of its operands, ##//lhs//## and ##//rhs//##, and if both bits are the same (both 1 or both 0), then the corresponding bit in the first operand, ##//lhs//##, is set to 0, otherwise it is set to 1. + ##**Xor=**## compare chaque bit de ses opérandes, ##//lhs//## et ##//rhs//##, et si les deux bits sont les mêmes (les deux à 1 ou les deux à both 0), alors le bit correspondant dans le premier opérande, ##//lhs//##, est mis à 1, sinon il est mis à 0. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/xor-assign.bas"}}%%(freebasic) @@ -36,10 +36,10 @@ print bin(a) %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpXor Xor]]## diff --git a/fbdocs/manual/cache/KeyPgOpConcat.wakka b/fbdocs/manual/cache/KeyPgOpConcat.wakka index 2967dd7f43..aa823af813 100644 --- a/fbdocs/manual/cache/KeyPgOpConcat.wakka +++ b/fbdocs/manual/cache/KeyPgOpConcat.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator + (String concatenation)"}}---- -Concatenates two strings +Concatène deux chaînes {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **+** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -11,12 +11,12 @@ Concatenates two strings ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side string to concatenate. + La chaîne de gauche à concaténer. ##//rhs//## - The right-hand side string to concatenate. + La chaîne de droite à concaténer. {{fbdoc item="desc"}} - This operator concatenates two strings. Unlike [[KeyPgOpConcatConvert Operator & (String concatenation with conversion)]] both expressions //must// be strings, and may not be converted (in fact, any attempt to concatenate a string with a non-string or two non-strings will result in a type mismatch error, with the exception of when operator overloading is used in a UDT). + Cet opérateur concatène deux chaînes. Contrairement à [[KeyPgOpConcatConvert Opérateur & (Concaténation de chaînes avec conversion)]] les deux expressions //doivent// être des chaînes, et ne seront pas converties (en fait, toute tentative de concaténer une chaîne avec une non-chaîne ou deux non-chaînes se traduira par une erreur de type, sauf si la surcharge d'opérateur est utilisée dans un type défini par l'utilisateur). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/concat_nocvt.bas"}}%%(freebasic) @@ -25,17 +25,17 @@ Dim As String c c = a + b Print c %% -Output: +Affiche: %% Hello, World! %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[KeyPgOpAdd Operator + (Add)]] - - [[KeyPgOpConcatConvert Operator & (String concatenation with conversion)]] + - [[KeyPgOpAdd Opérateur + (Add)]] + - [[KeyPgOpConcatConvert Opérateur & (Concaténation de chaînes avec conversion)]] - ##[[KeyPgStr Str]]## {{fbdoc item="back" value="CatPgOpString|String Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpConcatConvert.wakka b/fbdocs/manual/cache/KeyPgOpConcatConvert.wakka index b88210a1b9..51bba34a6b 100644 --- a/fbdocs/manual/cache/KeyPgOpConcatConvert.wakka +++ b/fbdocs/manual/cache/KeyPgOpConcatConvert.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator & (String concatenation with conversion)"}}---- -Concatenates two strings, converting non-strings to strings as needed +Concatène deux chaînes, en convertissant, si nécessaire, les non-chaînes en chaînes {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **&** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //U// ) [[KeyPgAs as]] //V// @@ -9,20 +9,20 @@ Concatenates two strings, converting non-strings to strings as needed ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to concatenate. + La chaîne de gauche à concaténer. ##//T//## - Any standard data type or user-defined type that can be converted to a standard data type. + N'importe quel type de donnée standard ou défini par l'utilisateur qui peut être converti en un type de donnée standard. ##//rhs//## - The right-hand side expression to concatenate. + La chaîne de droite à concaténer. ##//U//## - Any standard data type or user-defined type that can be converted to a standard data type. + N'importe quel type de donnée standard ou défini par l'utilisateur qui peut être converti en un type de donnée standard. ##//V//## - The resultant string type (varies with operands). + Le type de la chaîne résultante (varie avec les opérandes). {{fbdoc item="desc"}} - This operator concatenates two expressions. If either of the expressions is not a string type, it is converted to ##[[KeyPgString String]]## with ##[[KeyPgStr Str]]##. + Cet opérateur concatène deux expressions. Si l'une des expressions n'est pas de type chaîne, elle est convertie en ##[[KeyPgString String (Chaîne)]]## avec ##[[KeyPgStr Str]]##. - If either of the expressions is a ##[[KeyPgWstring Wstring]]##, a ##[[KeyPgWstring Wstring]]## is returned, otherwise a ##[[KeyPgString String]]## is returned. + Si l'une des expressions est une ##[[KeyPgWstring WString]]##, une ##[[KeyPgWstring WString]]## est retournée, sinon une ##[[KeyPgString String]]## est retournée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/concat.bas"}}%%(freebasic) @@ -34,16 +34,16 @@ C=A & B PRINT C SLEEP %% -Output: +Affiche: %% The result is: 124.3 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC -{{fbdoc item="see"}} - - [[KeyPgOpConcat Operator + (String concatenation)]] +{{fbdoc item="section" value="Vopir aussi + - [[KeyPgOpConcat Opérateur + (String Concaténation)]] - ##[[KeyPgStr Str]]## {{fbdoc item="back" value="CatPgOpString|String Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpDelete.wakka b/fbdocs/manual/cache/KeyPgOpDelete.wakka index cfc771ddfc..62619e98b9 100644 --- a/fbdocs/manual/cache/KeyPgOpDelete.wakka +++ b/fbdocs/manual/cache/KeyPgOpDelete.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Delete"}}---- -Operator to delete data allocated with the ##[[KeyPgOpNew New]]## operator +Opérateur pour détruire des données allouées avec l'opérateur ##[[KeyPgOpNew New]]## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **delete** ( //buf// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -7,26 +7,26 @@ Operator to delete data allocated with the ##[[KeyPgOpNew New]]## operator ## {{fbdoc item="usage"}}## **Delete** //expression// - //or// + //ou// **Delete[]** //expression// ## {{fbdoc item="param"}} ##//buf//## - An address of memory to free. + Une adresse mémoire à libérer. ##//expression//## - An address of memory to free. + Une adresse mémoire à libérer. {{fbdoc item="desc"}} - ##**Delete**## is used to destroy and free the memory of an object created with [[KeyPgOpNew New]]. When deleting a TYPE, its destructor will be called. ##**Delete**## should only be used with addresses returned from ##[[KeyPgOpNew New]]##. + ##**Delete**## est utilisé pour détruire et libérer la mémoire d'un objet créé avec [[KeyPgOpNew New]]. Quand on ##**Delete**## un TYPE, son destructeur est appelé. ##**Delete**## doit être utilisé uniquement avec des adresses retournées par ##[[KeyPgOpNew New]]##. - The array version of ##**Delete**##, ##**Delete[]**##, is used to destroy an array of objects previously created with [[KeyPgOpNew New]][]. Destructors will be called here as well. + La version ##**Delete**## pour les tableaux, ##**Delete[]**##, est utilisé pour détruire un tableau d'objets créés précédemment avec [[KeyPgOpNew New]][]. Les destructeurs seront là aussi appelés. - ##**Delete**## must be used with addresses returned from [[KeyPgOpNew New]], and ##**Delete[]**## with [[KeyPgOpNew New]][]. You cannot mix and match the different versions of the operators. + ##**Delete**## doit être utilisé avec des adresses retournées par [[KeyPgOpNew New]], et ##**Delete[]**## par [[KeyPgOpNew New]][]. Vous ne pouvez mélanger les différentes versions de ces opérateurs. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/delete.bas"}}%%(freebasic) type Rational - as integer numerator, denominator + As Integer numerator, denominator end type scope @@ -57,10 +57,10 @@ scope end scope %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Valable seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpNew New]]## diff --git a/fbdocs/manual/cache/KeyPgOpDivide.wakka b/fbdocs/manual/cache/KeyPgOpDivide.wakka index 0944e9d7c3..6491f71db1 100644 --- a/fbdocs/manual/cache/KeyPgOpDivide.wakka +++ b/fbdocs/manual/cache/KeyPgOpDivide.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator / (Divide)"}}---- -Divides two numeric expressions +Divise deux expressions numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **/** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgByte byte]] @@ -19,19 +19,19 @@ Divides two numeric expressions ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side dividend expression. + Le dividende, argument côté gauche. ##//rhs//## - The right-hand side divisor expression. + Le diviseur, argument côté droit. -{{fbdoc item="ret"}} - Returns the quotient of a dividend and divisor. +{{fbdoc item="section" value="Valeur retournée + Retourne le quotient du dividende et du diviseur. {{fbdoc item="desc"}} - **##Operator /## (Divide)** returns the quotient of a dividend and divisor. + **##Operator /## (Divide)** retourne le quotient du dividende et du diviseur. - Neither operand is modified in any way. Unlike with integer division, float division by zero is safe to perform, the quotient will hold a special value representing infinity, converting it to a string returns something like "Inf" or "INF", exact text is platform specific. + Dans tous les cas, aucun opérande n'est modifié. Contrairement à la division entière, division à virgule flottante par zéro est sans danger, le quotient aura une valeur spéciale représentant l'infini, en la convertissant en une chaîne elle retournera quelque chose comme "Inf" ou "INF", le texte exact est spécifique à la plate-forme. - This operator can be overloaded to accept user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/divide.bas"}}%%(freebasic) @@ -48,13 +48,13 @@ Output: %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[KeyPgOpIntegerDivide Operator \ (Integer divide)]] - - [[CatPgMath Mathematical Functions]] + - [[KeyPgOpIntegerDivide Operator \ (Division entière)]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} diff --git a/fbdocs/manual/cache/KeyPgOpEqual.wakka b/fbdocs/manual/cache/KeyPgOpEqual.wakka index b7070d15c7..67bb41ae2a 100644 --- a/fbdocs/manual/cache/KeyPgOpEqual.wakka +++ b/fbdocs/manual/cache/KeyPgOpEqual.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator = (Equal)"}}---- -Compares two expressions for equality +Compare deux expressions pour l'égalité {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,21 +22,21 @@ Compares two expressions for equality ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if expressions are equal, or zero (0) if unequal. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si les deux expressions sont égales ou zéro (0) si inégales. {{fbdoc item="desc"}} - **##Operator =## (Equality)** is a binary operator that compares two expressions for equality and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur =## (Egalité)** est un opérateur binaire qui compare deux expressions pour l'égalité et retourne le résultat - une valeur booléenne sous forme d'un ##[[KeyPgInteger Entier (Integer)]]##: négatif (-1) pour vrai et zéro (0) pour faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi bien des types définis par l'utilisateur. - **##Operator =## (Equality)** should not be confused with initializations or assignments, both of which also use the "##=##" symbol. + L'**##Opérateur =## (Egalité)** ne doit pas être confondu avec des initialisations ou des affectations, qui elles aussi utilisent aussi le symbole "##=##". {{fbdoc item="ex"}} @@ -49,7 +49,7 @@ if (i = 69) then '' equation: compare the equality of the value of i and end -1 end if %% - ##[[KeyPgOpNotEqual Operator <>]]## (Inequality) is complement to **##Operator =## (Equality)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'##[[KeyPgOpNotEqual Opérateur <>]]## (Inégalité) est complémentaire à l'**##Opérateur =## (Egalité)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/equal2.bas"}}%%(freebasic) if (420 = 420) then print "(420 = 420) is true." @@ -57,13 +57,13 @@ end if %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpNotEqual Operator <>]]## (Inequality) - - ##[[KeyPgOpAssignment Operator = ]]## (Assignment) + - ##[[KeyPgOpNotEqual Opérateur <>]]## (Inégalité) + - ##[[KeyPgOpAssignment Opérateur =]]## (Affectation) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpEqv.wakka b/fbdocs/manual/cache/KeyPgOpEqv.wakka index 033185905a..0d877c5911 100644 --- a/fbdocs/manual/cache/KeyPgOpEqv.wakka +++ b/fbdocs/manual/cache/KeyPgOpEqv.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator EQV (Equivalence)"}}---- -Returns the bitwise-and (equivalence) of two numeric values +Retourne la manipulation de bits équivalence de deux valeurs numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Eqv** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// @@ -9,31 +9,31 @@ Returns the bitwise-and (equivalence) of two numeric values ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Côté gauche de l'expression. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Côté droit de l'expression. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - A numeric type (varies with ##//T1//## and ##//T2//##). + Un type numérique. (varie avec ##//T1//## et ##//T2//##). -{{fbdoc item="ret"}} - Returns the bitwise-equivalence of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits équivalence de deux opérandes. {{fbdoc item="desc"}} - This operator returns the bitwise-equivalence of its operands, a logical operation that results in a value with bits set depending on the bits of the operands. + Cet opérateur retourne la manipulation de bits équivalence de ses opérandes, une opération logique dont le résultat est une valeur dont les bits à 1 dépendent des bits des deux opérandes. - The truth table below demonstrates all combinations of a boolean-equivalence operation: + La table de vérité ci-dessous montre toutes les combinaisons de l'opération d'équivalence booléenne: - {{table columns="3" cellpadding="2" cells="Lhs Bit;Rhs Bit;Result;0;0;1;1;0;0;0;1;0;1;1;1"}} + {{table columns="" cellpadding="2" cells="Bit côté gauche;Bit côté droit;Résultat;0;0;1;1;0;0;0;1;0;1;1;1;
    - No short-circuiting is performed - both expressions are always evaluated. + Pas de possibilité de court-circuit - les deux expressions sont toujours évaluées. - The return type depends on the types of values passed. ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]## and floating-point type values are first converted to ##[[KeyPgInteger Integer]]##. If the left and right-hand side types differ only in signedness, then the return type is the same as the left-hand side type (##//T1//##), otherwise, the larger of the two types is returned. + Le type de la valeur retournée dépend des types des deux valeurs passées. Les valeurs de type ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]## et à virgule flottante sont en premier converties en ##[[KeyPgInteger Integer]]##. Si les types des côtés gauche et droit diffèrent seulement par le manque de signe, le type de retour sera celui du côté gauche (##//T1//##), autrement, le plus grand des deux est retourné. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/eqv-bitwise.bas"}}%%(freebasic) @@ -43,12 +43,12 @@ c = a eqv b '' c = &b10011001 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpExponentiate.wakka b/fbdocs/manual/cache/KeyPgOpExponentiate.wakka index 7dc3c9e866..3ddaf841f5 100644 --- a/fbdocs/manual/cache/KeyPgOpExponentiate.wakka +++ b/fbdocs/manual/cache/KeyPgOpExponentiate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator ^ (Exponentiate)"}}---- -Raises a numeric expression to some power +Élève une expression numérique à une certaine puissance {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **^** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgDouble double]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,22 +9,22 @@ Raises a numeric expression to some power ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side base expression. + Valeur de base, argument côté gauche. ##//rhs//## - The right-hand side exponent expression. + L'exposant, argument côté droit. {{fbdoc item="ret"}} - Returns the exponentiation of a base expression raised to some exponent. + Retourne le résultat de l'élévation à la puissance exposant ##//rhs//## d'une valeur de base ##//lhs//##. {{fbdoc item="desc"}} - **##Operator ^## (Exponentiate)** returns the result of a base expression (##//lhs//##) raised to some exponent expression (##//rhs//##). ##**^**## works with double float numbers only, operands of other types will be converted into double before performing the exponentiation. Exponent of a fractional value (##1""/""//n//##) is the same as taking ##//n//##th root from the base, for example, ##2 **^** (1/3)## is the cube root of 2. + L'**##Opérateur ^## (Puissance)** retourne l'élévation à la puissance exposant ##//rhs//## d'une valeur de base ##//lhs//##.. ##**^**## travaille seulement avec des nombres double à virgule, les opérandes d'autres types seront convertis en double avant d'effectuer l'élévation à la puissance. Un exposant de valeur fractionaire (##1///n//##) est le même que la racine ##//n//##-ième de la base, par exemple, ##2 **^** (1/3)## est la racine cubique de 2. - Neither of the operands are modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - Note: this operation is not guaranteed to be fully accurate, and there may be some inaccuracy in the least significant bits of the number. This is particularly noticeable when the result is expected to be an exact number: in these cases, you may find the result is out by a very small amount. For this reason, you should never assume that an exponentiation expression will be exactly equal to the value you expect. - This also means that you should be wary of using rounding methods such as ##[[KeyPgInt Int]]## and ##[[KeyPgFix Fix]]## on the result: if you expect the result to be an integer value, then there's a chance that it might be slightly lower, and will round down to a value that is one less than you would expect. + Note: cette opération n'est pas garantie d'être tout à fait exacte, et il peut y avoir une certaine imprécision dans les bits les moins significatifs du nombre. Ceci est particulièrement visible lorsque le résultat devrait être un nombre exact: dans ces cas, vous pouvez trouver le résultat est erroné par une très petite quantité. Pour cette raison, il ne faut jamais présumer que le résultat de l'élévation à la puissance sera exactement égal à la valeur que vous attendez. + Cela signifie également que vous devez être prudent dans l'utilisation de méthodes telles que l'arrondissement ##[[KeyPgInt Int]]## et ##[[KeyPgFix Fix]]## sur le résultat: si vous espérez que le résultat soit une valeur entière, alors il y a des chances qu'il soit être légèrement inférieur, et sera arrondi à une valeur qui est un de moins que ce vous attendez. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/exponent.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ PRINT n;" squared is "; n ^ 2 PRINT "The fifth root of "; n;" is "; n ^ 0.2 SLEEP %% -Output: +Affiche: %% Please enter a positive number: 3.4 @@ -44,12 +44,12 @@ The fifth root of 3.4 is 1.27730844458754 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpFor.wakka b/fbdocs/manual/cache/KeyPgOpFor.wakka index 33032b9a6b..4437ddebff 100644 --- a/fbdocs/manual/cache/KeyPgOpFor.wakka +++ b/fbdocs/manual/cache/KeyPgOpFor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator For (iteration)"}}---- -Declares or defines operators used by a ##[[KeyPgFornext For...Next]]## loop with user defined type variables +Déclare ou définit les opérateurs utilisés par une boucle ##[[KeyPgFornext For...Next]]## avec des variables de type défini par l'utilisateur {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] } //typename// @@ -15,32 +15,32 @@ Declares or defines operators used by a ##[[KeyPgFornext For...Next]]## loop wit ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]## + nom du ##[[KeyPgType Type]]##, de la ##[[KeyPgClass Class]]## ou de l'##[[KeyPgUnion Union]]## ##//stp//##, ##//step_value//## - a ##//typename//## object used as an incremental value + un objet ##//typename//## utilisé comme valeur pour l'incrémentation ##//iterator//## - a ##//typename//## object used as an iterator + un objet ##//typename//## utilisé comme itérateur ##//end_value//## - a ##//typename//## object used as a loop-terminating value + un objet ##//typename//## utilisé comme valeur déterminant la fin de la boule ##//start_value//## - a ##//typename//## object used to copy construct or assign to the iterator initially + un objet ##//typename//## utilisé pour la copie de construction ou à assigner à l'itérateur initial {{fbdoc item="desc"}} - ##**Operator For**##, ##[[KeyPgOpNext Operator Next]]## and ##[[KeyPgOpStep Operator Step]]## can be overloaded in user-defined type definitions to allow objects of that type to be used as iterators and step values in ##[[KeyPgFornext For...Next]]## loops. + ##**Opérateur For**##, ##[[KeyPgOpNext Opérateur Next]]## et ##[[KeyPgOpStep Opérateur Step]]## peuvent être surchargés dans des définitions de type par l'utilisateur pour allouer des objets de ce type comme itérateur ou valeur d'incrémentation, dans les boucles ##[[KeyPgFornext For...Next]]##. - ##**Operator For**## is called immediately after copy constructing or assigning to the iterator object, and allows the object to perform any additional initialization needed in preparation for the loop. + ##**Opérateur For**## est appelé immédiatement après la copie de construction ou assigné à l'objet itérateur et permet à l'objet d'effectuer toute initialisation supplémentaire nécessaire à la préparation de la boucle. - The first version of ##**Operator For**## is used if no step value is given in the ##[[KeyPgFornext For...Next]]## statement. If a step value is given, the second version is used and is passed the step value. + La première version de ##**Opérateur For**## est utilisée si aucune valeur d'incrémentation n'est donné dans la déclaration ##[[KeyPgFornext For...Next]]##. Si une valeur d'incrémentation est donnée, la seconde version est utilisée et une valeur d'incrémentation est passée. {{fbdoc item="ex"}} - See the [[KeyPgOpStep Operator Step]] examples. + Voir les exemples de [[KeyPgOpStep Opérateur Step]]. {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - - ##[[KeyPgOpNext Operator Next]]## - - ##[[KeyPgOpStep Operator Step]]## + - ##[[KeyPgOpNext Opérateur Next]]## + - ##[[KeyPgOpStep Opérateur Step]]## - ##[[KeyPgFornext For...Next]]## {{fbdoc item="back" value="CatPgOpIterating|Iterating Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} diff --git a/fbdocs/manual/cache/KeyPgOpGreaterThan.wakka b/fbdocs/manual/cache/KeyPgOpGreaterThan.wakka index 92a38a9371..c33e2e6926 100644 --- a/fbdocs/manual/cache/KeyPgOpGreaterThan.wakka +++ b/fbdocs/manual/cache/KeyPgOpGreaterThan.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator > (Greater than)"}}---- -Compares an expression greater than another expression +Compare une expression à une autre pour savoir si elle lui est supérieure {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **>** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,22 +22,22 @@ Compares an expression greater than another expression ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if the left-hand side expression is greater than the right-hand side expression, or zero (0) if less than or equal. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si l'expression côté gauche est supérieure à celle de droite ou zéro (0) si elle est inférieure ou égale. {{fbdoc item="desc"}} - **##Operator >## (Greater than)** is a binary operator that compares an expression greater than another expression and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur >## (Supérieur à)** est un opérateur binaire qui compare une expression à une autre pour savoir si elle est plus grande et retourne un résultat - une valeur boléenne sous la forme d'un ##[[KeyPgInteger Entier (Integer)]]##: negatif (-1) si c'est vrai et zéro (0) si c'est faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi bien des types définis par l'utilisateur. {{fbdoc item="ex"}} - ##[[KeyPgOpLessThanOrEqual Operator <=]]## (Less than or equal) is complement to **##Operator >## (Greater than)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'##[[KeyPgOpLessThanOrEqual Opérateur <=]]## (Inférieur ou égal) est complémentaire à l'**##Opérateur >## (Supérieur à)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/greater-than.bas"}}%%(freebasic) if (420 > 69) then print "(420 > 69) is true." @@ -45,12 +45,12 @@ Compares an expression greater than another expression %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpLessThanOrEqual Operator <=]]## (Less than or equal) + - ##[[KeyPgOpNotEqual Opérateur <=]]## (Inférieur ou égal) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpGreaterThanOrEqual.wakka b/fbdocs/manual/cache/KeyPgOpGreaterThanOrEqual.wakka index b4d12501c0..51cf373e41 100644 --- a/fbdocs/manual/cache/KeyPgOpGreaterThanOrEqual.wakka +++ b/fbdocs/manual/cache/KeyPgOpGreaterThanOrEqual.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator >= (Greater than or Equal)"}}---- -Compares an expression greater than or equal to another expression +Compare une expression à une autre pour savoir si elle lui est supérieure ou égale {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **>=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,22 +22,22 @@ Compares an expression greater than or equal to another expression ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if the left-hand side expression is greater than or equal to the right-hand side expression, or zero (0) if less than. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si l'expression côté gauche est supérieure ou égale à celle de droite ou zéro (0) si elle est inférieure. {{fbdoc item="desc"}} - **##Operator >=## (Greater than or Equal)** is a binary operator that compares an expression greater than or equal to another expression and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur >=## (Supérieur ou égal à)** est un opérateur binaire qui compare une expression à une autre pour savoir si elle est plus grande ou égale et retourne le résultat - une valeur boléenne sous la forme d'un ##[[KeyPgInteger Entier (Integer)]]##: negatif (-1) si c'est vrai et zéro (0) si c'est faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi bien des types définis par l'utilisateur. {{fbdoc item="ex"}} - ##[[KeyPgOpLessThan Operator <]]## (Less than) is complement to **##Operator >=## (Greater than or Equal)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'##[[KeyPgOpLessThan Opérateur <]]## (Inférieur à) est complémentaire à l'**##Opérateur >=## (Supérieur ou égal à)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/greater-than-or-equal.bas"}}%%(freebasic) if (420 >= 69) then print "(420 >= 69) is true." @@ -45,12 +45,12 @@ Compares an expression greater than or equal to another expression %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpLessThan Operator <]]## (Less than) + - ##[[KeyPgOpNotEqual Opérateur <]]## (Inférieur à) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpImp.wakka b/fbdocs/manual/cache/KeyPgOpImp.wakka index 6f78895a53..b202264d55 100644 --- a/fbdocs/manual/cache/KeyPgOpImp.wakka +++ b/fbdocs/manual/cache/KeyPgOpImp.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Imp (Implication)"}}---- -Returns the bitwise-and (implication) of two numeric values +Retourne la manipulation de bits implication de deux valeurs numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Imp** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// @@ -9,31 +9,31 @@ Returns the bitwise-and (implication) of two numeric values ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Expression côté gauche. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Expression côté droit. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - A numeric type (varies with ##//T1//## and ##//T2//##). + Un type numérique (varie avec ##//T1//## et ##//T2//##). -{{fbdoc item="ret"}} - Returns the bitwise-implication of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits implication de deux opérandes. {{fbdoc item="desc"}} - This operator returns the bitwise-implication of its operands, a logical operation that results in a value with bits set depending on the bits of the operands. + Cet opérateur retourne la manipulation de bits implication de ses opérandes, une opération logique qui donne une valeur avec ses bits positionnés en fonction des bits des opérandes. - The truth table below demonstrates all combinations of a boolean-implication operation: + La table de vérité ci-dessous donne toutes les combinaisons d'une opération d'implication booléenne: - {{table columns="3" cellpadding="2" cells="Lhs Bit;Rhs Bit;Result;0;0;1;1;0;0;0;1;1;1;1;1"}} + {{table columns="" cellpadding="2" cells="Bit côté gauche;Bit côté droit;Résultat;0;0;1;1;0;0;0;1;1;1;1;1;
    - No short-circuiting is performed - both expressions are always evaluated. + Aucun court-circuit n'est possible - les deux expressions sont toujours évaluées. - The return type depends on the types of values passed. ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]## and floating-point type values are first converted to ##[[KeyPgInteger Integer]]##. If the left and right-hand side types differ only in signedness, then the return type is the same as the left-hand side type (##//T1//##), otherwise, the larger of the two types is returned. + Le type de la valeur retournée dépend des types des valeurs passées. Les valeurs ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]## et à virgule flottante sont, en premier, converties en ##[[KeyPgInteger Integer]]##. Si les types des deux côtés diffèrent seulement par leur manque de signe, le type de retour sera celui du côté gauche (##//T1//##), autrement, le plus grand des deux est retourné. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/imp-bitwise.bas"}}%%(freebasic) @@ -44,12 +44,12 @@ c = a imp b '' c = &b11110101 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpIntegerDivide.wakka b/fbdocs/manual/cache/KeyPgOpIntegerDivide.wakka index ecea54806b..76840ee6c0 100644 --- a/fbdocs/manual/cache/KeyPgOpIntegerDivide.wakka +++ b/fbdocs/manual/cache/KeyPgOpIntegerDivide.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator \ (Integer divide)"}}---- -Divides two ##[[KeyPgInteger Integer]]## expressions +Divise deux expressions ##[[KeyPgInteger Integer (=entier)]]## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **\** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,21 +9,21 @@ Divides two ##[[KeyPgInteger Integer]]## expressions ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side dividend expression. + Le dividende, argument côté gauche. ##//rhs//## - The right-hand side divisor expression. + Le diviseur, argument côté droit. -{{fbdoc item="ret"}} - Returns the quotient of an ##[[KeyPgInteger Integer]]## dividend and divisor. +{{fbdoc item="section" value="Valeur retournée + Retourne le quotient d'un dividende et d'un diviseur ##[[KeyPgInteger Integer (=entier)]]##. {{fbdoc item="desc"}} - **##Operator \## (Integer division)** divides two ##[[KeyPgInteger Integer]]## expressions and returns the result. Float numeric values are converted to ##[[KeyPgInteger Integer]]## by rounding up or down, and the fractional part of the resulting quotient is truncated. + **##Operator \## (Division entière)** divise deux expressions ##[[KeyPgInteger Integer (=entier)]]## et retourne le résultat. Les valeurs nuériques à virgule sont converties en ##[[KeyPgInteger Integer (=entier)]]## en arrondissant par excès ou par défaut, et la partie décimale du quotient résultant est tronquée. - If the divisor (##//rhs//##) is zero (##0##), a division by zero error (crash) will be raised. + Si le diviseur (##//rhs//##) est zéro (##0##), une erreur "division par zéro" (plantage!) est affichée. - Neither of the operands are modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/integer-divide.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ n = 7 \ 2.4 '' => 7 \ 2 => 3.5 => 3 PRINT n SLEEP %% -Output: +Affiche: %% 0 2 @@ -43,14 +43,14 @@ Output: %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[KeyPgOpDivide Operator \ (Floating-point divide)]] - - [[KeyPgOpModulus Operator Mod (Modulus)]] - - [[CatPgMath Mathematical Functions]] + - [[KeyPgOpDivide Opérateur \ (Division à virgule)]] + - [[KeyPgOpModulus Opérateur Mod (Modulo)]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpLessThan.wakka b/fbdocs/manual/cache/KeyPgOpLessThan.wakka index 1f21b9b100..b70f6e0e07 100644 --- a/fbdocs/manual/cache/KeyPgOpLessThan.wakka +++ b/fbdocs/manual/cache/KeyPgOpLessThan.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator < (Less than)"}}---- -Compares an expression less than another expression +Compare une expression à une autre pour savoir si elle lui est inférieure {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **<** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,19 +22,19 @@ Compares an expression less than another expression ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if the left-hand side expression is less than the right-hand side expression, or zero (0) if greater than or equal. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si l'expression côté gauche est inférieure à celle de droite ou zéro (0) si elle est supérieure ou égale. {{fbdoc item="desc"}} - **##Operator <## (Less than)** is a binary operator that compares two expressions for inequality and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur <##** (Inférieur à) est un opérateur binaire qui compare une expression à une autre pour savoir si elle est plus petite et retourne un résultat - une valeur boléenne sous la forme d'un ##[[KeyPgInteger Entier (Integer)]]##: negatif (-1) si c'est vrai et zéro (0) si c'est faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi bien des types définis par l'utilisateur. {{fbdoc item="ex"}} @@ -48,7 +48,7 @@ while (index < size) index += 1 wend %% - ##[[KeyPgOpGreaterThanOrEqual Operator >=]]## (Greater than or equal) is complement to **##Operator <## (Less than)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'##[[KeyPgOpGreaterThanOrEqual Opérateur >=]]## (Supérieur ou égal à) est complémentaire à l'**##Opérateur <## (Inférieur à)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/less-than3.bas"}}%%(freebasic) if (69 < 420) then print "(69 < 420) is true." @@ -56,12 +56,12 @@ wend %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpGreaterThanOrEqual Operator >=]]## (Greater than or equal) + - ##[[KeyPgOpGreaterThanOrEqual Opérateur >=]]## (Supérieur ou égal à) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpLessThanOrEqual.wakka b/fbdocs/manual/cache/KeyPgOpLessThanOrEqual.wakka index 97f62fb982..9a628160e4 100644 --- a/fbdocs/manual/cache/KeyPgOpLessThanOrEqual.wakka +++ b/fbdocs/manual/cache/KeyPgOpLessThanOrEqual.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator <= (Less than or Equal)"}}---- -Compares an expression less than or equal to another expression +Compare une expression à une autre pour savoir si elle lui est inférieure ou égale {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **<=** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,22 +22,22 @@ Compares an expression less than or equal to another expression ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if the left-hand side expression is less than or equal to the right-hand side expression, or zero (0) if greater than. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si l'expression côté gauche est inférieure ou égale à celle de droite ou zéro (0) si elle est supérieure. {{fbdoc item="desc"}} - **##Operator <=## (Less than or Equal)** is a binary operator that compares an expression less than or equal to another expression and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur <=## (Inférieur ou égal à)** est un opérateur binaire qui compare une expression à une autre pour savoir si elle lui est inférieure ou égale et retourne un résultat - une valeur boléenne sous la forme d'un ##[[KeyPgInteger Entier (Integer)]]##: negatif (-1) si c'est vrai et zéro (0) si c'est faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi bien des types définis par l'utilisateur. {{fbdoc item="ex"}} - ##[[KeyPgOpGreaterThan Operator >]]## (Greater than) is complement to **##Operator <=## (Less than or Equal)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'**##Opérateur >]]##** (Supérieur à) est complémentaire à l'**##Opérateur <=## (Inférieur ou égal)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/less-than-or-equal.bas"}}%%(freebasic) if (69 <= 420) then print "(69 <= 420) is true." @@ -45,12 +45,12 @@ Compares an expression less than or equal to another expression %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpGreaterThan Operator >]]## (Greater than) + - ##[[KeyPgOpGreaterThan Opérateur >]]## (Supérieur à) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpLet.wakka b/fbdocs/manual/cache/KeyPgOpLet.wakka index 1c084cda14..fc548b6722 100644 --- a/fbdocs/manual/cache/KeyPgOpLet.wakka +++ b/fbdocs/manual/cache/KeyPgOpLet.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Let (Assign)"}}---- -Indicates the assignment operator when overloading [[KeyPgOpAssignment Operator = (Assignment)]] +Indique l'opérateur d'affectation en cas de surcharge [[KeyPgOpAssignment Operator = (Assignment)]] {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] | [[KeyPgEnum Enum]] } //typename// @@ -13,16 +13,16 @@ Indicates the assignment operator when overloading [[KeyPgOpAssignment Operator ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgUnion Union]]##, or ##[[KeyPgEnum Enum]]## + Nom de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgUnion Union]]##, ou ##[[KeyPgEnum Enum]]## ##//lhs//## - The variable to assign to. + La variable à affecter. ##//rhs//## - The value to assign. + La valeur à affecter. {{fbdoc item="desc"}} - ##**Let**## is used to overload the ##[[KeyPgOpAssignment Operator = (Assignment)]]## operator and to distinguish it from the comparison operator ##[[KeyPgOpEqual Operator = (Equal)]]##. + ##**Let**## est utilisé pour surcharger l'opérateur ##[[KeyPgOpAssignment Operator = (Affectation)]]## et pour le distinguer de l'opérateur de comparaison ##[[KeyPgOpEqual Operator = (Egal)]]##. - ##//lhs// **=** //rhs//## will assign the ##//rhs//## to ##//lhs//## by invoking the **Let** operator procedure defined int ##//typename//##. + ##//lhs// **=** //rhs//## attribuera le terme de droite ##//rhs//## au terme de gauche ##//lhs//## en invoquant la procédure d'opérateur **Let** définie dans ##//typename//##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/let.bas"}}%%(freebasic) @@ -50,7 +50,7 @@ print print "b.x = "; b.x print "b.y = "; b.y %% -Output: +Affiche: %% a.x = 5 a.y = 7 @@ -60,16 +60,17 @@ b.y = 7 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, this operator cannot be overloaded. - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, an assignment expression can be preceded by the ##[[KeyPgLet Let]]## keyword. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, cet opérateur ne peut être surchargé + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, une expression d'affectation peut être précédée par le mot-clef ##[[KeyPgLet Let]]## keyword. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgLet Let]]## - - ##[[KeyPgOpLetlist Operator Let() (Assignment)]]## - - ##[[KeyPgOpAssignment Operator = (Assignment)]]## - - ##[[KeyPgOpEqual Operator = (Equal)]]## + - ##[[KeyPgOpLetlist Opérateur Let() (Affectation)]]## + - ##[[KeyPgOpAssignment Opérateur = (Affectation)]]## + - ##[[KeyPgOpEqual Opérateur = (Egal)]]## -{{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} + diff --git a/fbdocs/manual/cache/KeyPgOpLetlist.wakka b/fbdocs/manual/cache/KeyPgOpLetlist.wakka index 1726cd75cb..02e8656fbd 100644 --- a/fbdocs/manual/cache/KeyPgOpLetlist.wakka +++ b/fbdocs/manual/cache/KeyPgOpLetlist.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Operator LET() (Assignment)"}}---- -Assigns fields of a user defined type to a list of variables +Assigne les champs d'un type défini par l'utilisateur à une liste de variables {{fbdoc item="syntax"}}## **Let**( //variable1// [, //variable2// [, ... ]] ) = //UDT_var// ## {{fbdoc item="param"}} ##//variable1// [, //variable2// [, ... ]]## - Comma separated list of variables to receive the values of the ##//UDT//## variable's fields. + Liste de variables séparées par des virgules pour recevoir les valeurs des champs de la variable de type défini par l'utilisateur. ##//UDT_var//## - A user defined type variable. + une variable de type défini par l'utilisateur. {{fbdoc item="desc"}} - Assigns the values from the ##//UDT_var//## variable's fields to the list of variables. + Affecte les valeurs des champs de la variable ##//UDT_var//## à la liste des variables. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/let-list.bas"}}%%(freebasic) @@ -31,21 +31,21 @@ Let( x, y ) = a Print "x = "; x Print "y = "; y %% -Output: +Affiche: %% x = 5 y = 7 %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Utilisable seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLet Let]]## - - ##[[KeyPgOpAssignment Operator = (Assignment)]]## - - ##[[KeyPgOpLet Operator Let (Assignment)]]## + - ##[[KeyPgOpAssignment Opérateur = (Affectation)]]## + - ##[[KeyPgOpLet Opérateur Let (Affectation)]]## {{fbdoc item="back" value="CatPgOpAssignment|Assignment Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpMemberAccess.wakka b/fbdocs/manual/cache/KeyPgOpMemberAccess.wakka index 0a97c3d7f9..4405875bd9 100644 --- a/fbdocs/manual/cache/KeyPgOpMemberAccess.wakka +++ b/fbdocs/manual/cache/KeyPgOpMemberAccess.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="Operator . (Member access)"}}---- -Returns a reference to a member from a reference to an object +Renvoie une référence à un membre d'une référence à un objet {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **.** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// ) [[KeyPgAs as]] //U// ## -~&//Note that **##Operator .## (Member access)** returns a reference. As of 02.27.07, ""FreeBASIC"" syntax does not support returning references. When it does, this syntax will need to be changed.// +//Notez que **##Opérateur .## (Accès membre)** renvoie une référence. En date du 27/02/07, la syntaxe FreeBASIC ne supporte pas le retour de références.// {{fbdoc item="usage"}}## //result// = //lhs// **.** //rhs// ## {{fbdoc item="param"}} ##//lhs//## - An object. + Un objet. ##//T//## - A user-defined type. + Un type défini par l'utilisateur. ##//rhs//## - The name of a member to access. + Le nom du membre auquel on veut accéder. ##//U//## - The type that ##//rhs//## refers to. + Le type auquel ##//rhs//## se réfère. -{{fbdoc item="ret"}} - Returns a reference to the member specified by ##//rhs//##. +{{fbdoc item="section" value="Valeur retournée + Renvoie une référence au membre spécifié par ##//rhs//##. {{fbdoc item="desc"}} - **##Operator .## (Member access)** returns a reference to a member of an object. + **##Opérateur .## (Accès membre)** renvoie une référence à un membre d'un objet. - **##Operator .## (Member access)** can also be used to access members of an implicit object inside a ##[[KeyPgWith With..End With]]## block. + **##Opérateur .## (Accès membre)** peut également être utilisé pour accéder aux membres d'un objet implicite dans un bloc ##[[KeyPgWith With..End With]]##. {{fbdoc item="ex"}} @@ -46,15 +46,15 @@ end with %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]## - - ##[[KeyPgOpAt Operator @ (Address of)]]## - - ##[[KeyPgOpValueOf Operator * (Value of)]]## + - ##[[KeyPgOpPtrMemberAccess Opérateur -> (Pointeur vers accès membre)]]## + - ##[[KeyPgOpAt Opérateur @ (Adresse de)]]## + - ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]## - ##[[KeyPgWith With..End With]]## {{fbdoc item="back" value="CatPgOpTypeclass|Type or Class Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} diff --git a/fbdocs/manual/cache/KeyPgOpModulus.wakka b/fbdocs/manual/cache/KeyPgOpModulus.wakka index c97fdff431..8ef89cde0e 100644 --- a/fbdocs/manual/cache/KeyPgOpModulus.wakka +++ b/fbdocs/manual/cache/KeyPgOpModulus.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Mod (Modulus)"}}---- -Finds the remainder from a division operation +Trouve le reste d'une opération de division {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Mod** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,19 +9,19 @@ Finds the remainder from a division operation ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side dividend expression. + Argument de gauche, le dividende. ##//rhs//## - The right-hand side divisor expression. + Argument de droite, le diviseur. -{{fbdoc item="ret"}} - Returns the remainder of a division operation. +{{fbdoc item="section" value="Valeur retournée + Retourne le reste d'une opération de division. {{fbdoc item="desc"}} - **##Operator Mod## (Modulus)** divides two ##[[KeyPgInteger Integer]]## expressions and returns the remainder. Numeric values are converted to ##[[KeyPgInteger Integer]]## by rounding up or down. + L'**##Operator Mod## (Modulo)** divise deux nombres ##[[KeyPgInteger Integer (entier)]]## et retourne le reste. Les valeurs numériques sont converties en ##[[KeyPgInteger Integer (entier)]]## en arrondissant par excès ou par défaut. - Neither of the operands are modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/mod.bas"}}%%(freebasic) @@ -29,25 +29,25 @@ PRINT 47 MOD 7 PRINT 5.6 MOD 2.1 PRINT 5.1 MOD 2.8 %% -Output: +Affiche: %% 5 0 2 %% -This is because: - - 47 divided by 7 gives a remainder of 5 - - 5.6 is rounded to 6 while 2.1 is rounded to 2. This makes the problem 6 MOD 2 which means 6 divided by 2 which gives a remainder of 0 - - 5.1 is rounded to 5 while 2.8 is rounded to 3. This makes the problem 5 MOD 3 which means 5 divided by 3 which gives a remainder of 2 +On obtient ces résultats parce que: + - 47 divisé par 7 donne le reste 5 + - 5.6 est arrondi à 6 alors que 2.1 est arrondi à 2. Cela donne le problème 6 MOD 2 ce qui signifie que 6 divisé par 2 donne le reste 0 + - 5.1 est arrondi à 5 alors que 2.8 est arrondi à 3. Cela donne le problème 5 MOD 3 ce qui signifie que 5 divisé par 3 donne le reste 2 {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpMultiply.wakka b/fbdocs/manual/cache/KeyPgOpMultiply.wakka index 8e4b66e14b..ca2f2d77f0 100644 --- a/fbdocs/manual/cache/KeyPgOpMultiply.wakka +++ b/fbdocs/manual/cache/KeyPgOpMultiply.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator * (Multiply)"}}---- -Multiplies two numeric expressions +Multiplie deux expressions numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] ***** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgByte byte]] @@ -19,19 +19,19 @@ Multiplies two numeric expressions ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side multiplicand expression. + Multiplicande, argument côté gauche. ##//rhs//## - The right-hand side multiplicand expression. + Multiplicande, argument côté droit. -{{fbdoc item="ret"}} - Returns the product of two multiplicands. +{{fbdoc item="section" value="Valeur retournée + Renvoie le produit des deux multiplicandes. {{fbdoc item="desc"}} - **##Operator *## (Multiply)** returns the product of two multiplicands. + **##Operator *## (Multiplier)** renvoie le produit des deux multiplicandes. - Neither operand is modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded to accept user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/multiply.bas"}}%%(freebasic) @@ -40,18 +40,18 @@ n = 4 * 5 PRINT n SLEEP %% -Output: +Affichage: %% 20 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpNegate.wakka b/fbdocs/manual/cache/KeyPgOpNegate.wakka index 484d89bdba..9ebea3eb2a 100644 --- a/fbdocs/manual/cache/KeyPgOpNegate.wakka +++ b/fbdocs/manual/cache/KeyPgOpNegate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator - (Negate)"}}---- -Changes the sign of a numeric expression +Change le signe d'une expression numérique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -11,17 +11,17 @@ Changes the sign of a numeric expression ## {{fbdoc item="param"}} ##//rhs//## - The right-hand side numeric expression to negate. + L'argument de droite de l'opération de négation. -{{fbdoc item="ret"}} - Returns the negative of the expression. +{{fbdoc item="section" value="Valeur retournée + Renvoie la négation de l'expression. {{fbdoc item="desc"}} - **##Operator -## (Negate)** is a unary operator that negates the value of its operand. + **##Operator -## (Negation)** est un opérateur unaire qui nie la valeur de son opérande. - The operand is not modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/negate.bas"}}%%(freebasic) @@ -32,19 +32,19 @@ n = - n PRINT n SLEEP %% -Output: +Affiche: %% -5 -65432568459 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpNew.wakka b/fbdocs/manual/cache/KeyPgOpNew.wakka index d506da7669..1241c0a410 100644 --- a/fbdocs/manual/cache/KeyPgOpNew.wakka +++ b/fbdocs/manual/cache/KeyPgOpNew.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator New"}}---- -Operator to dynamically allocate memory and construct data of a specified type +Opérateur qui alloue dynamiquement de la mémoire et construit une donnée du type spécifié {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **new** ( //size// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -7,76 +7,78 @@ Operator to dynamically allocate memory and construct data of a specified type ## {{fbdoc item="usage"}}## //result// = **New** //[[DataType datatype]]// - //or// + //ou// //result// = **New** //[[DataType datatype]]// ( //initializers//, ... ) - //or// + //ou// //result// = **New** //[[DataType datatype]]//**[** //count// **]** ## {{fbdoc item="param"}} ##//size//## - Number of bytes to allocate. + Nombre d'octets à allouer. ##//initializers//## - Initial value(s) for the variable. + Valeur(s) pour initialiser la variable. ##//datatype//## - Name of the data type to create. + Nom du type de donnée à créer. ##//count//## - Exact number of elements to allocate. + Nombre exact d'éléments à allouer. -{{fbdoc item="ret"}} - A pointer of type [[DataType datatype]] to the newly allocated data. +{{fbdoc item="section" value="Valeur retournée + Un pointeur du type [[DataType datatype]] vers la nouvelle donnée allouée. {{fbdoc item="desc"}} - The ##**New**## operator dynamically allocates memory and constructs a specified data type. For simple types, like integers, an initial value can be given. For types without constructors, initial values can be specified for each field. Types that have constructors can have their constructors called by ##**New**## as well. If no initializers are given, the default values for those types will be set. + L'opérateur ##**New**## alloue dynamiquement de la mémoire et construit une donnée du type spécifié. Pour des types simples, comme les entiers, une valeur initiale peut être attribuée. Pour des types sans constructeur(s), des valeurs initiales peuvent être spécifiées pour chaque champ. Les types qui ont des constructeurs, ceux-ci peuvent être appelés par ##**New**##. Si aucun initialiseur n'est fourni, les valeurs par défaut seront attribuées pour ces types. - ##**New[]**## is the array-version of the ##**New**## operator and allocates enough memory for the specified number of objects. The default constructor for the type will be used to set the initial values for each item. + ##**New[]**## est la version pour les tableaux de l'opérateur ##**New**## et alloue suffisamment de mémoire pour le nombre d'objets spécifié. Le constructeur par défaut pour le type sera utilisé pour initialiser chacun des éléments. - Objects created with ##**New**## must be freed with ##[[KeyPgOpDelete Delete]]##. Memory allocated with ##**New[]**## must be freed with ##**Delete[]**##, the array-version of ##[[KeyPgOpDelete Delete]]##. You cannot mix and match the different versions of the operators. + Les objects créés avec ##**New**## doivent être libérés avec ##[[KeyPgOpDelete Delete]]##. La mémoire allouée avec ##**New[]**## doit être libérée avec ##**Delete[]**##, la version pour les tableaux de ##[[KeyPgOpDelete Delete]]##. Vous ne pouvez pas mélanger les deux versions de l'opérateur. - Specifying an initial value of ##[[KeyPgAny Any]]##, as in ##new datatype(any)## will allocate memory for the type, but not initialize the data. This is only valid on data types that do not have constructors. + Spécifier une valeur initiale ##[[KeyPgAny Any]]##, comme dans ##new datatype(any)## allouera de la mémoire pour le type, mais n'initialisera pas les données. Ceci n'est valide que pour les types qui n'ont pas de constructeur. - Specifying an initial value of ##[[KeyPgAny Any]]##, as in ##new datatype[count]{any}## will allocate memory for the array, but not initialize the data. This is only valid on data types that do not have constructors. + Spécifier une valeur initiale ##[[KeyPgAny Any]]##, comme dans ##new datatype[count]{any}## allouera de la mémoire pour le tableau, mais n'initialisera pas les données. Ceci n'est valide que pour les types qui n'ont pas de constructeur. -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/operator/new.bas"}}%%(freebasic) -type Rational - as integer numerator, denominator -end type + {{fbdoc item="ex"}} -scope +{{fbdoc item="ex"}} +Type Rational +As Integer numerator, denominator + End Type +Scope - ' Create and initialize a Rational, and store it's address. - dim p as Rational ptr = new Rational(3, 4) +' Create and initialize a Rational, and store it's address. - print p->numerator & "/" & p->denominator + Dim p As Rational Ptr = New Rational(3, 4) + Print p->numerator & "/" & p->denominator ' Destroy the rational and give its memory back to the system. - delete p -end scope + Delete p + End Scope -scope +Scope - ' Allocate memory for 100 integers, store the address of the first one. - dim p as integer ptr = new integer[100] +' Allocate memory for 100 integers, store the address of the first one. + Dim p As Integer Ptr = New Integer[100] ' Assign some values to the integers in the array. - for i as integer = 0 to 99 - p[i] = i - next + For i As Integer = 0 To 99 + p[i] = i + Next ' Free the entire integer array. - delete[] p -end scope + Delete[] p + End Scope + %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. +- Utilisable seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgOpDelete Delete]]## +- ##[[KeyPgOpDelete Delete]]## + - ##[[KeyPgOpPlacementNew Placement New]]## - ##[[KeyPgOpPlacementNew Placement New]]## {{fbdoc item="back" value="CatPgOpMemory|Memory Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpNext.wakka b/fbdocs/manual/cache/KeyPgOpNext.wakka index b368434722..9ad8712c52 100644 --- a/fbdocs/manual/cache/KeyPgOpNext.wakka +++ b/fbdocs/manual/cache/KeyPgOpNext.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Next (Iteration)"}}---- -Determines if a ##[[KeyPgFornext For...Next]]## loop should be terminated +Détermine si une boucle ##[[KeyPgFornext For...Next]]## est terminée {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] } //typename// @@ -15,32 +15,32 @@ Determines if a ##[[KeyPgFornext For...Next]]## loop should be terminated ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]## + nom du ##[[KeyPgType Type]]##, de la ##[[KeyPgClass Class]]## ou de l'##[[KeyPgUnion Union]]## ##//cond//##, ##//end_value//## - a ##//typename//## object used as a loop-terminating value + un objet ##//typename//## utilisé comme valeur de fin de boucle ##//stp//##, ##//step_value//## - a ##//typename//## object used as an incremental value + un objet ##//typename//## utilisé comme valeur d'incrémentation ##//iterator//## - a ##//typename//## object used as an iterator + un objet ##//typename//## utilisé comme itérateur ##//start_value//## - a ##//typename//## object used to copy construct or assign to the iterator initially + un objet ##//typename//## utilisé pour copie de construction ou à assigner à l'itérateur initialement {{fbdoc item="desc"}} - ##[[KeyPgOpFor Operator For]]##, ##**Operator Next**## and ##[[KeyPgOpStep Operator Step]]## can be overloaded in user-defined type definitions to allow objects of that type to be used as iterators and step values in ##[[KeyPgFornext For...Next]]## loops. + ##[[KeyPgOpFor Opérateur For]]##, ##**Opérateur Next**## et ##[[KeyPgOpStep Opérateur Step]]## peuvent être surchargés dans un type défini par l'utilisateur pour permettre à des définitions d'objets de ce type d'être utilisés comme itérateurs et valeurs d'incrémentation dans des boucles ##[[KeyPgFornext For...Next]]##. - ##**Operator Next**## is called every time the iterator needs to be checked against the end value. This happens immediately after the call to its ##[[KeyPgOpFor Operator For]]##, and immediately after any calls to its ##[[KeyPgOpStep Operator Step]]##. ##**Operator Next**## should return zero (0) if the loop should be terminated, or non-zero if the loop should continue iterating. The first time ##**Operator Next**## is called, no statements in the ##[[KeyPgFornext For...Next]]## body, if any, have been executed yet. + L'##**Opérateur Next**## est appelé chaque fois que l'itérateur doit être vérifié par rapport à la valeur de fin. Ceci se passe immédiatement après l'appel à son ##[[KeyPgOpFor Opérateur For]]## et immédiatement après les appels à son ##[[KeyPgOpStep Opérateur Step]]##. ##**Opérateur Next**## retournera zéro (0) si la boucle doit se terminer ou non-zéro si la boucle doit continuer l'itération. La première fois que l'##**Opérateur Next**## est appelé, aucune déclaration du corps de ##[[KeyPgFornext For...Next]]##, si elles existent, ne sont encore exécutées. - The first version of ##**Operator Next**## is used if no step value is given in the ##[[KeyPgFornext For...Next]]## statement. If a step value is given, the second version is used and is passed the step value. + La première version de ##**Opérateur Next**## est utilisée si aucune valeur d'incrémentation n'a été donnée dans la déclaration de ##[[KeyPgFornext For...Next]]##. Si une valeur d'incrémentation est donnée, la seconde version est utilisée et la valeur d'incrémentation est passée. {{fbdoc item="ex"}} - See the [[KeyPgOpStep Operator Step]] examples. + Voir les exemples de [[KeyPgOpStep Opérateur Step]]. {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - - ##[[KeyPgOpFor Operator For]]## - - ##[[KeyPgOpStep Operator Step]]## + - ##[[KeyPgOpFor Opérateur For]]## + - ##[[KeyPgOpStep Opérateur Step]]## - ##[[KeyPgFornext For...Next]]## {{fbdoc item="back" value="CatPgOpIterating|Iterating Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpNot.wakka b/fbdocs/manual/cache/KeyPgOpNot.wakka index b19606403f..06566c68b1 100644 --- a/fbdocs/manual/cache/KeyPgOpNot.wakka +++ b/fbdocs/manual/cache/KeyPgOpNot.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Not (Complement)"}}---- -Returns the bitwise-not (complement) of a numeric value +Retourne la manipulation de bits (complément) d'une valeur numérique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Not** ( [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -14,21 +14,21 @@ Returns the bitwise-not (complement) of a numeric value ## {{fbdoc item="param"}} ##//rhs//## - The right-hand side expression. + Le côté droit de l'expression. ##//T//## - Any numeric type. + Un type numérique. -{{fbdoc item="ret"}} - Returns the bitwise-complement of its operand. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits-complément de son opérande. {{fbdoc item="desc"}} - This operator returns the bitwise-complement of its operand, a logical operation that results in a value with bits set depending on the bits of the operand. + Cet opérateur retourne la manipulation de bits-complément de son opérande, une opéation logique dont le résultat est une valeur dont les bits mis à dépendent des bits de son opérande. - The truth table below demonstrates all combinations of a boolean-complement operation: + La table de vérité ci-dessous montre toutes les combinaisons d'une opération booléenne de complément: - {{table columns="2" cellpadding="2" cells="Rhs Bit;Result;0;1;1;0"}} + {{table columns="" cellpadding="2" cells="Bit côté droit;Résultat;0;1;1;0;
    - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/not-bitwise.bas"}}%%(freebasic) @@ -57,12 +57,12 @@ IF NOT numeric_value2 = 25 THEN PRINT "Numeric_Value2 is not equal to 25" %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Table de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpNotEqual.wakka b/fbdocs/manual/cache/KeyPgOpNotEqual.wakka index 5161c443ad..ebaf58d72a 100644 --- a/fbdocs/manual/cache/KeyPgOpNotEqual.wakka +++ b/fbdocs/manual/cache/KeyPgOpNotEqual.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator <> (Not equal)"}}---- -Compares two expressions for inequality +Compare deux expressions et vérifie leur inégalité {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **<>** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -22,19 +22,19 @@ Compares two expressions for inequality ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to compare to. + L'expression du côté gauche à comparer. ##//rhs//## - The right-hand side expression to compare to. + L'expression du côté droit à comparer. ##//T//## - Any pointer type. + N'importe quel type de pointeur. -{{fbdoc item="ret"}} - Returns negative one (-1) if expressions are not equal, or zero (0) if equal. +{{fbdoc item="section" value="Valeur retournée + Retourne une valeur négative (-1) si les expressions ne sont pas égales ou zéro (0) si égales. {{fbdoc item="desc"}} - **##Operator <>## (Not equal)** is a binary operator that compares two expressions for inequality and returns the result - a boolean value in the form of an ##[[KeyPgInteger Integer]]##: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way. + L'**##Opérateur <>## (Not equal)** est un Opérateur binaire qui compare deux expressions pour vérifier leur inégalité et retourne le résultat - une valeur booléenne sous forme d'un ##[[KeyPgInteger Entier (Integer)]]##: négative (-1) pour vrai et zéro (0) pour faux. Les arguments ne sont en aucun cas modifiés. - This operator can be overloaded to accept user-defined types as well. + Cet opérateur peut être surchargé pour accepter aussi des types définis par l'utilisateur. {{fbdoc item="ex"}} @@ -50,7 +50,7 @@ If (i <> j) Then Print "error: " & i & " does not equal " & j End If %% - ##[[KeyPgOpEqual Operator =]]## (Equal) is complement to **##Operator <>## (Not equal)**, and is functionally identical when combined with ##[[KeyPgOpNot Operator Not]]## (Bit-wise Complement). + L'##[[KeyPgOpEqual Opérateur =]]## (Egal) est complémentaire de l'**##Opérateur <>## (Non égal)** et est fonctionnellement identique si combiné avec l'##[[KeyPgOpNot Opérateur Not]]## (Bit-wise Complement). {{fbdoc item="filename" value="examples/manual/operator/not-equal2.bas"}}%%(freebasic) if (69 <> 420) then print "(420 <> 420) is true." @@ -58,12 +58,12 @@ End If %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpEqual Operator =]]## (Equal) + - ##[[KeyPgOpEqual Opérateur =]]## (Egal) {{fbdoc item="back" value="CatPgOpConditional|Relational Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpOr.wakka b/fbdocs/manual/cache/KeyPgOpOr.wakka index b82e2c9d33..964dfd65dd 100644 --- a/fbdocs/manual/cache/KeyPgOpOr.wakka +++ b/fbdocs/manual/cache/KeyPgOpOr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator OR (Inclusive Disjunction)"}}---- -Returns the bitwise-or (inclusive disjunction) of two numeric values +Retourne la manipulation de bits (disjonction inclusive) de deux valeurs numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Or** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// @@ -9,31 +9,31 @@ Returns the bitwise-or (inclusive disjunction) of two numeric values ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Le côté gauche de l'expression. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Le côté droit de l'expression. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - A numeric type (varies with ##//T1//## and ##//T2//##). + Un type numérique (varie avec ##//T1//## et ##//T2//##). -{{fbdoc item="ret"}} - Returns the bitwise-disjunction of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits (disjonction inclusive) des deux opérandes. {{fbdoc item="desc"}} - This operator returns the bitwise-disjunction of its operands, a logical operation that results in a value with bits set depending on the bits of the operands. + Cet opérateur retourne la manipulation de bits disjonction-inclusive de ses opérandes, une opération logique dont le résultat est une valeur avec ses bits positionnés en fonction des bits de ses opérandes. - The truth table below demonstrates all combinations of a boolean-disjunction operation: + La table de vérité ci-dessous montre toutes les combinaisons de l'opération booléenne de disjonction inclusive: - {{table columns="3" cellpadding="2" cells="Lhs Bit;Rhs Bit;Result;0;0;0;1;0;1;0;1;1;1;1;1"}} + {{table columns="" cellpadding="2" cells="Bit côté gauche;Bit côté droit;Résultat;0;0;0;1;0;1;0;1;1;1;1;1;
    - No short-circuiting is performed - both expressions are always evaluated. + Aucun court-circuit n'est possible - les deux expressions sont toujours évaluées. - The return type depends on the types of values passed. ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]## and floating-point type values are first converted to ##[[KeyPgInteger Integer]]##. If the left and right-hand side types differ only in signedness, then the return type is the same as the left-hand side type (##//T1//##), otherwise, the larger of the two types is returned. + Le type de retour dépend des types des valeurs passées. Les valeurs de type ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]## et à virgule flottante sont en premier converties en ##[[KeyPgInteger Integer]]##. Si les types des deux côtés diffèrent seulement par leur signe, alors le type de retour est le même que celui du côté gauche (##//T1//##), autrement, le plus large des deux types est retourné. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/or-bitwise.bas"}}%%(freebasic) @@ -60,12 +60,12 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpOrElse.wakka b/fbdocs/manual/cache/KeyPgOpOrElse.wakka index 61542d78c5..d33fa2aff6 100644 --- a/fbdocs/manual/cache/KeyPgOpOrElse.wakka +++ b/fbdocs/manual/cache/KeyPgOpOrElse.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="Operator ORELSE (Short Circuit Inclusive Disjunction)"}}---- -Returns the short circuit-or (Inclusive Disjunction) of two numeric values +Retourne le circuit-court (Disjonction Inclusive) de deux valeurs numériques {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **""OrElse""** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// + [[KeyPgDeclare Declare]] [[KeyPgOperator Operator]] **OrElse** ( [[KeyPgByref ByRef]] //lhs// [[KeyPgAs As]] //T1//, [[KeyPgByref ByRef]] //rhs// [[KeyPgAs As]] //T2// ) [[KeyPgAs As]] //Ret// ## {{fbdoc item="usage"}}## - //result// = //lhs// **""OrElse""** //rhs// + //result// = //lhs// **OrElse** //rhs// ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Expression côté gauche. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Expression côté droit. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - An Integer. + Un nombre entier. {{fbdoc item="ret"}} - Returns the short circuit-or (inclusive disjunction) of the two operands. + Retourne le circuit-court (disjonction inclusive) des deux opérandes. {{fbdoc item="desc"}} - This operator evaluates the left hand side expression. If the result is non-zero, then -1 (true) is immediately returned. If the result is zero then the right hand side is evaluated, and the logical result from that is returned. + Cet opérateur évalue l'expression à gauche. Si le résultat non-zéro, alors -1 (vrai) est retourné immédiatement. Si le résultat est zéro alors l'expression de droite est évaluée et le résultat logique des deux expressions est retourné. - The truth table below demonstrates all combinations of a short circuit-or operation, the '-' denotes that the operand is not evaluated. + La table de vérité ci-dessous montre toutes les combinaisons d'un circuit-court, le signe '-' indique que l'opérande n'est pas évalué. - {{table columns="3" cellpadding="2" cells="Lhs Value;Rhs Value;Result;0;0;0;0;1;1;1;-;1"}} + {{table columns="" cellpadding="2" cells="Valeur de Lhs;Valeur de Rhs;Résultat;0;0;0;0;1;1;1;-;1;
    - Short-circuiting is performed - only expressions needed to calculate the result are evaluated. + Un circuit-court est exécuté - seules les expressions nécessaires pour calculer le résultat sont évaluées. - The return type is always an Integer, of the value 0 or -1, denoting false and true respectively. + Le type de retour est toujours un entier, de valeur 0 ou -1, indiquant faux et vrai, respectivement. - This operator cannot be overloaded for user-defined types. + Cet opérateur ne peut pas être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/orelse.bas"}}%%(freebasic) @@ -48,10 +48,10 @@ SLEEP %% {{fbdoc item="diff"}} - - This operator was not available in QB. + - Cet opérateur n'est pas disponible sous QB. {{fbdoc item="see"}} - ##[[KeyPgOpAndAlso AndAlso]]## - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs de manipulation de bits]] {{fbdoc item="back" value="CatPgOpShortCircuit|Short Circuit Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPlacementNew.wakka b/fbdocs/manual/cache/KeyPgOpPlacementNew.wakka index e9e29dbfac..30f588cdc7 100644 --- a/fbdocs/manual/cache/KeyPgOpPlacementNew.wakka +++ b/fbdocs/manual/cache/KeyPgOpPlacementNew.wakka @@ -1,78 +1,80 @@ {{fbdoc item="title" value="Operator Placement New"}}---- -Operator to construct an object at a specified memory address. +Opérateur pour construire un object à l'adresse mémoire spécifiée. {{fbdoc item="syntax"}}## //result// = **New(//address//)** //[[DataType datatype]]// - //or// + //ou// //result// = **New(//address//)** //[[DataType datatype]]// ( //initializers//, ... ) - //or// + //ou// //result// = **New(//address//)** //[[DataType datatype]]//**[** //count// **]** ## {{fbdoc item="param"}} ##//address//## - the location in memory to construct. the parenthesis are **not** optional. + La position mémoire où construire. Les parenthèses **ne sont pas** facultatives. ##//size//## - number of bytes to allocate. + Le nombre d'octets à allouer. ##//initializers//## - Initial value(s) for the variable. + La valeur initiale de la variable. ##//datatype//## - name of the data type to create. + Le nom du type de donnée à créer. ##//count//## - Number of elements to allocate. + Le nombre d'éléments à allouer. -{{fbdoc item="ret"}} - A pointer of type [[DataType datatype]] to the newly allocated data. +{{fbdoc item="section" value="Valeur retournée + Un pointeur du type [[DataType datatype]] vers la nouvelle donnée allouée. {{fbdoc item="desc"}} - The ##**Placement New**## operator constructs a specified data type at the specified memory location. + L'opérateur ##**New (Emplacement mémoire)**## construit un type de donnée spécifique à l'emplacement mémoire spécifié. - For simple types, like integers, an initial value can be given. For types without constructors, initial values can be specified for each field. Types that have constructors can have their constructors called by ##**Placement New**## as well. If no initializers are given, the default values for those types will be set. + Pour des types simples, comme les entiers, une valeur initiale peut être donnée. Pour des types sans constructeur, des valeurs initiales peuvent être spécifiées pour chacun des champs. Pour les types ayant des constructeurs ceux-ci peuvent être appelés par ##**New (Emplacement mémoire)**##. Si aucun initialiseur n'est fourni, les valeurs par défaut seront utilisées. - Memory is **not** allocated when using the ##**Placement New**## operator. Instead, the memory at the specified ##//address//## is used. It is incorrect to call ##[[KeyPgOpDelete Delete]]## on the address. See examples below for proper //placement new// usage. + La mémoire **n'est pas** allouée quand on utilise l'opérateur ##**Placement New**##. Au lieu de cela, la mémoire à l'##//address//##e spécifiée est utilisée. Il est incorrect d'appeler ##[[KeyPgOpDelete Delete]]## pour cette adresse. Voir les exemples ci-dssous pour utiliser correctement //new (emplacement mémoire)//. - Specifying an initial value of ##[[KeyPgAny Any]]##, as in ##new(address) datatype(any)## will not initialize the data. This is only valid on data types that do not have constructors. + Spécifier une valeur initiale ##[[KeyPgAny Any]]##, comme dans ##new(address) datatype(any)## n'initialisera pas les données. Ceci n'est valide que pour des types de donnée n'ayant pas de constructeur. - Specifying an initial value of ##[[KeyPgAny Any]]##, as in ##new(address) datatype[count]{any}## will not initialize the data. This is only valid on data types that do not have constructors. + Spécifier une valeur initiale ##[[KeyPgAny Any]]##, comme dans ##new(address) datatype[count]{any}## n'initialisera pas les données. Ceci n'est valide que pour des types de donnée n'ayant pas de constructeur. + + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/operator/placement_new.bas"}}%%(freebasic) '' "placement new" example +Type Rational -type Rational - as integer numerator, denominator -end type +As Integer numerator, denominator + End Type +Scope -scope - - '' allocate some memory to construct as a Rational - dim as any ptr ap = callocate(len(Rational)) +'' allocate some memory to construct as a Rational + Dim As Any Ptr ap = CAllocate(Len(Rational)) '' make the placement new call - dim as Rational ptr r = new (ap) Rational( 3, 4 ) + Dim As Rational Ptr r = New (ap) Rational( 3, 4 ) '' you can see, the addresses are the same, just having different types in the compiler - print ap, r + Print ap, r '' confirm all is okay - print r->numerator & "/" & r->denominator - + + Print r->numerator & "/" & r->denominator '' destroying must be done explicitly, because delete will automatically free the memory + '' and that isn't always okay when using placement new. ALWAYS explicitly call the destructor. - r->destructor( ) - + r->Destructor( ) '' we explicitly allocated, so we explicitly deallocate - deallocate( ap ) + + Deallocate( ap ) + End Scope -end scope %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. +- Utilisable seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgOpDelete Delete]]## +- ##[[KeyPgOpDelete Delete]]## + - ##[[KeyPgOpNew New]]## - ##[[KeyPgOpNew New]]## {{fbdoc item="back" value="CatPgOpMemory|Memory Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPpConcat.wakka b/fbdocs/manual/cache/KeyPgOpPpConcat.wakka index a9150ef100..e558bebb5c 100644 --- a/fbdocs/manual/cache/KeyPgOpPpConcat.wakka +++ b/fbdocs/manual/cache/KeyPgOpPpConcat.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Operator ## (Preprocessor Concatenate)"}}---- -Preprocessor operator to concatenate strings +Opérateur Préprocesseur pour concatener chaînes {{fbdoc item="syntax"}}## - text**""##""**text + text**##**text ## {{fbdoc item="desc"}} - This operator creates a new token by concatenating the texts at both sides of it. This text can be recognized by other macros and further expanded. One use, is to create a macro that expands to different macro names, variable names, and function names depending on the arguments received. + Cet opérateur crée un nouveau "symbole" par la concaténation des textes de ses deux côtés. Ce texte peut être reconnu par d'autres macros et étendu. Une utilisation, est de créer une macro qui s'étend à des noms de macro différents, des noms de variables et des noms de fonctions selon les arguments reçus. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/prepro/concat.bas"}}%%(freebasic) + %%(freebasic) #define Concat(t,n) t##n Print concat (12,34) @@ -17,16 +17,16 @@ Dim Concat (hello,world) as integer Concat (hello,world)=99 print helloworld %% - Output: + Affichage: %% 1234 99 %% -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +{{fbdoc item="lang"}} + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CatPgPreProcess Preprocessor]] + - [[CatPgPreProcess Préprocesseur]] {{fbdoc item="back" value="CatPgOpPrepro|Preprocessor Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPpEscape.wakka b/fbdocs/manual/cache/KeyPgOpPpEscape.wakka index 3cda512896..782ce5561d 100644 --- a/fbdocs/manual/cache/KeyPgOpPpEscape.wakka +++ b/fbdocs/manual/cache/KeyPgOpPpEscape.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Operator ! (Escaped String Literal)"}}---- -Explicitly indicates that a string literal should be processed for escape sequences. +Indique explicitement qu'une chaîne littérale supporte les séquences d'échappement. {{fbdoc item="syntax"}}## **!**"//text//" ## {{fbdoc item="param"}} ##**!**## - The preprocessor escaped string operator + L'opérateur préprocesseur de support des séquences d'échappement ##"//text//"## - The string literal containing escape characters + La chaîne littérale contenant des caractères d'échappement {{fbdoc item="desc"}} - This operator explicitly indicates that the string literal following it (wrapped in double quotes) should be processed for escape sequences. This a preprocessor operator and can only be used with string literals at compile time. + Cet opérateur indique explicitement que la chaîne littérale qui le suit (entre guillemets doubles) peut être traîtée pour le support des séquences d'échappement. C'est un opérateur du préprocesseur et il ne peut être utilisé qu'avec des chaînes littérales lors de la compilation. - The default behavior for string literals is that they not be processed for escape sequences. ##[[KeyPgOptionescape Option Escape]]## can be used in the //[[CompilerOptlang -lang fblite]]// dialect to override this default behaviour causing all strings to be processed for escape sequences. + Le comportement par défaut pour les chaînes littérales c'est qu'elles ne seront pas traitées comme supportant les séquences d'échappement. ##[[KeyPgOptionescape Option Escape]]## peut être utilisée dans le dialecte //[[CompilerOptlang -lang fblite]]// pour annuler ce comportement par défaut, entraînant alors le support des séquences d'échappement pour toutes les chaînes. - Use the [[KeyPgOpPpNoescape $ operator (Non-Escaped String Literal)]] operator to explicitly indicate that a string should not be processed for escape sequences. + Utilisez l'opérateur [[KeyPgOpPpNoescape $ Operator (Non Echappement chaîne littérale)]] pour indiquer explicitement qu'une chaîne ne supporte pas le traîtement des séquences d'échappement. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/prepro/escape.bas"}}%%(freebasic) + %%(freebasic) print "Some escape sequence examples:" print !"1.\tsingle quote (\\\') : \'" print !"2.\tdouble quote (\\\") : \"" @@ -28,20 +28,20 @@ print !"4.\tascii char (\\65): \65" '' OUTPUT: '' '' Some escape sequence examples: -'' 1. single quote (\') : ' -'' 2. double quote (\") : " -'' 3. backslash (\\) : \ -'' 4. ascii char (\65): A +'' 1. single quote (\') : ' +'' 2. double quote (\") : " +'' 3. backslash (\\) : \ +'' 4. ascii char (\65): A %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[KeyPgOpPpNoescape Operator $ (Non-Escaped String Literal)]] + - [[KeyPgOpPpNoescape Opérateur $ (Non Echappement chaîne littérale)]] - ##[[KeyPgOptionescape Option Escape]]## - - [[CatPgPreProcess Preprocessor]] - - [[ProPgLiterals Literals]] - - [[TblEscapeSequences Escape Sequences]] + - [[CatPgPreProcess Préprocesseur]] + - [[ProPgLiterals Les littéraux]] + - [[TblEscapeSequences Séquences d'échappement]] {{fbdoc item="back" value="CatPgOpPrepro|Preprocessor Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPpNoescape.wakka b/fbdocs/manual/cache/KeyPgOpPpNoescape.wakka index 27f5967f3e..937d5c4976 100644 --- a/fbdocs/manual/cache/KeyPgOpPpNoescape.wakka +++ b/fbdocs/manual/cache/KeyPgOpPpNoescape.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="Operator $ (Non-Escaped String Literal)"}}---- -Explicitly indicates that a string literal should not be processed for escape sequences. +Indique explicitement qu'une chaîne littérale ne supporte pas les séquences d'échappement. {{fbdoc item="syntax"}}## **$**"//text//" ## {{fbdoc item="param"}} ##**$**## - The preprocessor non-escaped operator + L'opérateur préprocesseur de non-support des séquences d'échappement ##"//text//"## - The string literal + La chaîne littérale {{fbdoc item="desc"}} - This operator explicitly indicates that the string literal following it (wrapped in double quotes) should not be processed for escape sequences. This a preprocessor operator and can only be used with string literals at compile time. + Cet opérateur indique explicitement que la chaîne littérale qui le suit (entre guillemets doubles) ne peut pas être traîtée pour le support des séquences d'échappement. C'est un opérateur du préprocesseur et il ne peut être utilisé qu'avec des chaînes littérales lors de la compilation. - The default behavior for string literals is that they not be processed for escape sequences. However, ##[[KeyPgOptionescape Option Escape]]## in the //[[CompilerOptlang -lang fblite]]// dialect can be used to override this default behaviour causing all strings to be processed for escape sequences. + Le comportement par défaut pour les chaînes littérales c'est qu'elles ne seront pas traitées comme supportant les séquences d'échappement. Cependant, ##[[KeyPgOptionescape Option Escape]]## peut être utilisée dans le dialecte //[[CompilerOptlang -lang fblite]]// pour annuler ce comportement par défaut, entraînant alors le support des séquences d'échappement pour toutes les chaînes. - Use the [[KeyPgOpPpEscape ! operator (Escaped String Literal)]] to explicitly indicate that a string should be processed for escape sequences. + Utilisez l'opérateur [[KeyPgOpPpEscape ! Operator (Escaped String Literal)]] pour indiquer explicitement qu'une chaîne supporte le traîtement des séquences d'échappement. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/prepro/noescape.bas"}}%%(freebasic) + %%(freebasic) '' Compile with -lang fblite or qb #lang "fblite" @@ -51,13 +51,13 @@ Print %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[KeyPgOpPpEscape Operator ! (Escaped String Literal)]] + - [[KeyPgOpPpEscape Opérateur ! (Echappement chaîne littérale)]] - ##[[KeyPgOptionescape Option Escape]]## - - [[CatPgPreProcess Preprocessor]] - - [[ProPgLiterals Literals]] - - [[TblEscapeSequences Escape Sequences]] + - [[CatPgPreProcess Préprocesseur]] + - [[ProPgLiterals Les littéraux]] + - [[TblEscapeSequences Séquences d'échappement]] {{fbdoc item="back" value="CatPgOpPrepro|Preprocessor Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPpStringize.wakka b/fbdocs/manual/cache/KeyPgOpPpStringize.wakka index b50d7adc2e..7e2f3a56d0 100644 --- a/fbdocs/manual/cache/KeyPgOpPpStringize.wakka +++ b/fbdocs/manual/cache/KeyPgOpPpStringize.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Operator # (Preprocessor Stringize)"}}---- -Preprocessor operator to convert macro arguments to strings +Opérateur pour convertir des arguments macro en chaînes {{fbdoc item="syntax"}}## - **""#""**//macro_argument// + **#**//macro_argument// ## {{fbdoc item="desc"}} - This operator converts the ##//macro_argument//## into a string whose value is the name of the argument. This substitution is made during the macro expansion, previous to compilation. + Cet Opérateur convertit ##//macro_argument//## en une chaîne dont la valeur est le nom de l'argument. Cette substitution est faite lors de l'expansion macro, avant la compilation. -~&//Note: because of this feature, care should be taken when using file-handling statements in a macro. Because of potential ambiguity with file-handling statements that take a "##**#**//filenum//##" parameter, if ##//filenum//## is one of the macro parameters, it may be necessary to wrap the ##//filenum//## expression in parenthesis (e.g. "##**#**(//filenum//)##"), to separate it from the ##**#**## sign. Otherwise, ##//filenum//## will be stringized in the macro.// +//Note: à cause de cette caractéristique, il faut prendre soin lors de l'utilisation de fichiers de traitement des déclarations dans une macro. En raison de l'ambiguïté potentielle avec un fichier de traitement des déclarations qui prennent un paramètre "##**#**//filenum//##", si ##//filenum//## est l'un des paramètres macro, il peut être nécessaire d'encadrer l'expression ##//filenum//## par des parenthèses (par ex: "##**#**(//filenum//)##"), pour le séparer du signe ##**#**##. Sinon, ##//filenum//## sera transformé en chaîne dans la macro.// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/stringize.bas"}}%%(freebasic) @@ -19,16 +19,16 @@ SEE(variable) SEE(another_one) %% -Output: +Affiche: %% variable = 1 another_one = 2 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CatPgPreProcess Preprocessor]] + - [[CatPgPreProcess Préprocesseur]] {{fbdoc item="back" value="CatPgOpPrepro|Preprocessor Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpProcptr.wakka b/fbdocs/manual/cache/KeyPgOpProcptr.wakka index 83860747dc..44da734b26 100644 --- a/fbdocs/manual/cache/KeyPgOpProcptr.wakka +++ b/fbdocs/manual/cache/KeyPgOpProcptr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator PROCPTR (Procedure pointer)"}}---- -Returns the address of a procedure +Renvoie l'adresse d'une procédure {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Procptr** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// ) [[KeyPgAs as]] //T// [[KeyPgPtr ptr]] @@ -9,17 +9,17 @@ Returns the address of a procedure ## {{fbdoc item="param"}} ##//lhs//## - A procedure. + Une procédure. ##//T//## - The type of procedure. + Le type de procédure. -{{fbdoc item="ret"}} - Returns the address of the procedure. +{{fbdoc item="section" value="Valeur retournée + Renvoie l'adresse de la procédure. {{fbdoc item="desc"}} - This operator returns the address of a ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## procedure. + Cet opérateur renvoie l'adresse d'une procédure ##[[KeyPgSub Sub]]## ou ##[[KeyPgFunction Function]]##. - ##[[KeyPgOpAt Operator @ (Address of)]]##, when used with procedures, has identical behavior. + L'##[[KeyPgOpAt Opérateur @ (Adresse de)]]##, utilisé avec des procédures, a un comportement identique. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/procptr.bas"}}%%(freebasic) @@ -46,15 +46,15 @@ end function %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Procptr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Procptr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgSub Sub]]## - ##[[KeyPgOpVarptr Varptr]]## - ##[[KeyPgOpStrptr Strptr]]## - - [[ProPgPointers Pointers]] + - [[ProPgPointers Pointeurs]] {{fbdoc item="back" value="CatPgOpPoint|Pointer Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpPtrIndex.wakka b/fbdocs/manual/cache/KeyPgOpPtrIndex.wakka index 82d15ea497..c93e451a8d 100644 --- a/fbdocs/manual/cache/KeyPgOpPtrIndex.wakka +++ b/fbdocs/manual/cache/KeyPgOpPtrIndex.wakka @@ -1,49 +1,52 @@ {{fbdoc item="title" value="Operator [] (Pointer index)"}}---- -Returns a reference to memory offset from an address +Renvoie une référence au décalage mémoire par rapport à une adresse {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// [[KeyPgPointer pointer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] //T// ## -~&//Note that **##Operator []## (Pointer index)** returns a reference. See [[CompilerFAQ CompilerFAQ]].// +//Notez que **##Opérateur [ ]## (Pointeur d'indice)** retourne une référence. Voir [[CompilerFAQ FAQ du Compilateur]].// {{fbdoc item="usage"}}## //result// = //lhs// **[** //rhs// **]** ## {{fbdoc item="param"}} ##//lhs//## - The base address. + L'adresse de base. ##//rhs//## - A signed offset from ##//lhs//##. + Un décalage (offset) à partir de ##//lhs//##. ##//T//## - Any data type. + Tout type de donnée. {{fbdoc item="desc"}} - This operator returns a reference to a value some distance in memory from a base address. It is essentially shorthand for "##[[KeyPgOpValueOf *]](//lhs// [[KeyPgOpAdd +]] //rhs//)##"; both do exactly the same thing. Like pointer arithmetic, any type of ##[[KeyPgPointer POINTER]]## can be indexed except for an ##[[KeyPgAny ANY]]## ##[[KeyPgPointer POINTER]]##. Also, like pointer arithmetic, it is up to the user to make sure meaningful data is being accessed. + Cet opérateur renvoie une référence à une valeur à une certaine distance dans la mémoire par rapport à une adresse de base. Il s'agit essentiellement d'un raccourci pour "##[[KeyPgOpValueOf *]](//lhs// [[KeyPgOpAdd +]] //rhs//)##"; les deux font exactement la même chose. Comme un pointeur arithmétique, tout type de ##[[KeyPgPointer Pointeur]]## peut être indexé sauf pour un ##[[KeyPgPointer Pointeur]]## ##[[KeyPgAny Any]]##. Aussi, comme un pointeur arithmétique, c'est à l'utilisateur de s'assurer les données significatives sont accessibles. -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/operator/pointer-index.bas"}}%%(freebasic) -'' initialize a 5-element array -dim array(4) as integer = { 0, 1, 2, 3, 4 } + {{fbdoc item="ex"}} + %%(freebasic) +'' initialize a 5-element array +Dim array(4) As Integer = { 0, 1, 2, 3, 4 } '' point to the first element -dim p as integer ptr = @array(0) +Dim p As Integer Ptr = @array(0) '' use pointer indexing to output array elements -for index as integer = 0 to 4 - print p[index] -next -%% - - Will give the output, +For index As Integer = 0 To 4 +Print p[index] +Next + %% +Affichera, %%0 1 2 3 4 -%% + + %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpAdd Operator + (Add)]]## + - ##[[KeyPgOpAdd Opérateur + (Addition)]]## + +- ##[[KeyPgOpSubtract Opérateur - (Soustraction)]]## + - [[CatPgOpPoint Pointeur Opérateurs]] - ##[[KeyPgOpSubtract Operator - (Subtract)]]## - [[CatPgOpPoint Pointer Operators]] diff --git a/fbdocs/manual/cache/KeyPgOpPtrMemberAccess.wakka b/fbdocs/manual/cache/KeyPgOpPtrMemberAccess.wakka index 46f1ac3d85..7f403ebc49 100644 --- a/fbdocs/manual/cache/KeyPgOpPtrMemberAccess.wakka +++ b/fbdocs/manual/cache/KeyPgOpPtrMemberAccess.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="Operator -> (Pointer to member access)"}}---- -Returns a reference to a member from a pointer to an object +Renvoie une référence à un membre d'un pointeur vers un objet {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **->** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// [[KeyPgPointer pointer]] ) [[KeyPgAs as]] //U// ## -~&//Note that **##Operator ->## (Pointer to member access)** returns a reference. As of 02.27.07, ""FreeBASIC"" syntax does not support returning references. When it does, this syntax will need to be changed.// +//Notez que **##Opérateur ->## (Accès membre par pointeur)** renvoie une référence. En date du 27/02/07, la syntaxe FreeBASIC ne supporte pas le retour de références. Lorsque c'est le cas, cette syntaxe devra être changée.// {{fbdoc item="usage"}}## //result// = //lhs// **->** //rhs// ## {{fbdoc item="param"}} ##//lhs//## - The address of an object. + L'adresse d'un objet. ##//T//## - A pointer to a user-defined type. + Un pointeur vers un type défini par l'utilisateur. ##//rhs//## - The name of a member to access. + Le nom du membre auquel on accède. ##//U//## - The type that ##//rhs//## refers to. + Le type auquel se réfère ##//rhs//##. -{{fbdoc item="ret"}} - Returns a reference to the member specified by ##//rhs//##. +{{fbdoc item="section" value="Valeur retournée + Renvoie une référence au membre spécifié par ##//rhs//##. {{fbdoc item="desc"}} - **##Operator ->## (Pointer to member access)** returns a reference to a member of an object through a pointer to that object. It has the effect of dereferencing a pointer to an object, then using ##[[KeyPgOpMemberAccess Operator . (Member access)]]##. For example, ##"//p//**->**//member//"## is equivalent to ##"//x//.//member//"##, if //x// is an object of user-defined type and //p// is a pointer to an object of the same type. + L'**##Opérateur ->## (Accès membre par pointeur)** renvoie une référence à un membre d'un objet grâce à un pointeur vers cet objet. Elle a pour effet de déréférencer un pointeur vers un objet, alors utilisez ##[[KeyPgOpMemberAccess Opérateur . (Accès membre)]]##. Par exemple, ##"//p//**->**//member//"## est équivalent à ##"//x//.//member//"##, si //x// est un objet de type défini par l'utilisateur et //p// est un pointeur vers un objet du même type. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour les types définis par l'utilisateur. {{fbdoc item="ex"}} @@ -46,14 +46,14 @@ Sleep %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpMemberAccess Operator . (Member access)]]## - - ##[[KeyPgOpAt Operator @ (Address of)]]## - - ##[[KeyPgOpValueOf Operator * (Value of)]]## + - ##[[KeyPgOpMemberAccess Opérateur . (Accès membre)]]## + - ##[[KeyPgOpAt Opérateur @ (Adresse de)]]## + - ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]## {{fbdoc item="back" value="CatPgOpTypeclass|Type or Class Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpShiftLeft.wakka b/fbdocs/manual/cache/KeyPgOpShiftLeft.wakka index 6eb9b72e72..1ab91adc94 100644 --- a/fbdocs/manual/cache/KeyPgOpShiftLeft.wakka +++ b/fbdocs/manual/cache/KeyPgOpShiftLeft.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Shl (Shift left)"}}---- -Shifts the bits of a numeric expression to the left +Décale vers la gauche les bits d'une expression numérique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Shl** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -12,19 +12,19 @@ Shifts the bits of a numeric expression to the left ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + La valeur de l'opération de décalage. ##//rhs//## - The right-hand side shift expression. + Le nombre de bits de décalage. -{{fbdoc item="ret"}} - Returns the result of ##//lhs//## being shifted left ##//rhs//## number of times. +{{fbdoc item="section" value="Valeur retournée + Retourne le résultat du décalage de ##//rhs//## bits vers la gauche de la valeur ##//lhs//##. {{fbdoc item="desc"}} - **##Operator Shl## (Shift left)** shifts all of the bits in the left-hand side expression (##//lhs//##) left a number of times specified by the right-hand side expression (##//rhs//##). This has the effect of multiplying ##//lhs//## by two for each shift. For example, "##&b0101 **Shl** 1##" returns the binary number ##&b01010##, and "##5 **Shl** 1##" returns ##10##. + L'**##Opérateur Shl## (Décalage vers la gauche)** décale vers la gauche tous les bits de l'expression de gauche (##//lhs//##) un nombre de fois spécifié dans l'expression de droite (##//rhs//##). Cela a pour effet de multiplier ##//lhs//## par deux pour chaque décalage. Par exemple, "##&b0101 **Shl** 1##" retourne le nombre binaire ##&b01010##, et "##5 **Shl** 1##" retourne ##10##. - Neither of the operands are modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/shift-left.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ For i As Integer = 0 To 10 Next i %% -Output: +Affiche: %% 5 0000000000000101 10 0000000000001010 @@ -52,15 +52,15 @@ Output: {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Shl""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Shl**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpCombineShiftLeft Operator Shl= (Shift Left and Assign)]]## - - ##[[KeyPgOpShiftRight Operator Shr (Shift right)]]## + - ##[[KeyPgOpCombineShiftLeft Opérateur Shl= (Décalage à gauche et Affectation)]]## + - ##[[KeyPgOpShiftRight Opérateur Shr (Décalage à droite)]]## - ##[[KeyPgBin Bin]]## - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpShiftRight.wakka b/fbdocs/manual/cache/KeyPgOpShiftRight.wakka index 22624673c2..264364a10f 100644 --- a/fbdocs/manual/cache/KeyPgOpShiftRight.wakka +++ b/fbdocs/manual/cache/KeyPgOpShiftRight.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Shr (Shift right)"}}---- -Shifts the bits of a numeric expression to the right +Décale vers la droite les bits d'une expression numérique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Shr** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -12,21 +12,21 @@ Shifts the bits of a numeric expression to the right ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + La valeur de l'opération de décalage. ##//rhs//## - The right-hand side shift expression. + Le nombre de bits de décalage. -{{fbdoc item="ret"}} - Returns the result of ##//lhs//## being shifted right ##//rhs//## number of times. +{{fbdoc item="section" value="Valeur retournée + Retourne le résultat du décalage de ##//rhs//## bits vers la droite de la valeur ##//lhs//##. {{fbdoc item="desc"}} - **##Operator Shr## (Shift right)** shifts all of the bits in the left-hand side expression (##//lhs//##) right a number of times specified by the right-hand side expression (##//rhs//##). This has the effect of dividing ##//lhs//## by two for each shift. For example, "##&b0101 **Shr** 1##" returns the binary number ##&b010##, and "##5 **Shr** 1##" returns ##2##. + L'**##Opérateur Shr## (Décalage vers la droite)** décale vers la droite tous les bits de l'expression de gauche (##//lhs//##) un nombre de fois spécifié dans l'expression de droite (##//rhs//##). Cela a pour effet de diviser ##//lhs//## par deux pour chaque décalage. Par exemple, "##&b0101 **Shr** 1##" retourne le nombre binaire ##&b010##, et "##5 **Shr** 1##" retourne ##2##. - If the left-hand side expression is signed, the sign bit is copied in the newly created bits on the left after the shift. + Si l'expression de gauche est signée, le bit de signe est copié sur la gauche des bits nouvellement créés après le décalage. - Neither of the operands are modified in any way. + Dans tous les cas, aucun opérande n'est modifié. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/shift-right.bas"}}%%(freebasic) @@ -37,7 +37,7 @@ For i As Integer = 0 To 10 Next i %% -Output: +Affiche: %% 1000 0000001111101000 500 0000000111110100 @@ -53,15 +53,15 @@ Output: %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Shr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Shr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgOpCombineShiftRight Operator Shr= (Shift Right and Assign)]]## - - ##[[KeyPgOpShiftLeft Operator Shl (Shift left)]]## + - ##[[KeyPgOpCombineShiftRight Opérateur Shr= (Décalage à droite et Affectation)]]## + - ##[[KeyPgOpShiftLeft Opérateur Shl (Décalage à gauche)]]## - ##[[KeyPgBin Bin]]## - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpStep.wakka b/fbdocs/manual/cache/KeyPgOpStep.wakka index 49c33c4b86..0ad42988f0 100644 --- a/fbdocs/manual/cache/KeyPgOpStep.wakka +++ b/fbdocs/manual/cache/KeyPgOpStep.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator Step (Iteration)"}}---- -Increments the iterator of a ##[[KeyPgFornext For...Next]]## loop +Incrémente l'itérateur d'une boucle ##[[KeyPgFornext For...Next]]## {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] } //typename// @@ -15,22 +15,22 @@ Increments the iterator of a ##[[KeyPgFornext For...Next]]## loop ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgUnion Union]]## + nom du ##[[KeyPgType Type]]##, de la ##[[KeyPgClass Class]]## ou de l'##[[KeyPgUnion Union]]## ##//stp//##, ##//step_value//## - a ##//typename//## object used as an incremental value + un objet ##//typename//## utilisé comme valeur d'incrémentation ##//iterator//## - a ##//typename//## object used as an iterator + un objet ##//typename//## utilisé comme itérateur ##//end_value//## - a ##//typename//## object used as a loop-terminating value + un objet ##//typename//## utilisé comme valeur de fin de boucle ##//start_value//## - a ##//typename//## object used to copy construct or assign to the iterator initially + un objet ##//typename//## utilisé pour la construction de copie ou pour initialiser l'itérateur {{fbdoc item="desc"}} - ##[[KeyPgOpFor Operator For]]##, ##[[KeyPgOpNext Operator Next]]## and ##**Operator Step**## can be overloaded in user-defined type definitions to allow objects of that type to be used as iterators and step values in ##[[KeyPgFornext For...Next]]## loops. + ##[[KeyPgOpFor Opérateur For]]##, ##[[KeyPgOpNext Opérateur Next]]## et ##**Opérateur Step**## peut être surchargé dans des définitions de type utilisateur pour permettre à des objets de ce type d'être utilisés comme itérateurs et valeurs d'incrémentation dans des boucles ##[[KeyPgFornext For...Next]]##. - ##**Operator Step**## is called to increment the iterator immediately after all statements in the ##[[KeyPgFornext For...Next]]## body are executed, if any. + L'##**Opérateur Step**## est appelé pour incrémenter l'itérateur immédiatement après l'exécution de toutes les déclarations, s'il y en a, de la boucle ##[[KeyPgFornext For...Next]]##. - The first version of ##**Operator Step**## is used if no step value is given in the ##[[KeyPgFornext For...Next]]## statement. If a step value is given, the second version is used and is passed the step value. + La première version d'##**Opérateur Step**## est utilisée si aucune valeur d'incrémentation n'est donnée dans la déclaration ##[[KeyPgFornext For...Next]]##. Si la valeur d'incrémentation est donnée, la seconde version est utilisée et passée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/step.bas"}}%%(freebasic) @@ -74,7 +74,7 @@ For i As T = 10 To 1 Step -1 Print i.value; Next i %% -A more practical example demonstrating file iteration based on [[http://www.freebasic.net/forum/viewtopic.php?p=83564 cha0s' file iteration class]]. +Un exemple plus pratique démontrant l'itération de fichier basé sur [[http://www.freebasic.net/forum/viewtopic.php?p=83564">cha0s' file iteration class]]. {{fbdoc item="filename" value="examples/manual/udt/stepFileIteration.bas"}}%%(freebasic) '' a class which iterates through files type FileIter @@ -109,6 +109,241 @@ For i As FileIter = "./" To "" print i.fileName Next %% +{{fbdoc item="lang"}} +- Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. +{{fbdoc item="see"}} + - ##[[KeyPgOpFor Opérateur For]]## + - ##[[KeyPgOpNext Opérateur Next]]## + + - ##[[KeyPgFornext For...Next]]## + declare operator for ( ) + declare operator step( ) + declare operator next( byref end_cond as CharIterator ) as integer + + '' explicit step versions + declare operator for ( byref step_var as CharIterator ) + declare operator step( byref step_var as CharIterator ) + declare operator next( byref end_cond as CharIterator, byref step_var as CharIterator ) as integer + + '' give the current "value" + declare operator cast( ) as string + + private: + '' data + value as string + + '' This member isn't necessary - we could use + '' the step variable on each iteration - + '' but we choose this method, since we have + '' to compare strings otherwise. See below. + is_up as integer +end type + +constructor CharIterator( byval r as zstring ptr ) + value = *r +end constructor + +operator CharIterator.cast( ) as string + operator = value +end operator + +'' implicit step versions +'' +'' In this example, we interpret implicit step +'' to always mean 'up' +operator CharIterator.for( ) + print "implicit step" +end operator + +operator CharIterator.step( ) + value[0] += 1 +end operator + +operator CharIterator.next( byref end_cond as CharIterator ) as integer + return this.value <= end_cond.value +end operator + +'' explicit step versions +'' +'' In this example, we calculate the direction +'' at FOR, but since the step var is passed to +'' each operator, we have the choice to also calculate +'' it "on-the-fly". For strings such as this, repeated comparison +'' may penalize, but if you're working with simpler types, +'' then you may prefer to avoid the overhead of +'' an 'is_up' variable. +operator CharIterator.for( byref step_var as CharIterator ) + print "explicit step" + is_up = (step_var.value = "up") +end operator + +operator CharIterator.step( byref step_var as CharIterator ) + if( is_up ) then + value[0] += 1 + else + value[0] -= 1 + end if +end operator + +operator CharIterator.next( byref end_cond as CharIterator, byref step_var as CharIterator ) as integer + if( this.is_up ) then + return this.value <= end_cond.value + else + return this.value >= end_cond.value + end if +end operator + +for i as CharIterator = "a" to "z" + print i; " "; +next +print "done" + +for i as CharIterator = "a" to "z" step "up" + print i; " "; +next +print "done" + +for i as CharIterator = "z" to "a" step "down" + print i; " "; +next +print "done" + +for i as CharIterator = "z" to "a" step "up" + print i; " "; +next +print "done" +%% +Iterating with fractions: +{{fbdoc item="filename" value="examples/manual/udt/step-fraction-iterator.bas"}}%%(freebasic) +type fraction + '' Used to build a step var + declare constructor( byval n as integer, byval d as integer ) + + '' Implicit step versions + declare operator for ( ) + declare operator step( ) + declare operator next( byref end_cond as fraction ) as integer + + '' Explicit step versions + declare operator for ( byref step_var as fraction ) + declare operator step( byref step_var as fraction ) + declare operator next( byref end_cond as fraction, byref step_var as fraction ) as integer + + '' Give the current "value" + declare operator cast( ) as double + declare operator cast( ) as string + + private: + as integer num, den +end type + +constructor fraction( byval n as integer, byval d as integer ) + this.num = n : this.den = d +end constructor + +operator fraction.cast( ) as double + operator = num / den +end operator + +operator fraction.cast( ) as string + operator = num & "/" & den +end operator + +'' Some fraction functions +Function gcd( Byval n As Integer, Byval m As Integer ) As Integer + Dim As Integer t + While m <> 0 + t = m + m = n Mod m + n = t + Wend + Return n +End Function + +Function lcd( Byval n As Integer, Byval m As Integer ) As Integer + Return (n * m) / gcd( n, m ) +End Function + +'' +'' Implicit step versions +'' +'' In this example, we interpret implicit step +'' to mean 1 +'' +operator fraction.for( ) + print "implicit step" +end operator + +operator fraction.step( ) + var lowest = lcd( this.den, 1 ) + + var mult_factor = this.den / lowest + dim as fraction step_temp = fraction( 1, 1 ) + + this.num *= mult_factor + this.den *= mult_factor + + step_temp.num *= lowest + step_temp.den *= lowest + + this.num += step_temp.num +end operator + +operator fraction.next( byref end_cond as fraction ) as integer + return this <= end_cond +end operator + +'' +'' Explicit step versions +'' +operator fraction.for( byref step_var as fraction ) + print "explicit step" +end operator + +operator fraction.step( byref step_var as fraction ) + var lowest = lcd( this.den, step_var.den ) + var mult_factor = this.den / lowest + dim as fraction step_temp = step_var + + this.num *= mult_factor + this.den *= mult_factor + + mult_factor = step_temp.den / lowest + + step_temp.num *= mult_factor + step_temp.den *= mult_factor + + this.num += step_temp.num +end operator + +operator fraction.next( byref end_cond as fraction, byref step_var as fraction ) as integer + if(( step_var.num < 0 ) or ( step_var.den < 0 ) ) then + return this >= end_cond + else + return this <= end_cond + end if +end operator + +for i as fraction = fraction(1,1) to fraction(4,1) + print i; " "; +next +print "done" + +for i as fraction = fraction(1,4) to fraction(1,1) step fraction(1,4) + print i; " "; +next +print "done" + +for i as fraction = fraction(4,4) to fraction(1,4) step fraction(-1,4) + print i; " "; +next +print "done" + +for i as fraction = fraction(4,4) to fraction(1,4) + print i; " "; +next +print "done" +%% {{fbdoc item="lang"}} - Only available in the //[[CompilerOptlang -lang fb]]// dialect. diff --git a/fbdocs/manual/cache/KeyPgOpStringIndex.wakka b/fbdocs/manual/cache/KeyPgOpStringIndex.wakka index 8b2e85789d..8c705d2f0b 100644 --- a/fbdocs/manual/cache/KeyPgOpStringIndex.wakka +++ b/fbdocs/manual/cache/KeyPgOpStringIndex.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="Operator [] (String index)"}}---- -Returns a reference to a character in a string +Renvoie une référence à un caractère dans une chaîne {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]] [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgZstring zstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]] [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgWstring wstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] //T// ## -~&//Note that **##Operator {}## (String index)** returns a reference. See [CompilerFAQ Compiler FAQ]].// +//Notez que **##Opérateur [ ]## (Indice de chaîne)** renvoie une référence. Voir [[CompilerFAQ CompilerFAQ]].// {{fbdoc item="usage"}}## //result// = //lhs// **[** //rhs// **]** ## {{fbdoc item="param"}} ##//lhs//## - The string. + La chaîne. ##//rhs//## - A zero-based offset from the first character. + Décalage, basé sur zéro, par rapport au premier caractère. ##//T//## - The wide-character type (varies per platform). + Le type de caractères "larges" (varie selon la plateforme). {{fbdoc item="desc"}} - This operator returns a reference to a specific character in a string: - - This operator must not be used in case of empty string because reference is undefined (inducing runtime error). - - Otherwise, the user must ensure that the index does not exceed the range "[0, ##[[KeyPgLen Len]](//lhs//) - 1##]". Outside this range, results are undefined. + Cet opérateur renvoie une référence à un caractère spécifique dans une chaîne: + - Cet opérateur ne doit pas être utilisé en cas de chaîne vide parce que la référence n'est pas définie (induisant une erreur d'exécution). + - Sinon, l'utilisateur doit s'assurer que l'indice ne dépasse pas la fourchette "[0, ##[[KeyPgLen Len]](//lhs//) - 1##]". En dehors de cette plage, les résultats sont indéfinis. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/stringindex.bas"}}%%(freebasic) @@ -35,15 +35,15 @@ next i print %% -Will print +Affichera %% Hello, world! %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CatPgOpString String Operators]] + - [[CatPgOpString Opérateurs de chaînes]] {{fbdoc item="back" value="CatPgOpIndexing|Indexing Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpStrptr.wakka b/fbdocs/manual/cache/KeyPgOpStrptr.wakka index af7e3e1533..daf02a7f36 100644 --- a/fbdocs/manual/cache/KeyPgOpStrptr.wakka +++ b/fbdocs/manual/cache/KeyPgOpStrptr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator STRPTR (String pointer)"}}---- -Returns the address of a string's character data. +Renvoie l'adresse de données caractère d'une chaîne. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Strptr** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgZstring zstring]] [[KeyPgPtr ptr]] @@ -10,17 +10,17 @@ Returns the address of a string's character data. ## {{fbdoc item="param"}} ##//lhs//## - A string. + Une chaîne. -{{fbdoc item="ret"}} - Returns a ##[[KeyPgZstring Zstring]] [[KeyPgPtr Ptr]]## to a string's character data. +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgZstring ZString]] [[KeyPgPtr Ptr]]## aux données caractères d'une chaîne. {{fbdoc item="desc"}} - This operator returns a ##[[KeyPgZstring Zstring]] [[KeyPgPtr Ptr]]## that points to the beginning of a string's character data. ##**Operator Strptr**## is the proper method for acquiring the address of a string's character data. + Cet retourne une ##[[KeyPgZstring ZString]] [[KeyPgPtr Ptr]]## qui pointe vers le début des données caractères d'une chaîne. ##**Operator Strptr**## est la méthode appropriée pour l'acquisition de l'adresse de données caractères d'une chaîne. - Note that when passed a ##[[KeyPgWstring Wstring]]##, ##**Operator Strptr**## still returns a ##[[KeyPgZstring Zstring]] [[KeyPgPtr Ptr]]##, which may not be the desired result. + Notez que lorsqu'on a passé une ##[[KeyPgWstring WString]]##, ##**Operator Strptr**## renvoie toujours une ##[[KeyPgZstring ZString]] [[KeyPgPtr Ptr]]##, qui peut ne pas être le résultat désiré. - The related ##[[KeyPgOpVarptr Operator Varptr (Variable pointer)]]## and ##[[KeyPgOpAt Operator @ (Address of)]]##, when used with a ##[[KeyPgString String]]##, return the address of the internal string descriptor. + Les opérateurs liés ##[[KeyPgOpVarptr Operator Varptr (Variable pointeur)]]## et ##[[KeyPgOpAt Operator @ (Address Of)]]##, lorsqu'il est utilisé avec une ##[[KeyPgString String]]##, renvoie l'adresse du descripteur de chaîne interne. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/strptr.bas"}}%%(freebasic) @@ -52,7 +52,7 @@ Print %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"", but does exactly the same thing as ##[[KeyPgSadd Sadd]]## + - Nouveau pour FreeBASIC, mais fait exactement la même chose que ##[[KeyPgSadd SAdd]]## {{fbdoc item="see"}} - ##[[KeyPgSadd Sadd]]## diff --git a/fbdocs/manual/cache/KeyPgOpSubtract.wakka b/fbdocs/manual/cache/KeyPgOpSubtract.wakka index 73a8b4eb92..ef87bb07a4 100644 --- a/fbdocs/manual/cache/KeyPgOpSubtract.wakka +++ b/fbdocs/manual/cache/KeyPgOpSubtract.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator - (Subtract)"}}---- -Subtracts two expressions +Soustrait deux expressions {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgByte byte]] @@ -23,23 +23,23 @@ Subtracts two expressions ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression to subtract from. + L'argument de gauche auquel on soustrait ##//rhs//##. ##//rhs//## - The right-hand side expression to subtract. + L'argument de droite à soustraire à ##//lhs//##. ##//T//## Any pointer type. {{fbdoc item="ret"}} - Returns the subtraction of two expressions. + Renvoie le résultat de la soustraction de deux expressions. {{fbdoc item="desc"}} - When the left and right-hand side expressions are numeric values, **##Operator -## (Subtract)** returns the subtraction of the two values. + Lorsque les expressions à gauche et à droite sont des valeurs numériques, **##Operator -## (Soustraction)** retourne le résultat de la soustraction des deux valeurs. - If either the left or right-hand side expressions is of [[KeyPgPointer Pointer]] type, **##Operator -## (Subtract)** performs pointer arithmetic on the address, returning the result. + Si les expressions de droite ou de gauche sont de type [[KeyPgPointer Pointer]], **##Operator -## (Soustraction)** exécute une opération arithmétique pointeur sur l'adresse, et renvoie le résulat. - Neither operand is modified in any way. + Dans tous les cas, aucun opérande n'est modifié - This operator can be overloaded to accept user-defined types. + Cet opérateur peut être surchargé pour accepter les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/subtract.bas"}}%%(freebasic) @@ -48,19 +48,19 @@ n = 4 - 5 PRINT n SLEEP %% - will produce the output: + produira l'affichage: %% -1 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Mathematical Functions]] + - [[CatPgMath Fonctions mathématiques]] {{fbdoc item="back" value="CatPgOpArithmetic|Arithmetic Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpValueOf.wakka b/fbdocs/manual/cache/KeyPgOpValueOf.wakka index ee5a8e1186..e5b92f0a67 100644 --- a/fbdocs/manual/cache/KeyPgOpValueOf.wakka +++ b/fbdocs/manual/cache/KeyPgOpValueOf.wakka @@ -1,29 +1,29 @@ {{fbdoc item="title" value="Operator * (Value of)"}}---- -Dereferences a pointer +Déréférence un pointeur {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] ***** ( [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T// [[KeyPgPointer pointer]] ) [[KeyPgAs as]] //T// ## -~&//Note that **##Operator *## (Value of)** returns a reference. As of 02.27.07, ""FreeBASIC"" syntax does not support returning references. When it does, this syntax will need to be changed.// +//Notez que **##Opérateur *## (Valeur de)** retourne une référence. En date du 27/02/07, la syntaxe FreeBASIC ne supporte pas le retour de références. Lorsque c'est le cas, cette syntaxe devra être changée.// {{fbdoc item="usage"}}## //result// = * //rhs// ## {{fbdoc item="param"}} ##//rhs//## - The address to dereference. + L'adresse à déréférencer. ##//T//## - Any [[CatPgStdDataTypes standard]], [[CatPgUserDefTypes user-defined]] or procedure type. + Tout type [[CatPgStdDataTypes standard]], [[CatPgUserDefTypes défini par l'utilisateur]] ou procédure. -{{fbdoc item="ret"}} - Returns a reference to the value stored at the address ##//rhs//##. +{{fbdoc item="section" value="Valeur retournée + Retourne une référence à une valeur stockée à l'adresse ##//rhs//##. {{fbdoc item="desc"}} - **##Operator *## (Value of)** returns a reference to the value stored at an address, and is often called the dereference operator. The operand is not modified in any way. + **##Opérateur *## (Valeur de)** retourne une référence à une valeur stockée une certaine adresse et est souvent appelé opérateur de déréférencement. L'opérande n'est en aucune manière modifié. - As a reference, the result of this operator can be used on the left-hand side of assignments. + Comme référence, le résultat de cet opérateur peut être utilisé sur le côté gauche d'affectations. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour des types utilisateurs. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/valueof.bas"}}%%(freebasic) @@ -31,30 +31,30 @@ Dereferences a pointer Dim a As Integer Dim pa As Integer Ptr +See also pa=@a 'Here, we use the @ operator to point our integer ptr at 'a'. + ' 'a' is, in this case, a standard integer variable. a=9 'Here we give 'a' a value of 9. Print "The value of 'a' is";*pa 'Here, we display the value of 'a' using a pointer. - *pa = 1 'Here we use our pointer to change the value of 'a' Print "The new value of 'a' is";a 'Here we display the new value of 'a'. %% -Output: +Affiche: %% The value of 'a' is 9 The new value of 'a' is 1 -%% -{{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. +%% + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} - - ##[[KeyPgOpAt Operator @ (Address of)]]## - - [[ProPgPointers Pointers]] +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} + - ##[[KeyPgOpAt Opérateur @ (Adresse de)]]## -{{fbdoc item="back" value="CatPgOpPoint|Pointer Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file +- [[ProPgPointers Pointeurs]] \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpVarptr.wakka b/fbdocs/manual/cache/KeyPgOpVarptr.wakka index cfaece3c18..6ce102d4eb 100644 --- a/fbdocs/manual/cache/KeyPgOpVarptr.wakka +++ b/fbdocs/manual/cache/KeyPgOpVarptr.wakka @@ -1,27 +1,27 @@ {{fbdoc item="title" value="Operator VARPTR (Variable pointer)"}}---- -Returns the address of a variable or object +Renvoie l'adresse d'une variable ou un objet {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Varptr** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// ) [[KeyPgAs as]] //T// [[KeyPgPtr ptr]] ## -{{fbdoc item="syntax"}}## +{{fbdoc item="usage"}}## //result// = **Varptr** ( //lhs// ) ## {{fbdoc item="param"}} ##//lhs//## - A variable or object. + Une variable ou un object. ##//T//## - Any data type. + Un type de données. -{{fbdoc item="ret"}} - Returns the address of a variable or object. +{{fbdoc item="section" value="Valeur retournée + Renvoie l'adresse d'une variable ou un objet. {{fbdoc item="desc"}} - This operator returns the address of its operand. + Cet opérateur renvoie l'adresse de son opérande. - When the operand is of type ##[[KeyPgString String]]##, the address of the internal string descriptor is returned. Use ##[[KeyPgOpStrptr Operator Strptr (String pointer)]]## to retrieve the address of the string data. + Quand l'opérande est de type ##[[KeyPgString String]]##, c'est l'adresse de la chaîne du descripteur interne qui est retournée. Utilisez ##[[KeyPgOpStrptr Opérateur Strptr (Pointeur de chaîne)]]## pour retrouver l'adresse des données chaîne. - The operand cannot be an array, but may be an array element. For example, ##"**Varptr**(myarray(0))"## returns the address of ##"myarray(0)"##. + L'opérande ne peut pas être un tableau, mais peut être un élément d'un tableau. Par example, ##"**VarPtr**(myarray(0))"## retourne l'adresse de ##"myarray(0)"##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/varptr.bas"}}%%(freebasic) @@ -43,7 +43,7 @@ Print Peek( addr ) %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - [[ProPgPointers Pointers]] diff --git a/fbdocs/manual/cache/KeyPgOpXor.wakka b/fbdocs/manual/cache/KeyPgOpXor.wakka index d266ad0095..2a220669c6 100644 --- a/fbdocs/manual/cache/KeyPgOpXor.wakka +++ b/fbdocs/manual/cache/KeyPgOpXor.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Operator XOR (Exclusive Disjunction)"}}---- -Returns the bitwise-xor (exclusive disjunction) of two numeric values +Retourne la manipulation de bits Xor (disjonction exclusive) de deux valeurs numériques {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Xor** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// ) [[KeyPgAs as]] //Ret// @@ -9,31 +9,31 @@ Returns the bitwise-xor (exclusive disjunction) of two numeric values ## {{fbdoc item="param"}} ##//lhs//## - The left-hand side expression. + Le côté gauche de l'expression. ##//T1//## - Any numeric type. + Tout type numérique. ##//rhs//## - The right-hand side expression. + Le côté droit de l'expression. ##//T2//## - Any numeric type. + Tout type numérique. ##//Ret//## - A numeric type (varies with ##//T1//## and ##//T2//##). + Un type numérique (varie avec ##//T1//## et ##//T2//##). -{{fbdoc item="ret"}} - Returns the bitwise-xor of the two operands. +{{fbdoc item="section" value="Valeur retournée + Retourne la manipulation de bits Xor des deux opérandes. {{fbdoc item="desc"}} - This operator returns the bitwise-exclusion of its operands, a logical operation that results in a value with bits set depending on the bits of the operands. + Cet opérateur retourne la manipulation de bits disjonction-exclusive de ses opérandes, une opération logique dont le résultat est une valeur avec ses bits positionnés en fonction des bits de ses opérandes. - The truth table below demonstrates all combinations of a boolean-exclusion operation: + La table de vérité ci-dessous montre toutes les combinaisons de l'opération booléenne de disjonction exclusive: - {{table columns="3" cellpadding="2" cells="Lhs Bit;Rhs Bit;Result;0;0;0;1;0;1;0;1;1;1;1;0"}} + {{table columns="" cellpadding="2" cells="Bit côté gauche;Bit côté droit;Résultat;0;0;0;1;0;1;0;1;1;1;1;0;
    - No short-circuiting is performed - both expressions are always evaluated. + Aucun circuit-court n'est possible - les deux expressions sont toujours évaluées. - The return type depends on the types of values passed. ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte Ubyte]]## and floating-point type values are first converted to ##[[KeyPgInteger Integer]]##. If the left and right-hand side types differ only in signedness, then the return type is the same as the left-hand side type (##//T1//##), otherwise, the larger of the two types is returned. + Le type de retour dépend des types des valeurs passées. Les valeurs de type ##[[KeyPgByte Byte]]##, ##[[KeyPgUbyte UByte]]## et à virgule flottante sont en premier converties en ##[[KeyPgInteger Integer]]##. Si les types des deux côtés diffèrent seulement par leur signe, alors le type de retour est le même que celui du côté gauche (##//T1//##), autrement, le plus large des deux types est retourné. - This operator can be overloaded for user-defined types. + Cet opérateur peut être surchargé pour les types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/operator/xor-bitwise.bas"}}%%(freebasic) @@ -61,12 +61,12 @@ SLEEP %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[TblTruth Operator Truth Tables]] + - [[TblTruth Tables de vérité des opérateurs]] {{fbdoc item="back" value="CatPgOpLogical|Logical Operators"}}{{fbdoc item="back" value="CatPgOperators|Operators"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOpen.wakka b/fbdocs/manual/cache/KeyPgOpen.wakka index dfff4599fc..6d93fc8540 100644 --- a/fbdocs/manual/cache/KeyPgOpen.wakka +++ b/fbdocs/manual/cache/KeyPgOpen.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OPEN"}}---- -Opens a disk file for reading or writing using file operations +Ouvre un fichier sur le disque pour des opérations de lecture/écriture {{fbdoc item="syntax"}}## **Open** //filename// **For** **[[KeyPgInputfilemode Input]]** [//encoding_type//] [//lock_type//] **As** [**#**]//filenumber// @@ -11,56 +11,56 @@ Opens a disk file for reading or writing using file operations ## {{fbdoc item="usage"}}## //result// = **Open** (//filename//, **For** {**[[KeyPgInputfilemode Input]]**|**[[KeyPgOutput Output]]**|**[[KeyPgAppend Append]]**}, **As** //filenumber// ) - ##//or//## + ##//ou//## //result// = **Open** (//filename//, **For** **[[KeyPgBinary Binary]]**, **[[KeyPgAccess Access]]** {**Read**|**Write**}, **As** //filenumber// ) - ##//or//## + ##//ou//## //result// = **Open** (//filename//, **For** **[[KeyPgRandom Random]]**, **[[KeyPgAccess Access]]** {**Read**|**Write**}, **As** //filenumber// [, **Len = ** //record_length//] ) - ##//or//## + ##//ou//## **Open** //filename// **For** {**[[KeyPgInputfilemode Input]]**|**[[KeyPgOutput Output]]**|**[[KeyPgAppend Append]]**} **As** //filenumber// - ##//or//## + ##//ou//## **Open** //filename// **For** **[[KeyPgBinary Binary]]** **[[KeyPgAccess Access]]** {**Read**|**Write**} **As** //filenumber// - ##//or//## + ##//ou//## **Open** //filename// **For** **[[KeyPgRandom Random]]** **[[KeyPgAccess Access]]** {**Read**|**Write**} **As** //filenumber// [**Len = ** //record_length//] ## {{fbdoc item="param"}} ##//filename//## - A string value of the name of the disk file to open. Relative file paths are relative to the current directory (see ##[[KeyPgCurdir Curdir]]##). + Une chaîne de caractères correspondant au nom du fichier à ouvrir sur le disque. les chemins de fichiers relatifs le sont par rapport au répertoire courant (voir ##[[KeyPgCurdir CurDir]]##). ##//encoding_type//## - The encoding to be used when reading or writing text, can be one of: - - ##Encoding "ascii"## //(ASCII encoding is used, default)// - - ##Encoding "utf8"## //(8-bit Unicode encoding is used)// - - ##Encoding "utf16"## //(16-bit Unicode encoding is used)// - - ##Encoding "utf32"## //(32-bit Unicode encoding is used)// + Le codage à utiliser lors de la lecture ou l'écriture du texte: + - ##Encodage "ascii"## //(l'encodage ASCII est utilisé, c'est celui par défaut)// + - ##Encoding "utf8"## //(l'encodage 8-bit Unicode est utilisé)// + - ##Encoding "utf16"## //(l'encodage 16-bit Unicode est utilisé)// + - ##Encoding "utf32"## //(l'encodage 32-bit Unicode est utilisé)// ##//access_type//## - The type of access requested by the calling process. - - ##Access## [##Read##] [##Write##] //(both read and write access can be used, which is the default)// + Le type d'accès demandé par le processus appelant. + - ##Accès ## [##Read##] [##Write##] // (lire et écrire peuvent être utilisés ensemble, c'est la valeur par défaut)// ##//lock_type//## - Imposes restrictions on disk file access from other processes (threads or programs), can be either: - - ##Shared## //(the file can be freely accessed by other processes)// - - ##Lock## [##Read##] [##Write##] //(both read and write access can be denied to other processes)// - ##//filenum//## - An available file number to bind to the disk file, which can be found with ##[[KeyPgFreefile Freefile]]##. + Impose des restrictions sur l'accès aux fichiers disque à partir d'autres processus ("threads" ou programmes): + - ##Shared## //(le fichier peut être librement consulté par d'autres processus)// + - ##Lock## [##Read##] [##Write##] //(l'accès en lecture et écriture peut être refusé à d'autres processus)// + ##//filenumber//## + Un numéro de fichier disponible, qui peut être trouvé avec ##[[KeyPgFreefile FreeFile]]##, pour se lier au fichier sur le disque. ##//record_length//## - The size, in bytes, of each record read from or written to the disk file. The default is 128. + La taille, en octets, de chaque enregistrement lu ou écrit dans le fichier disque. La valeur par défaut est 128. -{{fbdoc item="ret"}} - In the first usage, ##**Open**## returns zero (##0##) on success and a non-zero error code otherwise. +{{fbdoc item="section" value="Valeur retournée + Dans la première utilisation, ##**Open**## retourne zéro (##0##) si succès et une valeur différente de zéro dans les autres cas. {{fbdoc item="desc"}} - Opens a disk file for reading and/or writing. The file number ##//file_num//## is bound to the file on disk, for use in subsequent file operations, such as ##[[KeyPgInputPp Input #]]## and ##[[KeyPgLock Lock]]##. The next available file number can be retrieved with ##[[KeyPgFreefile Freefile]]##. + Ouvre un fichier sur le disque en lecture et/ou en écriture. Le numéro de fichier ##//file_number//## est lié au fichier sur le disque, pour une utilisation dans les opérations ultérieures sur les fichiers, comme ##[[KeyPgInputPp Input #]]## et ##[[KeyPgLock Lock]]##. Le premier numéro de fichier disponible peut être récupéré avec ##[[KeyPgFreefile FreeFile]]##. - The ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]## and ##[[KeyPgAppend Append]]## file modes open disk files for sequential text I/O, useful for reading or writing plain text files. When the ##[[KeyPgInputfilemode Input]]## mode is specified, only reading file operations can be used, like ##[[KeyPgLineinput Line Input #]]## and ##[[KeyPgGetfileio Get #]]##. If the disk file does not exist a runtime error will be thrown. The ##[[KeyPgOutput Output]]## mode specifies that only writing operations can be used, like ##[[KeyPgPrintPp Print #]]## and ##[[KeyPgPutfileio Put #]]##. If the disk file does not exist it is created empty. The ##[[KeyPgAppend Append]]## mode is like the ##[[KeyPgOutput Output]]## mode, except that writing operations will begin at the end of the disk file, if it exists. + Les modes d'ouverture de fichiers ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]## et ##[[KeyPgAppend Append]]## en entrée/sortie séquencielle de texte, sont utiles pour la lecture ou l'écriture de fichiers texte brut. Quand le mode ##[[KeyPgInputfilemode Input]]## est spécifié, seules les opérations de lecture de fichiers sont utilisables, comme ##[[KeyPgLineinput Line Input #]]## et ##[[KeyPgGetfileio Get #]]##. Si le fichier disque n'existe pas une erreur d'exécution sera produite. Quand le mode ##[[KeyPgOutput Output]]## est spécifié, seules les opérations d'écriture de fichiers sont utilisables, comme ##[[KeyPgPrintPp Print #]]## et ##[[KeyPgPutfileio Put #]]##. Si le fichier n'existe pas sur le disque, il est créé vide. Le mode ##[[KeyPgAppend Append]]## est comme le mode ##[[KeyPgOutput Output]]##, sauf que les opérations d'écriture commenceront à la fin du fichier disque, s'il existe. - The ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]## and ##[[KeyPgAppend Append]]## file modes also allow selection of a character encoding to be used when reading from or writing text to the disk file. ASCII or a Unicode encoding may be specified (see the description of the ##//encoding_type//## parameter above). + Les modes d'ouverture de fichiers ##[[KeyPgInputfilemode Input]]##, ##[[KeyPgOutput Output]]## et ##[[KeyPgAppend Append]]## permettent également la sélection d'un codage de caractères à utiliser lors de la lecture ou l'écriture de texte dans le fichier disque. Un codage ASCII ou Unicode peut être spécifié (voir ci-dessus la description du paramètre ##//encoding_type//##). - The ##[[KeyPgBinary Binary]]## and ##[[KeyPgRandom Random]]## file modes open disk files for random-access reading or writing of arbitrary sized binary data. The ##[[KeyPgBinary Binary]]## file mode allows reading and writing of simple data type values, like ##[[KeyPgByte Byte]]## or ##[[KeyPgLongint Longint]]##, using binary read or write operations, like ##[[KeyPgGetfileio Get #]]##. ##[[KeyPgLoc Loc]]## and ##[[KeyPgSeekreturn Seek]]## are among the procedures used for reading and writing to arbitrary locations in the disk file. The ##[[KeyPgRandom Random]]## file mode is similar to ##[[KeyPgBinary Binary]]##, except that file I/O operations always use a constant data size when reading or writing. + Les modes d'ouverture de fichiers ##[[KeyPgBinary Binary]]## et ##[[KeyPgRandom Random]]## permettent un accès aléatoire (random-access) en lecture ou écriture de données binaires de taille arbitraire. Le mode ##[[KeyPgBinary Binary]]## permet la lecture ou l'écriture de valeurs de données de type simple, comme ##[[KeyPgByte Byte (=octet)]]## ou ##[[KeyPgLongint LongInt (=entier long)]]##, en utilisant des opérations de lecture ou d'écriture binaire, comme ##[[KeyPgGetfileio Get #]]##. ##[[KeyPgLoc LOC]]## et ##[[KeyPgSeekreturn Seek]]## sont des méthodes utilisées pour lire et écrire à des emplacements arbitraires dans un fichier disque. Le mode ##[[KeyPgRandom Random]]## est similaire à ##[[KeyPgBinary Binary]]##, sauf que les opérations d'entrée/sortie utilisent toujours une taille constante de données lors d'une lecture ou d'une écriture. - By default, the ##[[KeyPgBinary Binary]]## and ##[[KeyPgRandom Random]]## file modes allow both reading and writing operations on the opened disk file, but this can be changed by specifying an access type (see the description for the ##//access_type//## parameter above). + Par défaut, les modes ##[[KeyPgBinary Binary]]## et ##[[KeyPgRandom Random]]## permettent les deux opérations de lecture et d'écriture sur le fichier ouvert sur le disque, mais cela peut être changé en spécifiant un type d'accès (voir ci-dessus la description pour le paramètre ##//access_type//##). - For any file mode, access to the opened disk file can be restricted or granted to other threads or programs by specifying a lock type (see the description for the ##//lock_type//## parameter above). If no lock type is specified, other threads of the current program can freely open the disk file (##Shared##), while other programs cannot (##Lock Read Write##). ##[[KeyPgLock Lock]]## and ##[[KeyPgUnlock Unlock]]## can be used to temporarily restrict access to parts of a file. + Pour tout mode, l'accès au fichier ouvert sur le disque peut être restreint ou accordé à d'autres "threads" ou des programmes en spécifiant un type de verrou (voir ci-dessus la description pour le paramètre ##//lock_type//##). Si aucun type de verrou n'est spécifié, les autres "threads" du programme actuel peuvent librement ouvrir le fichier sur le disque (##Shared##), tandis que d'autres programmes ne peuvent pas (##Lock Read Write##). ##[[KeyPgLock Lock]]## et ##[[KeyPgUnlock Unlock]]## peut être utilisés pour restreindre provisoirement l'accès à des parties d'un fichier. - The error code returned by ##**Open**## can be checked using ##[[KeyPgErr Err]]## in the next line. The function version of ##**Open**## returns directly the error code as an integer. + Le code d'erreur renvoyé par ##**Open**## peut être vérifié à l'aide de ##[[KeyPgErr Err]]## dans la ligne suivante. La version fonction de ##**Open**## retourne directement le code d'erreur sous forme d'un entier. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/open.bas"}}%%(freebasic) @@ -110,21 +110,22 @@ End If %% {{fbdoc item="target"}} - - Linux requires the ##//filename//## case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes ##/##. Windows uses backward slashes ##\## but it allows for forward slashes . DOS uses backward slashes ##\##. - - On Windows, a file number used in a dynamic link library is not the same as an identical file number used in the main program. File numbers can not be passed or returned and then used between a DLL and an executable. + - Linux nécessite que la casse de la police de ##//filename//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques ##/##. Windows utilise les barres obliques vers l'arrière ##\## mais il permet les barres obliques . DOS utilise les barres obliques inverses ##\##. + - Sous Windows, un numéro de fichier utilisé dans une bibliothèque de liens dynamiques n'est pas le même qu'un numéro de fichier identique utilisé dans le programme principal. Les numéros de dossier ne peut être passés ou renvoyés, puis utilisés entre une DLL et un fichier exécutable. {{fbdoc item="diff"}} - - Using MS-DOS device names to open streams or hardware devices (##"LPT:"##, ##"SCR:"##, etc.) is supported only in the //[[CompilerOptlang -lang qb]]// dialect; for other modes ""FreeBASIC's"" new composite keywords must be used: see ##[[KeyPgOpenCom Open Com]]##, ##[[KeyPgOpenCons Open Cons]]##, ##[[KeyPgOpenErr Open Err]]##, ##[[KeyPgOpenPipe Open Pipe]]##, ##[[KeyPgOpenLpt Open Lpt]]##, ##[[KeyPgOpenScrn Open Scrn]]##. - - ##**Open**## can be called as a procedure that returns an error code. +
  • L'utilisation des noms de périphériques MS-DOS pour ouvrir des flots ou des périphériques (##"LPT:"##, ##"SCR:"##, etc.) est permise seulement dans le dialecte //[[CompilerOptlang -lang qb]]//; pour les autres modes FreeBasic de nouveaux mots-clés composites doivent être utilisés: voir ##[[KeyPgOpenCom Open Com]]##, ##[[KeyPgOpenCons Open Cons]]##, ##[[KeyPgOpenErr Open Err]]##, ##[[KeyPgOpenPipe Open Pipe]]##, ##[[KeyPgOpenLpt Open Lpt]]##, ##[[KeyPgOpenScrn Open Scrn]]##. + - ##**Open**## peut être appelé comme une procédure qui retourne un code d'erreur. {{fbdoc item="lang"}} - - The //[[CompilerOptlang -lang qb]]// dialect supports the old GW-BASIC-style syntax ##OPEN mode_string, #filenum, filename [length]## with mode_string being ##"I"## for input, ##"O"## for output, ##"A"## for append, ##"R"## for random, ##"B"## for binary. + - Le dialecte //[[CompilerOptlang -lang qb]]// permet la syntaxe du style GW-BASIC ##OPEN mode_string, #filenum, filename [length]## avec mode_string qui peut être ##"I"## pour entrée, ##"O"## pour sortie, ##"A"## pour ajout, ##"R"## pour aléatoire (random), ##"B"## pour binaire. {{fbdoc item="see"}} - - ##[[KeyPgErr Err with a list of error codes]]## + - ##[[KeyPgErr Err]]## et [[TblRuntimeErrors Codes des erreurs de fonctionnement]] - ##[[KeyPgClose Close]]## - ##[[KeyPgFreefile Freefile]]## - ##[[KeyPgOpenCons Open Cons]]##, ##[[KeyPgOpenErr Open Err]]##, ##[[KeyPgOpenPipe Open Pipe]]##, ##[[KeyPgOpenLpt Open Lpt]]##, ##[[KeyPgOpenCom Open Com]]##, ##[[KeyPgOpenScrn Open Scrn]]## -{{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgFile|File I/O Functions"}} + diff --git a/fbdocs/manual/cache/KeyPgOpenCom.wakka b/fbdocs/manual/cache/KeyPgOpenCom.wakka index 85724dc978..61a93a8760 100644 --- a/fbdocs/manual/cache/KeyPgOpenCom.wakka +++ b/fbdocs/manual/cache/KeyPgOpenCom.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OPEN COM"}}---- -Opens a serial port for input and output +Ouvre un port série en entrée et sortie {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Open Com** ( byref //options// [[KeyPgAs as]] [[KeyPgString string]], **AS** //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,73 +9,73 @@ Opens a serial port for input and output ## {{fbdoc item="param"}} ##//options//## - A [[KeyPgString string]] containing options used in controlling the port. + A [[KeyPgString String]] contenant les options de contrôle du port. ##//filenum//## - The file number to bind to the port. + Le numéro de fichier à associer au port. -{{fbdoc item="ret"}} - Returns zero (0) on success and a non-zero error code otherwise. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si succès et autrement un code d'erreur différent de zéro. {{fbdoc item="desc"}} - This command opens a serial port of the PC, allowing to send and receive data by using the normal file commands as PRINT #, INPUT#, GET #,... + Cette commande ouvre un port série du PC, ce qui permet d'envoyer et de recevoir des données en utilisant les commandes de fichiers normales comme PRINT #, INPUT #, GET #,... - The main parameter is a [[KeyPgString string]] that describes, at the very least, which communications port to open. It has the format: + Le paramètre principal est une [[KeyPgString String]] qui décrit, à tout le moins, le port de communication à ouvrir. Elle a le format: ##"**COM**//n//**:** [ //baudrate// ][ , [ //parity// ][ , [ //data_bits// ][ , [ //stop_bits// ][ , [ //extended_options// ]]]]]"## - where, + où, ##//n//## - Com port to open. "1", "2", "3", "4", etc. Some platforms will support more serial ports depending on how the operating system is configured. Where ##//n//## is not given, "COM:" will map to "COM1:", except on Linux where "COM:" maps to "/dev/modem" + Port Com à ouvrir. "1", "2", "3", "4", etc. Certaines plates-formes ont plus de ports série selon la façon dont le système d'exploitation est configuré. Si ##//n//## est absent, "COM:" sera "COM1:", sauf sous Linux où "COM:" sera "/dev/modem" ##//baudrate//## - "300" (default), "1200", ..., etc. + "300" (par défaut), "1200", ..., etc. ##//parity//## - "N" (none), "E" (even, default), "O" (odd), "S" (space), "M" (mark), "PE" (QB-quirk: checked, even parity) + "N" (none=aucune), "E" (even=paire, par défaut), "O" (odd=impaire), "S" (space=espace), "M" (mark=marque), "PE" (QB-quirk: checked, even parity) ##//data_bits//## - "5", "6", "7" (default) or "8". + "5", "6", "7" (par défaut) or "8". ##//stop_bits//## - "1", "1.5" or "2". //(default value depends on baud rate and data bits, see table below)// + "1", "1.5" or "2". //(la valeur par défaut dépend de "baud rate" et "data bits", voir table ci-dessous)// - {{table columns="2" cellpadding="2" cells="Condition;Default number of stop bits;baud rate <= 110 and data bits = 5;1.5;baud rate <= 110 and data bits >= 6;2;baud rate > 110;1"}} + {{table columns="" cellpadding="2" cells="Condition;Nombre de bits d'arrêt par défaut;baud rate <= 110 et data bits = 5;1.5;baud rate <= 110 et data bits >= 6;2;baud rate > 110;1;
    ##//extended_options//## - Miscellaneous options. //(See table below)// + Options diverses. //(Voir table ci-dessous)// - {{table columns="2" cellpadding="2" cells="Option;Action;'CSn';Set the CTS duration (in ms) (n>=0), 0 = turn off, default = 1000;'DSn';Set the DSR duration (in ms) (n>=0), 0 = turn off, default = 1000;'CDn';Set the Carrier Detect duration (in ms) (n>=0), 0 = turn off;'OPn';Set the 'Open Timeout' (in ms) (n>=0), 0 = turn off;'TBn';Set the 'Transmit Buffer' size (n>=0), 0 = default, depends on platform;'RBn';Set the 'Receive Buffer' size (n>=0), 0 = default, depends on platform;'RS';Suppress RTS detection;'LF';Communicate in ASCII mode (add LF to every CR) - Win32 doesn't support this one;'ASC';same as 'LF';'BIN';The opposite of LF and it'll always work;'PE';Enable 'Parity' check;'DT';Keep DTR enabled after CLOSE;'FE';Discard invalid character on error;'ME';Ignore all errors;'IRn';IRQ number for COM (only supported (?) on DOS)"}} + {{table columns="" cellpadding="2" cells="Option;Action;'CSn';Établit la durée de CTS (en ms) (n>=0), 0 = arrêter, par défaut = 1000;'DSn';Établit la durée de DSR (en ms) (n>=0), 0 = arrêter, par défaut = 1000;'CDn';Établit la durée de Carrier Detect (en ms) (n>=0), 0 = arrêter;'OPn';Établit 'Open Timeout' (en ms) (n>=0), 0 = arrêter;'TBn';Établit la taille de 'Transmit Buffer' (n>=0), 0 = par défaut, dépend de la plate-forme ;'RBn';Établit la taille de 'Receive Buffer' (n>=0), 0 = par défaut, dépend de la plate-forme;'RS';Supprime la détection de RTS;'LF';Communique en mode ASCII (ajoute LF à chaque CR) - Win32 ne permet pas;'ASC';comme 'LF';'BIN';L'opposé de LF et fonctionnera toujours;'PE';Valide recherche de 'Parity';'DT';Conserve DTR valide après CLOSE;'FE';Rejeter caractère non valide en cas d'erreur;'ME';Ignorer toutes les erreurs;'IRn';numéro d'IRQ pour COM (supporté seulement (?) sous DOS);
    - All items except for the COM port are optional. The order of ##//baudrate//##, ##//parity//##, ##//data_bits//##, ##//stop_bits//## is fixed. Any skipped fixed item ( ##//baudrate//##, etc...) must be empty. + Tous les items sont facultatifs, sauf pour le port COM. L'ordre de ##//baudrate//##, ##//parity//##, ##//data_bits//##, ##//stop_bits//## est fixé. Tout élément fixe sauté ( ##//baudrate//##, etc...) doit être vide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/opencom1.bas"}}%%(freebasic) OPEN COM "COM1:9600,N,,2" as 1 %% - Opens COM1 with 9600 baud, no parity, 7 data bits and 2 stop bits. + Ouvre COM1 avec 9600 baud, no parity, 7 data bits et 2 stop bits. {{fbdoc item="filename" value="examples/manual/fileio/opencom2.bas"}}%%(freebasic) OPEN COM "COM1:115200" as 1 %% - Opens COM1 with 115200 baud, "even" parity, 7 data bits and 1 stop bits. + Ouvre COM1 avec 115200 baud, "even" parity, 7 data bits et 1 stop bits. -{{fbdoc item="target"}} - - On the Windows platform ##"COM:"## maps to ##"COM1:"## - - On the Linux platform - ##"COM:"## maps to ##"/dev/modem"## - ##"COM1:"## maps to ##"/dev/ttyS0"## - ##"COM2:"## maps to ##"/dev/ttyS1"##, etc - ##"/dev/xyz:"## maps to ##"/dev/xyz"##, etc - - The DOS serial driver is experimental and can access COM ports 1 to 4 - It uses the following base io and IRQ's as default: +{{fbdoc item="section" value="Différences de plates-formes + - Sur les plates-formes Windows ##"COM:"## est ##"COM1:"## + - Sur les plates-formes Linux + ##"COM:"## est ##"/dev/modem"## + ##"COM1:"## est ##"/dev/ttyS0"## + ##"COM2:"## est ##"/dev/ttyS1"##, etc + ##"/dev/xyz:"## est ##"/dev/xyz"##, etc +
  • Le pilote série DOS est expérimental et peut accéder aux ports COM 1 à 4 + Il utilise la base suivante I/O et IRQ par défaut: COM1 - &h3f8 - IRQ4 COM2 - &h2f8 - IRQ3 COM3 - &h3e8 - IRQ4 COM4 - &h2e8 - IRQ3 - Since fbc-0.18.4, an alternate IRQ can be specified using the the "IRn" protocol option where "n" is 3 through 7. - Currently not supported: IRQ's on the slave PIC, alternate base I/O addresses, Timeouts and most errors as detected in QB, hardware flow control, FIFO's. - ##"COM:"## maps to ##"COM1:"## + Depuis fbc-0.18.4, une alternative IRQ peut être spécifiée en utilisant l'option du "IRn" protocole où "n" va de 3 à 7. + Á l'heure actuelle pas pris en charge: IRQ sur le PIC esclave, base alternative adresses I / O, Délais d'attente et la plupart des erreurs détectées dans QB, contrôle de flux matériel, FIFO. + ##"COM:"## est ##"COM1:"## {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect the old syntax ##OPEN "COMx:...## is supported. + - dans le dialecte //[[CompilerOptlang -lang qb]]// l'ancienne syntaxe ##OPEN "COMx:...## est admise. {{fbdoc item="diff"}} - - In QB the syntax was ##OPEN "COMx:[baudrate] [,parity, [data_bits, [stop_bits, [extended_options]]]]" FOR INPUT|OUTPUT|RANDOM AS [#] n## - - In QB, only ##"COM1:"## and ##"COM2:"## are supported. In FreeBASIC, any correctly configured serial port may be used. +
  • Dans la syntaxe QB il y avait ##OPEN "COMx:[baudrate] [,parity, [data_bits, [stop_bits, [extended_options]]]]" FOR INPUT|OUTPUT|RANDOM AS [#] n## + - Dans QB, seulement ##"COM1:"## et ##"COM2:"## sont supportés. Dans FreeBASIC, tout port série correctement configuré peut être utilisé. {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgOpenCons.wakka b/fbdocs/manual/cache/KeyPgOpenCons.wakka index 0111f90e47..6e6e69b3b4 100644 --- a/fbdocs/manual/cache/KeyPgOpenCons.wakka +++ b/fbdocs/manual/cache/KeyPgOpenCons.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OPEN CONS"}}---- -Opens the console's standard input (//stdin//) or output (//stdout//) streams for use in file operations. +Ouvre le flux d'entrée (//stdin//) ou de sortie (//stdout//) standard de la console pour une utilisation dans des opérations sur les fichiers. {{fbdoc item="syntax"}}## **Open Cons** **As** [**#**]//filenumber// @@ -13,26 +13,26 @@ Opens the console's standard input (//stdin//) or output (//stdout//) streams fo ## {{fbdoc item="param"}} ##//filenumber//## - An available //file number// to bind to the //stdin// or //stdout// stream, which can be found with ##[[KeyPgFreefile Freefile]]##. + Un //numéro de fichier// disponible pour communiquer avec les flux //stdin// ou //stdout//, qui peut être trouvé avec ##[[KeyPgFreefile FreeFile]]##. -{{fbdoc item="ret"}} - In the first usage, ##**Open Cons**## returns zero (0) on success and a non-zero error code otherwise. +{{fbdoc item="section" value="Valeur retournée + Dans le premier usage, ##**Open Cons**## retourne zéro (0) en cas de succès et sinon un code erreur différent de zéro. {{fbdoc item="desc"}} - ##**Open Cons**## opens the console's //stdin// or //stdout// streams for reading or writing. A //file number// is bound to the stream, which is used in subsequent file operations, such as ##[[KeyPgInputPp Input #]]##. An available //file number// can be retrieved with ##[[KeyPgFreefile Freefile]]##. + ##**Open Cons**## ouvre les flux console //stdin// ou //stdout// pour une opération de lecture ou d'écriture. Un //numéro de fichier// est lié au flux, qui est utilisé dans des opérations de fichier ultérieures, telles que ##[[KeyPgInputPp Input #]]##. Un //numéro de fichier// disponible peut être récupéré avec ##[[KeyPgFreefile FreeFile]]##. - The ##[[KeyPgInputfilemode Input]]## //file mode// opens the //stdin// stream for reading file operations, such as ##[[KeyPgInputPp Line Input #]]##, while the ##[[KeyPgOutput Output]]## //file mode// opens the //stdout// stream for writing file operations, such as ##[[KeyPgPrintPp Print #]]##. The ##[[KeyPgOutput Output]]## //file mode// is the default if not specified. + ##[[KeyPgInputfilemode Input]]## //file mode// ouvre le flux //stdin// pour des opérations de lecture de fichier, comme ##[[KeyPgInputPp Line Input #]]##, alors que ##[[KeyPgOutput Output]]## //file mode// ouvre le flux //stdout// pour des opérations d'écriture de fichier, comme ##[[KeyPgPrintPp Print #]]##. Le //file mode// est ##[[KeyPgOutput Output]]## par défaut s'il n'a pas été spécifié. - The //stdin// and //stdout// streams are the ones used when the calling process' input or output is redirected (piped) by OS commands, or when it is opened with ##[[KeyPgOpenPipe Open Pipe]]##. + Les flux //stdin// et //stdout// sont ceux utilisés lorsque le processus d'appel d'entrée/sortie est redirigé par les commandes du système d'exploitation, ou quand il est ouvert avec ##[[KeyPgOpenPipe Open Pipe]]##. - To open both the //stdin// and //stdout// streams for file operations, a process must use multiple //file numbers//. + Pour ouvrir à la fois //stdin// et //stdout// pour des opérations sur les fichiers, un processus doit utiliser plusieurs //numéros de fichier//s. -**Runtime errors:** - ##**Open Cons**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de fonctionnement:** + ##**Open Cons**## produit l'une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes: - //(##1##) Illegal function call// - - Filenumber was not free at the time. use ##[[KeyPgFreefile Freefile]]## to ensure that filenumber is free. + //(##1##) Illegal function call : Appel illégal de fonction// +
  • //filenumber// n'est pas libre actuellement. Utilisez ##[[KeyPgFreefile FreeFile]]## pour vous assurer que //filenumber// est libre. {{fbdoc item="ex"}} @@ -51,7 +51,7 @@ Sleep %% {{fbdoc item="diff"}} - - In QB the syntax was ##OPEN "CON:" FOR INPUT|OUTPUT AS [#] //filenum//## + - Dans QB la syntaxe est ##OPEN "CON:" FOR INPUT|OUTPUT AS [#] //filenum//## {{fbdoc item="see"}} - ##[[KeyPgOpenScrn Open Scrn]]## diff --git a/fbdocs/manual/cache/KeyPgOpenErr.wakka b/fbdocs/manual/cache/KeyPgOpenErr.wakka index 3195e100be..3d7cf65fa3 100644 --- a/fbdocs/manual/cache/KeyPgOpenErr.wakka +++ b/fbdocs/manual/cache/KeyPgOpenErr.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="OPEN ERR"}}---- -Opens both the standard input (//stdin//) and standard error (//stderr//) streams for file operations. +Ouvre le flux d'entrée standard (//stdin//) et le flux d'erreur standard (//stderr//) pour des opérations sur les fichiers. {{fbdoc item="syntax"}}## **[[KeyPgOpen Open]] Err** [for //mode//] [[KeyPgAs as]] [#]//filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ## {{fbdoc item="usage"}}## **Open Err** [for //mode//] as [#]//filenum// - //or// + //ou// //result// = **Open Err**( [for //mode//] as [#]//filenum// ) ## {{fbdoc item="param"}} ##//mode//## - Ignored. + Ignoré. ##//filenum//## - An unused file number. + Un numéro de fichier inutilisé. -{{fbdoc item="ret"}} - Zero is returned if ##**Open Err**## completed successfully, otherwise a non-zero value is returned to indicate failure. +{{fbdoc item="section" value="Valeur retournée + Zéro est retourné si ##**Open Err**## a fonctionné avec succès, sinon une valeur non nulle est renvoyée pour indiquer un échec. {{fbdoc item="desc"}} - This command opens ##stdin## to read from and ##stderr## to write to the console allowing read and write operations with normal file commands. + Cette commande ouvre ##//stdin//## pour une opération de lecture et ##stderr## pour une opération d'écriture sur la console permettant des opérations de lecture et d'écriture avec des commandes de fichiers normales. - ##stderr## is an output stream different from ##stdout## allowing error messages to be redirected separately from the main console output. + ##//stderr//## est un flux de sortie différent de ##//stdout//## permettant la redirection séparée des messages d'erreur à partir de la sortie principale de la console. - The normal console commands, such as ##[[KeyPgColor Color]]## and ##[[KeyPgLocate Locate]]##, do not work in this mode, because they do not accept a file number. + Les commandes de la console normales, comme ##[[KeyPgColor Color]]## et ##[[KeyPgLocate Locate]]##, ne fonctionnent pas dans ce mode, parce qu'ells n'acceptent pas un numéro de fichier. - The ##[For Input|Output]## ##//mode//## is allowed for compatibility, but is ignored. + Le ##//mode//## ##[For Input|Output]## n'existe que pour la compatibilité, mais il est ignoré. -**Runtime errors:** - ##**Open Err**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de fonctionnement:** + ##**Open Err**## produit l'une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes: - //(##1##) Illegal function call// - - Filenumber was not free at the time. use ##[[KeyPgFreefile Freefile]]## to ensure that filenumber is free. + //(##1##) Illegal function call : Appel illégal de fonction// +
  • //filenumber// n'est pas libre actuellement. Utilisez ##[[KeyPgFreefile FreeFile]]## pour vous assurer que //filenumber// est libre. {{fbdoc item="ex"}} @@ -46,7 +46,7 @@ sleep %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgOpen Open]]## diff --git a/fbdocs/manual/cache/KeyPgOpenLpt.wakka b/fbdocs/manual/cache/KeyPgOpenLpt.wakka index fad28ee0a5..87e4fad751 100644 --- a/fbdocs/manual/cache/KeyPgOpenLpt.wakka +++ b/fbdocs/manual/cache/KeyPgOpenLpt.wakka @@ -1,54 +1,54 @@ {{fbdoc item="title" value="OPEN LPT"}}---- -Open a printer device +Ouvre un périphérique imprimante {{fbdoc item="syntax"}}## **Open Lpt** ["[LPT[x]:][//Printer_Name//][,//TITLE=Doc_Title//][,//EMU=TTY//]"] [For Input|Output] [[KeyPgAs as]] #//filenum// ## {{fbdoc item="usage"}}## **Open Lpt** "LPT..." [[KeyPgAs as]] [#]//filenum// - //or// + //ou// //result// = **Open Lpt**( "LPT..." [[KeyPgAs as]] [#]//filenum// ) ## {{fbdoc item="param"}} ##//x//## - Specifies a port number. If omitted, output is sent to the system print spooler. + Spécifie un numéro de port. S'il est omis, la sortie est envoyée de spooleur d'impression du système. ##//Printer_Name//## - Name of printer to open. This parameter is ignored on DOS. + Nom de l'imprimante à ouvrir. Ce paramètre est ignoré sous DOS. ##//TITLE=Doc_Title//## - Title of the print job as seen by the printer spooler. This parameter is ignored on DOS. + Titre de l'impression comme on le voit sur le spooler d'imprimante. Ce paramètre est ignoré sous DOS. ##//EMU=TTY//## - Emulation of TTY output on a windows GDI printer, using driver text imaging. This parameter is ignored on DOS and Linux. + Emulation de sortie TTY sur une imprimante GDI pour Windows, en utilisant un pilote d'imagerie de texte. Ce paramètre est ignoré sous DOS et Linux. ##For Input|Output## - clause is allowed for compatibility, but it is ignored. + clause pour la compatibilité, mais ignorée. ##//filenum//## - An unused file number to assign to the device. + Un numéro de fichier utilisé pour l'attribuer à l'appareil. -{{fbdoc item="ret"}} - Zero is returned if **Open Lpt** completed successfully, otherwise a non-zero value is returned to indicate failure. +{{fbdoc item="section" value="Valeur retournée + Zéro si succès complet de **Open Lpt**, autrement une valeur différente de zéro pour indiquer un échec. {{fbdoc item="desc"}} - **Open Lpt** opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint Print]]## and ##[[KeyPgPutfileio Put #]]## commands. + **Open Lpt** ouvre une connexion avec un périphérique d'impression. La connexion est traitée comme un fichier, afin que les données puissent être écrites à l'imprimante à l'aide des commandes ##[[KeyPgPrint Print]]## et ##[[KeyPgPutfileio Put #]]##. - Any printer attached to the system may be opened with **Open Lpt** + Toute imprimante reliée au système peut être ouverte avec **Open Lpt** - ##**Open Lpt** "LPT:" ...## will try to open the default printer on Windows and Linux, and "LPT1:" on DOS. + ##**Open Lpt** "LPT:" ...## va essayer d'ouvrir l'imprimante par défaut sur Windows et Linux, et "LPT1:" sous DOS. - ##[[KeyPgLprint Lprint]]## will automatically try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS. + ##[[KeyPgLprint LPrint]]## va automatiquement essayez d'ouvrir l'imprimante par défaut sur Windows et Linux, et "LPT1:" sous DOS. -Platform specific notes: +Notes spécifiques aux plates-formes: - ==Windows== - The argument EMU=TTY assumes printable ASCII or Unicode text, and applies printer driver text imaging to the input. EMU=TTY also allows the usage of CR, LF, BS, TAB, FF, etc., for virtual print-head movement...even when the printer is a GDI printer and therefore doesn't itself understand these special characters. If ",EMU=TTY" is omitted, the data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Other useful emulation modes aren't supported yet. + **Windows** + L'argument EMU=TTY suppose imprimables les textes ASCII ou Unicode, et applique un pilote d'imagerie de texte à l'imprimante pour la sortie. EMU=TTY permet aussi l'usage de CR, LF, BS, TAB, FF, etc., pour le mouvement de tête d'impression virtuelle...même si l'imprimante est une imprimante GDI et par conséquent ne comprend pas ces caractères spéciaux. Si ",EMU=TTY" est omis, les données doivent être envoyées dans le langage de l'imprimante (ESC/P, HPGL, PostScript, etc...). Les autres modes d'émulation utiles ne sont pas encore pris en charge. - ==Linux== - A printer spooler available through ##lp## must be installed to access printers by name or a default printer. Spooler access was tested only with CUPS, but other spoolers may work that are invoked through ##lp##. Port are zero based on linux. ##"LPT1:"## corresponds with ##"/dev/lp0"##. + **Linux** + Un spooleur d'imprimante disponible par le biais de ##lp## doit être installé pour accéder aux imprimantes par leur nom ou à une imprimante par défaut. L'accès au spooleur a été testé uniquement avec CUPS, mais d'autres spoolers peuvent travailler s'ils sont invoqués par ##lp##. Les ports sont basés sur zéro sous Linux. ##"LPT1:"## correspond à ##"/dev/lp0"##. - The data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Emulation modes aren't supported yet. + Les données doivent être envoyées dans le langage de l'imprimante (ESC/P, HPGL, PostScript, etc...). Les modes d'émulation ne sont pas encore pris en charge. - ==DOS== - FreeBASIC does not support print spoolers on DOS. Printers must be accessible through ##"LPTx:"##. + **DOS** + FreeBASIC ne supporte pas les spooleurs d'impression sous DOS. Les imprimantes sont accessible par le biais de ##"LPTx:"##. - The data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Emulation modes aren't supported yet. + Les données doivent être envoyées dans le langage de l'imprimante (ESC/P, HPGL, PostScript, etc...). Les modes d'émulation ne sont pas encore pris en charge. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/openlpt1.bas"}}%%(freebasic) @@ -105,7 +105,7 @@ Print "Printing Completed!" %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect the old syntax is supported OPEN "LPT:..." . This syntax used in the other dialects will open a regular file. + - Dans le dialecte //[[CompilerOptlang -lang qb]]// l'ancienne syntaxe est supportée OPEN "LPT:..." . Cette syntaxe utilisée dans les autres dialectes ouvrira un fichier régulier. {{fbdoc item="see"}} - ##[[KeyPgLprint Lprint]]## diff --git a/fbdocs/manual/cache/KeyPgOpenPipe.wakka b/fbdocs/manual/cache/KeyPgOpenPipe.wakka index b7b5af0d2b..caffb18314 100644 --- a/fbdocs/manual/cache/KeyPgOpenPipe.wakka +++ b/fbdocs/manual/cache/KeyPgOpenPipe.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OPEN PIPE"}}---- -Opens an external process' standard input (//stdin//) or output (//stdout//) stream for file operations. +Ouvre un processus externe de flux d'entrée (//stdin//) ou de sortie (//stdout//) pour des opérations sur les fichier. {{fbdoc item="syntax"}}## **Open Pipe** //shell_command// **For** **[[KeyPgInputfilemode Input]]** **As** [**#**]//filenumber// @@ -8,57 +8,63 @@ Opens an external process' standard input (//stdin//) or output (//stdout//) str ## {{fbdoc item="usage"}}## //result// = **Open Pipe**( //command//, **For** {**[[KeyPgInputfilemode Input]]**|**[[KeyPgOutput Output]]**}, **As** //filenumber// ) - ##//or,//## + ##//ou,//## //result// = **Open Pipe**( //command//, **For** **[[KeyPgBinary Binary]]**, //access_type//, **As** //filenumber// ) - ##//(or in the QB-like syntax,)//## + ##//(ou dans la syntaxe QB-like,)//## **Open Pipe** //filename// **For** {**[[KeyPgInputfilemode Input]]**|**[[KeyPgOutput Output]]**} **As** //filenumber// - ##//(or,)//## + ##//(ou,)//## **Open Pipe** //filename// **For** **[[KeyPgBinary Binary]]** //access_type// **As** //filenumber// ## {{fbdoc item="param"}} ##//shell_command//## - The external process to execute in the operating system command shell. Relative file paths are relative to the current directory (see ##[[KeyPgCurdir Curdir]]##). When opening a pipe for a process that requires double quotes in either its executable path, or its arguments, the entire pipe string should be nested inside of double quotes. + Le processus externe à exécuter dans le //shell// de commande du système d'exploitation. Les chemins relatifs de fichiers sont relatifs au répertoire courant (voir ##[[KeyPgCurdir CurDir]]##). Lors de l'ouverture d'un //pipe// pour un processus qui exige des guillemets doubles dans le chemin de son exécutable ou de ses arguments, la chaîne complète du //pipe// doit être imbriquée à l'intérieur de guillemets doubles. ##//access_type//## - The type of read or write access requested by the calling process. - - ##[[KeyPgAccess Access]]## {##Read##|##Write##} //(either the //stdin// or //stdout// stream of the external process can be opened)// + Le type d'accès en lecture ou écriture demandé par le processus appelant. + - ##[[KeyPgAccess Access]]## {##Read##|##Write##} (le flux //stdin// ou //stdout// du processus externe sera ouvert) ##//filenumber//## - An available file number to bind to the external process' //stdin// or //stdout// stream. + Un numéro de fichier disponible pour se lier au flux //stdin// ou //stdout// du processus externe. {{fbdoc item="ret"}} - In the first usage, ##**Open Pipe**## returns zero (0) on success and a non-zero error code otherwise. + Dans la première utilisation, ##**Open Pipe**## retourne zéro (0) si succès et sinon un code d'erreur différent de zéro. {{fbdoc item="desc"}} - ##**Open Pipe**## executes another process in the command shell and opens either its //stdin// or //stdout// streams for reading or writing. A //file number// is bound to the stream, which is used in subsequent file operations, such as ##[[KeyPgInputPp Input #]]##. An available ##//filenumber//## can be retrieved with ##[[KeyPgFreefile Freefile]]##. If the external process does not exist, a runtime error is thrown. + ##**Open Pipe**## exécute un autre processus dans le //shell// de commande et ouvre l'un des deux flux //stdin// ou //stdout// pour une lecture ou une écriture. Un //filenumber (= numéro de fichier)// est lié au flux et est utilisé dans les opérations de fichier ultérieures, telles que ##[[KeyPgInputPp Input #]]##. Un ##//filenumber (= numéro de fichier)//## utilisable peut être déterminé avec ##[[KeyPgFreefile FreeFile]]##. Si le processus externe n'existe pas, une erreur d'exécution est émise. - The ##[[KeyPgInputfilemode Input]]## and ##[[KeyPgOutput Output]]## //file modes// open the external process' //stdin// and //stdout// streams, respectively, for sequential text I/O, useful for reading or writing plain text. Characters, words or whole lines can then be read or written using text-mode file operations, such as ##[[KeyPgLineinput Line Input #]]## and ##[[KeyPgPrintPp Print #]]##. + Les ## //file modes// ##[[KeyPgInputfilemode Input]]## et ##[[KeyPgOutput Output]]## ouvrent, respectivement, les flux //stdin// et //stdout// du processus externe, pour une entrée/sortie texte, très utile pour la lecture ou l'écriture du texte brut. Les caractères, les mots ou lignes de caractères peuvent ensuite être lus ou écrits à l'aide des opérations en mode texte sur les fichiers, commme ##[[KeyPgLineinput Line Input #]]## et ##[[KeyPgPrintPp Print #]]##. - The ##[[KeyPgBinary Binary]]## //file mode// opens the external process' //stdin// or //stdout// streams - depending on the //access type// specified (see description of the ##//access_type//## parameter above) - for random-access reading or writing of arbitrarily sized and interpreted raw data. Simple data type values, like ##[[KeyPgByte Byte]]## and ##[[KeyPgLongint Longint]]##, and whole chunks of memory can be read from or written to the streams with binary-mode file operations like ##[[KeyPgGetfileio Get #]]## and ##[[KeyPgPutfileio Put #]]##. - Bidirectional pipes are not supported by FB and must be implemented using the OS' API functions. -{{fbdoc item="target"}} - - The ##[[KeyPgBinary Binary]]## //file mode// is not supported on all platforms; ##**Open Pipe**## will throw an error if it is unable to open the external process' //stdin// or //stdout// streams in binary mode. - - - -**Runtime errors:** - ##**Open Pipe**## throws one of the following [[ProPgErrorHandling runtime errors]]: + Le //file mode// ##[[KeyPgBinary Binary]]## ouvre les flux //stdin// ou //stdout// du processus externe - en fonction de l'//access type (= type d'accès)// spécifié (voir plus loin la description du paramètre ##//access_type//##) - pour des accès-aléatoires (random-access) en lecture ou écriture de données brutes de taille arbitraire. Des valeurs de données de types simples, comme ##[[KeyPgByte Byte]]## et ##[[KeyPgLongint LongInt]]##, et des pans entiers de la mémoire peuvent être lus ou écrits sur les flux avec des opérations de fichier en mode binaire comme ##[[KeyPgGetfileio Get #]]## et ##[[KeyPgPutfileio Put #]]##. + Les //pipes// bidirectionnels ne sont pas supportés par FB et doivent être implémentés en utilisant les fonctions API de l'OS. - //(##1##) Illegal function call// - - Filenumber was not free at the time. use ##[[KeyPgFreefile Freefile]]## to ensure that filenumber is free. +{{fbdoc item="target"}} + - Le //file mode// ##[[KeyPgBinary Binary]]## n'est pas supporté par toutes les plates-formes; ##**Open Pipe**## produira une erreur s'il ne peut pas ouvrir les flux //stdin// ou //stdout// du processus externe en mode binaire. + **Erreurs de fonctionnement:** + ##**Open Pipe**## produit l'une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes: +//(##1##) Illegal function call : Appel illégal de fonction// +
  • //filenumber// n'est pas libre actuellement. Utilisez ##[[KeyPgFreefile FreeFile]]## pour vous assurer que //filenumber// est libre. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/fileio/openpipe.bas"}}%%(freebasic) -dim text as string -open pipe "fbc.exe" for input as #1 -print "Output of fbc:" -do while not eof(1) - line input #1, text - print text -loop -close #1 -%% +#ifdef __FB_UNIX__ +Dim text As String +Open Pipe "fbc.exe" For Input As #1 +Print "Output of fbc:" +Do While Not EOF(1) +Line Input #1, text + +Print text +Loop + Close #1 + %% {{fbdoc item="diff"}} + +- Nouveau pour FreeBASIC +{{fbdoc item="see"}} + +- ##[[KeyPgOpenCons Open Cons]]## + - ##[[KeyPgOpenErr Open Err]]## + +- ##[[KeyPgFreefile FreeFile]]## - New to ""FreeBASIC"" {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgOpenScrn.wakka b/fbdocs/manual/cache/KeyPgOpenScrn.wakka index 6bb91a1702..c0b31c273a 100644 --- a/fbdocs/manual/cache/KeyPgOpenScrn.wakka +++ b/fbdocs/manual/cache/KeyPgOpenScrn.wakka @@ -1,42 +1,42 @@ {{fbdoc item="title" value="OPEN SCRN"}}---- -Opens the console directly for input and output as a file +Ouvre la console directement pour des opérations d'entrée ou de sortie comme pour un fichier {{fbdoc item="syntax"}}## **[[KeyPgOpen Open]] Scrn** [for //mode//] [[KeyPgAs as]] [#]//filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ## {{fbdoc item="usage"}}## **Open Scrn** [for //mode//] as [#]//filenum// - //or// + //ou// //result// = **Open Scrn**( [for //mode//] as [#]//filenum// ) ## {{fbdoc item="param"}} ##//mode//## - Either ##[[KeyPgInputfilemode Input]]## or ##[[KeyPgOutput Output]]##. If omitted, ##[[KeyPgOutput Output]]## is assumed. + Soit ##[[KeyPgInputfilemode Input]]## ou ##[[KeyPgOutput Output]]##. Si omis, ##[[KeyPgOutput Output]]## est utilisé. ##//filenum//## - An unused file number. + Un numéro de fichier inutilisé. -{{fbdoc item="ret"}} - Zero is returned if ##**Open Err**## completed successfully, otherwise a non-zero value is returned to indicate failure. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro si ##**Open Err**## s'acheve avec succès, sinon une valeur non nulle est renvoyée pour indiquer un échec. {{fbdoc item="desc"}} - This command opens the console for both input and output as a file, allowing to read/write from/to it with normal file commands. + Cette commande ouvre la console en entrée ou sortie comme pour un fichier, permettant de lire/écrire à partir de/vers celle-ci à l'aide des commandes normales d'accès fichier. - This command may use direct access to the console for speed in some implementations, so it should not be used when the input / output is required to be redirected or piped with OS commands. + Cette commande peut utiliser l'accès direct à la console pour plus de vitesse dans certaines implémentations, elle ne doit pas être utilisée lorsque l'entrée/sortie doit être redirigée ou //pipe// par des commandes OS. - The normal console commands, such as ##[[KeyPgColor Color]]## and ##[[KeyPgLocate Locate]]##, do not work in this mode, because they do not accept a file number. + Les commandes normales de la console, comme ##[[KeyPgColor Color]]## et ##[[KeyPgLocate Locate]]##, ne fonctionnent pas dans ce mode, parce qu'elles n'acceptent pas un numéro de fichier. - The ##[For Input|Output]## clause is allowed for compatibility, but is ignored. + La clause ##[For Input|Output]## existe pour la compatibilité, mais elle est ignorée. - ##//filenum//## is an unused file number. + ##//filenum//## est un numéro de fichier inutilisé. - An unused file number can be found using ##[[KeyPgFreefile FreeFile]]##. + Un numéro de fichier inutilisé peut être trouvé en utilisant ##[[KeyPgFreefile FreeFile]]##. -**Runtime errors:** - ##**Open Cons**## throws one of the following [[ProPgErrorHandling runtime errors]]: +**Erreurs de fonctionnement:** + ##**Open Cons**## produit l'une des [[ProPgErrorHandling erreurs de fonctionnement]] suivantes: - //(##1##) Illegal function call// - - Filenumber was not free at the time. use ##[[KeyPgFreefile Freefile]]## to ensure that filenumber is free. + //(##1##) Illegal function call : Appel illégal de fonction// +
  • //filenumber// n'est pas libre actuellement. Utilisez ##[[KeyPgFreefile FreeFile]]## pour vous assurer que //filenumber// est libre. @@ -52,7 +52,7 @@ sleep %% {{fbdoc item="diff"}} - - QB used OPEN "SCRN:" ... + - QB utilise OPEN "SCRN:" ... {{fbdoc item="see"}} - ##[[KeyPgOpenCons Open Cons]]## diff --git a/fbdocs/manual/cache/KeyPgOperator.wakka b/fbdocs/manual/cache/KeyPgOperator.wakka index d9a2fdb05f..b6d57550e2 100644 --- a/fbdocs/manual/cache/KeyPgOperator.wakka +++ b/fbdocs/manual/cache/KeyPgOperator.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OPERATOR"}}---- -Declares or defines an overloaded operator. +Déclare ou définit un opérateur surchargé. {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] | [[KeyPgUnion Union]] | [[KeyPgEnum Enum]] } //typename// @@ -34,30 +34,30 @@ Declares or defines an overloaded operator. ## {{fbdoc item="param"}} ##//typename//## - Name of the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgUnion Union]]##, or ##[[KeyPgEnum Enum]]##. + Nom de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgUnion Union]]## ou ##[[KeyPgEnum Enum]]##. ##//assignment_op//## ##let += -= *= /= \= mod= shl= shr= and= or= xor= imp= eqv= ^=## ##//unary_op//## - ##""-"" not @ * -> abs sgn fix frac int exp log sin asin cos acos tan atn## + ##- not @ * -> abs sgn fix frac int exp log sin asin cos acos tan atn## ##//binary_op//## ##+ - * / \ mod shl shr and or xor imp eqv ^ = <> < > <= >= andalso orelse## {{fbdoc item="desc"}} - The built in operators like ##=##, ##+##, and ##cast## have predefined behaviors when used in expressions. These operators can be overloaded to do something other than predefined operations when at least one of the arguments to the operator is a ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgEnum Enum]]##, or ##[[KeyPgUnion Union]]## data type. + Les opérateurs intégrés comme ##=##, ##+## et ##cast## ont des comportements prédéfinis lorsqu'ils sont utilisés dans des expressions. Ces opérateurs peuvent être surchargés pour faire autre chose que ces opérations prédéfinies lorsqu'au moins l'un des arguments de l'opérateur est un type de données ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, ##[[KeyPgEnum Enum]]## ou ##[[KeyPgUnion Union]]##. - Operators are just functions. The operator '+' has functionality like ##Function Plus( A as DataType, B as DataType ) as DataType##. See //[[ProPgOperatorOverloading Operator Overloading]]// for more information. Operators can be overloaded to accept different data types as parameters. Only the ##[[KeyPgCast Cast]]## Operator can be overloaded to return different types. + Les opérateurs sont juste des fonctions. L'opérateur '+' a les fonctionnalités de la fonction ##Function Plus( A as DataType, B as DataType ) as DataType##. Voir //[[ProPgOperatorOverloading Surcharge d'opérateur]]// pour plus d'informations. Les opérateurs peuvent être surchargés pour accepter différents types de données en tant que paramètres. Seul l'opérateur ##[[KeyPgCast Cast]]## peut être surchargé pour retourner différents types. - Non-static operator members are declared inside the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. Global operators are declared outside. All operator definitions (procedure bodies) must appear outside. + Les membres opérateur non-statiques sont déclarés à l'intérieur de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. Les opérateurs globaux sont déclarés en dehors. Toutes les définitions de l'opérateur (corps de procédure) doivent apparaître en dehors. - ##**Let**##, ##**Cast**##, and other assignment operators must be declared inside the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. They are passed a hidden ##[[KeyPgThis this]]## parameter and have a return data type same as the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they are declared in. + ##**Let**##, ##**Cast**## et autres opérateurs d'affectation doivent être déclarés à l'intérieur de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. Ils transmettent un paramètre caché ##[[KeyPgThis This]]## et ont une valeur de retour du même type de données que le ##[[KeyPgType Type]]## ou la ##[[KeyPgClass Class]]## où ils ont été déclarés. - Unary operators must be declared outside the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgEnum Enum]]## and have a return data type explicitly declared. Unary operators can be overloaded to return any valid data type, except for ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]## which must return a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## data type. + Les opérateurs unaires doit être déclarés en dehors de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]## ou ##[[KeyPgEnum Enum]]## et ont un type de données de retour déclaré explicitement. Les opérateurs unaires peuvent être surchargés pour retourner tout type valide de données, sauf pour ##[[KeyPgOpPtrMemberAccess Operator -> (Pointeur vers Accès membre)]]## qui doit retourner un type de données ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. - Binary operators must be declared outside the ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]##, or ##[[KeyPgEnum Enum]]## and have a return data type explicitly declared. Binary operators can be overloaded with valid data types, except for relational operators, which must return ##[[KeyPgInteger Integer]]##. + Les opérateurs binaires doivent être déclarés en dehors de ##[[KeyPgType Type]]##, ##[[KeyPgClass Class]]## ou ##[[KeyPgEnum Enum]]## et ont un type de données de retour explicitement déclaré. Les opérateurs binaires peuvent être surchargés avec des types valides de données, sauf pour les opérateurs relationnels, qui doivent retourner ##[[KeyPgInteger Integer]]##. - ##[[KeyPgLet Let]]## refers to the assignment operator, as in ##LET a=b##. The ##[[KeyPgLet Let]]## keyword is omitted in common practice, and is not allowed in the //[[CompilerOptlang -lang fb]]// dialect. However, ##[[KeyPgOpLetlist Let()]]## can be used to assign the fields of a UDT to multiple variables. + ##[[KeyPgLet Let]]## se réfère à l'opérateur d'affectation, comme dans ##LET a=b##. Le mot-clé ##[[KeyPgLet Let]]## est omis dans la pratique courante et n'est pas autorisé en dialecte //[[CompilerOptlang -lang fb]]//. Toutefois, ##[[KeyPgOpLetlist Let()]]## peut être utilisé pour affecter des champs d'un type de données utilisateur à des variables multiples. - See ##[[KeyPgOpFor For]]##, ##[[KeyPgOpStep Step]]##, and ##[[KeyPgOpNext Next]]## for more information on overloading the ##[[KeyPgFornext For..Next]]## statement for use with user defined types. + Voir ##[[KeyPgOpFor For]]##, ##[[KeyPgOpStep Step]]## et ##[[KeyPgOpNext Next]]## pour plus d'informations sur la surcharge de la déclaration ##[[KeyPgFornext For..Next]]## pour une utilisation avec des types définis par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/operator.bas"}}%%(freebasic) @@ -87,7 +87,7 @@ Print "b = "; b Print "a + b = "; a + b %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## diff --git a/fbdocs/manual/cache/KeyPgOption.wakka b/fbdocs/manual/cache/KeyPgOption.wakka index 163e968a5e..b4dc388f07 100644 --- a/fbdocs/manual/cache/KeyPgOption.wakka +++ b/fbdocs/manual/cache/KeyPgOption.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="OPTION()"}}---- -Specifies additional attributes and/or characteristics of symbols. +Spécifie des attributs et/ou des caractéristiques additionnels de symboles. {{fbdoc item="syntax"}}## **Option**( "//literal-text//" ) ## {{fbdoc item="param"}} ##//literal-text//## - The literal text specifying the option. See description. + Le texte littéral spécifiant l'option. Voir description. {{fbdoc item="desc"}} - ##**Option()**## allows the programmer to specify additional attributes or characteristics. Enclosing the string into quotes and parentheses is required in the syntax. Unrecognized options are ignored. + ##**Option()**## permet au programmeur de préciser des attributs ou caractéristiques supplémentaires. Dans cette syntaxe la chaîne doit être encadrée par des guillemets ("). Les options inconnues seront ignorées. - ##**Option**## can also be used as a statement to specify other compile time options. See [[CatPgCompilerSwitches Compiler Switches]]. + ##**Option**## peut également être utilisé comme instruction pour préciser d'autres options de compilation. Voir [[CatPgCompilerSwitches Commutateurs du compilateur]]. - Individual options are explained below. + Les options individuelles sont expliquées ci-dessous. -{{fbdoc item="subsect" value="SSE"}} - ##**Option("SSE")**## indicates that a floating point value (##[[KeyPgSingle Single]]## or ##[[KeyPgDouble Double]]##) returned from a function is stored in the ##xmm0## register. ##[[KeyPgOption Option("SSE")]]## is ignored unless the source is compiled with the [[CompilerOptfpu -fpu SSE]] command line option. This option may be used immediately after the return type in a function declaration or function definition. This option is an optimization only and not required to compile programs using the [[CompilerOptfpu -fpu SSE]] command line option. +{{fbdoc item="section" value="SSE + ##**Option("SSE")**## indique qu'une valeur à virgule flottante (##[[KeyPgSingle Single]]## ou ##[[KeyPgDouble Double]]##) retournée par une fonction est chargée dans le registre ##xmm0##. ##[[KeyPgOption Option("Sse")]]## est ignorée tant que le code source n'est pas compilé avec l'option de ligne de commande [[CompilerOptfpu -fpu SSE]]. Cette option peut être utilisée immédiatement après le retour dans une déclaration de fonction ou une définition de fonction. Cette option est une optimisation et n'est pas requise pour compiler des programmes utilisant l'option de ligne de commande [[CompilerOptfpu -fpu SSE]]. %%(freebasic) declare function ValueInXmm0 () as double option("sse") %% -{{fbdoc item="subsect" value="FPU"}} - ##**Option("FPU")**## indicates that a floating point value (##[[KeyPgSingle Single]]## or ##[[KeyPgDouble Double]]##) returned from a function is stored in the ##st(0)## register. This option may be used immediately after the return type in a function declaration or function definition. +{{fbdoc item="section" value="FPU + ##**Option("FPU")**## indique qu'une valeur à virgule flottante (##[[KeyPgSingle Single]]## ou ##[[KeyPgDouble Double]]##) retournée par une fonction est chargée dans le registre ##st(0)##. Cette option peut être utilisée immédiatement après le retour dans une déclaration de fonction ou une définition de fonction. %%(freebasic) declare function ValueInStZero () as double option("fpu") %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - [[CompilerOptfpu Compiler Option: -fpu]] - - [[CatPgCompilerSwitches Compiler Switches]] + - [[CompilerOptfpu Option du compilateur : -fpu]] + - [[CatPgCompilerSwitches Commutateurs du compilateur]] {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOptionbase.wakka b/fbdocs/manual/cache/KeyPgOptionbase.wakka index 7108e89eb4..04628d6174 100644 --- a/fbdocs/manual/cache/KeyPgOptionbase.wakka +++ b/fbdocs/manual/cache/KeyPgOptionbase.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="OPTION BASE"}}---- -Specifies a default lower bound for array declarations +Spécifie une limite inférieure par défaut pour les déclarations de tableau {{fbdoc item="syntax"}}## **Option Base** //base_subscript// ## {{fbdoc item="param"}} ##//base_subscript//## - an numeric literal value + une valeur numérique littérale {{fbdoc item="desc"}} - ##**Option Base**## is a statement that sets the default lower bound for any following array declarations. This default remains in effect for the rest of the module in which ##**Option Base**## is used, and can be overridden by declaring arrays with an explicit lower bound, or with another ##**Option Base**## statement. + ##**Option Base**## est une déclaration qui positionne la limite inférieure par défaut de toutes déclarations de tableau qui suivront. Cette valeur par défaut reste en vigueur pour le reste du module dans lequel ##**Option Base**## est utilisé, et peut être annulé en déclarant des tableaux avec une limite inférieure explicite, ou avec une autre déclaration ##**Option Base**##. - Note: initially, the default base is ##0##. + Note: initialement, la base par défaut est ##0##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/check/KeyPgOptionbase_1.bas"}}%%(freebasic) @@ -28,13 +28,13 @@ Dim baz(0 To 4) As Integer ' declares an array with indices 0-4 %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. - - In //[[CompilerOptlang -lang fb]]//, ##**Option Base**## is not allowed, and the default lower bound is always ##0##. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. + - Dans //[[CompilerOptlang -lang fb]]//, ##**Option Base**## n'est pas permis et la limite inférieure par défaut est toujours ##0##. {{fbdoc item="diff"}} - - QBASIC only supported values of ##0## or ##1## for ##//base_subscript//##. - - In QBASIC the word ##**Base**## was a reserved keyword, and couldn't be used as a variable name. - - Arrays must always be explicitly created in ""FreeBASIC"". QBASIC would implicitly create an array from ##//base_subscript//## to ##10## if one was used in code without being predefined. + - QBASIC ne supporte que les valeurs ##0## ou ##1## pour ##//base_subscript//##. + - En QBASIC ##**Base**## est un mot-clef réservé et ne peut être utilisé comme nom de variable. + - En FreeBASIC les tableaux doivent être créés explicitement. QBASIC créera implicitement un tableau à partir de ##//base_subscript//## à ##10## si un a été utilisé dans le code sans être prédéfini. {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/KeyPgOptionbyval.wakka b/fbdocs/manual/cache/KeyPgOptionbyval.wakka index d996cc8345..3b518351c9 100644 --- a/fbdocs/manual/cache/KeyPgOptionbyval.wakka +++ b/fbdocs/manual/cache/KeyPgOptionbyval.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="OPTION BYVAL"}}---- -Specifies parameters are to be passed by value by default in procedure declarations +Spécifie les paramètres qui doivent être passés par valeur par défaut dans les déclarations de procédure {{fbdoc item="syntax"}}## **Option Byval** ## {{fbdoc item="desc"}} - ##**Option Byval**## is a statement that sets the default passing convention for procedure parameters to //by value//, as if declared with ##[[KeyPgByval Byval]]##. This default remains in effect for the rest of the module in which ##**Option Byval**## is used, and can be overridden by specifying ##[[KeyPgByref Byref]]## in parameter lists. + ##**Option ByVal**## est une instruction qui fixe la valeur par défaut de la convention de passage pour les paramètres des procédures à //by value (par valeur)//, comme s'ils avaient été déclarés avec ##[[KeyPgByval ByVal]]##. Ceci reste en vigueur pour tout le reste du module dans lequel ##**Option ByVal**## est utilisé, et peut être annulé en spécifiant ##[[KeyPgByref ByRef]]## dans les liste de paramètres. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/switches/option-byval.bas"}}%%(freebasic) @@ -38,10 +38,10 @@ Print %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptionbyval __FB_OPTION_BYVAL__]]## diff --git a/fbdocs/manual/cache/KeyPgOptiondynamic.wakka b/fbdocs/manual/cache/KeyPgOptiondynamic.wakka index 5114cb0c10..e0aa435680 100644 --- a/fbdocs/manual/cache/KeyPgOptiondynamic.wakka +++ b/fbdocs/manual/cache/KeyPgOptiondynamic.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="OPTION DYNAMIC"}}---- -Specifies variable-length array declarations +Spécifie un tableau de longueur-variable {{fbdoc item="syntax"}}## **Option Dynamic** ## {{fbdoc item="desc"}} - ##**Option Dynamic**## is a statement that specifies that any following array declarations are variable-length, whether they are declared with constant subscript ranges or not. This remains in effect for the rest of the module in which ##**Option Dynamic**## is used, and can be overridden with ##[[KeyPgOptionstatic Option Static]]##. + ##**Option Dynamic**## est une déclaration qui précise que toutes les déclarations tableau suivantes sont de longueur variable, qu'elles aient été déclarées avec un intervalle d'indices constant ou non. Ceci demeure en vigueur pour le reste du module dans lequel ##**Option Dynamic**## est utilisé, et peut être modifié avec l'##[[KeyPgOptionstatic Option Static]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/switches/option-dynamic.bas"}}%%(freebasic) @@ -22,16 +22,17 @@ Dim bar(99) As Integer ' declares a variable-length array ReDim bar(199) As Integer ' resize the array %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptiondynamic __FB_OPTION_DYNAMIC__]]## - [[KeyPgMetaDynamic $Dynamic]] - ##[[KeyPgOptionstatic Option Static]]## - ##[[KeyPgDim Dim]]## + - ##[[KeyPgRedim ReDim]]## - ##[[KeyPgRedim Redim]]## {{fbdoc item="back" value="CatPgArray|Array Functions"}}{{fbdoc item="back" value="CatPgCompilerSwitches|Compiler Switches"}}{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOptionescape.wakka b/fbdocs/manual/cache/KeyPgOptionescape.wakka index e693830242..23773075cd 100644 --- a/fbdocs/manual/cache/KeyPgOptionescape.wakka +++ b/fbdocs/manual/cache/KeyPgOptionescape.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="OPTION ESCAPE"}}---- -Specifies that string literals should be processed for C-like escape sequences by default +Indique que les chaînes littérales doivent être compilées avec des séquences d'échappement de type C par défaut {{fbdoc item="syntax"}}## **Option Escape** ## {{fbdoc item="desc"}} - ##**Option Escape**## is a statement that causes string literals to be processed for C-like escape sequences by default. Normally, escape sequences have no effect in string literals unless the string is prefixed with the [[KeyPgOpPpEscape ! operator (Escaped String Literal)]]. This default remains in effect for the rest of the module in which ##**Option Escape**## is used, and can be overridden by prefixing string literals with the [[KeyPgOpPpNoescape $ operator (Non-Escaped String Literal)]]. + ##**Option Escape**## est une déclaration qui oblige le traitement des chaînes littérales à être compilées avec des séquences d'échappement de type C par défaut. Normalement, les séquences d'échappementsont sont sans effet sur les chaînes littérales sauf si la chaîne est préfixée avec l'[[KeyPgOpPpEscape Opérateur ! (Echappement chaîne littérale)]]. Ceci reste en vigueur pour tout le reste du module dans lequel ##**Option Escape**## est utilisé, et peut être annulé en préfixant les chaînes littérales avec l'[[KeyPgOpPpNoescape Opérateur $ (Non-Echappement chaîne littérale)]]. - See [[ProPgLiterals Literals]] in the Programmer's Guide to learn more about escape sequences. + Voir [[ProPgLiterals Les littéraux]] dans le Guide du programmeur pour en savoir plus sur les séquences d'échappement. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/switches/option-escape.bas"}}%%(freebasic) + %%(freebasic) '' Compile with the "-lang fblite" compiler switch #lang "fblite" @@ -27,15 +27,15 @@ printf("%d * %d = %d\r\n", a, b, a * b) %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptionescape __FB_OPTION_ESCAPE__]]## - - [[KeyPgOpPpEscape Operator ! (Escaped String Literal)]] - - [[KeyPgOpPpNoescape Operator $ (Non-Escaped String Literal)]] - - [[ProPgLiterals Literals]] + - [[KeyPgOpPpEscape Operator ! (Chaîne littérale avec séquences d'échappement)]] + - [[KeyPgOpPpNoescape Operator $ (Chaîne littérale sans séquences d'échappement)]] + - [[ProPgLiterals Les littéraux]] {{fbdoc item="back" value="CatPgCompilerSwitches|Compiler Switches"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOptionexplicit.wakka b/fbdocs/manual/cache/KeyPgOptionexplicit.wakka index d8f4d4410c..04676076d3 100644 --- a/fbdocs/manual/cache/KeyPgOptionexplicit.wakka +++ b/fbdocs/manual/cache/KeyPgOptionexplicit.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="OPTION EXPLICIT"}}---- -Forces variables, objects and arrays to be declared before they are used +Force variables, objets et tableaux à être déclarés avant leur utilisation {{fbdoc item="syntax"}}## **Option Explicit** ## {{fbdoc item="desc"}} - ##**Option Explicit**## is a statement that forces any following variable, object or array usage to be preceded by a declaration, with, for example, ##[[KeyPgDim Dim]]## or ##[[KeyPgStatic Static]]##. This rule remains in effect for the rest of the module in which ##**Option Explicit**## is used, and cannot be overridden. + ##**Option Explicit**## est une déclaration qui force toute variable, tout objet ou tableau qui suit à être précédé par une déclaration avant usage, avec, par exemple, ##[[KeyPgDim Dim]]## ou ##[[KeyPgStatic Static]]##. Cette règle reste en vigueur pour tout le reste du module dans lequel ##**Option Explicit**## est utilisé et ne peut être annulée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/switches/option-explicit.bas"}}%%(freebasic) @@ -20,10 +20,10 @@ a = 1 ' ..or this statement will fail to compile. %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - -New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptionexplicit __FB_OPTION_EXPLICIT__]]## diff --git a/fbdocs/manual/cache/KeyPgOptiongosub.wakka b/fbdocs/manual/cache/KeyPgOptiongosub.wakka index 092d0fc151..1b6c173d92 100644 --- a/fbdocs/manual/cache/KeyPgOptiongosub.wakka +++ b/fbdocs/manual/cache/KeyPgOptiongosub.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="OPTION GOSUB"}}---- -Enables support for ##[[KeyPgGosub Gosub]]## and ##[[KeyPgOngosub On Gosub]]##. +Active le support de ##[[KeyPgGosub GoSub]]## et ##[[KeyPgOngosub On Gosub]]##. {{fbdoc item="syntax"}}## **Option Gosub** ## {{fbdoc item="desc"}} - ##**Option Gosub**## enables support for ##[[KeyPgGosub Gosub]]## and ##[[KeyPgReturn Return]]## (from gosub). + ##**Option Gosub**## active le support de ##[[KeyPgGosub GoSub]]## et ##[[KeyPgReturn Return]]## (depuis gosub). - Because ##[[KeyPgReturn Return]]## could mean return-from-gosub or return-from-procedure, ##**Option Gosub**## and ##[[KeyPgOptionnogosub Option Nogosub]]## can be used to enable and disable ##[[KeyPgGosub Gosub]]## support. When ##[[KeyPgGosub Gosub]]## support is disabled, ##[[KeyPgReturn Return]]## is then recognized as return-from-procedure. + Parce que ##[[KeyPgReturn Return]]## pourrait signifier retour-de-gosub ou retour-de-procédure, ##**Option Gosub**## et ##[[KeyPgOptionnogosub Option Nogosub]]## peuvent être utilisés pour activer et désactiver le support de ##[[KeyPgGosub GoSub]]##. Quand le support de ##[[KeyPgGosub GoSub]]## est désactivé, ##[[KeyPgReturn Return]]## est alors reconnu comme retour-de-procédure. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/switches/option-gosub.bas"}}%%(freebasic) + %%(freebasic) '' Compile with the "-lang fblite" compiler switch #lang "fblite" @@ -29,10 +29,10 @@ there: %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptiongosub __FB_OPTION_GOSUB__]]## diff --git a/fbdocs/manual/cache/KeyPgOptionnogosub.wakka b/fbdocs/manual/cache/KeyPgOptionnogosub.wakka index deeb8b10ac..145c8cfa6d 100644 --- a/fbdocs/manual/cache/KeyPgOptionnogosub.wakka +++ b/fbdocs/manual/cache/KeyPgOptionnogosub.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="OPTION NOGOSUB"}}---- -Disables support for ##[[KeyPgGosub Gosub]]## and ##[[KeyPgOngosub On Gosub]]##. +Désactive le support de ##[[KeyPgGosub GoSub]]## et ##[[KeyPgOngosub On Gosub]]##. {{fbdoc item="syntax"}}## **Option Nogosub** ## {{fbdoc item="desc"}} - ##**Option Nogosub**## disables support for ##[[KeyPgGosub Gosub]]## and ##[[KeyPgReturn Return]]## (from gosub). + ##**Option Nogosub**## désactive le support de ##[[KeyPgGosub GoSub]]## et ##[[KeyPgReturn Return]]## (depuis gosub). - Because ##[[KeyPgReturn Return]]## could mean return-from-gosub or return-from-procedure, ##[[KeyPgOptiongosub Option Gosub]]## and ##**Option Nogosub**## can be used to enable and disable ##[[KeyPgGosub Gosub]]## support. When ##[[KeyPgGosub Gosub]]## support is disabled, ##[[KeyPgReturn Return]]## is then recognized as return-from-procedure. + Parce que ##[[KeyPgReturn Return]]## pourrait signifier retour-de-gosub ou retour-de-procédure, ##[[KeyPgOptiongosub Option Gosub]]## et ##**Option Nogosub**## peuvent être utilisés pour activer et désactiver le support de ##[[KeyPgGosub GoSub]]##. Quand le support de ##[[KeyPgGosub GoSub]]## est désactivé, ##[[KeyPgReturn Return]]## est alors reconnu comme retour-de-procédure. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/switches/option-nogosub.bas"}}%%(freebasic) + %%(freebasic) '' Compile with the "-lang qb" compiler switch '$lang: "qb" @@ -26,10 +26,10 @@ Print foo %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptiongosub __FB_OPTION_GOSUB__]]## diff --git a/fbdocs/manual/cache/KeyPgOptionnokeyword.wakka b/fbdocs/manual/cache/KeyPgOptionnokeyword.wakka index 317f925543..3e30434dbd 100644 --- a/fbdocs/manual/cache/KeyPgOptionnokeyword.wakka +++ b/fbdocs/manual/cache/KeyPgOptionnokeyword.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="OPTION NOKEYWORD"}}---- -"Undefines" a reserved keyword +Annule la définition d'un mot-clé réservé {{fbdoc item="syntax"}}## **Option Nokeyword** //keyword// ## {{fbdoc item="param"}} ##//keyword//## - the keyword to undefine + le mot-clé dont on annule la définition {{fbdoc item="desc"}} - ##**Option Nokeyword**## is a statement that undefines a ""FreeBASIC"" reserved keyword, meaning it can be used as an identifier for a variable, object, procedure or any other symbol. The keyword is undefined for the rest of the module in which ##**Option Nokeyword**## is used. + ##**Option NoKeyword**## est une déclaration qui annule la définition d'un mot-clé réservé du FreeBASIC, ce qui signifie qu'il peut être utilisé comme un identifiant d'une variable, d'un objet, d'une procédure ou de tout autre symbole. La définition du mot-clé n'est plus définie pour le reste du module dans lequel ##**Option NoKeyword**## est utilisé. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/switches/option-nokeyword.bas"}}%%(freebasic) + %%(freebasic) '' Compile with the "-lang fblite" compiler switch #lang "fblite" @@ -24,10 +24,10 @@ Dim Int As Integer ' declare a variable with the name 'int' %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPpundef #undef]]## diff --git a/fbdocs/manual/cache/KeyPgOptionprivate.wakka b/fbdocs/manual/cache/KeyPgOptionprivate.wakka index 75a1af2b2f..8690b0a322 100644 --- a/fbdocs/manual/cache/KeyPgOptionprivate.wakka +++ b/fbdocs/manual/cache/KeyPgOptionprivate.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="OPTION PRIVATE"}}---- -Specifies internal linkage by default for procedure declarations +Spécifie la liaison interne par défaut pour les déclarations de procédure {{fbdoc item="syntax"}}## **Option Private** ## {{fbdoc item="desc"}} - ##**Option Private**## is a statement that gives any following procedure declarations internal linkage by default, as if declared with ##[[KeyPgPrivate Private]]##. This default remains in effect for the rest of the module in which ##**Option Private**## is used, and can be overridden by declaring procedures with ##[[KeyPgPublic Public]]##. + ##**Option Private**## est une déclaration qui donne à toutes les déclarations de procédure suivantes une liaison interne par défaut, comme si elles étaient déclarées avec ##[[KeyPgPrivate Private]]##. Ceci reste en vigueur pour le reste du module dans lequel ##**Option Private**## est utilisé et ne peut être annulé qu'en déclarant les procédures avec ##[[KeyPgPublic Public]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/switches/option-private.bas"}}%%(freebasic) @@ -28,10 +28,10 @@ Public Sub AnotherProcWithExternalLinkage() End Sub %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDdfboptionprivate __FB_OPTION_PRIVATE__]]## diff --git a/fbdocs/manual/cache/KeyPgOptionstatic.wakka b/fbdocs/manual/cache/KeyPgOptionstatic.wakka index ad958b3986..acafc74671 100644 --- a/fbdocs/manual/cache/KeyPgOptionstatic.wakka +++ b/fbdocs/manual/cache/KeyPgOptionstatic.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="OPTION STATIC"}}---- -Reverts to default array declaration behavior +Revient au comportement par défaut de déclaration de tableau {{fbdoc item="syntax"}}## **Option Static** ## {{fbdoc item="desc"}} - ##**Option Static**## is a statement that overrides the behavior of ##[[KeyPgOptiondynamic Option Dynamic]]##, that is, arrays declared with constant subscript ranges are fixed-length. This remains in effect for the rest of the module in which ##**Option Static**## is used, and can be overridden with ##[[KeyPgOptiondynamic Option Dynamic]]##. + ##**Option Static**## annule le comportement de ##[[KeyPgOptiondynamic Option Dynamic]]##, c'est à dire que les tableaux déclarés avec une gamme d'indices constante sont de longueur fixe. Ceci demeure en vigueur pour le reste du module dans lequel ##**Option Static**## est utilisé et peut être modifié avec ##[[KeyPgOptiondynamic Option Dynamic]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/switches/option-static.bas"}}%%(freebasic) @@ -15,24 +15,25 @@ Reverts to default array declaration behavior Option Dynamic -Dim foo(100) As Integer ' declares a variable-length array +Dim foo(100) As Integer ' declares a variable-length array Option Static -Dim bar(100) As Integer ' declares a fixed-length array +Dim bar(100) As Integer ' declares a fixed-length array %% -{{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. +{{fbdoc item="lang"}} + - Disponible seulement dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgMetaDynamic $Dynamic]]## - ##[[KeyPgDim Dim]]## - ##[[KeyPgErase Erase]]## - - ##[[KeyPgRedim Redim]]## + - ##[[KeyPgRedim ReDim]]## + - ##[[KeyPgOptiondynamic Option Dynamic]]## - ##[[KeyPgOptiondynamic Option Dynamic]]## {{fbdoc item="back" value="CatPgArray|Array Functions"}}{{fbdoc item="back" value="CatPgCompilerSwitches|Compiler Switches"}}{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOrGfx.wakka b/fbdocs/manual/cache/KeyPgOrGfx.wakka index c6312c5c00..3e3f133b33 100644 --- a/fbdocs/manual/cache/KeyPgOrGfx.wakka +++ b/fbdocs/manual/cache/KeyPgOrGfx.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="OR"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which uses a bit-wise ##[[KeyPgOpOr Or]]## as the blitting method +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui utilise la manipulation de bits ##[[KeyPgOpOr Or]]## comme méthode de transformation image {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Or** ## {{fbdoc item="param"}} ##**Or**## - Required. + Obligatoire. {{fbdoc item="desc"}} - The ##**Or**## method combines each source pixel with the corresponding destination pixel, using the bit-wise ##[[KeyPgOpOr Or]]## function. The result of this is output as the destination pixel. - This method works in all graphics modes. There is no mask color, although color values of ##0## (##[[KeyPgRgba RGBA]](0, 0, 0, 0)## in full-color modes) will have no effect, because of the behavior of ##[[KeyPgOpOr Or]]##. + La méthode ##**Or**## combine chaque pixel source avec chaque pixel correspondant de la destination, en utilisant la fonction de manipulation de bits ##[[KeyPgOpOr Or]]##. Le résultat est renvoyé comme pixel destination. + Cette méthode fonctionne dans tous les modes graphiques. Il n'y a pas de masque de couleur, donc les valeurs de couleur de ##0## (##[[KeyPgRgba RGBA]](0, 0, 0, 0)## en modes pleine couleur) n'auront aucun effet, en raison du comportement de ##[[KeyPgOpOr Or]]##. - In full-color modes, each component (red, green, blue and alpha) is kept in a discrete set of bits, so the operation can be made to only affect some of the channels, by making sure the all the values of the other channels are set to ##0##. + En mode pleine couleur, chaque composante (rouge, vert, bleu et alpha) est conservée dans un ensemble discret de bits, ainsi l'opération peut affecter seulement certains canaux, en s'assurant que toutes les valeurs des autres canaux sont mises à ##0##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/put-or.bas"}}%%(freebasic) -''open a graphics window +''Ouvre une fenetre graphique ScreenRes 320, 200, 16 -''create 3 sprites containing red, green and blue circles +''Cree 3 sprites contenant cercles rouges, verts et bleus Const As Integer r = 32 dim as any ptr cr, cg, cb cr = ImageCreate(r * 2 + 1, r * 2 + 1, RGBA(0, 0, 0, 0)) @@ -29,26 +29,26 @@ Circle cr, (r, r), r, RGB(255, 0, 0), , , 1, f Circle cg, (r, r), r, RGB(0, 255, 0), , , 1, f Circle cb, (r, r), r, RGB(0, 0, 255), , , 1, f -''put the sprite at three different multipier -''levels, overlapping each other in the middle +''Put le sprite avec trois niveaux multiplieur +''differents, se recouvrant dans le milieu Put (146 - r, 108 - r), cr, or Put (174 - r, 108 - r), cg, or Put (160 - r, 84 - r), cb, or -''free the memory used by the sprites +''Libere la memoire utilisee par les sprites ImageDestroy cr ImageDestroy cg ImageDestroy cb -''pause the program before closing +''Pause du programme avant fermeture Sleep %% -{{image class="center" title="Put Or example output" url="/images/put-or.png"}} +
    {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgOpOr Or]]## - - ##[[KeyPgPutgraphics Put (Graphics)]]## + - ##[[KeyPgPutgraphics Put (Graphique)]]## {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOut.wakka b/fbdocs/manual/cache/KeyPgOut.wakka index bcecb937c4..dc589163e6 100644 --- a/fbdocs/manual/cache/KeyPgOut.wakka +++ b/fbdocs/manual/cache/KeyPgOut.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="OUT"}}---- -Outputs a value to a hardware port. +Envoie une valeur sur un port "hardware". {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Out** ( [[KeyPgByval byval]] //port// [[KeyPgAs as]] [[KeyPgUshort ushort]] , [[KeyPgByval byval]] //data// [[KeyPgAs as]] [[KeyPgUbyte ubyte]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,12 +9,12 @@ Outputs a value to a hardware port. ## {{fbdoc item="param"}} ##//port//## - Hardware port to write to. + Port hardware sur lequel écrire. ##//data//## - Data value to write. + Donnée à écrire. {{fbdoc item="desc"}} - This function sends ##//value//## to ##//port//## and returns immediately. + Cette fonction envoie ##//value//## sur ##//port//## et retourne immédiatement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/hardware/out.bas"}}%%(freebasic) @@ -41,12 +41,12 @@ Sound(784, 60) 'G5 Sound(880, 60) 'A5 Sound(988, 60) 'B5 Sound(1046, 60) 'C6 -%% +%% -{{fbdoc item="target"}} - - In the Windows and Linux versions three port numbers (&H3C7, &H3C8, &H3C9) are hooked by the graphics library when a graphics mode is in use to emulate QB's VGA palette handling. This use is deprecated; use ##[[KeyPgPalette Palette]]## to retrieve and set palette colors. +{{fbdoc item="section" value="Différences de plates-formes + - Dans les versions Windows et Linux trois numéros de port (&H3C7, &H3C8, &H3C9) sont réservés par la librairie graphique quand un mode graphique est utilisé pour émuler une palette VGA QB. Cette utilisation est obsolète; utilisez ##[[KeyPgPalette Palette]]## pour récupérer ou valider une palette de couleurs. - - Using true port access in the Windows version requires the program to install a device driver for the present session. For that reason, Windows executables using hardware port access should be run with administrator permits each time the computer is restarted. Further runs don't require admin rights as they just use the already installed driver. The driver is only 3K in size and is embedded in the executable. + - L'utilisation d'un accès "true port" dans la version Windows implique que le programme installe un "driver" de "device" pour la session en cours. Pour cette raison, les exécutables Windows utilisant un accès port "hardware" doivent être lancés avec des permissions administrateur pour chaque redémarrage de l'ordinateur. Les lancements ultérieurs n'auront pas besoin de ces droits car il ne font qu'utiliser le driver déjà installé. Le driver n'a qu'une taille de 3K et est intégré dans l'exécutable. {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgOutput.wakka b/fbdocs/manual/cache/KeyPgOutput.wakka index a22e149fa1..8259134600 100644 --- a/fbdocs/manual/cache/KeyPgOutput.wakka +++ b/fbdocs/manual/cache/KeyPgOutput.wakka @@ -1,40 +1,40 @@ {{fbdoc item="title" value="OUTPUT"}}---- -Specifies text file to be opened for output mode +Spécifie un fichier texte à ouvrir en sortie {{fbdoc item="syntax"}}## [[KeyPgOpen open]] //filename// for **Output** [[[KeyPgEncoding encoding]] //encoding_type//] [[[KeyPgLock lock]] //lock_type//] as [#]//filenum// ## {{fbdoc item="param"}} ##//filename//## - file name to open for output + nom du fichier à ouvrir en sortie ##//encoding_type//## - indicates encoding type for the file + indique le codage du fichier ##//lock_type//## - locking to be used while the file is open + verrouillage à utiliser lorsque le fichier est ouvert ##//filenum//## - unused file number to associate with the open file + numéro de fichier inutilisé pour l'associer au fichier ouvert {{fbdoc item="desc"}} - A file mode used with ##[[KeyPgOpen Open]]## to open a text file for writing. + Un mode fichier utilisé avec ##[[KeyPgOpen Open]]## pour ouvrir un fichier texte en écriture. - This mode is used to write text with ##[[KeyPgPrintPp Print #]]##, or comma separated values with ##[[KeyPgWrite Write #]]##. + Ce mode est utilisé pour écrire un texte avec ##[[KeyPgPrintPp Print #]]##, ou des valeurs séparées par des virgules avec ##[[KeyPgWrite Write #]]##. - Text files can't be simultaneously read and written in ""FreeBASIC"", so if both functions are required on the same file, it must be opened twice. + Les fichiers texte ne peuvent pas être simultanément en lecture et en écriture dans FreeBASIC, donc si les deux fonctions sont nécessaires sur le même fichier, il doit être ouvert deux fois. - ##//filename//## must be a string expression resulting in a legal file name in the target OS, without wildcards. The file will be sought for in the present directory, unless the ##//filename//## contains a path . If the file does not exist, it is created. The pointer is set at the first character of the file. + ##//filename//## doit être une expression chaîne correspondant à un nom de fichier compatible avec le système cible, sans jokers de remplacement. Le fichier sera recherché dans le répertoire courant, sauf si ##//filename//## contient un chemin. Si le fichier n'existe pas, il est créé. Le pointeur est placé sur le premier caractère du fichier. - ##//Encoding_type//## indicates the Unicode ##[[KeyPgEncoding Encoding]]## of the file, so characters are correctly read. If omitted, "ascii" encoding is defaulted. Only little endian character encodings are supported at the moment. - -##"utf8"## - -##"utf16"## - -##"utf32"## - -##"ascii"## (the default) + ##//Encoding_type//## indique le ##[[KeyPgEncoding Encoding (=codage)]]## Unicode du fichier, ainsi les caractères sont lus correctement. Si omis, le codage "ascii" est utilisé par défaut. Seuls les caractères codés "little endian" sont supportés pour le moment. +
  • ##"utf8"## +
  • ##"utf16"## +
  • ##"utf32"## +
  • ##"ascii"## (par défaut) - ##//Lock_type//## indicates the way the file is locked for other processes, it is one of: - - ##**Read**## - the file can be opened simultaneously by other processes, but not for reading - - ##**Write**## - the file can be opened simultaneously by other processes, but not for writing - - ##**Read Write**## - the file cannot be opened simultaneously by other processes (the default) + ##//Lock_type//## indique la façon dont le fichier est verrouillé pour d'autres processus: + - ##**Read**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas pour la lecture + - ##**Write**## - le fichier peut être ouvert simultanément par d'autres processus, mais pas en écriture + - ##**Read Write**## -le fichier ne peut pas être ouvert simultanément par d'autres processus (par défaut) - ##//filenum//## Is a valid FreeBASIC file number (in the range ##1..255##) not being used for any other file presently open. The file number identifies the file for the rest of file operations. A free file number can be found using the ##[[KeyPgFreefile Freefile]]## function. + ##//filenum//## est un numéro FreeBASIC valide de fichier (dans la plage ##1..255##) qui n'est pas utilisé par un autre fichier actuellement ouvert. Le numéro de fichier identifie le fichier pour le reste des opérations de fichiers. Un numéro de fichier libre peut être trouvé en utilisant la fonction ##[[KeyPgFreefile FreeFile]]##. {{fbdoc item="ex"}} @@ -72,7 +72,7 @@ Print "Your age is: " + Str(age_ubyte) {{fbdoc item="see"}} - ##[[KeyPgAppend Append]]## - - ##[[KeyPgInputfilemode Input (File Mode)]]## + - ##[[KeyPgInputfilemode Input (Mode fichier)]]## - ##[[KeyPgOpen Open]]## {{fbdoc item="back" value="CatPgFile|File I/O Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgOverload.wakka b/fbdocs/manual/cache/KeyPgOverload.wakka index 45187bff26..48da00d3d8 100644 --- a/fbdocs/manual/cache/KeyPgOverload.wakka +++ b/fbdocs/manual/cache/KeyPgOverload.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="OVERLOAD"}}---- -Specifies that a procedure name can be overloaded +Indique que le nom d'une procédure peut être surchargé {{fbdoc item="syntax"}}## - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// **Overload** [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// **Overload** [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// **Overload** [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// **Overload** [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// **Overload** [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// **Overload** [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// **Overload** [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// **Overload** [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure declarations, **Overload** allows procedure names to be overloaded, that is, other procedures can then be declared with the same name if their parameter lists are unique. Two parameter lists are unique if they contain a different number of parameters, or have parameters of different types. Note that this means that two or more procedures cannot be declared with the same name if they differ in return type alone. + Dans les déclarations de procédure, **Overload** permet aux noms de procédure d'être surchargés, c'est à dire, d'autres procédures peuvent alors être déclarées avec le même nom si leurs listes de paramètres sont uniques. Deux listes de paramètres sont uniques si elles contiennent un certain nombre de paramètres différents ou ont des paramètres de types différents. Notez que cela signifie que deux ou plusieurs procédures, si elles ne diffèrent que dans leur type de retour, ne peuvent être déclarées avec le même nom. - Once a procedure name has been declared overloaded, further declarations using the name need not specify *Overload*, but it is allowed. + Une fois qu'un nom de procédure a été déclaré surchargé, de nouvelles déclarations en utilisant le nom n'ont pas à préciser *Overload*, mais il est autorisé. - **Overload** is not necessary in member procedure declarations, as they are always implicitly overloaded. + **Overload** n'est pas nécessaire dans les déclarations de membre de procédure, car ils sont toujours implicitement surchargés. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/overload.bas"}}%%(freebasic) @@ -43,7 +43,7 @@ SLEEP %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgPaint.wakka b/fbdocs/manual/cache/KeyPgPaint.wakka index 42b6c63988..8669a2cbe1 100644 --- a/fbdocs/manual/cache/KeyPgPaint.wakka +++ b/fbdocs/manual/cache/KeyPgPaint.wakka @@ -1,43 +1,43 @@ {{fbdoc item="title" value="PAINT"}}---- -Fills an area delimited by a border of a specified color +Remplit une surface délimitée par une bordure, avec la couleur indiquée {{fbdoc item="syntax"}}## **Paint** [//target//,] [STEP] (//x//, //y//)[, [//paint//][, [//border_color//]]] ## {{fbdoc item="param"}} ##//target//## - specifies buffer to draw on. + le tampon sur lequel on dessine. ##STEP## - indicates that coordinates are relative + indique que les coordonnées sont relatives ##(//x//, //y//)## - coordinates of the pixel on which to start the flood fill (paint) + coordonnées du pixel sur lequel on commence le remplissage en utilisant ##//paint//## ##//paint//## - the color attribute or fill pattern - a numeric value indicates a color, while a string indicates a fill pattern + la couleur ou le motif pour effectuer le remplissage + une valeur numérique indique une couleur, alors qu'une chaîne indique un motif de remplissage ##//border_color//## - boundary color for the fill + couleur de la bordure pour limiter le remplissage {{fbdoc item="desc"}} - Graphics command to fill an area delimited by a border of specified color. Also known as 'flood-fill' or 'paint bucket'. + Commande graphique pour remplir une zone délimitée par une bordure d'une certaine couleur. Aussi appelée 'flood-fill' (seau de peinture) ou 'paint bucket' (inondation-remplissage). - ##**Paint**## can operate on the current work page as set by the ##[[KeyPgScreenset Screenset]]## statement or on the target ##[[KeyPgGetgraphics Get]]##/##[[KeyPgPutgraphics Put]]## buffer, if specified. + ##**Paint**## opère sur la page de travail courante validée par ##[[KeyPgScreenset ScreenSet]]## ou sur le tampon cible de ##[[KeyPgGetgraphics Get]]##/##[[KeyPgPutgraphics Put]]##, si spécifié. - Filling starts at specified ##(//x//,//y//)## coordinates; if ##STEP## is specified, these are relative to the last graphics cursor position. Coordinates are also affected by custom coordinates system set up by ##[[KeyPgWindow Window]]## and/or ##[[KeyPgViewgraphics View (Graphics)]]## statements; clipping set by ##[[KeyPgViewgraphics View]]## also applies. + Le remplissage commence aux coordonnées ##(//x//,//y//)##; si ##STEP## est précisé, elles sont relatives à la dernière position du curseur graphique. Les coordonnées sont affectées sont affectées par le système de coordonnées personnel établi avec ##[[KeyPgWindow Window]]## et/ou ##[[KeyPgViewgraphics View (Graphics)]]##; le cadrage établi par ##[[KeyPgViewgraphics View]]## s'applique aussi. - If the ##//paint//## argument is a number, it is assumed a color in the same format used by the ##[[KeyPgColor Color]]## statement, and the region is flood-filled using that color. If ##//paint//## is a ##[[KeyPgString String]]##, the region will be filled using a pattern; the pattern is always 8*8 pixels, and the passed string must hold pixels data in a format dependent on the current color depth. The string holds pattern pixels row by row, and its size should be as follows: + Si l'argument ##//paint//## est un nombre, il est utilisé comme une couleur du même format que celui utilisé par ##[[KeyPgColor Color]]## et la région est remplie en utilisant cette couleur. Si ##//paint//## est une ##[[KeyPgString String (chaîne)]]##, la région est remplie avec un motif; le motif a toujours 8 * 8 pixels, et la chaîne passée doit contenir des données dans un format correspondant à la profondeur de couleur courante. La chaîne du motif contient les pixels ligne par ligne, et sa taille doit être comme ci-dessous: - For color depths 1, 2, 4 and 8: + Pour des profondeurs de couleur de 1, 2, 4 et 8: ##size = 8 * 8 = 64## - For color depths 15 and 16: + Pour des profondeurs de couleur de 15 et 16: ##size = (8 * 8) * 2 = 128## - For color depths 24 and 32: + Pour des profondeurs de couleur de 24 et 32: ##size = (8 * 8) * 4 = 256## - If the passed string is smaller, missing pixels will be 0. If the ##//paint//## argument is omitted, normal filling is performed using the current foreground color set by ##[[KeyPgColor Color]]##. Flood-filling continues until pixels of the specified border color are found; if ##//border_color//## is omitted, the current background color is assumed. + Si la chaîne passée est plus petite, les pixels manquants seront à 0. Si l'argument ##//paint//## est omis, un remplissage normal sera exécuté en utilisant la couleur d'avant-plan validée par ##[[KeyPgColor Color]]##. Le remplissage continue tant que des pixels de la couleur bordure sont trouvés; si ##//border_color//## est omis, la couleur courante d'arrière-plan est utilisée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/paint.bas"}}%%(freebasic) -' draws a white circle painted blue inside +' Dessine un cercle blanc interieur peint en bleu screen 13 circle (160, 100), 30, 15 paint (160, 100), 1, 15 @@ -45,15 +45,15 @@ sleep %% {{fbdoc item="filename" value="examples/manual/gfx/paint2.bas"}}%%(freebasic) -' draws a circle and fills it with a checkered pattern +' Dessine un cercle et le remplit avec un motif a damier -'' choose the bit depth for the Screen -'' try setting this to other values: 8, 16 or 32 +'' Choisit la profondeur de bits pour Screen +'' Essayer de valider d' autres valeurs: 8, 16 ou 32 const bit_depth = 8 -'' function for returning a pixel color, represented as a string -'' returns a the string in the appropriate format for the current bit depth +'' Fonction pour retourner la couleur pixel, sous forme de chaine +'' retourne la chaine dans le format approprie pour la profondeur de bit courante function paint_pixel( byval c as uinteger, byval bit_depth_ as integer ) as string if bit_depth_ <= 8 then '' 8-bit: @@ -72,62 +72,62 @@ function paint_pixel( byval c as uinteger, byval bit_depth_ as integer ) as stri end function -'' open a graphics window at the chosen bit depth +'' Ouvre une fenetre graphique a la profondeur de bit choisie screenres 320, 200, bit_depth -'' declare variables for holding colors +'' Declare variables pour manier couleurs dim as uinteger c, c1, c2, cb -'' declare string variable for holding the pattern used in Paint +'' Declare variable chaine pour manier le motif utilise dans Paint dim as string paint_pattern = "" -'' set colors +'' Valide couleurs if bit_depth <= 8 then - c1 = 7 ''pattern color 1 - c2 = 8 ''pattern color 2 - cb = 15 ''border color + c1 = 7 ''couleur motif 1 + c2 = 8 ''couleur motif 2 + cb = 15 ''couleur bord else - c1 = rgb(192, 192, 192) '' pattern color 1 - c2 = rgb(128, 128, 128) '' pattern color 2 - cb = rgb(255, 255, 255) '' border color + c1 = RGB(192, 192, 192) '' couleur motif 1 + c2 = RGB(128, 128, 128) '' couleur motif 2 + cb = RGB(255, 255, 255) '' couleur bord end if -'' make the pattern to be used in Paint +'' Fabrique le motif a utiliser dans Paint for y as uinteger = 0 to 7 for x as uinteger = 0 to 7 - '' choose the color of the pixel (c) + '' Choisit la couleur du pixel (c) if (x \ 4 + y \ 4) mod 2 > 0 then c = c1 else c = c2 end if - '' add the pixel to the pattern + '' Ajoute le pixel au motif paint_pattern = paint_pattern + paint_pixel(c, bit_depth) - '' the following line can be used if you want to draw the - '' pattern tile in the top left hand corner of the screen: + '' La ligne suivante peut etre utilisee si vous desirez afficher le + '' motif dans le coin haut gauche de l' ecran: ' pset (x, y), c next x next y -'' draw a circle with the border color +'' Dessine un cercle avec la couleur du bord circle (160, 100), 50, cb, , , 1.0 -'' paint the circle region with paint_pattern, stopping at the border color +'' Peint la region du cercle avec paint_pattern, stoppant a la couleur du bord paint (160, 100), paint_pattern, cb -'' pause before ending the program +'' Pause avant fin du programme sleep %% {{fbdoc item="diff"}} - - ##//target//## is new to ""FreeBASIC"" - - In QB, the fill pattern was always 8-bits wide, and the height was the length of the string (up to 64). In FreeBASIC, the fill pattern is 8 pixels wide, independent of the color depth, and the height is always 8 - - The background color parameter supported by QB is not supported by the ""FreeBASIC"" version + - ##//target//## est nouveau pour FreeBASIC + - Dans QB, le motif de remplissage est toujours de 8 bits de largeur et la hauteur est la longueur de la chaîne (jusqu'à 64). Dans FreeBASIC, le motif de remplissage a 8 pixels de large, est indépendent de la profondeur de couleur et la hauteur est toujours de 8. + - Le paramètre de couleur d'arrière-plan supporté par QB ne l'est pas par la version FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen]]## diff --git a/fbdocs/manual/cache/KeyPgPalette.wakka b/fbdocs/manual/cache/KeyPgPalette.wakka index b47e9c5720..6a6a9f07a2 100644 --- a/fbdocs/manual/cache/KeyPgPalette.wakka +++ b/fbdocs/manual/cache/KeyPgPalette.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PALETTE"}}---- -Customizes colors in modes with paletted colors +Personnalise les couleurs dans les modes de couleurs palettisées {{fbdoc item="syntax"}}## **Palette** [Get] [//index//, //color//] @@ -8,57 +8,57 @@ Customizes colors in modes with paletted colors ## {{fbdoc item="param"}} ##Get## - indicates getting palette information rather than setting palette information + indique une demande d'information et non une validation d'information palette ##Using## - indicates using array of color values + indique l'utilisation d'un tableau de valeurs de couleur ##//index//## - palette index + indice de la palette ##//color//## - color attribute + attribut couleur ##//r//## - red color component + composante rouge de couleur ##//g//## - green color component + composante vert de couleur ##//b//## - blue color component + composante bleu de couleur ##//arrayname(idx)//## - array and index to get/set color attributes + tableau et indice pour obtenir/valider les attributs de couleur {{fbdoc item="desc"}} - The ##**Palette**## statement is used to retrieve or customize the current palette for graphics modes with a color depth of up to 8bpp; using ##**Palette**## while in a mode with a higher color depth will have no effect. Calling ##**Palette**## with no argument restores the default palette for current graphics mode, as set by the ##[[KeyPgScreengraphics Screen (Graphics)]]## statement. - The GfxLib sets a [[GfxDefPalettes default palette]] when a [[KeyPgScreengraphics Screen]] mode is initialized. + ##**Palette**## est utilisé pour récupérer ou établir la palette courante pour les modes graphiques avec une profondeur de couleur jusqu'à 8bpp (8 bits par pixel); l'utilisation de ##**Palette**## quand on est dans un mode de profondeur de couleur supérieur n'a aucun effet. Appeler ##**Palette**## sans argument restaure la palette par défaut pour le mode graphique courant, comme le fait ##[[KeyPgScreengraphics Screen (Graphique)]]##. + La GfxLib valide une [[GfxDefPalettes palette par défaut]] quand un mode [[KeyPgScreengraphics Screen]] est initialisé. - ==First form== - If you specify index and color, these are dependent on the current mode: - {{table columns="3" cellpadding="1" cells="Screen mode;index range;color range;1;0-3;0-15;2;0-1;0-15;7,8;0-15;0-15;9;0-15;0-63;11;0-1;see below;12;0-15;see below;13 to 21;0-255; see below"}} - In screen modes 1, 2, 7, 8 and 9 you can assign to each color index one of the colors in the available range. In other screen modes, the color must be specified in the form &hBBGGRR, where BB, GG and RR are the blue, green and red components ranging ##&h0##-##&h3F## in hexadecimal (0-63 in decimal). If you don't like hexadecimal form, you can use the following formula to compute the integer value to pass to this parameter: + **Première forme** + Si vous spécifiez ##//index//## et ##//color//##, ceux-ci dépendent du mode courant: + {{table columns="" cellpadding="2" cells="Mode écran;##//index//##;##//color//##;1;0-3;0-15;2;0-1;0-15;7,8;0-15;0-15;9;0-15;0-63;11;0-1;voir ci-dessous;12;0-15;voir ci-dessous;13 à 21;0-255;voir ci-dessous;
    + Dans les modes écran 1, 2, 7, 8 et 9 vous assignez à chaque indice de couleur une des couleurs disponible dans la plage. Dans les autres modes écran, la couleur doit être spécifiée dans la forme &hBBVVRR, où BB, VV et RR sont les composantes bleu, vert et rouge dans la plage &h0-&h3F en hexadécimal (0-63 en décimal). Si vous n'aimez pas la forme hexadécimale, vous pouvez utiliser la formule ci-dessous pour calculer la valeur entière à passer à ce paramètre: ##color = red [[KeyPgOpOr or]] (green [[KeyPgOpShiftLeft shl]] 8) [[KeyPgOpOr or]] (blue [[KeyPgOpShiftLeft shl]] 16)## - Where red, green and blue must range ##0##-##63##. Please note that color values accepted by ##**Palette**## are **not** the in the same form as returned by the ##[[KeyPgRgb RGB]]## macro (the red and blue fields are inverted, and the range is different); this is for backward compatibility with QB. + Où 'red' (rouge), 'green' (vert) et 'blue' (bleu) sont dans la plage 0-63. Notez SVP que les valeurs de couleur acceptées par ##**Palette**## **ne** sont **pas** de la même forme que celles retournées par la macro ##[[KeyPgRgb RGB]]## (les champs rouge et bleu sont intervertis, et la plage est différente); c'est une question de compatibilité avec QB. - ==Second form== - In the second form, you specify the red, green and blue components for a palette entry directly, by calling ##**Palette**## with 4 parameters. In this case ##//r//##, ##//g//## and ##//b//## must be in the range ##0##-##255##. + **Seconde forme** + Dans la seconde forme, vous précisez les composantes rouge, vert et bleu directement pour une palette, en appelant ##**Palette**## avec 4 paramètres. Dans ce cas ##//r//##, ##//g//## et ##//b//## doivent être dans la plage ##0##-##255##. - ==Third form== - Calling ##**Palette Using**## allows to set a list of color values all at once; you should pass an array holding enough elements as the color indices available for your current graphics mode color depth (2 for 1bpp, 4 for 2bpp, 16 for 4bpp or 256 for 8bpp). The array elements must be integer color values in the form described above. The colors stored into ##//arrayname//## starting with given ##//idx//## index are then assigned to each palette index, starting with index 0. + **Troisième forme** + Appeler ##**Palette Using**## permet d'établir en une seule fois une liste de valeurs de couleur; vous devrez passer un tableau ayant autant d'éléments que les indices de couleur disponibles pour la profondeur de couleur de votre mode graphique courant (2 pour 1bpp, 4 pour 2bpp, 16 pour 4bpp ou 256 pour 8bpp). Les éléments du tableau doivent être des valeurs entières de couleur comme décrit précédemment. Les couleurs stockées dans ##//arrayname//## débutent avec l'indice donné par ##//idx//## puis sont assignées à chaque indice de la palette, en commençant par 0. - Form 1 and 3 are for backward compatibility with QB; form 2 is meant to ease palette handling. Any change to the palette is immediately visible on screen. + Les formes 1 et 3 sont pour la compatibilité descendante avec QB; la forme 2 facilite la prise en charge de la palette. Chaque modification de la palette est immédiatement suivi d'effet à l'écran. - If the ##**Get**## option is specified, ##**Palette**## retrieves instead of setting color values for the current palette. The parameters have the same meaning as specified for the form being used, but in this case color, ##//r//##, ##//g//## and ##//b//## must be variables passed by reference that will hold the color RGB values on function exit. + Si l'option ##**Get**## est spécifiée, ##**Palette**## récupère au lieu de valider les valeurs de la palette courante. Les paramètres ont la même signification pour chaque forme utilisée, mais dans ce cas ##//color//##, ##//r//##, ##//g//## et ##//b//## sont des variables passées par référence qui contiendront les valeurs de couleur RVB à la sortie de la fonction. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/palette.bas"}}%%(freebasic) -' Setting a single color, form 1. +' Valide une seule couleur, forme 1. screen 15 locate 1,1: color 15 print "Press any key to change my color!" sleep -' Now change color 15 hues to bright red +' Maintenant change couleur 15 teintes vers lumineux red palette 15, &h00003F sleep %% {{fbdoc item="filename" value="examples/manual/gfx/palette2.bas"}}%%(freebasic) -' Getting a single color, form 2. +' Obtient une seule couleur, forme 2. dim as integer r, g, b screen 13 palette get 32, r, g, b @@ -68,7 +68,7 @@ sleep %% {{fbdoc item="filename" value="examples/manual/gfx/palette3.bas"}}%%(freebasic) -' Getting whole palette, form 3. +' Obtient palette entiere, forme 3. dim pal(1 to 256) as integer dim i as integer screen 13 @@ -80,12 +80,12 @@ sleep %% {{fbdoc item="diff"}} - - QB version did not support palette retrieval. + - La version QB ne prend pas en charge la récupération de la palette. {{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + - ##[[KeyPgScreengraphics Screen (Graphique)]]## - ##[[KeyPgColor Color]]## - ##[[KeyPgUsing Using]]## - - ##[[GfxInternalFormats Internal Pixel Formats]]## + - ##[[GfxInternalFormats Formats graphiques internes]]## {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPascal.wakka b/fbdocs/manual/cache/KeyPgPascal.wakka index 10bc03a77c..228752fe26 100644 --- a/fbdocs/manual/cache/KeyPgPascal.wakka +++ b/fbdocs/manual/cache/KeyPgPascal.wakka @@ -1,35 +1,37 @@ {{fbdoc item="title" value="PASCAL"}}---- -Specifies a //Pascal//-style calling convention in a procedure declaration +Spécifie une convention d'appel style-//Pascal// dans la déclaration d'une procédure {{fbdoc item="syntax"}}## - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Pascal** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **pascal** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Pascal** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **pascal** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Pascal** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **pascal** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Pascal** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **pascal** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure declarations, ##**Pascal**## specifies that a procedure will use the //Pascal// calling convention. In the //Pascal// calling convention, any parameters are to be passed (pushed onto the stack) in the same order in which they are listed, that is, from left to right. The procedures need not preserve the ##EAX##, ##ECX## or ##EDX## registers, and must clean up the stack (pop any parameters) before it returns. + Dans les déclarations de procédure, ##**pascal**## spécifie qu'une procédure utilisera une convention d'appel //Pascal//. Dans une convention d'appel //Pascal//, tous les paramètres doivent être passés (placés sur la pile) dans l'ordre où ils ont été listés, c'est à dire, de la gauche vers la droite. Les procédures n'ont pas besoin de préserver les registres ##EAX##, ##ECX## ou ##EDX##, et doivent nettoyer la pile (sortie de tous les paramètres) avant le retour. + + //Pascal// est la convention d'appel par défaut des procédures Microsoft QuickBASIC et la convention standard utilisée par l'API Windows 3.1. - //Pascal// is the default calling convention for procedures in Microsoft ""QuickBASIC"", and is the standard convention used in the Windows 3.1 API. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/pascal.bas"}}%%(freebasic) Declare Function MyFunc pascal Alias "MyFunc" (MyParm As Integer) As Integer %% - {{fbdoc item="diff"}} - - New to ""FreeBASIC"" -{{fbdoc item="see"}} - - [[KeyPgCdecl Cdecl]], [[KeyPgStdcall Stdcall]] +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} + +- [[KeyPgCdecl cdecl]], [[KeyPgStdcall stdcall]] - [[KeyPgDeclare Declare]] - [[KeyPgSub Sub]], [[KeyPgFunction Function]] + - [[KeyPgSub Sub]], [[KeyPgFunction Function]] {{fbdoc item="back" value="CatPgProcedures|Procedures"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPcopy.wakka b/fbdocs/manual/cache/KeyPgPcopy.wakka index e95471ecbc..4a413a2e16 100644 --- a/fbdocs/manual/cache/KeyPgPcopy.wakka +++ b/fbdocs/manual/cache/KeyPgPcopy.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PCOPY"}}---- -Copies one graphical or text page onto another +Copie une page texte ou graphique vers une autre page {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Pcopy** ( [[KeyPgByval byval]] //source// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //destination// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) @@ -9,100 +9,92 @@ Copies one graphical or text page onto another ## {{fbdoc item="param"}} ##//source//## - page to copy from + page à copier ##//destination//## - page to copy to + page vers laquelle on copie {{fbdoc item="desc"}} - Copies one graphical or text video page to another. Useful for drawing all graphics on one invisible page and copying it to the active visible page - creating smooth graphics and animation. Known as 'double buffering' or 'page flipping'. + Copie une page texte ou graphique vers une autre page texte ou graphique. Utile pour copier tous les graphiques d'une page invisible vers la page visible active - création de graphiques et d'animations en douceur. Connu sous l'appellation 'double buffering' ou 'page flipping'. - ##//source//## and ##//destination//## refer to page numbers. The 'source' page is copied over the 'destination' page when pcopy is called. + ##//source//## et ##//destination//## font référence aux numéros de pages. La page 'source' est copiée sur la page 'destination' quand 'Pcopy' est appelé. - If the ##//source//## argument is omitted, the current working page is assumed. If the ##//destination//## page is omitted, the current visible page is assumed. + Si l'argument ##//source//## est omis, la page de travail courante est utilisée. Si la page ##//destination//## est omise, la page visible courante est utilisé. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/pcopy.bas"}}%%(freebasic) -screenres 320, 240, 32, 2 'Sets up the screen to be 320x240 in 32-bit color with 2 video pages. -dim as integer max_x_value = 270, x_value = 50 'Dimension our working variables. - -do while x_value < max_x_value 'Loop while x_value is less than the max - screenset 2,1 'Sets the working page to 2 and the displayed page to 1 - cls 'Clears the screen so we can start fresh - circle (x_value,50),50,&h00FFFF00 'Draws a circle with a 50 pixel radius in yellow on page 2 - screenset 1,1 'Sets the working page to 1 and the displayed page to 1 - screensync 'Waits for vertical refresh - pcopy 2,1 'Copies our circle from page 2 to page 1 - x_value += 1 'Increments x_value so it will move. - sleep 25 'Waits for 25 milliseconds. -loop 'Goes back to do as long as x_value is less than x_max_value - -sleep 'Waits for any key to be pressed so you can see the work done. + + %%(freebasic) +ScreenRes 320, 240, 32, 2 'Valide l' ecran a 320x240 en couleur 32-bit avec 2 pages video. +Dim As Integer max_x_value = 270, x_value = 50 'Dimensionne les variables de travail. + +Do While x_value < max_x_value 'Boucle tant que x_value est inferieur a max + ScreenSet 2,1 'Valide la page travail a 2 et la page affichage a 1 + Cls 'Efface ecran ainsi nous demarrons ecran propre + Circle (x_value,50),50,&h00FFFF00 'Dessine un cercle jaune avec un rayon de 50 pixels sur page 2 + ScreenSet 1,1 'Page de travail a 1 et page affichage a 1 + ScreenSync 'Attend rafraichissement vertical + PCopy 2,1 'Copie cercle depuis page 2 vers page 1 +x_value += 1 'Incremente x_value ainsi il se deplacera. + +Sleep 25 'Delai de 25 millisecondes. +Loop 'Continue tant que x_value est inferieur a x_max_value + + Sleep 'Attend touche appuyee. %% {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/pcopy_cons.bas"}}%%(freebasic) -' Console mode example: - -'' set the working page number to 0, and the visible page number to 1 #if __FB_LANG__ = "QB" -screen ,, 0, 1 -#else -screen , 0, 1 -#endif - -dim as integer i, frames, fps -dim as double t +' Exemple mode Console: +'' Valide page travail a nombre 0, et page visible a nombre 1 +#if __FB_LANG__ = "QB" +Screen ,, 0, 1 -t = timer +#else +Screen , 0, 1 -do +#endif +Dim As Integer i, frames, fps + Dim As Double t + t = Timer + Do + '' remplit page travail with avec certain couleur et caractere + Cls + Locate 1, 1 - '' fill working page with a certain color and character - cls - locate 1, 1 - color (i and 15), 0 - print string$(80 * 25, hex$(i, 1)); + Color (i And 15), 0 + Print String$(80 * 25, Hex$(i, 1)); i += 1 + '' montre images par seconde + Color 15, 0 + Locate 1, 1 + Print "fps: " & fps, + If Int(t) <> Int(Timer) Then + t = Timer + fps = frames + frames = 0 + End If - '' show frames per second - color 15, 0 - locate 1, 1 - print "fps: " & fps, - if int(t) <> int(timer) then - t = timer - fps = frames - frames = 0 - end if frames += 1 + '' copie page travail vers page visible + PCopy +'' arret 50ms par image liberer temps cpu +Sleep 50, 1 - '' copy working page to visible page - pcopy - - - '' sleep 50ms per frame to free up cpu time - sleep 50, 1 - - - '' run loop until user presses a key -loop until len(inkey$) -%% - -{{fbdoc item="target"}} - - Maximum number of text pages in Windows is 4. - - Maximum number of text pages in DOS is 8. - - Maximum number of text pages in all other targets is 1. - - Maximum number of graphics pages depends on what was specified when the ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres Screenres]]## statement was called. +'' boucle jusqu'a utilisateur appuie une touche + Loop Until Len(Inkey$) + %% + {{fbdoc item="section" value="Différences de plates-formes + - Le nombre maximum de pages texte est de 4 dans Windows. -{{fbdoc item="diff"}} - - None +- Le nombre maximum de pages texte est de 8 dans DOS. + - Le nombre maximum de pages texte est de 1 dans toutes les autres. -{{fbdoc item="see"}} - - ##[[KeyPgScreencopy Screencopy]]## - - ##[[KeyPgFlip Flip]]## - - ##[[KeyPgScreengraphics Screen]]## +- Le nombre maximum de pages graphiques dépend de ce qui a été spécifié avec ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]##. + {{fbdoc item="diff"}} + - Aucune + {{fbdoc item="see"}} -{{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file +- ##[[KeyPgScreencopy ScreenCopy]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPeek.wakka b/fbdocs/manual/cache/KeyPgPeek.wakka index 36024751d4..3a9d76d039 100644 --- a/fbdocs/manual/cache/KeyPgPeek.wakka +++ b/fbdocs/manual/cache/KeyPgPeek.wakka @@ -1,26 +1,26 @@ {{fbdoc item="title" value="PEEK"}}---- -Gets the value of an arbitrary type at an address in memory +Obtient la valeur d'un type arbitraire à une adresse dans la mémoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Peek** ( [[KeyPgByval byval]] //address// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]] [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Peek** ( //datatype//, [[KeyPgByval byval]] //address// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) [[KeyPgAs as]] //datatype// ## -~&//Note: ##**Peek**## returns a reference to the value at the specified address. See [[CompilerFAQ Compiler FAQ]].// +//Note: ##**Peek**## retourne une référence à la valeur à l'adresse indiquée. Voir [[CompilerFAQ FAQ du compilateur]].// {{fbdoc item="usage"}}## **Peek**( [ //datatype//, ] //address// ) ## {{fbdoc item="param"}} ##//address//## - The address in memory to get the value from. + L'adresse mémoire dont on veut obtenir la valeur. ##//datatype//## - The type of value to get. If omitted, it defaults to the type of the pointer passed; or to ##[[KeyPgUbyte ubyte]]##, if the address is an ##[[KeyPgInteger integer]]## or an ##[[KeyPgAny any]] [[KeyPgPtr ptr]]##. + Le type de valeur à obtenir. En cas d'omission, la valeur par défaut correspond au type du pointeur passé ou à ##[[KeyPgUbyte UByte]]##, si l'adresse est un ##[[KeyPgInteger Integer]]## ou un ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]##. {{fbdoc item="desc"}} - This procedure returns a reference to the value in memory given by a memory address, and is equivalent to + Cette procédure renvoie une référence à la valeur en mémoire donnée par une adresse mémoire, et est équivalente à: ##*cast(ubyte ptr, //address//)## - or + ou ##*cast(//datatype// ptr, //address//)## {{fbdoc item="ex"}} @@ -31,15 +31,15 @@ p = @i Poke Integer, p, 420 Print Peek(Integer, p) %% - will produce the output: + affichera: %%420 %% {{fbdoc item="diff"}} - - **##Peek##** did not support the ##//datatype//## parameter in QB, and could only return individual bytes. - - **##Peek##** returns a reference in FB, so can be used to set the memory contents of the address, like with ##[[KeyPgOpValueOf Operator * (Value of)]]##. - - ##DEF SEG## isn't needed anymore because the address space is 32-bit flat in ""FreeBASIC"". + - **##Peek##** ne supportait pas le paramètre ##//datatype//## dans QB, et ne pouvait retourner des octets individuels. + - **##Peek##** retourne une référence dans FB et peut donc être utilisé pour définir le contenu de la mémoire à l'adresse, comme avec ##[[KeyPgOpValueOf Operator * (Value Of)]]##. + - ##DEF SEG## n'est pas nécessaire parce que l'espace d'adressage est "32-bit flat" dans FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgPoke Poke]]## diff --git a/fbdocs/manual/cache/KeyPgPmap.wakka b/fbdocs/manual/cache/KeyPgPmap.wakka index a5fb114f1a..6e9303d3d9 100644 --- a/fbdocs/manual/cache/KeyPgPmap.wakka +++ b/fbdocs/manual/cache/KeyPgPmap.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PMAP"}}---- -Maps coordinates between view and physical mapping. +Cartographie les coordonnées entre la vue et la cartographie physique.. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **PMap** ( [[KeyPgByval byval]] //coord// [[KeyPgAs as]] [[KeyPgSingle single]], [[KeyPgByval byval]] //func// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgSingle single]] @@ -9,17 +9,17 @@ Maps coordinates between view and physical mapping. ## {{fbdoc item="param"}} ##//coord//## - An expression indicating the coordinate to be mapped. + Une expression indiquant les coordonnées à cartographier. ##//func//## - The mapping function number to be applied to given coordinate. + La numéro de la fonction de cartographie à employer pour donner les coordonnées. -{{fbdoc item="ret"}} - The mapped coordinate value. +{{fbdoc item="section" value="Valeur Retournée + La valeur de la coordonnée. {{fbdoc item="desc"}} - This function converts a coordinate between view (as defined by the ##[[KeyPgWindow Window]]## statement) and physical (as set by the ##[[KeyPgViewgraphics View (Graphics)]]## statement) mappings. Depending on the value of ##//func//##, ##//expr//## is used to compute a different mapping to be returned by PMAP: + Cette fonction convertit une coordonnée entre la "cartographie vue" (définie par ##[[KeyPgWindow Window]]##) et la "cartographie physique" (comme établie par ##[[KeyPgViewgraphics View (Graphique)]]##). En fonction de la valeur de ##//func//##, ##//expr//## est utilisée pour calculer une cartographie différente pour être retournée par PMAP: - {{table columns="2" cellpadding="1" cells="func value:;return value:;0;Treats expr as x view coordinate and returns corresponding x physical coordinate.;1;Treats expr as y view coordinate and returns corresponding y physical coordinate.;2;Treats expr as x physical coordinate and returns corresponding x view coordinate.;3;Treats expr as y physical coordinate and returns corresponding y view coordinate."}} + {{table columns="" cellpadding="2" cells="valeur de func:;valeur retournée:;0;Traîte expr comme coordonnée x vue (view) et retourne la coordonnée x physique (physical) correspondante.;1;Traîte expr comme coordonnée y vue (view) et retourne la coordonnée y physique (physical) correspondante.;2;Traîte expr comme coordonnée x physique (physical) et retourne la coordonnée x vue (view) correspondante.;3;Traîte expr comme coordonnée y physique (physical) et retourne la coordonnée y vue (view) correspondante.;
    {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/pmap.bas"}}%%(freebasic) @@ -33,10 +33,10 @@ sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWindow Window]]## - - ##[[KeyPgViewgraphics View (Graphics)]]## + - ##[[KeyPgViewgraphics View (Graphique)]]## {{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPoint.wakka b/fbdocs/manual/cache/KeyPgPoint.wakka index fd43b31086..fc346bf602 100644 --- a/fbdocs/manual/cache/KeyPgPoint.wakka +++ b/fbdocs/manual/cache/KeyPgPoint.wakka @@ -1,59 +1,68 @@ {{fbdoc item="title" value="POINT"}}---- -Returns the color attribute of a specified pixel coordinate +Retourne l'attribut de couleur d'un pixel dont on spécifie les coordonnées {{fbdoc item="syntax"}}## //result// = **Point**( //coord_x//, //coord_y// [,//buffer//] ) - or + ou //result// = **Point**( //function_index// ) ## {{fbdoc item="usage"}} ##//coord_x//## - x coordinate of the pixel + coordonnée x du pixel ##//coord_y//## - y coordinate of the pixel + coordonnée y du pixel ##//buffer//## - the image buffer to read from + le tampon image à lire ##//function_index//## - the type of screen coordinate to return: one of the values ##0##, ##1##, ##2##, ##3## + le type de coordonnée écran à retourner: une des valeurs ##0##, ##1##, ##2##, ##3## -{{fbdoc item="ret"}} - If the ##//x//, //y//## coordinates of a pixel are provided **##Point##** returns the color attribute at the specified coordinates. - If the argument is a function index, **##Point##** returns one of the graphics cursor coordinates set by the last graphics command. - - {{table columns="2" cellpadding="1" cells="Argument; Value Returned ; 0;The current physical x coordinate.;1;The current physical y coordinate.; 2;The current view x coordinate. This returns the same value as the POINT(0) function if the WINDOW statement has not been used.;3;The current view y coordinate. This returns the same value as the POINT(1) function if the WINDOW statement has not been used."}} +{{fbdoc item="section" value="Valeur renvoyée + Si les coordonnées ##//x//, //y//## d'un pixel sont fournies **##Point##** retourne l'attribut de couleur aux coordonnées spécifiées. + Si l'argument est un indice de fonction, **##Point##** retourne une des coordonnées du curseur graphique validée par la dernière commnde graphique. + + {{table columns="" cellpadding="2" cells="Argument; Valeur Retournée ; 0;La coordonnée physique x courante.;1;La coordonnée physique y courante.; 2;La coordonnée vue x courante. Ceci retourne la même valeur que la fonction POINT(0) si la éclaration WINDOW n'a pas été utilisée.;3;La coordonnée vue y courante. Ceci retourne la même valeur que la fonction POINT(1) si la éclaration WINDOW n'a pas été utilisée.;
    {{fbdoc item="desc"}} - ""GfxLib"" Function with two different uses. - If supplied with two coordinates it reads the color of the pixel at the coordinate ##//coord_x//##, ##//coord_y//## of the screen, or of the ##//buffer//##, if supplied. - The value return is a color index in a 256 or less color ##[[KeyPgScreengraphics Screen]]##, and an ##[[KeyPgRgb RGB]]## value in true color modes. If the coordinates are off-screen or off-buffer, ##-1## is returned - - If supplied with a single value it returns the one of the coordinates of the graphics cursor as set by the last graphics command executed. If the last command was executed in a buffer, the values returned will be coordinates in the buffer. Arguments out of the range ##0##-##3## will return ##0##. + Fonction GfxLib avec deux utilisations différentes. + Si appelée avec deux coordonnées, elle lit la couleur du pixel aux coordonnées ##//coord_x//##, ##//coord_y//## de l'écran ou du tampon ##//buffer//##, s'il est précisé. + La valeur retournée est un indice de couleur dans un espace de couleurs ##[[KeyPgScreengraphics Screen]]## de 256 ou moins et une valeur ##[[KeyPgRgb RGB]]## en mode "true color". Si les coordonnées sont hors écran ou hors tampon, ##-1## est retourné. + + Si appelée avec une seule valeur, elle retourne une des coordonnées du curseur graphique qui a été validée par la dernière commande graphique exécutée. Si la dernière commande a été exécutée dans un tampon, les valeurs retournées seront les coordonnées dans le tampon. Les arguments en-dehors de ##0##-##3## retourneront ##0##. - The function ##**Point**## does not work in text modes. + La fonction ##**Point**## ne fonctionne pas en modes texte. - Optimization note: while **Point** and the opposite ##[[KeyPgPset Pset]]## provide valid results, they are very slow. Much better performance can be achieved by using ##[[KeyPgPeek Peek]]## after calculating the address yourself from values obtained from ##[[KeyPgImageinfo Imageinfo]]## and ##[[KeyPgScreeninfo Screeninfo]]##, or even more usig inline ASM. + Note d'optimisation: bien que **Point** et son opposé ##[[KeyPgPset PSet]]## fournissent des résultats valides, ils sont très lents. De meilleures performances sont obtenues avec ##[[KeyPgPeek Peek]]## après avoir calculé l'adresse vous-mème à partir des valeurs données par ##[[KeyPgImageinfo ImageInfo]]## et ##[[KeyPgScreeninfo ScreenInfo]]##, ou en utilisant le langage machine avec "inline ASM". {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/point.bas"}}%%(freebasic) -screen 13 -line (10,10)-(100,100),12 -print point(20,20) +Screen 13 +Line (10,10)-(100,100),12 + +Print Point(20,20) %% -**Output:** + +**Affichage:** %% + 12 %% -{{fbdoc item="diff"}} - - ##//buffer//## is new to ""FreeBASIC"" - - In SVGA modes, a 32-bit RGB value is returned +{{fbdoc item="diff"}} +- ##//buffer//## nouveau pour FreeBASIC +- En modes SVGA, une valeur RGB 32-bit est retournée {{fbdoc item="see"}} - - ##[[KeyPgPset Pset]]## +- ##[[KeyPgPset PSet]]## + - ##[[KeyPgPmap PMap]]## + - ##[[KeyPgColor Color]]## + +- ##[[KeyPgViewgraphics View (Grpahique)]]## + - ##[[KeyPgWindow Window]]## - ##[[KeyPgPmap Pmap]]## - ##[[KeyPgColor Color]]## - ##[[KeyPgViewgraphics View (Graphics)]]## - ##[[KeyPgWindow Window]]## + - ##[[GfxInternalFormats Internal pixel formats]]## -{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} diff --git a/fbdocs/manual/cache/KeyPgPointer.wakka b/fbdocs/manual/cache/KeyPgPointer.wakka index 594c97e5ae..78d585218c 100644 --- a/fbdocs/manual/cache/KeyPgPointer.wakka +++ b/fbdocs/manual/cache/KeyPgPointer.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="POINTER"}}---- -A variable declaration type modifier +Déclaration d'un modificateur de type de variable {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //symbolname// [[KeyPgAs as]] [[DataType DataType]] {**Pointer** | [[KeyPgPtr ptr]]} ## {{fbdoc item="desc"}} - Declares a pointer variable. The same as ##[[KeyPgPtr Ptr]]##. + Déclare un pointeur de variable. Identique à ##[[KeyPgPtr Ptr]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/pointer.bas"}}%%(freebasic) @@ -22,10 +22,10 @@ print *p %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Pointer""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Pointer**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPtr Ptr]]## diff --git a/fbdocs/manual/cache/KeyPgPoke.wakka b/fbdocs/manual/cache/KeyPgPoke.wakka index 5e0a906632..27866ce096 100644 --- a/fbdocs/manual/cache/KeyPgPoke.wakka +++ b/fbdocs/manual/cache/KeyPgPoke.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="POKE"}}---- -Assigns a value to a location in memory. +Assigne une valeur à un emplacement en mémoire. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Poke** ( [[KeyPgByval byval]] //address// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByref byref]] //value// [[KeyPgAs as]] [[KeyPgUbyte ubyte]] ) @@ -10,20 +10,20 @@ Assigns a value to a location in memory. ## {{fbdoc item="param"}} ##//datatype//## - The type of data at the specified address. + Le type de données à l'adresse indiquée. ##//address//## - The location in memory to assign to. + L'emplacement dans la mémoire où attribuer ##//value//##. ##//value//## - The value to assign. + La valeur à attribuer. {{fbdoc item="desc"}} - ##**Poke**## assigns a value to a location in memory. It is equivalent to + ##**Poke**## assigne une valeur à un emplacement en mémoire. Est équivalent à: ##*cast(ubyte ptr, //address//) = //value//## - or + ou ##*cast(//datatype// ptr, //address//) = //value//## - When ##//datatype//## is a user-defined type, ##**Poke**## assigns ##//value//## using the type's ##[[KeyPgOpLet Operator Let]]##. + Quand ##//datatype//## est un type défini par l'utilisateur, ##**Poke**## assigne ##//value//## en utilisant le type ##[[KeyPgOpLet Operator Let]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/memory/poke.bas"}}%%(freebasic) @@ -33,14 +33,14 @@ p = @i Poke Integer, p, 420 Print Peek(Integer, p) %% - Will produce the output: + affichera: %%420 %% {{fbdoc item="diff"}} - - Only the byte form were supported in QB. - - ##DEF SEG## isn't needed anymore because the address space is 32-bit flat in FreeBASIC. + - Seule la forme octets est prise en charge dans QB. + - ##DEF SEG## n'est pas nécessaire parce que l'espace d'adressage est "32-bit flat" dans FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgPeek Peek]]## diff --git a/fbdocs/manual/cache/KeyPgPos.wakka b/fbdocs/manual/cache/KeyPgPos.wakka index 868155cb94..2364628f0c 100644 --- a/fbdocs/manual/cache/KeyPgPos.wakka +++ b/fbdocs/manual/cache/KeyPgPos.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="POS"}}---- -Returns the horizontal (left to right) position of the text cursor +Retourne la position horizontale (de gauche à droite) du curseur texte {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Pos** [[KeyPgOverload overload]] ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,13 +10,13 @@ Returns the horizontal (left to right) position of the text cursor ## {{fbdoc item="param"}} ##//dummy//## - An unused parameter retained for backward compatibility with QBASIC. + Un paramètre inutilisé pour conserver la compatibilité descendante avec QBASIC. -{{fbdoc item="ret"}} - Returns the horizontal position of the text cursor. +{{fbdoc item="section" value="Valeur retournée + Retourne la position horizontale du curseur texte. {{fbdoc item="desc"}} -Returns the horizontal (left to right) position of the text cursor. The leftmost column is number ##1##. +Retourne la position horizontale (de gauche à droite) du curseur texte. La colonne la plus à gauche a le numéro ##1##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/pos.bas"}}%%(freebasic) @@ -40,7 +40,7 @@ Print Pos(), Pos(), Pos(), Pos(), Pos() %% {{fbdoc item="diff"}} - - The ##//dummy//## parameter was not optional in QBASIC. + - Le paramètre ##//dummy//## n'était pas facultatif dans QBASIC. {{fbdoc item="see"}} - ##[[KeyPgCsrlin Csrlin]]## diff --git a/fbdocs/manual/cache/KeyPgPpdefine.wakka b/fbdocs/manual/cache/KeyPgPpdefine.wakka index e934bafcb3..a00f6f3f1f 100644 --- a/fbdocs/manual/cache/KeyPgPpdefine.wakka +++ b/fbdocs/manual/cache/KeyPgPpdefine.wakka @@ -1,23 +1,24 @@ {{fbdoc item="title" value="#DEFINE"}}---- -Preprocessor directive to define a macro +Directive du préprocesseur pour définir une macro {{fbdoc item="syntax"}}## - #define //identifier// //text// #define //identifier//( [ //parameters// ] ) //macro_text// #define //identifier//( [ //parameters//, ] //variadic_parameter//[[KeyPgDots ...]] ) //macro_text// -## + ## {{fbdoc item="desc"}} - Preprocessor keyword that defines an identifier with a custom meaning: - - Non-empty defines (with ##//text//##) are substituted by its ##//text//## when the source is parsed, allowing a sort of "shorthand". ##//text//## may be empty, which is useful for making defines that are just designed for checking with ##[[KeyPgPpifdef #ifdef]]## and ##[[KeyPgPpifndef #ifndef]]##. - - Defines with parameters are substituted by the ##//macro_text//##, that will contain all the arguments passed replaced. **Note:** The open parentheses character ("##(##") must immediately follow the ##//identifier//##, there should be no white-spaces between them, otherwise the parentheses will be taken as part of ##//text//##. - - Defines are visible only in the scope where they are defined. If defined at module level, the define is visible throughout the module. If the ##//identifier//## is defined inside a compound statement having scope (##[[KeyPgSub Sub]]##, ##[[KeyPgFornext For..Next]]##, ##[[KeyPgWhilewend While..Wend]]##, ##[[KeyPgDoloop Do..Loop]]##, ##[[KeyPgScope Scope..End Scope]]##, etc), the ##//identifier//## is visible only within that scope. - - Namespaces do not have any effect on the visibility of a define. - - ##//Identifier//##s can be checked to see whether they have been defined with ##[[KeyPgPpifdef #ifdef]]## and ##[[KeyPgPpifndef #ifndef]]##, which can be used to hide parts of code to the compiler (conditional compiling). - - For defining identifiers with constant values associated with them ##[[KeyPgConst Const]]## may be used as a more powerful method. +Mot-clé du préprocesseur qui définit un identifiant avec un sens personnalisé: + - Des ##//define//## non-vides (avec ##//texte//##) sont remplacés par leur ##//texte//## lorsque le source est analysé, permettant une sorte de "raccourci". ##//text//## peut être vide, ce qui est utile pour faire des ##//define//## conçus pour le contrôle des ##[[KeyPgPpifdef #ifdef]]## et ##[[KeyPgPpifndef #ifndef]]##. + + - Des ##//define//## avec des paramètres sont remplacés par le ##//macro_text//##, qui contiendra tous les arguments passés remis à leur place. **Note:** Le caractère ouverture des parenthèses ("##(##") doit suivre immédiatement l' ##//identifier//##, il ne doit y avoir aucun espace-blanc entre eux, sinon les parenthèses seront prises comme faisant partie du ##//text//##. + - Les ##//define//## ne sont visibles que dans la portée où ils sont définis. S'il est défini au niveau du module, ##//define//## est visible tout au long du module. Si l'##//identifier//## est défini dans une instruction à portée composée (##[[KeyPgSub Sub]]##, ##[[KeyPgFornext For..Next]]##, ##[[KeyPgWhilewend While..Wend]]##, ##[[KeyPgDoloop Do..Loop]]##, ##[[KeyPgScope Scope..End Scope]]##, etc), l'##//identifier//## n'est visible que dans cette portée. + + - Les espaces de noms n'ont aucun effet sur la visibilité d'un ##//define//##. + + Les ##//Identifier//## peuvent être examinés pour voir si ils ont été définis avec ##[[KeyPgPpifdef #ifdef]]## et ##[[KeyPgPpifndef #ifndef]]##, ce qui peut être utilisé pour cacher des parties du code pour le compilateur (compilation conditionnelle). + + Pour définir des identificateurs avec des valeurs constantes qui leur sont associées, ##[[KeyPgConst Const]]## peut être utilisé comme une méthode plus puissante. - Using ##[[KeyPgDots ...]]## (an ellipsis) behind the last parameter of a macro allows to create a variadic macro. This means it is possible to pass any number of arguments to the //variadic_parameter//, which can be used in the //macro_text//, just like a normal macro parameter. The //variadic_parameter// will expand to the full list of arguments passed to it, including commas, and can also be completely empty. + Utiliser ##[[KeyPgDots ...]]## (une ellipse) derrière le dernier paramètre d'une macro permet de créer une macro variadique. Cela signifie qu'il est possible de passer n'importe quel nombre d'arguments à //variadic_parameter//, qui peuvent être utilisés dans //macro_text//, tout comme un paramètre macro normal. Le //variadic_parameter// sera étendu à la liste complète des arguments passés, y compris les virgules et peut également être complètement vide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/define.bas"}}%%(freebasic) @@ -45,41 +46,29 @@ scope end scope #ifndef LOCALDEF -# print LOCALDEF is not defined +# Print LOCALDEF Is Not defined #endif '' namespaces have no effect on the visibility of a define namespace foo -# define NSDEF +# define NSDEF end namespace #ifdef NSDEF -# print NSDEF is defined +# Print NSDEF Is defined #endif %% -{{fbdoc item="filename" value="examples/manual/prepro/variadic.bas"}}%%(freebasic) -'' Using a variadic macro to wrap a variadic function -#include "crt.bi" -#define eprintf(format, args...) fprintf(stderr, format, args) -eprintf(!"Hello from printf: %i %s %i\n", 5, "test", 123) - -'' LISP-like accessors allowing to modify comma-separated lists -#define car(a, b...) a -#define cdr(a, b...) b -%% - {{fbdoc item="diff"}} - - New to ""FreeBASIC"" - -{{fbdoc item="see"}} - - ##[[KeyPgPpmacro #macro]]## - - ##[[KeyPgOpPpStringize # Preprocessor stringize]]## - - ##[[KeyPgOpPpConcat ## Preprocessor concatenate]]## - - ##[[KeyPgPpifdef #ifdef]]## - - ##[[KeyPgPpifndef #ifndef]]## - - ##[[KeyPgPpundef #undef]]## - - ##[[KeyPgDefined defined]]## - - ##[[KeyPgConst Const]]## + '' Using a variadic macro to wrap a variadic function -{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file +#include "crt.bi" + #define eprintf(Format, args...) fprintf(stderr, Format, args) + eprintf(!"Hello from printf: %i %s %i\n", 5, "test", 123) + '' LISP-like accessors allowing to modify comma-separated lists + #define car(a, b...) a + #define cdr(a, b...) b + %% + {{fbdoc item="diff"}} + +- Nouveau pour Freebasic \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpelse.wakka b/fbdocs/manual/cache/KeyPgPpelse.wakka index 07c93bd7a6..e6f2c5f7d7 100644 --- a/fbdocs/manual/cache/KeyPgPpelse.wakka +++ b/fbdocs/manual/cache/KeyPgPpelse.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="#ELSE"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur -{{fbdoc item="syntax"}}## - [[KeyPgPpif #if]] (expression) - ' Conditionally included statements if expression is True +{{fbdoc item="syntax"}} + ##[[KeyPgPpif #if]]## (expression) + ' Déclarations incluses à condition qu'//expression// soit Vraie (True) **#else** - ' Conditionally included statements if expression is False - [[KeyPgPpendif #endif]] -## + ' Déclarations incluses à condition qu'//expression// soit Fausse (False) + ## +[[KeyPgPpendif #endif]]## {{fbdoc item="desc"}} - **#else** can be added to an ##[[KeyPgPpif #if]]##, ##[[KeyPgPpifdef #ifdef]]##, or ##[[KeyPgPpifndef #ifndef]]## block to provide an alternate result to the conditional expression. + **#else** peut être ajouté à un bloc ##[[KeyPgPpif #if]]##, ##[[KeyPgPpifdef #ifdef]]##, ou ##[[KeyPgPpifndef #ifndef]]## pour procurer un résultat alternatif à l'expression conditionnelle. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/else.bas"}}%%(freebasic) @@ -24,7 +24,7 @@ Print "Program is "; a %% {{fbdoc item="diff"}} - - New to Freebasic + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## diff --git a/fbdocs/manual/cache/KeyPgPpelseif.wakka b/fbdocs/manual/cache/KeyPgPpelseif.wakka index 0f6e530e02..bb39f0085a 100644 --- a/fbdocs/manual/cache/KeyPgPpelseif.wakka +++ b/fbdocs/manual/cache/KeyPgPpelseif.wakka @@ -1,36 +1,35 @@ {{fbdoc item="title" value="#ELSEIF"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur -{{fbdoc item="syntax"}}## +{{fbdoc item="syntax"}} [[KeyPgPpif #if]] (expression1) - ' Conditionally included statements if expression1 is True + ' Déclarations incluses à condition qu'//expression1// soit Vrai (True) **#elseif** (expression2) - ' Conditionally included statements if expression2 is True + ' Déclarations incluses à condition qu'//expression2// soit Vrai (True) [[KeyPgPpelse #else]] - ' Conditionally included statements if both - ' expression1 and expression2 are False + ' Déclarations incluses à condition que les deux + ' //expression1// et //expression2// soient Faux (False) [[KeyPgPpendif #endif]] -## {{fbdoc item="desc"}} - **#elseif** can be added to an ##[[KeyPgPpif #if]]## block to provide an additional conditions. +**#elseif** peut être ajouté à un bloc ##[[KeyPgPpif #if]]## pour procurer une condition additionnelle. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/prepro/elseif.bas"}}%%(freebasic) -#DEFINE WORDSIZE 16 -#IF (WORDSIZE = 16) - ' Do some some 16 bit stuff -#ELSEIF (WORDSIZE = 32) - ' Do some some 32 bit stuff -#ELSE - #ERROR WORDSIZE must be set to 16 or 32 -#ENDIF +#define WORDSIZE 16 +#if (WORDSIZE = 16) +' Do some some 16 bit stuff + #elseif (WORDSIZE = 32) +' Do some some 32 bit stuff + #else +#error WORDSIZE must be set To 16 Or 32 + #endif %% - {{fbdoc item="diff"}} - - New to Freebasic -{{fbdoc item="see"}} - - ##[[KeyPgPpdefine #define]]## +- Nouveau pour Freebasic + {{fbdoc item="see"}} + +- ##[[KeyPgPpdefine #define]]## - ##[[KeyPgPpmacro #macro]]## - ##[[KeyPgPpif #if]]## - ##[[KeyPgPpelse #else]]## @@ -39,6 +38,7 @@ Preprocessor conditional directive - ##[[KeyPgPpifndef #ifndef]]## - ##[[KeyPgPpundef #undef]]## - ##[[KeyPgDefined defined]]## + - ##[[KeyPgDefined defined]]## {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpendif.wakka b/fbdocs/manual/cache/KeyPgPpendif.wakka index 2338757f3e..c5ec780fa4 100644 --- a/fbdocs/manual/cache/KeyPgPpendif.wakka +++ b/fbdocs/manual/cache/KeyPgPpendif.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="#ENDIF"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur {{fbdoc item="syntax"}}## **#endif** ## {{fbdoc item="desc"}} - Ends a group of conditional directives + Termine un groupe de directives conditionnelles - See ##[[KeyPgPpif #if]]##, ##[[KeyPgPpifdef #ifdef]]##, or ##[[KeyPgPpifndef #ifndef]]## for examples of usage. + Voir ##[[KeyPgPpif #if]]##, ##[[KeyPgPpifdef #ifdef]]##, ou ##[[KeyPgPpifndef #ifndef]]## pour des exemples d'utilisation. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/endif.bas"}}%%(freebasic) @@ -18,7 +18,7 @@ Preprocessor conditional directive %% {{fbdoc item="diff"}} - - New to Freebasic + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## diff --git a/fbdocs/manual/cache/KeyPgPperror.wakka b/fbdocs/manual/cache/KeyPgPperror.wakka index f944ded5ec..b6bdc3cf25 100644 --- a/fbdocs/manual/cache/KeyPgPperror.wakka +++ b/fbdocs/manual/cache/KeyPgPperror.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value=" #ERROR"}}---- -Preprocessor diagnostic directive +Directive préprocesseur de diagnostique {{fbdoc item="syntax"}}## **#error** //error_text// ## {{fbdoc item="param"}} ##//error_text//## - The display message + Le message affiché {{fbdoc item="desc"}} - ##**#error**## stops compiling and displays ##//error_text//## when compiler finds it. + ##**#error**## arrête la compilation et affiche ##//error_text//## quand le compilateur détecte une erreur. - This keyword must be surrounded by an ##[[KeyPgPpif #if]]## ...##[[KeyPgPpendif #endif]]## so compiler can reach ##**#error**## only if is meet. + Ce mot-clef doit être encadré par ##[[KeyPgPpif #if]]## ...##[[KeyPgPpendif #endif]]## ainsi le compilateur peut atteindre ##**#error**## seulement si est vérifiée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/error.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ Preprocessor diagnostic directive %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpif #if]]## diff --git a/fbdocs/manual/cache/KeyPgPpif.wakka b/fbdocs/manual/cache/KeyPgPpif.wakka index 6bd9b72e4b..1185069e4c 100644 --- a/fbdocs/manual/cache/KeyPgPpif.wakka +++ b/fbdocs/manual/cache/KeyPgPpif.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="#IF"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur -{{fbdoc item="syntax"}}## - **#if** (expression) - ' Conditionally included statements +{{fbdoc item="syntax"}} + ##**#if**## (expression) + ' Déclarations incluses sous condition [[KeyPgPpendif #endif]] -## {{fbdoc item="desc"}} - Conditionally includes statements at compile time. +Déclarations incluses sous condition au moment de la compilation. + Les déclarations contenues dans le bloc ##**#if**## / ##[[KeyPgPpendif #endif]]## sont incluses si ##//expression//## est évaluée comme Vrai (True) (non-zéro) et exclues (ignorées) si ##//expression//## est évaluée comme Faux (False) (0). - Statements contained within the ##**#if**## / ##[[KeyPgPpendif #endif]]## block are included if ##//expression//## evaluates to True (non-zero) and excluded (ignored) if ##//expression//## evaluates to False (0). + Cette directive conditionnelle diffère de la déclaration conditionnelle ##[[KeyPgIfthen If]]## car ##**#if**## est évalué au moment de la compilation alors que ##[[KeyPgIfthen If]]## est évalué à l'exécution du programme. - This conditional directive differs from the ##[[KeyPgIfthen If]]## conditional statement in that ##**#if**## is evaluated at compile-time and ##[[KeyPgIfthen If]]## is evaluated at run-time. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/prepro/if.bas"}}%%(freebasic) #define DEBUG_LEVEL 1 -#IF (DEBUG_LEVEL >= 2) - ' This line is not compiled since the expression is False +#if (DEBUG_LEVEL >= 2) +' This line is not compiled since the expression is False Print "Starting application" -#ENDIF + #endif %% - {{fbdoc item="diff"}} - - New to ""FreeBASIC"" -{{fbdoc item="see"}} - - ##[[KeyPgPpdefine #define]]## +- Nouveau pour Freebasic + {{fbdoc item="see"}} + +- ##[[KeyPgPpdefine #define]]## - ##[[KeyPgPpmacro #macro]]## - ##[[KeyPgPpelse #else]]## - - ##[[KeyPgPpelseif #elseIf]]## + - ##[[KeyPgPpelseif #elseif]]## - ##[[KeyPgPpendif #endif]]## - ##[[KeyPgPpifdef #ifdef]]## - ##[[KeyPgPpifndef #ifndef]]## - ##[[KeyPgPpundef #undef]]## - ##[[KeyPgDefined defined]]## + - ##[[KeyPgDefined defined]]## {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpifdef.wakka b/fbdocs/manual/cache/KeyPgPpifdef.wakka index ce7ea8d574..68cc84f2da 100644 --- a/fbdocs/manual/cache/KeyPgPpifdef.wakka +++ b/fbdocs/manual/cache/KeyPgPpifdef.wakka @@ -1,31 +1,30 @@ {{fbdoc item="title" value="#IFDEF"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur -{{fbdoc item="syntax"}}## - **#ifdef** //symbol// - ' Conditionally included statements +{{fbdoc item="syntax"}} + ##**#ifdef**## //symbol// + ' Déclarations incluses sous condition [[KeyPgPpendif #endif]] -## {{fbdoc item="desc"}} - Conditionally includes statements at compile time. +Déclarations incluses sous condition au moment de la compilation. + Les déclarations contenues dans le bloc ##**#ifdef**...[[KeyPgPpendif #endif]]## sont incluses si ##//symbol//## est défini et exclues (ignorée) si ##//symbol//## n'est pas défini. - Statements within the ##**#ifdef**...[[KeyPgPpendif #endif]]## block are included if ##//symbol//## is defined and excluded (ignored) if ##//symbol//## is not defined. + ##**#ifdef** //symbol//## est équivalent à ##[[KeyPgPpif #if]] [[KeyPgDefined defined]] (//symbol//)## - ##**#ifdef** //symbol//## is equivalent to ##[[KeyPgPpif #if]] [[KeyPgDefined defined]] (//symbol//)## + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/prepro/ifdef.bas"}}%%(freebasic) -#DEFINE _DEBUG -#IFDEF _DEBUG - ' Special statements for debugging -#ENDIF +#define _DEBUG +#ifdef _DEBUG +' Special statements for debugging + #endif %% - {{fbdoc item="diff"}} - - New to Freebasic -{{fbdoc item="see"}} - - ##[[KeyPgPpdefine #define]]## +- Nouveau pour Freebasic + {{fbdoc item="see"}} + +- ##[[KeyPgPpdefine #define]]## - ##[[KeyPgPpmacro #macro]]## - ##[[KeyPgPpif #if]]## - ##[[KeyPgPpelse #else]]## @@ -34,5 +33,6 @@ Preprocessor conditional directive - ##[[KeyPgPpifndef #ifndef]]## - ##[[KeyPgPpundef #undef]]## - ##[[KeyPgDefined defined]]## + - ##[[KeyPgDefined defined]]## {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpifndef.wakka b/fbdocs/manual/cache/KeyPgPpifndef.wakka index a4f209c5ae..25dae463d3 100644 --- a/fbdocs/manual/cache/KeyPgPpifndef.wakka +++ b/fbdocs/manual/cache/KeyPgPpifndef.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="#IFNDEF"}}---- -Preprocessor conditional directive +Directive conditionnelle du préprocesseur -{{fbdoc item="syntax"}}## - **#ifndef** //symbol// - ' Conditionally included statements - [[KeyPgPpendif endif]] -## +{{fbdoc item="syntax"}} + ##**#ifndef**## //symbol// + ' Déclarations incluses sous condition + ## +[[KeyPgPpendif #endif]]## {{fbdoc item="desc"}} - Conditionally includes statements at compile time. + Déclarations incluses sous condition au moment de la compilation. - Statements within the ##**#ifndef**...[[KeyPgPpendif #endif]]## block are included if //symbol// is not defined and excluded (ignored) if //symbol// is defined. + Les déclarations contenues dans le bloc ##**#ifndef**...[[KeyPgPpendif #endif]]## sont incluses si //symbol// n'est pas défini et exclues (ignorées) si //symbol// est défini. - ##**#ifndef** //symbol//## is equivalent to ##[[KeyPgPpif #if]] Not [[KeyPgDefined defined]](//symbol//)## + ##**#ifndef** //symbol//## est équivalent à ##[[KeyPgPpif #if]] Not [[KeyPgDefined defined]](//symbol//)## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/ifndef.bas"}}%%(freebasic) @@ -22,7 +22,7 @@ Preprocessor conditional directive %% {{fbdoc item="diff"}} - - New to Freebasic + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## diff --git a/fbdocs/manual/cache/KeyPgPplang.wakka b/fbdocs/manual/cache/KeyPgPplang.wakka index 6e40ccb732..7ae2f8f148 100644 --- a/fbdocs/manual/cache/KeyPgPplang.wakka +++ b/fbdocs/manual/cache/KeyPgPplang.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="#LANG"}}---- -Preprocessor statement to set the compiler dialect. +Déclaration du préprocesseur pour définir le dialecte du compilateur. {{fbdoc item="syntax"}}## **#lang** "//lang//" ## {{fbdoc item="param"}} ##"//lang//"## - The dialect to set, enclosed in double quotes, and must be one of ##"fb"##, ##"fblite"##, ##"qb"##, or ##"deprecated"##. + Le dialecte à fixer, entre guillemets doubles, qui doit être l'un de ceux-ci: ##"fb"##, ##"fblite"##, ##"qb"##, ou ##"deprecated"##. {{fbdoc item="desc"}} - If the //[[CompilerOptforcelang -forcelang]]// option was not given on the command line, ##**#lang**## can be used to set the dialect for the source module in which it appears. At most two passes will be made on the source module. On the first pass, if the specified dialect is anything other than the default dialect (chosen with //[[CompilerOptlang -lang]]//, or ##"fb"## by default), the compiler will reset the parser for another pass and restart compilation at the beginning of the source module. If this directive is encountered again on the second pass, and the specified dialect does not match the new current dialect, a warning is issued and compilation continues. If any errors were encountered on the first pass, the compiler will not attempt a second pass." + Si l'option //[[CompilerOptforcelang -forcelang]]// n'a pas été donnée par la ligne de commande, ##**#lang**## peut être utilisé pour indiquer le dialecte dans lequel le module source apparaît. Tout au plus deux passes seront effectuées sur le module source. Lors de la première passe, si le dialecte spécifié est différent du dialecte par défaut (choisi avec //[[CompilerOptlang -lang]]//, ou ##"fb"## par défaut), le compilateur réinitialisera l'analyseur pour un nouveau passage et redémarrera la compilation au début du module source. Si cette directive est rencontrée à nouveau lors de la seconde passe et que le dialecte spécifié ne correspond pas au nouveau dialecte courant, un avertissement est émis et la compilation continue. Si des erreurs ont été rencontrées lors du premier passe, le compilateur ne tentera pas une seconde passe. - ##**#lang**## may not be used in any compound statement, scope, or subroutine. However, it may be nested in module level preprocessor statements or used in an include file. + ##**#lang**## ne peut pas être utilisé dans toute instruction composée, portée ou sous-programme. Cependant, il peut être imbriqué dans des déclarations au niveau module du préprocesseur ou utilisé dans un "fichier include". - There is currently no restriction on where this directive may be placed in a source module. In future this may change, therefore best practice would be to use this directive before the first declaration, definition, or executable statement in the source. + Il n'existe actuellement aucune restriction sur l'endroit où cette directive peut être placée dans un module source. A l'avenir, cela pourrait changer; cependant, la meilleure pratique est d'utiliser cette directive avant la première déclaration, définition ou déclaration exécutable dans le source. - This directive overrides the //[[CompilerOptlang -lang]]// option if it was given on the command line. However, if the //[[CompilerOptforcelang -forcelang]]// option was given on the command line, this directive will have no effect. A warning is issued, the directive is ignored, and compilation will continue. This allows the user to explicitly override ##**#lang**## directives. + Cette directive annule l'option //[[CompilerOptlang -lang]]// si elle a été donnée sur la ligne de commande. Cependant, si l'option //[[CompilerOptforcelang -forcelang]]// a été donnée sur la ligne de commande, cette directive sera sans effet. Un avertissement est affiché, la directive est ignorée et la compilation continue. Cela permet à l'utilisateur de remplacer explicitement les directives ##**#lang**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/lang.bas"}}%%(freebasic) @@ -23,13 +23,13 @@ Preprocessor statement to set the compiler dialect. %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgMetaLang $lang]]## - ##[[KeyPgDdfblang __FB_LANG__]]## - - [[CompilerOptlang Compiler Option: -lang]] - - [[CompilerOptforcelang Compiler Option: -forcelang]] - - [[CompilerDialects FreeBASIC Dialects]] + - [[CompilerOptlang Option du compilateur: -lang]] + - [[CompilerOptforcelang Option du compilateur: -forcelang]] + - [[CompilerDialects Les dialectes du FreeBASIC]] {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPplibpath.wakka b/fbdocs/manual/cache/KeyPgPplibpath.wakka index 039a464fc6..4354e6d16a 100644 --- a/fbdocs/manual/cache/KeyPgPplibpath.wakka +++ b/fbdocs/manual/cache/KeyPgPplibpath.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="#LIBPATH"}}---- -Preprocessor statement to add a search path for libraries +Déclaration du préprocesseur pour ajouter un chemin de recherche pour les bibliothèques {{fbdoc item="syntax"}}## **#libpath** "//path//" ## {{fbdoc item="desc"}} - Adds a library search path to the linker's list of search paths as if it had been specified on the command line with the '-p' option. + Ajoute un chemin de recherche pour les bibliothèques à la liste de recherche de chemins de l'éditeur de liens comme si elle avait été spécifiée sur la ligne de commande avec l'option '-p'. - Paths are relative to the working directory where fbc was invoked and not relative to the directory of the source file. + Les chemins sont relatifs au répertoire de travail où fbc a été invoqué, et non par rapport au répertoire du fichier source. - No error is generated if the path does not exist and compilation and linking will continue. + Aucune erreur n'est générée si le chemin n'existe pas et la compilation et les liens se poursuivront. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/libpath.bas"}}%%(freebasic) @@ -18,11 +18,11 @@ Preprocessor statement to add a search path for libraries %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgInclude #inclib]]## - ##[[KeyPgInclude #include]]## - - [[CompilerOptp Compiler Option: -p]] + - [[CompilerOptp Option du compilateur: -p]] {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpline.wakka b/fbdocs/manual/cache/KeyPgPpline.wakka index 98900aa895..6b3fe2f5c5 100644 --- a/fbdocs/manual/cache/KeyPgPpline.wakka +++ b/fbdocs/manual/cache/KeyPgPpline.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="#LINE"}}---- -Preprocessor directive to set the current line number and file name +Déclaration du préprocesseur pour définir le numéro de ligne courant et nom de fichier {{fbdoc item="syntax"}}## **#line** //number// [ "//name//" ] ## {{fbdoc item="param"}} ##//number// ## - new line number + nouveau numéro de ligne ##"//name//"## - new file name (optional) + nouveau nom de fichier (facultatif) {{fbdoc item="desc"}} - Informs the compiler of a change in line number and file name and updates the ##[[KeyPgDdfile __FILE__]]## and ##[[KeyPgDdline __LINE__]]## macro values accordingly. + Informe le compilateur d'un changement de numéro de ligne et de nom de fichier et met à jour les valeurs des macros ##[[KeyPgDdfile __FILE__]]## et ##[[KeyPgDdline __LINE__]]## en conséquence. - Both compile time messages and run-time messages are affected by this directive. + Les messages d'heure de compilation ainsi que ceux d'heure d'exécution seront affectés par cette directive. - This directive allows other programs to generate source code for the FreeBASIC compiler and have it return warning and/or error messages that refer to the original source used by the other program. + Cette directive permet aux autres programmes de générer du code source pour le compilateur FreeBasic et qu'il retourne avertissement et/ou messages d'erreur qui font référence à la source d'origine utilisée par l'autre programme. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/line.bas"}}%%(freebasic) @@ -28,7 +28,7 @@ error 1000 %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgDdfile __FILE__]]## diff --git a/fbdocs/manual/cache/KeyPgPpmacro.wakka b/fbdocs/manual/cache/KeyPgPpmacro.wakka index 562c6e5b47..ef678085ae 100644 --- a/fbdocs/manual/cache/KeyPgPpmacro.wakka +++ b/fbdocs/manual/cache/KeyPgPpmacro.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="#MACRO...#ENDMACRO"}}---- -Preprocessor directive to define a multiline macro +Directive du préprocesseur pour définir une macro multi-ligne {{fbdoc item="syntax"}}## **#macro** //macro_name//( [ //parameters// ] ) @@ -11,57 +11,42 @@ Preprocessor directive to define a multiline macro **#endmacro** ## {{fbdoc item="desc"}} - ##**#macro**## defines a function like macro where ##//macro body//## may span multiple lines. + ##**#macro**## définit une fonction comme macro où ##//macro body (corps de la macro)//## peut s'étendre sur plusieurs lignes. - Parameters supplied to the function like macro are substituted where they occur in the ##//macro body//##. The entire ##//macro body//## is substituted where ever ##//macro_name//## appears in the source code. The number of parameters supplied to a macro must match the number of parameters in its ##**#macro**## definition. - - Using ##[[KeyPgDots ...]]## (an ellipsis) behind the last parameter of a macro allows to create a variadic macro, see [[KeyPgPpdefine #define]]. - - The ##[[KeyPgPpifdef #ifdef]]## and ##[[KeyPgPpifndef #ifndef]]## preprocessor conditionals can test if ##//macro_name//## exists or does not exist. +Les paramètres fournis à la fonction comme macro sont mis à la place où ils fonctionnent dans ##//macro body//##. Le ##//macro body//## est placé en entier chaque fois que ##//macro_name//## apparaît dans le code source. Le nombre de paramètres transmis à la macro doit correspondre au nombre de paramètres dans sa ##**#macro**## définition. +Utiliser ##[[KeyPgDots ...]]## (une ellipse) derrière le dernier paramètre d'une macro permet de créer une macro variadique, voir [[KeyPgPpdefine #define]]. +Les conditionnels du préprocesseur ##[[KeyPgPpifdef #ifdef]]## et ##[[KeyPgPpifndef #ifndef]]## peuvent tester si ##//macro_name//## existe ou n'existe pas. +La directive préprocesseur ##[[KeyPgPpundef #undef]]## peut annuler la définition d'une macro de façon à pouvoir la redéfinir avec une autre définition. + La substitution de macro peut être vérifiée en utilisant les options -g -r. Le compilateur n'effacera pas le fichier .asm intermédiaire dans lequel le code réellement envoyé au compilateur peut être vu à côté de sa traduction en assembleur. +{{fbdoc item="ex"}} - The ##[[KeyPgPpundef #undef]]## preprocessor directive will undefine a macro so that it may be redefined with another definition. - Macro substitution can be checked by using the -g -r switches. The compiler doesn't erase the intermediate .asm file where the code actually sent to the compiler can be seen close to its translation into assembler. +print Print1( "Hello", "World" ) -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/prepro/macro.bas"}}%%(freebasic) '' macro as an expression value #macro Print1( a, b ) - a + b -#endmacro - -print Print1( "Hello", "World" ) +a + b +#endmacro +Print Print1( "Hello", "World" ) '' Output : -'' Hello World! -%% - -{{fbdoc item="filename" value="examples/manual/prepro/macro2.bas"}}%%(freebasic) -'' macro as multiple statements + '' Hello World! + %% + %%(freebasic) + '' macro as multiple statements #macro Print2( a, b ) - print a; - print " "; - print b; - print "!" -#endmacro -Print2( "Hello", "World" ) +Print a; -'' Output : -'' Hello World! -%% +Print " "; +Print b; +Print "!" -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +#endmacro + Print2( "Hello", "World" ) -{{fbdoc item="see"}} - - ##[[KeyPgPpdefine #define]]## - - ##[[KeyPgPpif #if]]## - - ##[[KeyPgPpelse #else]]## - - ##[[KeyPgPpelseif #elseif]]## - - ##[[KeyPgPpendif #endif]]## - - ##[[KeyPgPpifdef #ifdef]]## - - ##[[KeyPgPpifndef #ifndef]]## - - ##[[KeyPgPpundef #undef]]## - - ##[[KeyPgDefined defined]]## +'' Output : + '' Hello World! + %% + {{fbdoc item="diff"}} -{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} \ No newline at end of file +- Nouveau pour Freebasic \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPpprint.wakka b/fbdocs/manual/cache/KeyPgPpprint.wakka index 5591cc3b9c..8598fe742b 100644 --- a/fbdocs/manual/cache/KeyPgPpprint.wakka +++ b/fbdocs/manual/cache/KeyPgPpprint.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value=" #PRINT"}}---- -Preprocessor diagnostic directive +Directive de diagnostic du préprocesseur {{fbdoc item="syntax"}}## **#print** //text// ## {{fbdoc item="desc"}} - Causes compiler to output ##//text//## to screen during compilation. + Oblige le compilateur à afficher ##//text//## à l'écran durant la compilation. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/print.bas"}}%%(freebasic) @@ -13,7 +13,7 @@ Preprocessor diagnostic directive %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPperror #error]]## diff --git a/fbdocs/manual/cache/KeyPgPpundef.wakka b/fbdocs/manual/cache/KeyPgPpundef.wakka index a90bfdb1cb..12256b1b8a 100644 --- a/fbdocs/manual/cache/KeyPgPpundef.wakka +++ b/fbdocs/manual/cache/KeyPgPpundef.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="#UNDEF"}}---- -Preprocessor directive to undefine a macro +Directive préprocesseur pour annuler la définition d'une macro {{fbdoc item="syntax"}}## **#undef** //symbol// ## {{fbdoc item="desc"}} - Undefines a symbol previously defined with ##[[KeyPgPpdefine #define]]##. + Annule la définition d'un symbole défini précédemment avec ##[[KeyPgPpdefine #define]]##. - Can be used to ensure that a macro or symbol has a limited lifespan and does not conflict with a similar macro definition that may be defined later in the source code. + Peut être utilisé pour veiller à ce qu'une macro ou un symbole ait une durée de vie limitée et ne soit pas en conflit avec une définition de macro similaire qui pourrait être définie ultérieurement dans le code source. - (Note: ###undef## should not be used to undefine variable or function names used in the current function scope. The names are needed internally by the compiler and removing them can cause strange and unexpected results.) + (Note: ###undef## ne devrait pas être utilisé pour annuler la définition de noms de variables ou de fonction utilisés dans la portée de la fonction actuelle. Ces noms sont nécessaires au compilateur en interne et les enlever peut entraîner des résultats étranges et inattendus.) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/undef.bas"}}%%(freebasic) @@ -20,7 +20,7 @@ Print ADD2(1, 2) %% {{fbdoc item="diff"}} - - New to Freebasic + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## diff --git a/fbdocs/manual/cache/KeyPgPragma.wakka b/fbdocs/manual/cache/KeyPgPragma.wakka index 67dedb4c1f..dfea6f3634 100644 --- a/fbdocs/manual/cache/KeyPgPragma.wakka +++ b/fbdocs/manual/cache/KeyPgPragma.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="#PRAGMA"}}---- -Preprocessor directive +Directive du préprocesseur {{fbdoc item="syntax"}}## **#pragma** //option// [ =//value// ] - ##//Or//## + ##//ou//## **#pragma** **push** ( //option// ) - ##//Or//## + ##//ou//## **#pragma** **pop** ( //option// ) ## {{fbdoc item="param"}} - Possible values for ##//option//## and related ##//value//##s: + Les valeurs possibles pour ##//option//## et les ##//value//##s en relation sont: - {{table columns="3" cellpadding="1" cells="Option; Value; Description; msbitfields; 0; Use bitfields compatible with gcc (default);###; (nonzero); Use bitfields compatible with those used in Microsoft C compilers; once; N/A; cause the source file in which the pragma appears to behave as though it was included with #include once ..."}} + {{table columns="" cellpadding="2" cells="Option; Valeur; Description; msbitfields; 0;Utilisation de "bitfields" compatibles avec gcc (par défaut); (non-zéro); Utilisation de "bitfields" compatibles avec ceux utilisés dans les compilateurs C Microsoft; once; N/A; Le fichier source dans lequel apparaît "pragma" se comporte comme s'il était inclus une seule fois avec "#include" ...;
    {{fbdoc item="desc"}} - Allows the setting of compiler options inside the source code. + Permet le réglage des options du compilateur dans le code source. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/pragma.bas"}}%%(freebasic) @@ -30,7 +30,7 @@ Preprocessor directive %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgInclude #include]]## diff --git a/fbdocs/manual/cache/KeyPgPreserve.wakka b/fbdocs/manual/cache/KeyPgPreserve.wakka index 30e9eb0882..38026f569a 100644 --- a/fbdocs/manual/cache/KeyPgPreserve.wakka +++ b/fbdocs/manual/cache/KeyPgPreserve.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="PRESERVE"}}---- -Used with ##[[KeyPgRedim Redim]]## to preserve contents will resizing an array +Utilisé avec ##[[KeyPgRedim ReDim]]## pour préserver le contenu d'un tableau lors de son redimensionnement {{fbdoc item="syntax"}}## [[KeyPgRedim redim]] **Preserve** //array//(...) [[KeyPgAs as]] [[DataType datatype]] ## {{fbdoc item="desc"}} - Used with ##[[KeyPgRedim Redim]]## so that when an array is resized, data is not reset but is preserved. This means when the array is enlarged that only new data is reset, while the old data remains the same. + Utilisé avec ##[[KeyPgRedim ReDim]]## de sorte que quand un tableau est redimensionné, les données sont pas remises à zéro, mais conservées. Cela signifie que lorsque le tableau est agrandi, seules les données nouvelles sont remises à zéro, tandis que les anciennes données restent les mêmes. - **NOTE**: ##**Redim** [[KeyPgPreserve Preserve]]## may not work as expected in all cases: - ##[[KeyPgPreserve Preserve]]##'s current behavior is to keep the original data contiguous in memory, and only expand or truncate the size of the memory. - Its behavior is only well-defined when the upper bound is changed. If the lower bound is changed, the current result is that the data is in effect shifted to start at the new lower bound. - If there are multiple dimensions, only the upper bound of the first dimension may be changed safely. If lower-order dimensions are resized at all, the effects can be hard to predict. + **NOTE**: ##**ReDim** [[KeyPgPreserve Preserve]]## peut ne pas fonctionner comme espéré dans certains cas: + Le comportement normal de ##[[KeyPgPreserve Preserve]]## est de conserver les données originales contiguës dans la mémoire et seulement augmenter ou diminuer la taille de la mémoire. + Son comportement n'est bien défini que lorsque la borne supérieure est changée. Si la borne inférieure est modifiée, le résultat est que les données sont en effet déplacées pour commencer à la nouvelle limite inférieure. + S'il y a des dimensions multiples, seule la limite supérieure de la première dimension peut être modifiée en toute sécurité. Si les dimensions d'ordre inférieur sont toutes redimensionnées, les effets sont imprévisibles. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/array/preserve.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ next %% {{fbdoc item="diff"}} - - ##**Preserve**## wasn't supported until PDS 7.1 + - ##**Preserve**## n'était pas supporté jusqu'à PDS 7.1 {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/KeyPgPreset.wakka b/fbdocs/manual/cache/KeyPgPreset.wakka index 5748da6323..e4338a0257 100644 --- a/fbdocs/manual/cache/KeyPgPreset.wakka +++ b/fbdocs/manual/cache/KeyPgPreset.wakka @@ -1,44 +1,44 @@ {{fbdoc item="title" value="PRESET"}}---- -Plots a single pixel +Place un seul pixel {{fbdoc item="syntax"}}## **PReset** [//target// ,] [STEP] (//x//, //y//) [,//color//] ## {{fbdoc item="param"}} ##//target//## - specifies buffer to draw on. + spécifie le tampon sur lequel on travaille. ##STEP## - indicates that coordinates are relative + indique que les coordonnées sont relatives ##(//x, y//)## - coordinates of the pixel. + coordonnées du pixel. ##//color//## - the color attribute. + L'attribut de couleur. {{fbdoc item="desc"}} - ##//target//## specifies buffer to draw on. ##//target//## may be an image created with ##[[KeyPgImagecreate ImageCreate]]## or ##[[KeyPgGetgraphics Get (Graphics)]]##. If omitted, //target// defaults to the screen's current work page. + ##//target//## spécifie le tampon sur lequel on travaille. ##//target//## peut être une image créée avec ##[[KeyPgImagecreate ImageCreate]]## ou ##[[KeyPgGetgraphics Get (Graphics)]]##. Si omis, //target// est par défaut la page de travail courante de l'écran. - ##(//x, y//)## are the coordinates of the pixel. STEP if present, indicates that ##(//x, y//)## coordinates are relative to the graphics cursor position. If omitted, ##(//x, y//)## are relative to the upper left-hand corner of ##//target//##. The x and y coordinates are affected by the last call to the ##[[KeyPgViewgraphics View (Graphics)]]## and ##[[KeyPgWindow Window]]## statements, and respect the current clipping region as set by the ##[[KeyPgViewgraphics View (Graphics)]]## statement. + ##(//x, y//)## sont les coordonnées du pixel. Si STEP est présent, il indique que les coordonnées ##(//x, y//)## sont relatives à la position du curseur graphique. Si omis, ##(//x, y//)## sont relatifs au coin en haut à gauche de ##//target//##. Les coordonnées x et y sont affectées par le dernier appel à ##[[KeyPgViewgraphics View (Graphics)]]## et ##[[KeyPgWindow Window]]## et respectent la région de découpage (clipping region) validée par ##[[KeyPgViewgraphics View (Graphics)]]##. - ##//color//## specifies the color attribute. If omitted, ##//color//## defaults to the current background color. See ##[[KeyPgColor Color]]##. ##//color//## is graphics mode specific, see ##[[KeyPgColor Color]]## and ##[[KeyPgScreengraphics Screen (Graphics)]]## for details. + ##//color//## spécifie l'attribut de couleur. Si omis, ##//color//## est par défaut la couleur courante d'arrière-plan. Voir ##[[KeyPgColor Color]]##. ##//color//## dépend du mode graphique courant, voir ##[[KeyPgColor Color]]## et ##[[KeyPgScreengraphics Screen (Graphique)]]## pour plus de détails. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/preset.bas"}}%%(freebasic) SCREEN 13 -'Set background color to 15 +'Couleur arriere-plan a 15 COLOR , 15 -'Draw a pixel with the background color at 10, 10 +'Dessine un pixel avec la couleur d'arriere-plan a 10, 10 PRESET (10,10) -'Draw a pixel with the background color at Last x cord +10, Last y cord +10 +'Dessine un pixel avec la couleur d'arriere-plan a dernier x cord +10, dernier y cord +10 PRESET Step (10,10) SLEEP %% {{fbdoc item="diff"}} - - ##//target//## is new to ""FreeBASIC"" + - ##//target//## Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPset PSet]]## diff --git a/fbdocs/manual/cache/KeyPgPrint.wakka b/fbdocs/manual/cache/KeyPgPrint.wakka index 039157ba37..0e942c3c43 100644 --- a/fbdocs/manual/cache/KeyPgPrint.wakka +++ b/fbdocs/manual/cache/KeyPgPrint.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="PRINT"}}---- -Writes text to the screen +Ecrire du texte à l'écran {{fbdoc item="syntax"}}## **Print** [ //expressionlist// ] [ , | ; ] ## {{fbdoc item="param"}} ##//expressionlist//## - list of items to print + liste des items à afficher {{fbdoc item="desc"}} - ##**Print**## outputs a list of values to the screen. Numeric values are converted to their string representation, with left padding for the sign. Objects of user-defined types must overload ##Operator Cast () As String##. + ##**Print**## envoie une liste de valeurs à l'écran. Les valeurs numériques sont converties vers leur représentation chaîne, avec un remplissage à gauche pour le signe. Des objets de types définis par l'utilisateur doivent surcharger **Operator Cast () As String**. - Consecutive values in the expression list are separated either by a comma (##,##) or semicolon (##;##). A comma indicates printing should take place at the next 14 column boundary, while a semicolon indicates values are printed with no space between them. This has a similar effect to concatenating expressions using ##[[KeyPgOpConcat +]]## or ##[[KeyPgOpConcatConvert &]]##. + Les valeurs consécutives dans la liste d'expressions sont séparées par une virgule (##,##) ou point-virgule (##;##). Une virgule indique que l'affichage suivant devrait avoir lieu 14 colonnes plus loin, alors que point-virgule indique que toutes les valeurs sont affichées à la suite sans espace entre elles. Cela a le même effet que la concaténation d'expressions en utilisant ##[[KeyPgOpConcat +]]## ou ##[[KeyPgOpConcatConvert &]]##. - ##**Print**## also supports the special expressions, ##[[KeyPgSpc Spc]]()## and ##[[KeyPgTab Tab]]()##. These can be used to space out expressions, or to align the printing to a specific column. + ##**Print**## supporte aussi les expressions spéciales, ##[[KeyPgSpc Spc]]()## et ##[[KeyPgTab Tab]]()##. Celles-ci peuvent être utilisées pour espacer les expressions ou pour aligner l'affichage sur une colonne spécifique. - A new-line character is printed after the values in the expression list unless the expression list is followed by a comma or semicolon. A ##**Print**## without any expressions or separators following it will just print a new-line. + Un caractère "nouvelle ligne" est affiché après les valeurs de la liste des expressions à moins que la liste des expressions ne soit terminée par une virgule ou un point-virgule. Un ##**Print**## sans aucune expression ou séparateur, affichera seulement un caractère "nouvelle ligne". - NOTE: ##**Print**## resets the ##[[KeyPgErr Err]]## value after each expression is printed. + NOTE: ##**Print**## ré-initialise la valeur ##[[KeyPgErr Err]]## dès chaque expression est imprimée. - For more control over character style and text position in graphics modes, consider using ##[[KeyPgDrawString Draw String]]##. + Pour plus de contrôle sur le style des caractères et la position du texte dans les modes graphiques, pensez à utiliser ##[[KeyPgDrawString Draw String]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/print.bas"}}%%(freebasic) @@ -46,12 +46,12 @@ Print s; " is great!" %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, an extra space is printed after numbers. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, un espace supplémentaire est affiché après les nombres. {{fbdoc item="diff"}} - - None, when using QBASIC's variable types in //[[CompilerOptlang -lang qb]]//. - - Unsigned numbers are printed without a space before them. - - QB did not support casting for UDTs, so didn't allow them to be ##**Print**##ed. + - Aucune, si vous utilisez des types de variables QBASIC dans //[[CompilerOptlang -lang qb]]//. + - Les nombres non-signés sont affichés sans espace devant eux. + - QB ne supporte pas le "casting" pour les types définis par l'utilisateur (UDT = User-Defined Type), alors on ne peut utiliser ##**Print**## avec eux. {{fbdoc item="see"}} - ##[[KeyPgSpc Spc]]## diff --git a/fbdocs/manual/cache/KeyPgPrintPp.wakka b/fbdocs/manual/cache/KeyPgPrintPp.wakka index c63d0090a8..88f8941226 100644 --- a/fbdocs/manual/cache/KeyPgPrintPp.wakka +++ b/fbdocs/manual/cache/KeyPgPrintPp.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="PRINT #"}}---- -Writes a list of values to a file or device +Ecrit une liste de valeurs dans un fichier ou un périphérique {{fbdoc item="syntax"}}## **Print #** //filenum//**,** [ //expressionlist// ] [ **,** | **;** ] ## {{fbdoc item="param"}} ##//filenum//## - The file number of a file or device opened for ##[[KeyPgOutput Output]]## or ##[[KeyPgAppend Append]]##. + Le numéro de fichier d'un fichier ou un périphérique ouvert pour ##[[KeyPgOutput Output]]## ou ##[[KeyPgAppend Append]]##. ##//expressionlist//## - List of values to write. + Liste des valeurs à écrire. {{fbdoc item="desc"}} - ##**Print #**## outputs a list of values to a text file or device. Numeric values are converted to their string representation, with left padding for the sign. Objects of user-defined types must overload ##Operator Cast () As String##. + ##**Print #**## sort une liste de valeurs vers un fichier texte ou un périphérique. Les valeurs numériques sont converties vers leur représentation sous forme de chaîne, avec remplissage à gauche pour le signe. Les objets de types définis par l'utilisateur doivent surcharger ##Operator Cast () As String##. - Consecutive values in the expression list are separated either by a comma (##,##) or semicolon (##;##). A comma indicates printing should take place at the next 14 column boundary, while a semicolon indicates values are printed with no space between them. + Les valeurs consécutives dans la liste d'expressions sont séparées par une virgule (##,##) ou un point-virgule (##;##). Une virgule indique que l'écriture devrait avoir lieu au début d'une colonne multiplt de 14 octets, alors qu'un point-virgule indique que les valeurs sont écrites sans espace entre elles. - A new-line character is printed after the values in the expression list unless the expression list is followed by a comma or semicolon. + Un caractère de nouvelle ligne est imprimé après les valeurs de la liste des expressions à moins que la liste des expressions ne soit suivie par une virgule ou point-virgule. - Note that the comma (##,##) immediately following the file number is still necessary, even the expression list is empty. In this case a new-line is printed, just as with a normal expression list that doesn't have a comma or semicolon at the end. + Notez que la virgule (##,##) immédiatement après le numéro de fichier est obligatoire, même la liste d'expressions est vide. Dans ce cas une nouvelle ligne est écrite, tout comme une liste d'expressions normale qui n'a pas une virgule ou un point-virgule à la fin. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/print.bas"}}%%(freebasic) @@ -30,12 +30,12 @@ open "bleh.dat" for output as #1 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, an extra space is printed after numbers. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, un espace supplémentaire est écrit après les nombres. {{fbdoc item="diff"}} - - None, when using QBASIC's variable types in //[[CompilerOptlang -lang qb]]//. - - Unsigned numbers are printed without a space before them. - - QB did not support casting for UDTs, so didn't allow them to be ##**Print**##ed. + - Aucune, en utilisant les types de variables QBASIC dans //[[CompilerOptlang -lang qb]]//. + - Les nombres non signés sont écrits sans espace devant eux. + - QB ne supporte pas le "casting" des types définis par l'utilisateur, donc ne peut les ##**Print**##er. {{fbdoc item="see"}} - ##[[KeyPgPrintusingPp Print # Using]]## diff --git a/fbdocs/manual/cache/KeyPgPrintusing.wakka b/fbdocs/manual/cache/KeyPgPrintusing.wakka index 9b7ce14d2a..ea76b8fdaa 100644 --- a/fbdocs/manual/cache/KeyPgPrintusing.wakka +++ b/fbdocs/manual/cache/KeyPgPrintusing.wakka @@ -1,35 +1,35 @@ {{fbdoc item="title" value="PRINT USING"}}---- -Outputs formatted text to the screen +Ecrire du texte formaté à l'écran {{fbdoc item="syntax"}}## **Print Using** //formatstring// **;** [ //expressionlist// ] ## {{fbdoc item="param"}} ##//formatstring//## - Format string to use. + La chaîne de formatage à utiliser. ##//expressionlist//## - List of items to print, separated by semi-colons. + Liste des items à afficher, séparés par des point-virgule. {{fbdoc item="desc"}} - Print to screen various expressions using a format determined by the ##//formatstring//## parameter. Internally, ##**Print Using**## uses a buffer size of 2048 bytes: while it is highly unlikely that this buffer would be filled, it should be noted that output would be truncated should this limit be reached. + Affiche à l'écran des expressions variées en utilisant un format déterminé par le paramètre ##//formatstring//##. En interne, ##**Print Using**## utilise une taille de tampon de 2048 octets: alors qu'il est très peu probable que ce tampon soit rempli, il convient de noter que la sortie écran sera tronquée si cette limite est atteinte. - If no expression list is given, the format string will be printed up to the first special marker. Note that the semi-colon after the format string is still necessary, even if no expression list is given. + Si aucune liste d'expressions n'est donnée, la chaîne de format sera imprimée jusqu'au premier marqueur spécial. Notez que le point-virgule après la chaîne de format est toujours nécessaire, même si aucune liste d'expressions n'est donnée. - The format string dictates how the expressions are to be formatted when output to the screen, indicated by the use of special marker characters. There are markers for formatting both string and numeric output: + La chaîne de format détermine la façon dont les expressions sont formatées lors de la sortie à l'écran, ceci étant indiqué par l'utilisation de caractères marqueurs spéciaux. Il y a des marqueurs pour le formatage de chaîne et de sortie numérique: - {{fbdoc item="section" value="String formatting"}} + {{fbdoc item="section" value="Formatage de chaîne - {{table columns="2" cellpadding="2" cells="Marker;Formatting;!;prints the first character of a string;\ \;prints as many characters of a string as occuppied between the pair \ \;&;prints the entire string"}} + {{table columns="" cellpadding="2" cells="Marqueur;Formatage;!;affiche le 1er caractère d'une chaîne;\ \;imprime autant de caractères d'une chaîne qu'il y en a entre les deux \ \;&affiche la chaîne entière;
    - {{fbdoc item="section" value="Numeric formatting"}} + {{fbdoc item="section" value="Formatage numérique - {{table columns="2" cellpadding="2" cells="Marker;Formatting;#;placeholder for either an integer digit, or a decimal digit if a decimal point precedes it;,;placed after integer digit indicates groups of 3 digits should be separated by commas in fixed-point notation;.;placed near # indicates place for the decimal point;^^^^;uses exponential notation (E+/-###) when placed after the digit characters;+;placed before/after the format string, controls whether the sign of a number is prepended/appended, and causes an explicit '+' sign to be printed for positive numbers;-;placed after the format string, causes the sign of the number to be appended rather than prepended, appending a space/negative sign for positive/negative numbers;$$;placed at the start of integer digits, causes a dollar sign to be prepended to the number (after the sign if one is prepended);**;placed at the start of integer digits, causes any padding on the left to be changed from spaces to asterisks;**$;placed at the start of integer digits, pads on the left with asterisks, and prepends a dollar sign after the asterisks;&;prints a number intelligently, using the exact number of digits required (new to version 0.21.0b)"}} + {{table columns="" cellpadding="2" cells="Marqueur;Formatage;#;espace réservé soit pour un chiffre d'un entier ou un chiffre d'un décimal si précédé d'un point;,; placé après un chiffre d'un entier indique que les groupes de 3 chiffres doivent être séparés par des virgules en notation à virgule fixe;.;placé à proximité d'un # indique la place pour le point décimal;^^^^;utilise la notation exponentielle (E+/-###) s'il est placé à doite d'un format numérique;+;placé avant/après la chaîne formatée, contrôle si le signe d'un nombre est préfixé/suffixé, et implique qu'un explicite signe '+' soit afiché pour les nombres positifs;-;placé après la chaîne formatée, implique que le signe du nombre est suffixé plutôt que préfixé, fait suivre un espace/signe négatif pour les nombres positifs/négatifs;$$;placé au début de chiffres entiers, provoque l'écriture d'un signe de dollar placé avant le nombre (après le signe si l'on est préfixé);**;placé au début de chiffres entiers, provoque le remplacement sur la gauche des espaces par des astérisques;**$;placé au début de chiffres entiers, remplit sur la gauche avec des astérisques et préfixe un signe dollar après les astérisques;&affiche un nombre intelligemment, en utilisant le nombre exact de chiffres requis (nouveauté version 0.21.0b);
    - All of the special marker characters can be escaped by preceding them with the underscore character ##"_"##, allowing them to be printed directly. For example, ##"_!"## is printed as ##"!"##, and ##"_""""_"## is printed as ##"_"##. + Tous les caractères marqueurs spéciaux peuvent être précédés du caractère de soulignement ##"_"##, ce qui permettra de les afficher directement. Par exemple, ##"_!"## affichera ##"!"## et ##"__"## affichera##"_"##. - If a numerical value cannot fit in the number of digits indicated by the format string, the formatting is adapted to fit the number, possibly switching to sientific notation, and the number is printed preceded by the percent ##"%"## character. E.g., the number ##1234## with a ##//formatstring//## of ##"""##.##"""## would be printed as ##"%1234.00"##. + Si une valeur numérique ne correspond pas à la forme indiquée par la chaîne de format, le formatage est adapté au nombre, éventuellement en passant à la notation scientifique, et le nombre est précédé par le caractère pour cent ## "%". Par exemple, le nombre ##1234## avec un ##//formatstring//## de ##"##.##"## sera affiché ##"%1234.00"##. - All other characters within the format string are printed as they appear. + Tous les autres caractères dans la chaîne de format sont imprimés tels qu'ils apparaissent. {{fbdoc item="ex"}} @@ -38,14 +38,14 @@ Print Using "The value is #.## seconds"; 1.019 Print Using "The ASCII code for the pound sign (_#) is ###"; Asc("#") Print Using "The last day in the year is & \ \"; 31; "December" %% - will produce the output: + produira la sortie: %%The value is 1.02 seconds The ASCII code for the pound sign (#) is 35 The last day in the year is 31 Dec%% {{fbdoc item="diff"}} - - QB didn't allow ##"&"## to be used for printing numbers. + - QB ne permet pas l'utilisation de ##"&"## pour afficher des nombres. {{fbdoc item="see"}} - ##[[KeyPgPrint Print]]## diff --git a/fbdocs/manual/cache/KeyPgPrintusingPp.wakka b/fbdocs/manual/cache/KeyPgPrintusingPp.wakka index 25299c9d2e..a31b844b27 100644 --- a/fbdocs/manual/cache/KeyPgPrintusingPp.wakka +++ b/fbdocs/manual/cache/KeyPgPrintusingPp.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="PRINT # USING"}}---- -Outputs formatted text to a file or device +Sort un texte formaté vers un fichier ou un périphérique {{fbdoc item="syntax"}}## **Print #** //filenum// **,** **Using** //formatstring// **;** [ //expressionlist// ] ## {{fbdoc item="param"}} ##//filenum//## - The file number of a file or device opened for ##[[KeyPgOutput Output]]## or ##[[KeyPgAppend Append]]##. + Le numéro de fichier d'un fichier ou d'un périphérique ouvert avec ##[[KeyPgOutput Output]]## ou ##[[KeyPgAppend Append]]##. ##//formatstring//## - Format string to use. + La chaîne formatée à utiliser. ##//expressionlist//## - List of items to print, separated by semi-colons. + Liste des éléments à imprimer, séparés par des points-virgules. {{fbdoc item="desc"}} - Output various expressions to a text file or device using a format determined by the ##//formatstring//## parameter. Internally, ##**Print Using**## uses a buffer size of 2048 bytes: while it is highly unlikely that this buffer would be filled, it should be noted that output would be truncated should this limit be reached. + Sort des expressions diverses dans un fichier texte ou un périphérique en utilisant un format déterminé par le paramètre ##//formatstring//##. En interne, ##**Print Using**## utilise un buffer de 2048 octets: alors qu'il est très peu probable que ce tampon soit rempli, il convient de noter que la sortie serait tronquée si cette limite était atteinte. - If no expression list is given, the format string will be printed up to the first special marker. Note that the semi-colon after the format string is still necessary, even if no expression list is given. + Si aucune ##//expressionlist//## n'est donnée, la ##//formatstring//## sera écrite jusqu'à la première borne spéciale. Notez que le point-virgule après la chaîne formatée est toujours nécessaire, même si aucune liste d'expressions est donnée. - The format string dictates how the expressions are to be formatted when output to the screen, indicated by the use of special marker characters. There are markers for formatting both string and numeric output: + La chaîne de format détermine la façon dont les expressions sont à mettre en forme pour une sortie à l'écran, ceci est indiqué par l'utilisation de caractères marqueurs spéciaux. Il y a deux sortes de marqueurs, pour le formatage de chaîne ou de sortie numérique: - {{fbdoc item="section" value="String formatting"}} + {{fbdoc item="section" value="Le formatage de chaîne - {{table columns="2" cellpadding="2" cells="Marker;Formatting;!;prints the first character of a string;\ \;prints as many characters of a string as occuppied between the pair \ \;&;prints the entire string"}} + {{table columns="" cellpadding="2" cells="Marqueur;Formatage;!;écrit le premier caractère d'une chaîne;\ \;écrit autant de caractères d'une chaîne qu'il y en a entre la paire de \ \;&écrit la chaîne entière;
    - {{fbdoc item="section" value="Numeric formatting"}} + {{fbdoc item="section" value="Le formatage numérique - {{table columns="2" cellpadding="2" cells="Marker;Formatting;#;placeholder for a digit;,; placed after integer digit indicates groups of 3 digits should be separated by commas;.; placed near # indicates place for the decimal point;+;prints the sign of the number when placed to the left of numeric formatting;^^^^;prints exponential notation when placed to the right of numeric formatting;&;prints a number intelligently, using the exact number of digits required (new to version 0.21.0b)"}} + {{table columns="" cellpadding="2" cells="Marqueur;Formatage;#;espace réservé pour un chiffre;,; placé après un chiffre d'un nombre entier indique que les groupes de 3 chiffres doivent être séparés par des virgules;.; placé à proximité de # indique la place pour le point décimal;+;écrit le signe du nombre lorsqu'il est placé à la gauche d'une mise en forme numérique;^^^^;placé à droite de mise en forme numérique implique la notation scientifique;&imprime un nombre intelligemment, en utilisant le nombre exact de chiffres requis (nouveau pour la version 0.21.0b);
    - All of the special marker characters can be escaped, or preceded, with the underscore character ##"_"##, allowing them to be printed directly. For example, ##"_!"## is printed as ##"!"##. + Tous les caractères spéciaux de marqueurs peuvent être précédés d'un caractère d'échappement, ou précédés, avec le caractère de soulignement ##"_"##, leur permettant d'être affichés directement. Par exemple, ##"_!"## est affiché ##"!"##. - If a numerical value doesn't fit in the form indicated by the format string, the formatting is ignored and the number is printed preceded by the percent ##"%"## character. E.g., the number ##1234## with a ##//formatstring//## of ##"""##.##"""## would be printed as ##"%1234.00"##. + Si une valeur numérique ne correspond pas à la forme indiquée par la chaîne de format, la mise en forme est ignorée et le nombre est imprimé précédé par le caractère pour cent ##"%"##. Par exemple, le nombre ##1234## avec une ##//formatstring//## de ##"##.##"## sera affiché ##"%1234.00"##. - All other characters within the format string are printed as they appear. + Tous les autres caractères de la chaîne de format sont écrits tels qu'ils apparaissent. {{fbdoc item="ex"}} @@ -51,7 +51,7 @@ print #filenum, using "'###', '+###.###'"; 123.456, -123.456 close(filenum) %% - will produce the file: + produira le fichier: %% This file is called 'file.txt' Some numerical values are: @@ -59,7 +59,7 @@ Some numerical values are: %% {{fbdoc item="diff"}} - - QB didn't allow ##"&"## to be used for printing numbers. + - QB ne permettait pas d'utiliser ##"&"## pour l'impression de nombres. {{fbdoc item="see"}} - ##[[KeyPgPrintPp Print #]]## diff --git a/fbdocs/manual/cache/KeyPgPrivate.wakka b/fbdocs/manual/cache/KeyPgPrivate.wakka index dbdd285e10..301fc8590a 100644 --- a/fbdocs/manual/cache/KeyPgPrivate.wakka +++ b/fbdocs/manual/cache/KeyPgPrivate.wakka @@ -1,19 +1,19 @@ {{fbdoc item="title" value="PRIVATE"}}---- -Specifies a procedure having internal linkage +Indique une procédure ayant des liens internes {{fbdoc item="syntax"}}## - **Private** [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + **Private** [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - **Private** [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + **Private** [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure definitions, ##**Private**## specifies that a procedure has internal linkage, meaning it's name is not visible to external modules. + Dans les définitions de procédure, ##**Private**## précise que la procédure a une liaison interne, ce qui signifie que son nom n'est pas visible à des modules externes. - The ##[[KeyPgOptionprivate Option Private]]## statement allows procedures to be defined with internal linkage by default. + L'instruction ##[[KeyPgOptionprivate Option Private]]## permet aux procédures d'être définies avec une liaison interne par défaut. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/sub-private.bas"}}%%(freebasic) @@ -27,7 +27,7 @@ End Sub %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPublic Public]]## diff --git a/fbdocs/manual/cache/KeyPgProperty.wakka b/fbdocs/manual/cache/KeyPgProperty.wakka index 1193c0d879..3c3474f313 100644 --- a/fbdocs/manual/cache/KeyPgProperty.wakka +++ b/fbdocs/manual/cache/KeyPgProperty.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PROPERTY"}}---- -Declares or defines a property in a type or class +Déclare ou définit une propriété dans un type ou une classe {{fbdoc item="syntax"}}## { [[KeyPgType Type]] | [[KeyPgClass Class]] } //typename// @@ -27,22 +27,22 @@ Declares or defines a property in a type or class ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## + nom de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## ##//fieldname//## - name of the property + nom de la propriété ##//new_value//## - the value passed to property to be assigned + la valeur passée à la propriété pour être affectée ##//index//## - the property index value + la valeur de l'indice de la propriété {{fbdoc item="desc"}} - ##**Property**## fields are used to get and set values of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## in the same way as other data fields except instead of a simple assignment to a field or a value retrieved from field, a procedure is executed. + Les champs de la ##**Property**## sont utilisés pour obtenir et définir les valeurs de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## de la même manière que les champs de données, sauf qu'au lieu d'une simple affectation à un champ ou une valeur récupérée à partir du champ, une procédure est exécutée. - ##//typename//## is the name of the type for which the ##**Property**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace Namespace]]##. + ##//typename//## est le nom du type sous lequel la méthode ##**Property**## est déclarée et définie. La résolution de noms pour ##//typename//## suit les mêmes règles que les procédures en cas d'utilisation dans un ##[[KeyPgNamespace Namespace]]##. - A **Property** may optionally have one index parameter. When indexed, properties are accessed as Property(Index) = Value. + Une **Property** peut éventuellement avoir un index de paramètres. Quand elles sont indexées, les **Property**s sont accessibles de cette façon: Property(Indice) = Value. - A hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//## is passed to the property procedure. ##[[KeyPgThis this]]## is used to access the fields of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + Un paramètre caché ##[[KeyPgThis This]]## ayant le même type que ##//typename//## est passé à la procédure ##**Property**##. ##[[KeyPgThis This]]## est utilisé pour accéder aux champs de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/property.bas"}}%%(freebasic) @@ -81,74 +81,73 @@ a.length = 10 print "a = "; a print "a.length = "; a.length %% -Output: +Affichage: %% a = (3, 4) a.length = 5 a = (6, 8) a.length = 10 -%% +%%Property Indexé: Property Indexing: -{{fbdoc item="filename" value="examples/manual/udt/property2.bas"}}%%(freebasic) - '' True/False -Namespace BOOL - Const FALSE = 0 - Const TRUE = NOT FALSE -End Namespace - +'' True/False + Namespace BOOL +Const FALSE = 0 + Const TRUE = Not FALSE + End Namespace Type BitNum - Num as uInteger + +Num As UInteger + '' Get/Set Properties each with an Index. - '' Get/Set Properties each with an Index. - Declare Property NumBit( ByVal Index as Integer ) as Integer - Declare Property NumBit( ByVal Index as Integer, ByVal Value as Byte ) -End Type - - '' Get a bit by it's index. -Property BitNum.NumBit( ByVal Index as Integer ) as Integer - Return Bit( This.Num, Index ) -End Property - - '' Set a bit by it's index. -Property BitNum.NumBit( ByVal Index as Integer, ByVal Value as Byte ) - - '' Make sure index is in Integer range. - If Index >= ( Sizeof(This.Num) * 8 ) then - Print "Out of uInteger Range!" - exit property - else - If Index < 0 then exit property - End if + Declare Property NumBit( ByVal Index As Integer ) As Integer + Declare Property NumBit( ByVal Index As Integer, ByVal Value As Byte ) + End Type +'' Get a bit by it's index. + + Property BitNum.NumBit( ByVal Index As Integer ) As Integer +Return Bit( This.Num, Index ) + End Property +'' Set a bit by it's index. + + Property BitNum.NumBit( ByVal Index As Integer, ByVal Value As Byte ) +'' Make sure index is in Integer range. + + If Index >= ( SizeOf(This.Num) * 8 ) Then + Print "Out of uInteger Range!" + Exit Property + Else + If Index < 0 Then Exit Property + End If + If Value = BOOL.FALSE Then - If Value = BOOL.FALSE then - This.Num = BitReSet( This.Num, Index ) - End if + This.Num = BitReset( This.Num, Index ) + End If + If Value = BOOL.TRUE Then - If Value = BOOL.TRUE then - This.Num = BitSet( This.Num, Index ) - End if + This.Num = BitSet( This.Num, Index ) + End If + End Property -End Property +Dim As BitNum Foo -Dim as BitNum Foo +Print "Testing property indexing with data types:" -Print "Testing property indexing with data types:" Print "FOO Number's Value: " & Foo.Num +'' Set the bit in the number as true. - '' Set the bit in the number as true. -Foo.NumBit(31) = BOOL.TRUE + Foo.NumBit(31) = BOOL.TRUE Print "Set the 31st bit of FOO" +'' Print to see if our bit has been changed. - '' Print to see if our bit has been changed. -Print "FOO Number's Value: " & Foo.Num + Print "FOO Number's Value: " & Foo.Num Print "FOO 31st Bit Set? " & Foo.NumBit(31) -sleep +Sleep Print "" %% -Output: +Affichage: %% Testing property indexing with data types: FOO Number's Value: 0 @@ -157,7 +156,8 @@ FOO Number's Value: 2147483648 FOO 31st Bit Set? -1 %% {{fbdoc item="see"}} - - ##[[KeyPgType Class]]## +- ##[[KeyPgType Class]]## + - ##[[KeyPgType Type]]## - ##[[KeyPgType Type]]## {{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPset.wakka b/fbdocs/manual/cache/KeyPgPset.wakka index 460f01be2e..7b7c65ec68 100644 --- a/fbdocs/manual/cache/KeyPgPset.wakka +++ b/fbdocs/manual/cache/KeyPgPset.wakka @@ -1,68 +1,70 @@ {{fbdoc item="title" value="PSET"}}---- -Plots a single pixel +Place un seul pixel {{fbdoc item="syntax"}}## **PSet** [//target// ,] [STEP] (//x//, //y//) [,//color//] ## {{fbdoc item="param"}} ##//target//## - specifies buffer to draw on. + spécifie le tampon sur lequel on dessine. ##STEP## - indicates that coordinates are relative + indique que ces coordonnées sont relatives ##(//x, y//)## - coordinates of the pixel. + coordonnées du pixel. ##//color//## - the color attribute. + l'attribut de couleur. {{fbdoc item="desc"}} - ##//target//## specifies buffer to draw on. ##//target//## may be an image created with ##[[KeyPgImagecreate ImageCreate]]## or ##[[KeyPgGetgraphics Get (Graphics)]]##. If omitted, ##//target//## defaults to the screen's current work page. + ##//target//## spécifie le tampon sur lequel on dessine. ##//target//## peut être une image créée avec ##[[KeyPgImagecreate ImageCreate]]## ou ##[[KeyPgGetgraphics Get (Graphique)]]##. Si omis, ##//target//## prend par défaut la page courante de travail de l'écran. - ##(//x, y//)## are the coordinates of the pixel. ##STEP## if present, indicates that ##(//x, y//)## coordinates are relative to the graphics cursor position. If omitted, ##(//x, y//)## are relative to the upper left-hand corner of ##//target//##. The x and y coordinates are affected by the last call to the ##[[KeyPgViewgraphics View (Graphics)]]## and ##[[KeyPgWindow Window]]## statements, and respect the current clipping region as set by the ##[[KeyPgViewgraphics View (Graphics)]]## statement. + ##(//x, y//)## sont les coordonnées du pixel. ##STEP## si présent, indique que les coordonnées##(//x, y//)## sont relatives à la position du curseur graphique. Si omis, ##(//x, y//)## sont relatives au coin en haut à gauche de ##//target//##. Les coordonnées x et y sont affectées par le dernier appel à ##[[KeyPgViewgraphics View (Graphique)]]## et ##[[KeyPgWindow Window]]##, et respectent la région de découpage (clipping region) validée par ##[[KeyPgViewgraphics View (Graphique)]]##. - ##//color//## specifies the color attribute. If omitted, ##//color//## defaults to the current foreground color. See ##[[KeyPgColor Color]]##. ##//color//## is graphics mode specific, see ##[[KeyPgColor Color]]## and ##[[KeyPgScreengraphics Screen (Graphics)]]## for details. + ##//color//## spécifie l'attribut de couleur. Si omis, ##//color//## prend par défaut la couleur courante d'avant-plan. Voir ##[[KeyPgColor Color]]##. ##//color//## dépend du mode graphique, voir ##[[KeyPgColor Color]]## et ##[[KeyPgScreengraphics Screen (Graphique)]]## pour plus de détails. - Optimization note: while **Pset** and the opposite ##[[KeyPgPoint Point]]## provide valid results, they are very slow. Much better performance can be achieved by using ##[[KeyPgPoke Poke]]## after calculating the address yourself from values obtained from ##[[KeyPgImageinfo Imageinfo]]## and ##[[KeyPgScreeninfo Screeninfo]]##, or even more usig inline ASM. + Note d'optimisation: bien que **Pset** et son opposé ##[[KeyPgPoint Point]]## donnent des résultats valides, ils sont très lents. De meilleures performances sont obtenues en utilisant ##[[KeyPgPoke Poke]]## après avoir calculé vous-même l'adresse à partir des valeurs obtenues par ##[[KeyPgImageinfo ImageInfo]]## et ##[[KeyPgScreeninfo ScreenInfo]]##, ou même en utilisant le langage machine avec "inline ASM". {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/pset.bas"}}%%(freebasic) -' Set an appropriate Screen mode. +' Valide un mode ecran approprie. Screen 14 -' Plot a pixel at the coordinates 100, 100, Color 15. (white) +' Place un pixel aux coordonnees 100, 100, Couleur 15. (blanc) Pset (100, 100), 15 -' Confirm the operation. +' Confirme l' operation. Locate 1: Print "Pixel plotted at 100, 100" -' Wait for a keypress. +' Attente touche appuyee. Sleep -' Plot another pixel at the coordinates 150, 150, Color 4. (red) +' Place un autre pixel aux coordonnees 150, 150, Couleur 4. (rouge) Pset (150, 150), 4 -' Confirm the operation. +' Confirme l' operation. Locate 1: Print "Pixel plotted at 150, 150" -' Wait for a keypress. +' Attente touche appuyee. Sleep -' Plot a third pixel relative to the second, Color 15. (white) -' This pixel is given the coordinates 60, 60. It will be placed -' at 60, 60 plus the previous coordinates (150, 150), thus plotting at 210, 210. +' Place un 3eme pixel relatif au second, Couleur 15. (blanc) +' Ce pixel a les coordonnees 60, 60. Il sera place +' a 60, 60 plus les coordonnees precedentes (150, 150), donc place a 210, 210. Pset Step (60, 60), 15 -' Confirm the operation. +' Confirme l' operation. Locate 1: Print "Pixel plotted at 150 + 60, 150 + 60" -' Wait for a keypress +' Attente touche appuyee Sleep -' Close the program +' Ferme le programme End %% {{fbdoc item="diff"}} - - ##//target//## is new to ""FreeBASIC"" + - ##//target//## nouveau pour FreeBASIC + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgPoint Point]]## - read out pixels - - ##[[KeyPgPreset PReset]]## - - ##[[KeyPgViewgraphics View (Graphics)]]## +- ##[[KeyPgPoint Point]]## - lecture de pixels + - ##[[KeyPgPreset PReset]]## + - ##[[KeyPgViewgraphics View (Graphique)]]## - ##[[KeyPgWindow Window]]## + - ##[[KeyPgWindow Window]]## + - ##[[GfxInternalFormats Internal pixel formats]]## -{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} diff --git a/fbdocs/manual/cache/KeyPgPsetGfx.wakka b/fbdocs/manual/cache/KeyPgPsetGfx.wakka index d15b9e6b09..e68786dbfe 100644 --- a/fbdocs/manual/cache/KeyPgPsetGfx.wakka +++ b/fbdocs/manual/cache/KeyPgPsetGfx.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="PSET"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects ##[[KeyPgPset PSet]]## as the blitting method +Paramètre de la déclaration graphique ##[[KeyPgPutgraphics Put]]## qui sélectionne ##[[KeyPgPset PSet]]## comme méthode de 'blitting' {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Pset** ## {{fbdoc item="param"}} ##**PSet**## - Required. + Obligatoire. {{fbdoc item="desc"}} - The ##**PSet**## method copies the source pixel values onto the destination pixels. + La méthode ##**PSet**## copie les valeurs des pixels source sur les pixels destination. - This is the simplest ##[[KeyPgPutgraphics Put]]## method. The pixels in the destination buffer are directly overwritten with the pixels in the source buffer. No additional operations are done, and there are no color values that are treated as transparent. It has the same effect as ##[[KeyPgPset PSet]]ting## each pixel individually. + C'est la plus simple méthode ##[[KeyPgPutgraphics Put]]##. Les pixels du tampon destination sont directement remplacés par les pixels du tampon source. Aucune opération supplémentaire n'est effectuée, et il n'y a aucune valeur de couleur traîtée comme transparente. Cela a le même effet qu'un ##[[KeyPgPset PSet]]## individuel de chaque pixel. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/gfx/put-pset.bas"}}%%(freebasic) -'' set up a screen: 320 * 200, 16 bits per pixel + %%(freebasic) +'' Valide ecran 320 * 200, 16 bits par pixel screenres 320, 200, 16 line (0, 0)-(319, 199), rgb(0, 128, 255), bf -'' set up an image with the mask color as the background. +'' Valide une image avec le masque couleur arriere-plan. dim img as any ptr = imagecreate( 33, 33, rgb(255, 0, 255) ) circle img, (16, 16), 15, rgb(255, 255, 0), , , 1, f circle img, (10, 10), 3, rgb( 0, 0, 0), , , 2, f @@ -28,21 +28,21 @@ circle img, (16, 18), 10, rgb( 0, 0, 0), 3.14, 6.28 dim as integer x = 160 - 16, y = 100 - 16 -'' Put the image with PSET +'' Put l' image avec PSET put (x, y), img, pset -'' free the image memory +'' Libere memoire image imagedestroy img -'' wait for a keypress +'' Attente touche appuyee sleep %% -{{image class="center" title="Put PSet example output" url="/images/putpset.png"}} +
    {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgPset PSet]]## - - ##[[KeyPgPutgraphics Put (Graphics)]]## + - ##[[KeyPgPutgraphics Put (Graphique)]]## {{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgPtr.wakka b/fbdocs/manual/cache/KeyPgPtr.wakka index 2978e6889c..357c33aa18 100644 --- a/fbdocs/manual/cache/KeyPgPtr.wakka +++ b/fbdocs/manual/cache/KeyPgPtr.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="PTR"}}---- -A variable declaration type modifier +Déclaration d'un modificateur de type de variable {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //symbolname// [[KeyPgAs as]] [[DataType DataType]] {**Ptr** | [[KeyPgPointer pointer]]} ## {{fbdoc item="desc"}} - Declares a pointer variable. The same as ##[[KeyPgPointer Pointer]]##. + Déclare un pointeur de variable. Identique à ##[[KeyPgPtr Pointer]]##. - ##[[KeyPgOpAt Operator @ (Address of)]]## operator or ##[[KeyPgOpVarptr Varptr]]## are used to take the address of a variable. The ##[[KeyPgOpValueOf Operator * (Value of)]]## operator is used to dereference the pointer, that is, access the actual value stored in the memory location the pointer is pointing at. + Les opérateurs ##[[KeyPgOpAt Operator @ (Adresse de)]]## ou ##[[KeyPgOpVarptr VarPtr]]## sont utilisés pour obtenir l'adresse d'une variable. L'opérateur ##[[KeyPgOpValueOf Operator * (Valeur de)]]## est utilisé pour déréférencer le pointeur, c'est-à-dire, accéder à la valeur réelle stockée dans l'emplacement mémoire du pointeur indiqué. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/ptr.bas"}}%%(freebasic) @@ -31,10 +31,10 @@ Print p {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ptr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ptr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPointer Pointer]]## diff --git a/fbdocs/manual/cache/KeyPgPublic.wakka b/fbdocs/manual/cache/KeyPgPublic.wakka index 371281565e..a1eee6c567 100644 --- a/fbdocs/manual/cache/KeyPgPublic.wakka +++ b/fbdocs/manual/cache/KeyPgPublic.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="PUBLIC"}}---- -Specifies a procedure having external linkage. +Indique une procédure ayant de liens externes. {{fbdoc item="syntax"}}## - **Public** [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + **Public** [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - **Public** [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl Cdecl]]|[[KeyPgStdcall Stdcall]]|[[KeyPgPascal Pascal]]] [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + **Public** [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] [[[KeyPgCdecl cdecl]]|[[KeyPgStdcall stdcall]]|[[KeyPgPascal pascal]]] [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure definitions, ##**Public**## specifies that a procedure has external linkage, meaning it's name is visible to external modules. If ##**Public**## or ##[[KeyPgPrivate Private]]## is not specified, a procedure is defined as if ##**Public**## was specified. + Dans les définitions de procédure, ##**Public**## précise qu'une procédure a un lien externe, ce qui signifie son nom est visible à des modules externes. Si ##**Public**## ou ##[[KeyPgPrivate Private]]## n'est pas spécifié, une procédure est définie comme si ##**Public**## avait été spécifié. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/sub-public.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ End Sub %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPrivate Private]]## diff --git a/fbdocs/manual/cache/KeyPgPutfileio.wakka b/fbdocs/manual/cache/KeyPgPutfileio.wakka index eb389e4c67..c0db6c6c95 100644 --- a/fbdocs/manual/cache/KeyPgPutfileio.wakka +++ b/fbdocs/manual/cache/KeyPgPutfileio.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PUT (File I/O)"}}---- -Writes data from a buffer to a file +Ecrit des données d'un tampon vers un fichier {{fbdoc item="syntax"}}## **Put** #//filenum// [[KeyPgAs As]] [[KeyPgInteger integer]], [//position// [[KeyPgAs As]] [[KeyPgLongint longint]]], //data// [[KeyPgAs As]] [[KeyPgAny Any]] [, //amount// [[KeyPgAs As]] [[KeyPgInteger Integer]]] @@ -12,27 +12,27 @@ Writes data from a buffer to a file ## {{fbdoc item="param"}} ##//filenum//## - The value passed to ##[[KeyPgOpen Open]]## when the file was opened. + La valeur passée à ##[[KeyPgOpen Open]]## lorsque le dossier a été ouvert. ##//position//## - Is the position where ##Put## must start in the file. If the file was opened ##For Random##, the position is in records, else it is given in bytes. If omitted, writing starts at the present file pointer position. The position is 1-based: i.e. the first record or byte of a file is at position ##1##. - If ##//position//## is omitted or zero (##0##), file writing will start from the current file position. + Est la position où ##**Put**## doit commencer dans le fichier. Si le fichier a été ouvert en mode ##//For Random//##, la position est évaluée en enregistrements, sinon elle est évaluée en octets. Si omise, l'écriture commence à la position actuelle du pointeur. La position est basée sur 1: par exemple le premier enregistrement ou octet est à la position ##1##. + Si ##//position//## est omise ou zéro (##0##), l'écriture dans le fichier commencera à partir de la position courante dans le fichier. ##//data//## - Is the buffer where data is written from. It can be a numeric variable, a string, an array or a user-defined type. The operation will try to transfer to disk the complete variable, unless ##//amount//## is given. - When putting arrays, ##//data//## should be followed by an empty pair of brackets: '##()##'. ##**Put**## will write all of the data in the array. ##//amount//## is not allowed. - When putting ##[[KeyPgString String]]##s, the number of bytes written is the same as the number of bytes in the string data. ##//amount//## is not allowed. - Note: If you want to write values from a buffer, you should NOT pass a pointer to the buffer; instead you should pass the first variable in the buffer. (This can be done by dereferencing the pointer with ##[[KeyPgOpValueOf Operator * (Value of)]]##.) If you pass a pointer directly, then ##**Put**## will put the memory from the pointer variable, not the memory it points to. + Est le tampon mémoire à partir duquel les données sont écrites. Il peut être une variable numérique, une chaîne, un tableau ou un type défini par l'utilisateur. L'opération va essayer de transférer sur le disque la variable complète, sauf si ##//amount//## est précisé. + Lorsque ##**Put**## concerne un tableau, ##//data//## doit être suivi par une paire de parenthèses vides: '##()##'. ##**Put**## écrira toutes les données du tableau. ##//amount//## n'est pas permis. + Lorsque ##**Put**## concerne une ##[[KeyPgString String]]##, le nombre d'octets écrits est le même que le nombre d'octets dans la chaîne. ##//amount//## n'est pas permis. + Note: Si vous voulez écrire des valeurs à partir d'un tampon, vous NE DEVEZ PAS passer un pointeur vers la mémoire tampon; au lieu de cela vous devez passer la première variable dans la mémoire tampon. (Cela peut être fait par le déréférencement du pointeur avec ##[[KeyPgOpValueOf Operator * (Valeur de)]]##.) ##**Put**## déduira automatiquement que le reste de la mémoire tampon se poursuit après la première variable. Si vous passez un pointeur directement, alors ##**Put**## utilisera la mémoire à partir de la variable pointeur et non pas la mémoire pointée par lui. ##//amount//## - Makes ##Put## write to file ##//amount//## consecutive variables to the file - i.e. it writes ##( //amount// * [[KeyPgSizeof Sizeof]](//data//) )## bytes of data, starting at ##//data//##'s location in memory, into the file. If ##//amount//## is omitted it defaults to ##1##, meaning that ##**Put**## just writes a single variable.===== + ##Put## écrira dans le fichier ##//amount//## variables consécutives - c'est à dire qu'il écrira, dans le fichier, ##( //amount// * [[KeyPgSizeof SizeOf]](//data//) )## octets de données, commençant à la position ##//data//## dans la mémoire. Si ##//amount//## est omis sa valeur par défaut est ##1##, ce qui signifie que ##**Put**## n'écrit qu'une seule variable.
    -{{fbdoc item="ret"}} - ##0## on success; nonzero on error. "disk full" is considered as an error, and results in return code ##3##. An "exact" amount of data written before is not available, and wouldn't be really useful anyway. +{{fbdoc item="section" value="Valeur retournée + ##0## si succès; non zéro si erreur. "disk full" (disque complet) est considéré comme une erreur et il en résulte un code retour de ##3##. La quantité "exacte" des données écrites avant n'est pas disponible et ce ne serait pas vraiment utile de toute façon. {{fbdoc item="desc"}} - Writes binary data from a buffer variable to a file opened in ##[[KeyPgBinary Binary]]## or ##[[KeyPgRandom Random]]## mode. + Écrit des données binaires à partir d'une variable tampon dans un fichier ouvert en mode ##[[KeyPgBinary Binary]]## ou ##[[KeyPgRandom Random]]##. - ##**Put**## can be used as a function, and will return ##0## on success or an error code on failure. + ##**Put**## peut être utilisé comme une fonction, et retournera ##0## si succès ou un code d'erreur si échec. - For files opened in ##[[KeyPgRandom Random]]## mode, the size in bytes of the data to write must match the specified record size. + Pour les fichiers ouverts en mode ##[[KeyPgRandom Random]]##, la taille en octets des données à écrire doit correspondre à la taille spécifiée de l'enregistrement. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/put.bas"}}%%(freebasic) @@ -108,12 +108,12 @@ Deallocate lpBuffer End %% {{fbdoc item="diff"}} - - ##**Put**## can write full arrays as in VB or, alternatively, write a multiple of the data size from ##//buffer//##'s memory location. - - ##**Put**## can be used as a function in FB, to find the success/error code returned without having to use error handling procedures. + - ##**Put**## peut écrire des tableaux pleins comme dans VB ou, à défaut, écrire un multiple de la taille des données à partir de la position mémoire ##//buffer//##. + - ##**Put**## peut être utilisé comme une fonction dans FB, pour déterminer s'il y a eu succès ou si un code d'erreur a été renvoyé sans avoir à utiliser les procédures de gestion des erreurs. {{fbdoc item="see"}} - - ##[[KeyPgPutgraphics Put (Graphics)]]## different usage of same keyword - - ##[[KeyPgGetfileio Get (File I/O)]]## + - ##[[KeyPgPutgraphics Put (Graphique)]]## utilisation différente du même mot-clé + - ##[[KeyPgGetfileio Get (Entrée/Sortie fichiers)]]## - ##[[KeyPgOpen Open]]## - ##[[KeyPgClose Close]]## - ##[[KeyPgRandom Random]]## diff --git a/fbdocs/manual/cache/KeyPgPutgraphics.wakka b/fbdocs/manual/cache/KeyPgPutgraphics.wakka index 48dfd5285c..7c700f4280 100644 --- a/fbdocs/manual/cache/KeyPgPutgraphics.wakka +++ b/fbdocs/manual/cache/KeyPgPutgraphics.wakka @@ -1,34 +1,34 @@ -{{fbdoc item="title" value="PUT (GRAPHICS)"}}---- -Copies an image on to another image or screen - -{{fbdoc item="syntax"}}## - **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-[ STEP ]( //x2//,//y2// ) ] [ ,//method// [ ,( //alphaval//|//value//|//blender// [ ,//param//]) ] ] -## -{{fbdoc item="param"}} - ##//target//## - is the address of the buffer where the image is to be drawn. If it's omitted, the image gets blitted to screen. See below. - ##STEP## - indicates that ##(//x//, //y//)## offsets are relative to the current graphics cursor position. - ##(//x//, //y//)## - specify offsets from the upper-left corner of the destination buffer, or screen, that the image gets drawn to. - ##//source//## - is the address of the buffer of the image to be drawn. See below. - ##(//x1//, //y1//)-[ STEP ](//x2//, //y2//)## - specify a rectangular area in the source buffer to draw. If omitted, the entire buffer is drawn. ##STEP## indicates that ##//x2//## and ##//y2//## are relative to ##//x1//## and ##//y1//##, respectively. - ##//method//## - specifies the method used to draw the image to the destination buffer, and can be any one of the following (the default method is ##XOR##): - - Background-independent methods - ##[[KeyPgPsetGfx PSET]]## : Source pixel values are copied without modification. - ##PRESET## : Source pixel values are 1's-complement negated before being copied. - ##[[KeyPgTransGfx TRANS]]## : Source pixel values are copied without modification. Does not draw source pixels of mask color. See below. - Background-dependent methods - ##[[KeyPgAndGfx AND]]## : Destination pixels are bitwise ANDed with source pixels. See below. - ##[[KeyPgOrGfx OR]]## : Destination pixels are bitwise ORed with source pixels. See below. - ##[[KeyPgXorGfx XOR]]## : Destination pixels are bitwise XORed with source pixels. See below. - ##[[KeyPgAlphaGfx ALPHA]]## : Source is blended with a transparency factor specified either in the ##//value//## parameter, or in the image's individual pixels. See below. - ##[[KeyPgAddGfx ADD]]##: Source is multiplied by a value and added with saturation to the destination. See below. - ##[[KeyPgCustomgfx CUSTOM]]## : Uses a user-defined function to perform blending the source with the destination. See below. +{{fbdoc item="title" value="Put (Graphics)"}}----
    +Copie une image sur une autre image ou sur l'écran

    {{fbdoc item="syntax"}}##
    **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-[ STEP ]( //x2//,//y2// ) ] [ ,//method// [ ,( //alphaval//|//value//|//blender// [ ,//param//]) ] ]
    ##
    + +{{fbdoc item="param"}}
    ##//target//##
    est l'adresse du tampon où l'image doit êtredessinée (destination). Si omis, l'image est "blittée" (affichée) àl'écran. Voir ci-dessous.
    + ##STEP##
    indique que les coordonnées ##(//x//, //y//)## sont relatives à la position courante du curseur graphique.
    +##(//x//, //y//)##
    indique les coordonnées par rapport au coin en haut à gauche du tampon destination ou de l'écran, sur lequel l'image est dessinée.
    +##//source//##
    est l'adresse du tampon image sur lequel dessiner. Voir ci-dessous.
    + ##(//x1//, //y1//)-[ STEP ](//x2//, //y2//)##
    une zone rectangulaire dans le tampon source, utilisée pour le dessin. Si omise, le tampon entier est utilisé pour le dessin. ##STEP## indique que ##//x2//## et ##//y2//## sont relatifs respectivement à ##//x1//## et ##//y1//##.
    + ##//method//##
    spécifie la méthode utilisée pour dessiner l'image sur le tampon destination et peut être une des méthodes suivantes (##XOR## est la méthode par défaut):

    Méthodes indépendantes de l'arrière-plan
    ##[[KeyPgPsetGfx PSet]]## : Les valeurs pixel sont copiées sans modification.
    ##PRESET## : Les valeurs pixel source sont complémentées à 1 négativement (1's-complement negated) avant la copie.
    ##[[KeyPgTransGfx Trans]]## : Les valeurs pixel source sont copiées sans modification. Ne dessine pas les pixels source du masque de couleur. Voir ci-dessous.
    + Méthodes dépendant de l'arrière-plan
    ##[[KeyPgAndGfx And]]## : Les pixels destination subissent un AND avec les pixels source (dest AND source). Voir ci-dessous.
    ##[[KeyPgOrGfx Or]]## : Les pixels destination subissent un OR avec les pixels source (dest OR source). Voir ci-dessous.
    ##[[KeyPgXorGfx Xor]]## : Les pixels destination subissent un XOR avec les pixels source (dest XOR source). Voir ci-dessous.
    ##[[KeyPgAlphaGfx Alpha]]## : Source est mélangée avec un facteur de transparence spécifié soit par le paramètre ##//value//##, soit dans les pixels individuels de l'image. Voir ci-dessous.
    ##[[KeyPgAddGfx Add]]##: Source est multiplié par une valeur et ajoutée avec saturation à la destination. Voir ci-dessous.
    ##[[KeyPgCustomgfx Custom]]## : Utilise une fonction définie par l'utilisateur pour effectuer le mélange de la source avec la destination. Voir ci-dessous.

    + ##//value//##
    est une valeur de ##0 à 255## spécifiant la valeur de la transparence pour l'une des méthodes de transformation ##ADD## ou ##ALPHA##.
    + ##//blender//##
    spécifie l'adresse de la fonction utilisateur à appeler pour la méthode de transformation ##CUSTOM##. Voir ci-dessous.
    + ##//param//##
    indique le paramètre à passer à la fonction de transformation utilisateur.

    + {{fbdoc item="desc"}}
    ##**Put**## peut être utilisé pour dessiner une image sur une autre image. Les coordonnées ##//x//## et ##//y//## sont affectées par le dernier appel à ##[[KeyPgViewgraphics View]]## et ##[[KeyPgWindow Window]]##, et l'image placée respecte la région de découpage courante validée par le dernier appel à ##[[KeyPgViewgraphics View]]##. L'image est tronquée si elle est dessinée en-dehors du tampon destination.

    **Tampons Image Valides**
    Les tampons image ##//source//## et ##//target//## doivent être des tampons image valides. Des tampons image valides sont créés par ##[[KeyPgGetgraphics Get]]## ou ##[[KeyPgImagecreate ImageCreate]]##. Des tampons image valides peuvent être spécifiés dans ##**Put**## utilisant un tableau avec un index optionnel ou un pointeur avec un index optionnel.

    + **Méthodes de dessin**
    Dépendant de la méthode utilisée, les valeurs pixel dans le tampon destination sont utilisées pour calculer les valeurs pixel qui seront dessinées. Les méthodes ##PSET##, ##PRESET## et ##TRANS## n'utilisent pas le tampon destination pour calculer les valeurs finales, au contraire des méthodes ##AND##, ##OR##, ##XOR##, ##ALPHA## et ##ADD##. Les images qui sont dessinées par ces dernières méthodes seront différentes en fonction du contenu du tampon destination.

    + **Différent formats de pixel**
    Le format de pixel d'un tampon image doit être compatible avec la profondeur de couleur du mode de graphique courant; autrement dit, si vous faites l'acquisition d'une image en utilisant ##[[KeyPgGetgraphics Get]]## et que plus tard vous changez de mode écran avec ##[[KeyPgScreengraphics Screen]]##, les données image ne seront peut être pas valides dans ce nouveau mode graphique, et vous ne pourrez peut être pas l'afficher à l'écran. Vous noterez cependant que vous pourrez toujours dessiner un tampon image sur un autre tampon image via ##**Put**## tant que ces tampons auront été créés avec la même profondeur.

    Les méthodes ##AND##, ##OR## et ##XOR## donnent des résultats différents en fonction de la pofondeur de couleur courante, car les pixels sont stockés dans différents formats; voir [[GfxInternalFormats Formats internes des pixels]] pour des détails.

    + **Masque de couleur**
    Les méthodes ##TRANS##, ##ALPHA## et ##ADD## ne dessinent pas les pixels de l'image source qui utilisent le masque de couleur. Le masque de couleur dépend de la profondeur de la cible (un tampon image ou l'écran): pour des profondeurs jusqu'à 8 bpp (modes avec palette) c'est la couleur d'indice ##0##, alors qu'en profondeur 'hi/truecolor' (16 et 32 bpp) il correspond à magenta, c'est à dire ##[[KeyPgRgb RGB]](255, 0, 255)##. Notez que dans les modes 32 bpp la valeur alpha d'une couleur n'affecte pas l'identification de la couleur transparente; seuls les 24 bits de poids faibles sont utilisés pour l'identifier. Voir [[GfxInternalFormats Formats internes des pixels ]] pour plus de détails.

    + **Dessin de la transparence (Alpha drawing)** La méthode ##ALPHA## est utilisable dans deux modes. Si le paramètre ##//value//## est spécifié, il est utilisé pour spécifier le niveau de transparence pour l'image entière à dessiner; une valeur de 0 dessinera une image complètement transparente, alors qu'une valeur de 255 en dessinera une sans aucune transparence. Ce mode ne fonctionne qu'avec des cibles 'hi/truecolor' (16 et 32 bpp).
    Si le paramètre ##//value//## est omis, la méthode ##ALPHA## prendra la valeur du niveau alpha sur une base par-pixel, permettant de dessiner des images avec un canal alpha (certaines parties de l'image pourront étre plus ou moins transparentes que d'autres). Ce mode ne fonctionne qu'avec des tampons image de 32 bpp, car c'est la seule profondeur de couleur permettant d'inclure la valeur alpha dans chaque pixel.

    + **Jouer avec le canal "alpha"** Normalement ##**Put**## ne permet d'écrire des tampons image que sur des cibles de même profondeur, mais il y a une exception. Quand vous dessinez un tampon image de 8 bpp sur une cible de 32 bpp et que la méthode ##ALPHA## est utilisée, l'image source de 8 bpp est dessinée dans le canal alpha de la cible 32 bpp. Cela permet de valider facilement la totalité du canal alpha d'une image sans étre obligé de manier individuellement ses données pixels.

    + + **Méthode CUSTOM de Modification des pixels** La méthode ##CUSTOM## utilise une fonction définie par l'utilisateur pour calculer les valeurs finales des pixels à dessiner dans le tampon destination. Cette fonction sera appelée pour chaque pixel de l'image source, et recevra les valeurs des pixels source et destination et un pointeur de données passé par la fonction ##**Put**##. La valeur du pixel renvoyée sera celle utilisée pour dessiner sur le tampon destination. La fonction est de la forme:

    ##[[KeyPgDeclare Declare]] [[KeyPgFunction Function]] //identifier// ( [[KeyPgByval ByVal]] //source_pixel// [[KeyPgAs As]] [[KeyPgUinteger UInteger]], [[KeyPgByval ByVal]] //destination_pixel// [[KeyPgAs As]] [[KeyPgUinteger UInteger]], [[KeyPgByval ByVal]] //parameter// [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]]) [[KeyPgAs As]] [[KeyPgUinteger UInteger]]##

    ##//identifier//## est le nom de la fonction. Selon vos désirs.
    ##//source_pixel//## est la valeur du pixel courant de l'image source.
    ##//destination_pixel//## est la valeur du pixel courant de l'image destination.
    ##//parameter//## c'est le paramètre passé par la commande ##**Put**##. Ce doit être un ##[[KeyPgPtr Pointeur]]## de données. S'il est omis, sa valeur sera zéro.

    + {{fbdoc item="ex"}}
    Le programme ci-dessous donne un exemple simple de la façon d'utiliser ##**Put**## pour placer une image à l'écran, incluant la création d'un tampon image et la libération de la mémoire aprés utilisation.
    %%(freebasic) + '' Valide ecran et remplit avec couleur arriere-plan
    ScreenRes 320, 200, 32
    Paint (0, 0), RGB(64, 128, 255)

    '' Valide une image et dessine quelque chose dedans
    Dim img As Any Ptr = ImageCreate( 32, 32, RGB(255, 0, 255) )
    Circle img, (16, 16), 15, RGB(255, 255, 0), , , 1, f
    Circle img, (10, 10), 3, RGB( 0, 0, 0), , , 2, f
    Circle img, (23, 10), 3, RGB( 0, 0, 0), , , 2, f
    Circle img, (16, 18), 10, RGB( 0, 0, 0), 3.14, 6.28

    '' PUT image au centre ecran
    Put (160 - 16, 100 - 16), img, Trans

    '' Libere memoire image
    ImageDestroy img

    '' Attend touche appuyee
    Sleep
    + ##

    +

    L'exemple ci-dessous montre comment allouer de la mémoire pour une image, puis dessiner celle-ci en utilisant différentes méthodes, y compris en utilisant une fonction personnelle, puis comment libérer la mémoire utilisée:
    %%(freebasic) + Declare Function checkered_blend( ByVal src As UInteger, ByVal dest As UInteger, ByVal param As Any Ptr ) As UInteger

    Screen 14, 32 '' valide 320*240*32 mode gfx

    Dim As Any Ptr sprite
    Dim As Integer counter = 0

    sprite = ImageCreate( 32, 32 ) '' alloue memoire pour sprite 32x32

    Line sprite, ( 0, 0 )-( 31, 31 ), RGBA(255, 0, 0, 64), bf '' dessine un sprite ...
    Line sprite, ( 4, 4 )-( 27, 27 ), RGBA(255, 0, 0, 192), bf
    Line sprite, ( 0, 0 )-( 31, 31 ), RGB(0, 255, 0), b
    Line sprite, ( 8, 8 )-( 23, 23 ), RGBA(255, 0, 255, 64), bf
    Line sprite, ( 1, 1 )-( 30, 30 ), RGBA(0, 0, 255, 192)
    Line sprite, ( 30, 1 )-( 1, 30 ), RGBA(0, 0, 255, 192)

    Cls
    Dim As Integer i : For i = 0 To 63 '' draw l' arriere-plan
    Line( i,0 )-( i,240 ), RGB( i * 4, i * 4, i * 4 )
    Next i

    '' Demonstration toutes methodes dessin ...
    Put( 8,14 ), sprite, PSet
    Put Step( 16,20 ), sprite, PReset
    Put Step( -16,20 ), sprite, And
    Put Step( 16,20 ), sprite, Or
    Put Step( -16,20 ), sprite, Xor
    Put Step( 16,20 ), sprite, Trans
    Put Step( -16,20 ), sprite, Alpha, 96
    Put Step( 16,20 ), sprite, Alpha
    Put Step( -16,20 ), sprite, add, 192
    Put Step( 16,20 ), sprite, Custom, @checkered_blend, @counter

    '' Affiche une description a cote chaque demo
    Draw String (100, 26), "<- pset"
    Draw String Step (0, 20), "<- preset"
    Draw String Step (0, 20), "<- and"
    Draw String Step (0, 20), "<- or"
    Draw String Step (0, 20), "<- xor"
    Draw String Step (0, 20), "<- trans"
    Draw String Step (0, 20), "<- alpha (uniform)"
    Draw String Step (0, 20), "<- alpha (per pixel)"
    Draw String Step (0, 20), "<- add"
    Draw String Step (0, 20), "<- custom"

    ImageDestroy( sprite ) '' libere memoire sprite
    Sleep : End 0

    '' Fonction blender perso/span>
    Function checkered_blend( ByVal src As UInteger, ByVal dest As UInteger, ByVal param As Any Ptr ) As UInteger
    Dim As Integer Ptr counter
    Dim As UInteger pixel

    counter = Cast(Integer Ptr, param)
    pixel = IIf(((*counter And 4) Shr 2) Xor ((*counter And 128) Shr 7), src, dest)
    *counter += 1
    Return pixel
    End Function
    + ##

    +

    + {{fbdoc item="diff"}}
    - ##//target//## est nouveau pour FreeBASIC + - Les méthodes ##TRANS##, ##ALPHA##, ##ADD## et ##CUSTOM## sont nouvelles pour FreeBASIC.
  • - Dans QB, la destination est toujours l'écran.
    - QB produit une erreur de fonctionnement en cas d'écriture en dehors des limites de l'image.
    - Dans QB, seuls des tableaux (arrays) peuvent être spécifiés comme images source.

    + {{fbdoc item="see"}}
    - ##[[KeyPgPutfileio Put (File Entré/Sortie)]]##
    - ##[[KeyPgGetgraphics Get (Graphique)]]##
    - ##[[KeyPgImagecreate ImageCreate]]##
    - ##[[KeyPgAlphaGfx Alpha]]##
    - [[GfxInternalFormats Formats graphiques internes]]

    ##//value//## is a ##0..255## value specifying the transparency value for an ##ADD## or ##ALPHA## method blit. diff --git a/fbdocs/manual/cache/KeyPgRandom.wakka b/fbdocs/manual/cache/KeyPgRandom.wakka index 435d7201f5..a691be40b3 100644 --- a/fbdocs/manual/cache/KeyPgRandom.wakka +++ b/fbdocs/manual/cache/KeyPgRandom.wakka @@ -1,88 +1,114 @@ {{fbdoc item="title" value="RANDOM"}}---- -Specifies file or device to be opened for binary mode +Spécifie le fichier ou le périphérique à ouvrir en mode binaire {{fbdoc item="syntax"}}## [[KeyPgOpen Open]] //filename// for **Random** [[[KeyPgAccess Access]] //access_type//] [[[KeyPgLock Lock]] //lock_type//] as [#]//filenum// [Len = //record_length//] ## {{fbdoc item="param"}} ##//filename//## - file name to open + nom du fichier à ouvrir ##//access_type//## - indicates whether the file may be read from, written to or both + indique si le fichier doit être lu, écrit ou les deux ##//lock_type//## - locking to be used while the file is open + verrouillage à utiliser quand le fichier est ouvert ##//filenum//## - unused file number to associate with the open file + un numéro inutilisé de fichier pour l'associer au fichier ouvert ##//record_length//## - the size of the record used for the file + la taille des enregistrements utilisée pour le fichier {{fbdoc item="desc"}} - Opens a file or device for reading and/or writing binary data in the given file ##//filenum//##, with records of size ##//record_length//##. - If the file does not exist, a new file will be created, otherwise any data existing in the file is preserved by ##[[KeyPgOpen Open]]##. The file pointer is initialized by ##[[KeyPgOpen Open]]## at the start of the file, at record number ##1##. File operations move the file position in steps of ##//record_length//## bytes. - This file mode uses an user-defined ##[[KeyPgType Type]]## buffer variable to read/write full records in a file. The buffer variable uses to include several fields. - The data is saved in binary mode, in the same internal format ""FreeBASIC"" uses, by means of ##[[KeyPgGetfileio Get #]]## and ##[[KeyPgPutfileio Put #]]##. + Ouvre un fichier ou un périphérique en lecture et/ou écriture de données binaires dans le fichier donné ##//filenum//##, avec des enregistrements de taille ##//record_length//##. + Si le fichier n'existe pas, un nouveau fichier sera créé, sinon toutes les données existantes dans le fichier sont préservées par ##[[KeyPgOpen Open]]##. Le pointeur du fichier est initialisé par ##[[KeyPgOpen Open]]## au début du fichier, à l'enregistrement numéro ##1##. Les opérations sur le fichier déplace la position par pas de ##//record_length//## octets. + Ce mode de fichier utilise une variable tampon de ##[[KeyPgType Type]]## défini par l'utilisateur pour lire/écrire des enregistrements complets dans le fichier. La variable tampon utilisée peut inclure plusieurs champs. + Les données sont sauvegardées en mode binaire, dans le même format interne utilisé par FreeBasic, par le biais de ##[[KeyPgGetfileio Get #]]## et ##[[KeyPgPutfileio Put #]]##. - ##//filename//## must be string expression resulting in a legal file name in the target OS, without wildcards. The file will be sought for in the present directory, unless a path is given. + ##//filename//## doit être une expression chaîne correspondant à un nom de fichier légal dans le système d'exploitation cible, sans jokers de remplacement. Le fichier sera recherché dans le répertoire courant, sauf si ##//filename//## contient un chemin. - ##//Access_type//## - By default ##**Random**## mode allows to both read and write the file, unless an ##[[KeyPgAccess Access]]## type is specified, it must be one of: - - ##**Read**## - the file is opened for input only - - ##**Write**## - the file is opened for output only - - ##**Read Write**## - the file is opened for input and output (the default) - - ##//Lock_type//## indicates the way the file is locked for other processes (users or threads), it is one of: - - ##**Shared**## - The file can be freely accessed by other processes - - ##**Lock Read**## - The file can't be opened simultaneously for reading - - ##**Lock Write**## - The file can't be opened simultaneously for writing - - ##**Lock Read Write**## - The file cannot be opened simultaneously by other processes. - If no lock type is stated, the file will be ##**Shared**## for other threads of the program and ##**Lock Read Write**## for other programs. - ##[[KeyPgLock Lock]]## and ##[[KeyPgUnlock Unlock]]## can be used to restrict temporally access to parts of a file. - - ##//filenum//## is a valid ""FreeBASIC"" file number (in the range ##1..255##) not being used for any other file presently open. This number identifies the file for the rest of file operations. A free file number can be found using the ##[[KeyPgFreefile FreeFile]]## function. + ##//Access_type//## - par défaut le mode ##**Random**## permet à la fois lire et écrire dans le fichier, sauf si un type d'##[[KeyPgAccess Access]]## est spécifié, il doit être l'un de ceux-ci: + - ##**Read**## - le fichier est ouvert en lecture seulement + - ##**Write**## - le fichier est ouvert en écriture seulement + - ##**Read Write**## - le fichier est ouvert en lecture et écriture (par défaut) + + ##//Lock_type//## indique la façon dont le fichier est verrouillé pour les autres processus (utilisateurs ou fils), il est l'un de ceux-ci: + - ##**Shared**## - Le fichier peut être librement consulté par d'autres processus + - ##**Lock Read**## - Le fichier ne peut pas être ouvert en même temps pour la lecture + - ##**Lock Write**## - Le fichier ne peut pas être ouvert en même temps pour l'écriture + - ##**Lock Read Write**## - Le fichier ne peut pas être ouvert simultanément par d'autres processus. + Si aucun type de verrouillage n'est indiqué, le fichier sera ##**Shared**## pour les autres "threads" du programme et ##**Lock Read Write**## pour les autres programmes. + ##[[KeyPgLock Lock]]## et ##[[KeyPgUnlock Unlock]]## peuvent être utilisés pour restreindre temporairement l'accès à des parties d'un fichier. + + ##//filenum//## est un numéro de fichier valide (dans la plage ##1..255##) non utilisé par un autre fichier actuellement ouvert. Le numéro de fichier identifie celui-ci pour le reste des opérations. Un numéro de fichier libre peut être trouvé avec la fonction ##[[KeyPgFreefile FreeFile]]##. - ##//record_length//## is the amount of bytes the file pointer will move for each individual ##[[KeyPgGetfileio Get]]## and ##[[KeyPgPutfileio Put]]##, it must match the size of the buffer variable used when ##[[KeyPgGetfileio Get]]##ting and ##[[KeyPgPutfileio Put]]##ting data. If omitted, it defaults to ##128##. + ##//record_length//## est le nombre d'octets que le pointeur du fichier va parcourir pour chaque ##[[KeyPgGetfileio Get]]## et ##[[KeyPgPutfileio Put]]##, il doit correspondre à la taille de la variable tampon utilisée lors d'un ##[[KeyPgGetfileio Get]]## et ##[[KeyPgPutfileio Put]]## de données. Si omis, sa valeur par défaut est de ##128##. - {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/math/random.bas"}}%%(freebasic) -type UDT - slen as byte - sdata as string * 10 -end type +{{fbdoc item="ex"}} +{{fbdoc item="filename" value="examples/manual/math/random1.bas"}}%%(freebasic) +Type UDT +slen As Byte -dim i as integer -dim s as string -dim u as UDT +sdata As String * 10 + End Type + Dim i As Integer +Dim s As String -dim ff as ubyte -dim fpos as integer +Dim u As UDT +Dim ff As UByte -ff = freefile +Dim fpos As Integer + +ff = FreeFile fpos = 10 + Open "testfile" For Random As #ff Len=SizeOf(UDT) + For i = 1 To 9 + Read s +u = Type( Len(s), s ) -open "testfile" for random as #ff len=sizeof(UDT) -for i = 1 to 9 - read s - u = type( len(s), s ) - put #ff, i, u -next +Put #ff, i, u +Next +Do -do - input "Record number: ", i - if i < 1 or i > 9 then exit do - get #1, i, u - print i & ": " & left( u.sdata, u.slen ) - print -loop +Input "Record number: ", i +If i < 1 Or i > 9 Then Exit Do + Get #1, i, u + Print i & ": " & Left( u.sdata, u.slen ) + Print -close #ff -end 0 + Loop + Close #ff + End 0 +Data ".,-?!'@:", "abc", "def" -data ".,-?!'@:", "abc", "def" -data "ghi", "jkl", "mno" -data "pqrs", "tuv", "wxyz" +Data "ghi", "jkl", "mno" +Data "pqrs", "tuv", "wxyz" + +%% +{{fbdoc item="diff"}} + - Dans QB, les chaînes de contenu d'exécution de type défini par l'utilisateur ne sont pas implémentées dans FreeBASIC. + - Le mot-clef ##[[KeyPgField Field]]## ne peut être utilisé qu'avec ##[[KeyPgType Type]]## pour spécifier l'empaquetage du type défini par l'utilisateur +{{fbdoc item="see"}} + +- ##[[KeyPgOpen Open]]## + +- ##[[KeyPgBinary Binary]]## +- ##[[KeyPgGetfileio Get #]]## +- ##[[KeyPgPutfileio Put #]]## + entry.name = "Player " & i + entry.score = i + put #1, i, entry +next +close #1 + +'' Read out and display the entries +open "scores.dat" for random access read as #1 len = sizeof(entry) +for i as integer = 1 to 10 + get #1, i, entry + print i & ":", entry.name, str(entry.score), entry.score +next +close #1 %% {{fbdoc item="diff"}} - - In QB, String-contained runtime user defined types (UDT) are not implemented in ""FreeBASIC"". + - Care must be taken with dynamic or fixed length strings inside user defined types (UDT), see the warning at KeyPgType. - The keyword ##[[KeyPgField Field]]## can only be used with ##[[KeyPgType Type]]## to specify the packing of the UDT. {{fbdoc item="see"}} diff --git a/fbdocs/manual/cache/KeyPgRandomize.wakka b/fbdocs/manual/cache/KeyPgRandomize.wakka index 958b06c572..8c60bc1393 100644 --- a/fbdocs/manual/cache/KeyPgRandomize.wakka +++ b/fbdocs/manual/cache/KeyPgRandomize.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RANDOMIZE"}}---- -Seeds the random number generator +Alimente le générateur de nombres aléatoires {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Randomize** ( [[KeyPgByval byval]] //seed// [[KeyPgAs as]] [[KeyPgDouble double]] = -1.0, [[KeyPgByval byval]] //algorithm// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) @@ -9,24 +9,24 @@ Seeds the random number generator ## {{fbdoc item="param"}} ##//seed//## - A ##[[KeyPgDouble double]]## seed value for the random number generator. If omitted, a value based on ##[[KeyPgTimer Timer]]## will be used instead. + Une valeur ##[[KeyPgDouble Double]]## pour alimenter le générateur de nombres aléatoires. Si omise, une valeur basée sur ##[[KeyPgTimer Timer]]## sera utilisée à la place. ##//algorithm//## - An ##[[KeyPgInteger integer]]## value to select the algorithm used. If omitted, the default algorithm for the current [[CompilerDialects language dialect]] is used. + Une valeur ##[[KeyPgInteger Integer]]## pour sélectionner l'algorithme utilisé. Si omise, l'algorithme par défaut pour le [[CompilerDialects dialecte du langage]] est utilisé. {{fbdoc item="desc"}} - Sets the random seed that helps ##[[KeyPgRnd Rnd]]## generate random numbers, and selects the algorithm to use. Valid values for ##//algorithm//## are: + Définit la valeur de départ aléatoire qui permet à ##[[KeyPgRnd Rnd]]## de générer des nombres aléatoires et sélectionne l'algorithme à utiliser. Les valeurs valides pour ##//algorithm//## sont: - ##**0**## - Default for current [[CompilerDialects language dialect]]. This is algorithm ##**3**## in the //[[CompilerOptlang -lang fb]]// dialect, ##**4**## in the //[[CompilerOptlang -lang qb]]// dialect and ##**1**## in the //[[CompilerOptlang -lang fblite]]// dialect. - ##**1**## - Uses the C runtime library's ##rand()## function. This will give different results depending on the platform. - ##**2**## - Uses a fast implementation. This should be stable across all platforms, and provides 32-bit granularity, reasonable degree of randomness. - ##**3**## - Uses the Mersenne Twister. This should be stable across all platforms, provides 32-bit granularity, and gives a high degree of randomness. - ##**4**## - Uses a function that is designed to give the same random number sequences as QBASIC. This should be stable across all platforms, and provides 24-bit precision, with a low degree of randomness. + ##**0**## - Valeur par défaut pour le [[CompilerDialects dialecte du langage]]. C'est l'algorithme ##**3**## dans le dialecte //[[CompilerOptlang -lang fb]]//, ##**4**## dans le dialecte //[[CompilerOptlang -lang qb]]// et ##**1**## en dialecte //[[CompilerOptlang -lang fblite]]//. + ##**1**## - Utilise la fonction ##rand()## de la bibliothèque du langage C. Vous obtiendrez des résultats différents selon la plate-forme. + ##**2**## - Utilise une mise en œuvre rapide. Ce devrait être stable sur toutes les plates-formes et offre une granularité 32-bit, un degré raisonnable de hasard. + ##**3**## - Utilise "Mersenne Twister". Ce devrait être stable sur toutes les plates-formes, offre une granularité 32-bit et donne un degré élevé de hasard. + ##**4**## - Utilise une fonction qui est conçue pour donner les mêmes séquences de nombres aléatoires que QBASIC. Ce devrait être stable sur toutes les plates-formes et offre une précision 24-bit, avec un faible degré de l'aléatoire. - For any given seed, each algorithm will produce a specific, deterministic sequence of numbers for that seed. If you want each call to ##**Randomize**## to produce a different sequence of numbers, a seed that is not quite predictable should be used - for example, the value returned from ##[[KeyPgTimer Timer]]##. Omitting the ##//seed//## parameter will use a value based on this. - Note: using the ##[[KeyPgTimer Timer]]## value directly as a parameter will produce the same seed if used more than once in the same second. However, it is generally not worth calling ##**Randomize**## twice with unpredictable seeds anyway, because the second sequence will be no more random than the first. In most cases, the Mersenne twister should provide a sufficiently random sequence of numbers, without requiring reseeding between ##[[KeyPgRnd Rnd]]## calls. + Pour toute semence donnée, chaque algorithme produit une séquence précise, déterministe de nombres pour cette semence. Si vous voulez que chaque appel à ##**Randomize**## produise une séquence différente de nombres, une graine qui n'est pas prévisible doit être utilisée - par exemple, la valeur retournée par ##[[KeyPgTimer Timer]]##. L'omission du paramètre ##//seed//## utilise une valeur sur cette base. + Note: en utilisant la valeur ##[[KeyPgTimer Timer]]## directement en tant que paramètre va produire la semence même si elle est utilisée plus d'une fois dans la même seconde. Toutefois, il n'est généralement pas louable d'appeler ##**Randomize**## deux fois avec des graines imprévisibles de toute façon, parce que la deuxième séquence ne sera pas plus aléatoire que la première. Dans la plupart des cas, "Mersenne twister" procurera une séquence de nombres suffisante, sans nécessiter de réensemencement entre les appels à ##[[KeyPgRnd Rnd]]##. - When you call ##**Randomize**## with the QB compatible algorithm, part of the old seed is retained. This means that if you call ##**Randomize**## several times with the same seed, you will **not** get the same sequence each time. To get a specific sequence in QB compatible mode, set the seed by calling ##[[KeyPgRnd Rnd]]## with a negative parameter. + Lorsque vous appelez ##**Randomize**## avec l'algorithme QB compatible, une partie de l'ancienne graine est retenue. Cela signifie que si vous appelez ##**Randomize**## plusieurs fois avec la même graine, vous **n'**obtiendrez **pas** la même séquence à chaque fois. Pour obtenir une séquence spécifique au mode compatible QB, fixez la semence en appelant ##[[KeyPgRnd Rnd]]## avec un paramètre négatif. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/randomize.bas"}}%%(freebasic) @@ -40,17 +40,17 @@ next %% {{fbdoc item="lang"}} - The default algorithm used depends on the current dialect in use: - - With the //[[CompilerOptlang -lang fb]]// dialect, a 32 bit Mersenne Twister function with a granularity of 32 bits is used. - - With the //[[CompilerOptlang -lang qb]]// dialect, a function giving the same output as ##**Rnd**## in QB is used. The granularity is 24 bits. - - With the //[[CompilerOptlang -lang deprecated]]// and //[[CompilerOptlang -lang fblite]]// dialects, the function in the C runtime available in the system is used. The function has a granularity of 15 bits in ""Win32"", and 32 bits in Linux and DOS. + L'algorithme utilisé par défaut dépend du dialecte en usage: - Avec le dialecte //[[CompilerOptlang -lang fb]]//, une fonction "Mersenne Twister" 32 bits avec une granularité de 32 bits est utilisée. + - Avec le dialecte //[[CompilerOptlang -lang qb]]//, une fonction donnant le même résultat que ##**Rnd**## dans QB est utilisée. La granularité est de 24 bits. + - Avec les dialectes //[[CompilerOptlang -lang deprecated]]// et //[[CompilerOptlang -lang fblite]]//, la fonction C disponible dans le système est utilisée. La fonction a une granularité de 15 bits dans Win32, et 32 bits sous Linux et DOS. + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - The ##//algorithm//## parameter is new to ""FreeBASIC"". - - QBASIC only had one algorithm (replicated in FB in algorithm number ##**4**##, and set as the default in the //[[CompilerOptlang -lang qb]]// dialect). +- Le paramètre ##//algorithm//## est nouveau pour FreeBASIC. + - QBASIC n'avait qu'un seul algorithme (reproduit dans FB en algorithme numéro ##**4**## et défini par défaut dans le dialecte //[[CompilerOptlang -lang qb]]//). + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgRnd Rnd]]## +- ##[[KeyPgRnd Rnd]]## + - [[CompilerDialects Les dialectes du FreeBasic]] - [[CompilerDialects Language dialects]] {{fbdoc item="back" value="CatPgMath|Mathematical Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgRead.wakka b/fbdocs/manual/cache/KeyPgRead.wakka index 199781d5d1..3cb1f38a27 100644 --- a/fbdocs/manual/cache/KeyPgRead.wakka +++ b/fbdocs/manual/cache/KeyPgRead.wakka @@ -1,68 +1,68 @@ {{fbdoc item="title" value="READ"}}---- -Reads values stored with the ##[[KeyPgData Data]]## statement. +Lecture des valeurs stockées avec ##[[KeyPgData Data]]##. {{fbdoc item="syntax"}}## **Read** //variable_list// ## {{fbdoc item="desc"}} - Reads data stored in the application with the ##[[KeyPgData Data]]## command. + Lit les données stockées dans l'application avec la commande ##[[KeyPgData Data]]##. - The elements of the ##//variable_list//## must be of basic types, numeric, strings or elements of arrays and user defined types. + Les éléments de ##//variable_list//## doivent être des types basiques, numériques, chaînes ou éléments de tableaux et de types définis par l'utilisateur. - All the ##[[KeyPgData Data]]## statements in the program behave as a single list, after the last element of one ##[[KeyPgData Data]]## statement is read, the first element of the following ##[[KeyPgData Data]]## statement will be read. - The program should not attempt to ##[[KeyPgRead Read]]## after the last ##**Data**## element. The results are (in all dialects) undefined, and the program may crash (Page Fault). + Toutes les déclarations données ( ##[[KeyPgData Data]]## ) dans le programme constituent une liste unique, après la lecture du dernier élément d'une déclaration de données, le premier élément de la déclaration de données suivante sera lu.Le programme ne doit pas tenter de lire ( ##[[KeyPgRead Read]]## ) après le dernier élément de données. Si c'est le cas, les résultats sont (dans tous les dialectes) indéfinis, et le programme peut se "planter" (erreur de page). + Des données constantes ne peuvent être que des types simples (numériques ou chaînes). Une chaîne lue dans une variable numérique sera évaluée par la fonction ##[[KeyPgVal Val]]##. - Data constants can only be of simple types (numeric or string). A string read into a numeric variable will be evaluated by the ##[[KeyPgVal Val]]## function. + L'instruction "##[[KeyPgRestore Restore]]## ##//label//##" oblige la lecture du premier item de données après ##//label//##, permettant à l'utilisateur de choisir des sections spécifiques de données à lire. - The "##[[KeyPgRestore Restore]] //label//##" statement makes the first ##[[KeyPgData Data]]## item after ##//label//## the next item to be read, allowing the user to choose specific sections of data to be read. + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/data/read.bas"}}%%(freebasic) -' Create an array of 5 integers and a string to hold the data. -DIM AS INTEGER h(4) -DIM AS STRING hs -DIM AS INTEGER readindex +' Cree un tableau de 5 entiers et une chaine pour stocker les donnees. +Dim As Integer h(4) +Dim As String hs +Dim As Integer readindex +' Boucle 5 fois (pour 5 nombres... charge les donnees) -' Set up to loop 5 times (for 5 numbers... check the data) -FOR readindex = 0 TO 4 +For readindex = 0 To 4 +' Lecture d'un entier. - ' Read in an integer. - READ h(readindex) + Read h(readindex) + ' Affichage de celui-ci. - ' Display it. - PRINT "Number" ; readindex ; " = " ; h(readindex) + Print "Number" ; readindex ; " = " ; h(readindex) + Next readindex -NEXT readindex +' Separation. -' Spacer. -PRINT +Print +' Lecture d'une chaine. -' Read in a string. -READ hs +Read hs +' Affiche celle-ci. -' Print it. -PRINT "String = " + hs +Print "String = " + hs +' Attend appui sur touche. -' Await a keypress. -SLEEP +Sleep +' Sortie programme. -' Exit program. -END +End +' Block de donnees. -' Block of data. -DATA 3, 234, 4354, 23433, 87643, "Bye!" +Data 3, 234, 4354, 23433, 87643, "Bye!" %% - {{fbdoc item="lang"}} - - None in syntax and usage of ##**Read**## - - See the ##[[KeyPgData Data]]## page for more information on differences in storing the data -{{fbdoc item="diff"}} - - None in syntax and usage of ##**Read**## - - See the ##[[KeyPgData Data]]## page for more information on differences in storing the data +- Aucune dans la syntaxe et l'usage de ##**Read**## + - Voir la page ##[[KeyPgData Data]]## pour plus d'informations sur les différences dans le stockage des données + {{fbdoc item="diff"}} + +- Aucune dans la syntaxe et l'usage de ##**Read**## + - Voir la page ##[[KeyPgData Data]]## pour plus d'informations sur les différences dans le stockage des données + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgData Data]]## +- ##[[KeyPgData Data]]## + - ##[[KeyPgRestore Restore]]## - ##[[KeyPgRestore Restore]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgReadFile.wakka b/fbdocs/manual/cache/KeyPgReadFile.wakka index f6e10a6634..44d1a64cbe 100644 --- a/fbdocs/manual/cache/KeyPgReadFile.wakka +++ b/fbdocs/manual/cache/KeyPgReadFile.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="READ (File Access)"}}---- -File access specifier +Spécificateur d'accès fichier {{fbdoc item="syntax"}}## Open //filename// As String For Binary Access **Read** As #//filenum// As Integer ## {{fbdoc item="desc"}} - Specifier for the ##[[KeyPgAccess Access]]## clause in the ##[[KeyPgOpen Open]]## statement. ##**Read**## specifies that the file is accessible for input. + Spécificateur pour la clause ##[[KeyPgAccess Access]]## dans l'instruction ##[[KeyPgOpen Open]]##. ##**Read**## spécifie que le fichier est accessible en lecture. {{fbdoc item="ex"}} - See example at ##[[KeyPgAccess Access]]## + Voir exemple d'##[[KeyPgAccess Access]]## {{fbdoc item="diff"}} - - None known. + - Aucune de connue. {{fbdoc item="see"}} - ##[[KeyPgAccess Access]]## diff --git a/fbdocs/manual/cache/KeyPgReadWriteFile.wakka b/fbdocs/manual/cache/KeyPgReadWriteFile.wakka index 37416f414a..98be379779 100644 --- a/fbdocs/manual/cache/KeyPgReadWriteFile.wakka +++ b/fbdocs/manual/cache/KeyPgReadWriteFile.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="READ WRITE (File Access)"}}---- -File access specifier +Spécificateur d'accès fichier {{fbdoc item="syntax"}}## Open //filename// As String For Binary Access **Read Write** As #//filenum// As Integer ## {{fbdoc item="desc"}} - Specifier for the ##[[KeyPgAccess Access]]## clause in the ##[[KeyPgOpen Open]]## statement. ##**Read Write**## specifies that the file is accessible for both input and output. + Spécificateur pour la clause ##[[KeyPgAccess Access]]## dans l'instruction ##[[KeyPgOpen Open]]##. ##**Read Write**## spécifie que le fichier est accessible en lecture et en écriture. {{fbdoc item="ex"}} - See example at ##[[KeyPgAccess Access]]## + Voir exemple d' ##[[KeyPgAccess Access]]## {{fbdoc item="diff"}} - - None known. + - Aucune de connue. {{fbdoc item="see"}} - ##[[KeyPgAccess Access]]## diff --git a/fbdocs/manual/cache/KeyPgReallocate.wakka b/fbdocs/manual/cache/KeyPgReallocate.wakka index c330aa44b3..7b5aa7d255 100644 --- a/fbdocs/manual/cache/KeyPgReallocate.wakka +++ b/fbdocs/manual/cache/KeyPgReallocate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="REALLOCATE"}}---- -Reallocates storage for an existing reserved block of memory +Réaffecte au stockage un bloc existant et réservé de la mémoire {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Reallocate** [[KeyPgCdecl cdecl]] ( [[KeyPgByval byval]] //pointer// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]], [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -9,73 +9,77 @@ Reallocates storage for an existing reserved block of memory ## {{fbdoc item="param"}} ##//pointer//## - The address of allocated memory to be reallocated. + L'adresse de mémoire allouée qui doit être réaffectée. ##//count//## - The number of bytes, in total, to be reallocated. + Le nombre total d'octets qui doivent être réaffectés. -{{fbdoc item="ret"}} - The address of the reallocated memory. A null (##0##) pointer is returned if reallocation was unsuccessful, and the original memory pointed to by ##//pointer//## remains unchanged. +{{fbdoc item="section" value="Valeur retournée + L'adresse de la mémoire réaffectée. Un pointeur nul (##0##) est retourné si la réallocation a échoué et la mémoire d'origine pointée par ##//pointer//## reste inchangée. {{fbdoc item="desc"}} - Attempts to reallocate, or resize, memory previously allocated with ##[[KeyPgAllocate Allocate]]##. The contents of the buffer are preserved, although if ##//count//## is less than the original size of the memory block, the buffer will be truncated. + Essaye de réaffecter ou de redimensionner, la mémoire précédemment réservée avec ##[[KeyPgAllocate Allocate]]##. Le contenu de la mémoire tampon est conservé, mais si ##//count//## est inférieur à la taille d'origine du bloc de mémoire, la mémoire tampon sera tronquée. - If ##//pointer//## is null (##0##), then ##""ReAllocate""## behaves identically to ##[[KeyPgAllocate Allocate]]##. + Si ##//pointer//## est nul (##0##), alors le comportement de ##ReAllocate## est identique à celui de ##[[KeyPgAllocate Allocate]]##. - Reallocated memory must be deallocated, or freed, with ##[[KeyPgDeallocate Deallocate]]## when no longer needed. + La mémoire réallouée doit être désallouée ou libérée, avec ##[[KeyPgDeallocate Deallocate]]## quand elle n'est plus utilisée. - This function is not part of the FreeBASIC runtime library, it is an alias for the C runtime library's ##//realloc//##, so it's not guaranteed to be thread safe in all platforms. - - **NOTE**: Reallocating a pointer inside an object function, when that pointer contains the parent object of the function, is undefined, and will likely result in horrible crashes. + Cette fonction ne fait pas partie de la bibliothèque d'exécution de FreeBASIC, c'est un alias pour ##//realloc//## de la bibliothèque d'exécution du langage C, ce n'est donc pas garanti d'être "thread-safe" sur toutes les plates-formes. -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/memory/reallocate.bas"}}%%(freebasic) -Dim a as Integer Ptr, b as Integer Ptr, i As Integer + **NOTE**: La réaffectation d'un pointeur dans une fonction d'objet, quand ce pointeur contient l'objet parent de la fonction, est indéfinie et entraînera probablement dans des accidents horribles. -a = Allocate( 5 * SizeOf(Integer) ) ' Allocate memory for 5 integers + {{fbdoc item="ex"}} + + %%(freebasic) +Dim a As Integer Ptr, b As Integer Ptr, i As Integer +a = Allocate( 5 * SizeOf(Integer) ) ' Allocate memory for 5 integers If a = 0 Then Print "Error Allocating a": End -For i = 0 to 4 - a[i] = (i + 1) * 2 ' Assign integers to the buffer -Next i +For i = 0 To 4 -b = ReAllocate( a, 10 * SizeOf(Integer) ) ' Reallocate memory for 5 additional integers +a[i] = (i + 1) * 2 ' Assign integers to the buffer +Next i + b = Reallocate( a, 10 * SizeOf(Integer) ) ' Reallocate memory for 5 additional integers If b <> 0 Then - a = b +a = b + +For i = 5 To 9 + + a[i] = (i + 1) * 2 ' Assign more integers to the buffer - For i = 5 to 9 - a[i] = (i + 1) * 2 ' Assign more integers to the buffer Next i + For i = 0 To 9 ' Print the integers + Print i, a[i] - For i = 0 to 9 ' Print the integers - Print i, a[i] Next i - Print + Print + Else '' Reallocate failed, memory unchanged + Print "Error Reallocating a" -else '' Reallocate failed, memory unchanged +For i = 0 To 4 ' Print the integers - Print "Error Reallocating a" + Print i, a[i] - For i = 0 to 4 ' Print the integers - Print i, a[i] Next i - Print + Print + End If + Deallocate a ' Clean up -end if - -Deallocate a ' Clean up %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Reallocate""**##. +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Reallocate**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgAllocate Allocate]]## + +- ##[[KeyPgCallocate CAllocate]]## + - ##[[KeyPgDeallocate Deallocate]]## - ##[[KeyPgCallocate Callocate]]## - ##[[KeyPgDeallocate Deallocate]]## diff --git a/fbdocs/manual/cache/KeyPgRedim.wakka b/fbdocs/manual/cache/KeyPgRedim.wakka index adaca03ef6..f79406bbb9 100644 --- a/fbdocs/manual/cache/KeyPgRedim.wakka +++ b/fbdocs/manual/cache/KeyPgRedim.wakka @@ -1,61 +1,63 @@ {{fbdoc item="title" value="REDIM"}}---- -Defines or resizes a variable-length array +Définit ou redimensionne un tableau de longueur-variable {{fbdoc item="syntax"}}## - **Redim** [ [[KeyPgShared Shared]] ] [ [[KeyPgPreserve Preserve]] ] //symbolname//([//subscript// [, ...]]) As [[DataType datatype]] [, ...] - **Redim** [ [[KeyPgShared Shared]] ] [ [[KeyPgPreserve Preserve]] ] As [[DataType datatype]] //symbolname//([//subscript// [, ...]]) [, ...] -## -{{fbdoc item="param"}} - ##[[KeyPgShared Shared]]## - Specifies shared (file-scope) access to the array throughout the module. + **ReDim** [ [[KeyPgShared Shared]] ] [ [[KeyPgPreserve Preserve]] ] //symbolname//([//subscript// [, ...]]) As [[DataType datatype]] [, ...] + **ReDim** [ [[KeyPgShared Shared]] ] [ [[KeyPgPreserve Preserve]] ] As [[DataType datatype]] //symbolname//([//subscript// [, ...]]) [, ...] + ## + + {{fbdoc item="param"}} + ##[[KeyPgShared Shared]]## + +Spécifie un accès partagé au tableau (pour la portée du fichier) à travers le module. ##[[KeyPgPreserve Preserve]]## - When used with an existing array, the contents of the array will be preserved during the resize. Note that ##[[KeyPgPreserve Preserve]]## will not work properly in all cases. + Lors de l'utilisation avec un tableau existant, le contenu de ce tableau sera préservé pendant le redimensinnement. Notez que ##[[KeyPgPreserve Preserve]]## ne fonctionnera pas correctement dans tous les cas. ##//symbolname//## - A new or existing array id. + Un identificateur (id) de tableau, nouveau ou existant déjà. ##//subscript//##: [ ##//lowerbound// To## ] ##//upperbound//## - The lower and upper bound range for a dimension of the array. Lower bound defaults to zero (##0##), or the default ##[[KeyPgOptionbase Base]]##, if not specified. + Les limites inférieure et supérieure pour une dimension du tableau. La limite inférieure à zéro (##0##) par défaut ou la ##[[KeyPgOptionbase Base]]## par défaut, si non spécifié. ##[[DataType datatype]]## - The type of elements contained in the array. + Le type des éléments contenus dans le tableau. + {{fbdoc item="desc"}} + ##**ReDim**## peut être utilisé pour définir de nouveaux tableaux de longueur variable ou pour redimensionner des tableaux de longueur variable. ##**ReDim**## produit toujours des tableaux de longueur variable, ainsi, contrairement à ##[[KeyPgDim Dim]]##, des tableaux de longueur variable peuvent être définis avec des indices constants. -{{fbdoc item="desc"}} - ##**Redim**## can be used to define new variable-length arrays, or resize existing variable-length arrays. ##**Redim**## always produces variable-length arrays, so, unlike ##[[KeyPgDim Dim]]##, variable-length arrays can be defined with constant subscripts. +Lorsque vous définissez un nouveau tableau de longueur variable, ses éléments sont construits par défaut. Pour des types de données simples comme ##[[KeyPgInteger Integer]]## ou ##[[KeyPgDouble Double]]##, les éléments sont initialisés à zéro (##0##). Pour des types définis par l'utilisateur avec un constructeur par défaut, celui-ci sera appelé. + **NOTES**: - When defining a new variable-length array, its elements are default constructed. For simple data types like ##[[KeyPgInteger Integer]]## or ##[[KeyPgDouble Double]]##, the elements are initialized to zero (##0##). For user-defined types with a default constructor, that will be called. + - ##**ReDim** [[KeyPgPreserve Preserve]]## ne donnera pas le résultat escompté dans les cas suivants: - **NOTES**: - - ##**Redim** [[KeyPgPreserve Preserve]]## may not work as expected in all cases: - ##[[KeyPgPreserve Preserve]]##'s current behavior is to keep the original data contiguous in memory, and only expand or truncate the size of the memory. - Its behavior (with a single dimension) is well-defined only when the upper bound is changed. If the lower bound is changed, the current result is that the data is in effect shifted to start at the new lower bound. - With multiple dimensions, only the upper bound of only the first dimension may be safely increased. If the first dimension is reduced, the existing mappable data may be lost. If lower-order dimensions are resized at all, the effects can be hard to predict. + Le comportement normal de ##[[KeyPgPreserve Preserve]]## est de conserver les données originales contiguës dans la mémoire, et seulement augmenter ou diminuer la taille de la mémoire. + Son comportement (avec une seule dimension) n'est bien défini que lorsque la borne supérieure est changée. Si la borne inférieure est modifiée, le résultat est que les données sont en effet déplacées pour commencer à la nouvelle limite inférieure. + Avec des dimensions multiples, seule la limite supérieure de la première dimension peut être augmentée en toute sécurité. Si la première dimension est réduite, les données existantes cartographiables peuvent être perdues. Si les dimensions d'ordre inférieur sont toutes redimensionnées, les effets sont imprévisibles. + - ##**ReDim**## ne peut pas être utilisé sur des tableaux de taille fixe - c'est à dire avec des tableaux avec des limites constantes produits par ##[[KeyPgDim Dim]]##. Ceci inclut les tableaux contenus dans les ##[[KeyPgType Type]]##s définis par l'utilisateur, car seuls des tableaux à taille fixée sont supportés par les types définis par l'utilisateur. Ceci inclut aussi les tableaux de longueur fixée passés comme paramètres d'une fonction. FreeBASIC ne pourra vous empêcher d'essayer cela au moment de la compilation, mais les résultats au moment du fonctionnement seront imprévisibles. + - L'utilisation de ##**ReDim**## dans un membre d'une procédure avec un tableau qui contient une instance de la classe objet est indéfinie et entraînera d'horribles crashes. - - ##**Redim**## cannot be used on fixed-size arrays - i.e. arrays with constant bounds made with ##[[KeyPgDim Dim]]##. This includes arrays contained in UDTs (user-defined ##[[KeyPgType Type]]##s), because currently only fixed-size arrays are supported in UDTs. This also includes fixed-length arrays passed as parameters in a function. ""FreeBASIC"" cannot prevent you trying this at compile-time, but the results at run-time will be undefined. + {{fbdoc item="ex"}} - - Using ##**Redim**## within a member procedure with an array that contains an instance of the object class is undefined, and will [hopefully] result in horrible crashes. + %%(freebasic) -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/array/redim.bas"}}%%(freebasic) '' Define a variable-length array with 5 elements '' ReDim array(0 To 4) As Integer - For index As Integer = LBound(array) To UBound(array) - array(index) = index -Next +array(index) = index -'' Resize a variable-length array with 10 elements +Next + '' Resize a variable-length array with 10 elements '' (the lower bound should be kept the same) -ReDim Preserve array(0 to 9) As Integer +ReDim Preserve array(0 To 9) As Integer Print "index", "value" For index As Integer = LBound(array) To UBound(array) - Print index, array(index) -Next -%% - This program will produce the following output: +Print index, array(index) +Next + %% +Ce programme produira la sortie suivante: %%index value - 0 0 - 1 1 + 0 0 + +1 1 2 2 3 3 4 4 @@ -64,94 +66,96 @@ Next 7 0 8 0 9 0 -%% - -{{fbdoc item="filename" value="examples/manual/array/redim2d.bas"}}%%(freebasic) + %% + %%(freebasic) '' Define a variable-length array -Dim array() As Integer +Dim array() As Integer '' ReDim array to have 3*4 elements ReDim array(1 To 3, 1 To 4) Dim As Integer n = 1, i, j - Print "3 * 4:" + Print + For i = LBound(array, 1) To UBound(array, 1) - For j = LBound(array, 2) To UBound(array, 2) - array(i, j) = n - Print Using "## "; array(i, j); +For j = LBound(array, 2) To UBound(array, 2) +array(i, j) = n + Print Using "## "; array(i, j); n += 1 + Next + Print Next Print -Next -Print - - '' ReDim Preserve array to have 4*4 elements, preserving the contents '' (only the first upper bound should be changed) -ReDim Preserve array(1 To 4, 1 To 4) As Integer + +ReDim Preserve array(1 To 4, 1 To 4) As Integer Print "4 * 4:" Print + For i = LBound(array, 1) To UBound(array, 1) - For j = LBound(array, 2) To UBound(array, 2) - Print Using "## "; array(i, j); +For j = LBound(array, 2) To UBound(array, 2) +Print Using "## "; array(i, j); + Next + Print Next Print -Next -Print - - '' ReDim Preserve array to have 2*4 elements, preserving but trancating the contents '' (only the first upper bound should be changed) -ReDim Preserve array(1 To 2, 1 To 4) As Integer + +ReDim Preserve array(1 To 2, 1 To 4) As Integer Print "2 * 4:" Print + For i = LBound(array, 1) To UBound(array, 1) - For j = LBound(array, 2) To UBound(array, 2) - Print Using "## "; array(i, j); +For j = LBound(array, 2) To UBound(array, 2) +Print Using "## "; array(i, j); + Next + Print Next Print -Next -Print %% - This program will produce the following output: - +Ce programme produira la sortie suivante: %%3 * 4: + 1 2 3 4 + +5 6 7 8 - 1 2 3 4 - 5 6 7 8 9 10 11 12 + 4 * 4: + 1 2 3 4 -4 * 4: +5 6 7 8 - 1 2 3 4 - 5 6 7 8 9 10 11 12 0 0 0 0 - -2 * 4: - + 2 * 4: 1 2 3 4 - 5 6 7 8 -%% -{{fbdoc item="diff"}} - - ##[[KeyPgPreserve Preserve]]## was in Visual Basic, but not in QBASIC. - - Multi-dimensional arrays in ""FreeBASIC"" are in row-major order, rather than column-major order. +5 6 7 8 -{{fbdoc item="see"}} + %% + {{fbdoc item="diff"}} + +- ##[[KeyPgPreserve Preserve]]## existe dans Visual Basic, mais pas dans QBASIC. +- Les tableaux multi-dimensionnels de FreeBasic sont d'ordre ligne-majeur, plutôt que d'ordre colonne-majeur. + {{fbdoc item="see"}} - ##[[KeyPgCommon Common]]## - - ##[[KeyPgDim Dim]]## + +- ##[[KeyPgDim Dim]]## - ##[[KeyPgErase Erase]]## - ##[[KeyPgExtern Extern]]## - - ##[[KeyPgLbound Lbound]]## - - ##[[KeyPgRedim Redim]]## + - ##[[KeyPgLbound LBound]]## + - ##[[KeyPgRedim ReDim]]## - ##[[KeyPgPreserve Preserve]]## - ##[[KeyPgShared Shared]]## - ##[[KeyPgStatic Static]]## + - ##[[KeyPgUbound UBound]]## + - ##[[KeyPgVar Var]]## - ##[[KeyPgUbound Ubound]]## - ##[[KeyPgVar Var]]## diff --git a/fbdocs/manual/cache/KeyPgRem.wakka b/fbdocs/manual/cache/KeyPgRem.wakka index 9a9ed2f216..1c958f0f13 100644 --- a/fbdocs/manual/cache/KeyPgRem.wakka +++ b/fbdocs/manual/cache/KeyPgRem.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="REM"}}---- -Indicates comments in the source code. +Indique des commentaires dans le code source. {{fbdoc item="syntax"}}## **Rem** comment @@ -10,14 +10,14 @@ Indicates comments in the source code. comment '/ ## {{fbdoc item="desc"}} - A source code line beginning with ##**Rem**## indicates that the line is a comment and will not be compiled. + Une ligne de code source commençant par ##**Rem**## indique que celle-ci est un commentaire et ne sera pas compilée. - The single quote character (') may also be used to indicate a comment and may appear after other keywords on a source line. + Le caractère apostrophe simple (') peut également être utilisé pour indiquer un commentaire et peut apparaître après d'autres mots clés sur une ligne de source. - Multi-line comments are marked with the tokens ##**/'**## and ##**'/**##. All text between the two markers is considered comment text and is not compiled. + Les commentaires sur plusieurs lignes sont délimités par ##**/'**## et ##**'/**##. Tout le texte entre les deux marqueurs est considéré comme le texte du commentaire et n'est pas compilé. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/misc/rem.bas"}}%%(freebasic) + %%(freebasic) /' this is a multi line comment as a header of this example '/ @@ -42,7 +42,7 @@ Dim b As /' can comment in here also '/ Integer %% {{fbdoc item="diff"}} - - Multiline comments are new to ""FreeBASIC"" version 0.16 + - Les commentaires sur plusieurs lignes sont nouveaux pour FreeBASIC à partir de la version 0.16 {{fbdoc item="see"}} - ##[[KeyPgPpif #if]]## diff --git a/fbdocs/manual/cache/KeyPgReset.wakka b/fbdocs/manual/cache/KeyPgReset.wakka index 0b0b84b3c2..8376b1de11 100644 --- a/fbdocs/manual/cache/KeyPgReset.wakka +++ b/fbdocs/manual/cache/KeyPgReset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RESET"}}---- -Closes all open files, or resets standard I/O handles. +Ferme tous les fichiers ouverts ou réinitialise les périphériques d'Entrée/Sortie standard. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Reset** ( ) @@ -7,17 +7,17 @@ Closes all open files, or resets standard I/O handles. ## {{fbdoc item="usage"}}## **Reset** -//or// +//ou// **Reset**( //streamno// ) ## {{fbdoc item="param"}} ##//streamno//## - The stream number, 0 for stdin or 1 for stdout to reset. + Le numéro de flux à réinitialiser, 0 pour stdin ou 1 pour stdout. {{fbdoc item="desc"}} - ##**Reset**##, when called with no arguments, closes all disk files. + ##**Reset**##, appelé sans arguments, ferme tous les fichiers sur le disque. - ##**Reset**##, when called with the ##//streamno//## argument, will reset the redirected or piped streams associated with stdin (0), or stdout (1). Passing any value for ##//streamno//## other than 0 or 1 has no effect. + ##**Reset**##, appelé avec l'argument ##//streamno//##, réinitialisera les flux redirigés ou "pipés" associés à (0) ou stdout (1). Passer une valeur autre que 0 ou 1 pour ##//streamno//## est sans effet. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/reset.bas"}}%%(freebasic) @@ -52,8 +52,8 @@ wend close #1 %% {{fbdoc item="diff"}} - - None for ##**Reset**()##. - - The ##**Reset**(//streamno//)## usage is new to ""FreeBASIC"". + - Aucune pour ##**Reset**()##. + - L'utilisation de ##**Reset**(//streamno//)## est nouvelle pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgClose Close]]## diff --git a/fbdocs/manual/cache/KeyPgRestore.wakka b/fbdocs/manual/cache/KeyPgRestore.wakka index e7fc9ddd31..d071523cd2 100644 --- a/fbdocs/manual/cache/KeyPgRestore.wakka +++ b/fbdocs/manual/cache/KeyPgRestore.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="RESTORE"}}---- -Changes the next read location for values stored with the ##[[KeyPgData Data]]## statement. +Change la position de la prochaine lecture pour les valeurs stockées avec la déclaration ##[[KeyPgData Data]]##. {{fbdoc item="syntax"}}## **Restore** //label// ## {{fbdoc item="desc"}} - Sets the next-data-to-read pointer to the first element of the first ##[[KeyPgData Data]]## statement after the label. The label must be contained in the same module as the currently-executing code. ##Restore## alters the normal top to bottom order in which ##Data## are ##[[KeyPgRead Read]]##. It allows re-reading some ##Data## or using multiple sets of ##Data## in a single module. + Positionne le pointeur de la prochaine donnée à lire sur le premier élément de la première déclaration ##[[KeyPgData Data]]## après ##//label//##. Le ##//label//## doit être contenu dans le même module que le code en cours d'exécution. ##Restore## modifie l'ordre normal (du haut vers le bas) des ##**Data**## pour ##[[KeyPgRead Read]]##. Il permet de relire certains ##**Data**## ou d'utiliser plusieurs ensembles de ##Data## dans un seul module. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/data/restore.bas"}}%%(freebasic) @@ -92,7 +92,7 @@ Data 546, 7894, 4589, 64657, 34554, "Hi!" {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgData Data]]## diff --git a/fbdocs/manual/cache/KeyPgResume.wakka b/fbdocs/manual/cache/KeyPgResume.wakka index ea14b79d4b..96d5ef8096 100644 --- a/fbdocs/manual/cache/KeyPgResume.wakka +++ b/fbdocs/manual/cache/KeyPgResume.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="RESUME"}}---- -Error handling statement to resume execution after a jump to an error handler +Déclaration de gestion des erreurs pour reprendre l'exécution après un saut à un gestionnaire d'erreur {{fbdoc item="syntax"}}## **Resume** ## {{fbdoc item="desc"}} - ##**Resume**## is used in the traditional QB error handling mechanism within an error handler (called by ##[[KeyPgOnerror On Error]]##) to return execution to the line that caused the error. Usually this is used after the error has been handled gracefully in order to try the previously erroneous operation again with corrected data. + ##**Resume**## est utilisé dans le mécanisme traditionnel de gestion des erreurs de QB du gestionnaire d'erreurs (appelé par ##[[KeyPgOnerror On Error]]##) pour reprendre l'exécution à la ligne qui a provoqué l'erreur. Habituellement, cela est utilisé après que l'erreur ait été gérée de façon élégante pour exécuter de nouveau l'opération précédemment erronée avec des données corrigées. - ##**Resume**## resets the ##[[KeyPgErr Err]]## value to 0 + ##**Resume**## réinitialise à 0 la valeur de ##[[KeyPgErr Err]]## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/resume.bas"}}%%(freebasic) @@ -33,20 +33,20 @@ Resume ' execution jumps back to 'j = 1 / i' line, which does not cause an error %% {{fbdoc item="lang"}} - - ON ERROR is not supported in the //[[CompilerOptlang -lang fb]]// dialect. Statements can be used in its function form to return an error code + - ON ERROR n'est pas supporté dans le dialecte //[[CompilerOptlang -lang fb]]//. Des déclarations peuvent être utilisées dans cette forme de fonction pour retourner un code d'erreur {{fbdoc item="filename" value="examples/manual/check/KeyPgResume_1.bas"}}%%(freebasic) If Open( "text" For Input As #1 ) <> 0 Then Print "Unable to open file" End If -%% +%% {{fbdoc item="diff"}} - - Does not accept line numbers or labels - - Must compile with //[[CompilerOptex -ex]]// option + - N'accepte pas les numéros de ligne ou les labels + - Doit être compilé avec l'option //[[CompilerOptex -ex]]// {{fbdoc item="see"}} - ##[[KeyPgErr Err]]## - ##[[KeyPgResumenext Resume Next]]## - - [[ProPgErrorHandling Error Handling]] + - [[ProPgErrorHandling Gestion des erreurs]] {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgResumenext.wakka b/fbdocs/manual/cache/KeyPgResumenext.wakka index 6ecb27e068..267822938b 100644 --- a/fbdocs/manual/cache/KeyPgResumenext.wakka +++ b/fbdocs/manual/cache/KeyPgResumenext.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="RESUME NEXT"}}---- -Error handling statement to resume execution after a jump to an error handler +Déclaration de gestion des erreurs pour reprendre l'exécution après un saut à un gestionnaire d'erreur {{fbdoc item="syntax"}}## **Resume Next** ## {{fbdoc item="desc"}} - ##**Resume Next**## is used in the traditional QB error handling mechanism within an error handler (called by ##[[KeyPgOnerror On Error]]##) to return execution to the line after the one that caused the error. Usually this is used to avoid executing the same line and causing the error again. + ##**Resume Next**## est utilisé dans le mécanisme traditionnel de prise en charge des erreurs de QB du gestionnaire d'erreurs (appelé par ##[[KeyPgOnerror On Error]]##) pour reprendre l'exécution à la ligne après celle qui a provoqué l'erreur. Habituellement, cela est utilisé pour éviter l'exécution de la même ligne et de provoquer à nouveau la même erreur. - ##**Resume Next**## resets the ##[[KeyPgErr Err]]## value to 0 + ##**Resume Next**## réinitialise à 0 la valeur de ##[[KeyPgErr Err]]## {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/error/resume-next.bas"}}%%(freebasic) @@ -33,19 +33,19 @@ Resume Next ' execution jumps to 'Print "ending..."' line, but j is now in an un %% {{fbdoc item="lang"}} - - ON ERROR is not supported in the //[[CompilerOptlang -lang fb]]// dialect. Statements can be used in its function form to return an error code + - ON ERROR n'est pas supporté dans le dialecte //[[CompilerOptlang -lang fb]]//. Des déclarations peuvent être utilisées dans cette forme de fonction pour retourner un code d'erreur {{fbdoc item="filename" value="examples/manual/check/KeyPgResumenext_1.bas"}}%%(freebasic) If Open( "text" For Input As #1 ) <> 0 Then Print "Unable to open file" End If -%% +%% {{fbdoc item="diff"}} - - Must compile with //[[CompilerOptex -ex]]// option + - Doit être compilé avec l'option //[[CompilerOptex -ex]]// {{fbdoc item="see"}} - ##[[KeyPgErr Err]]## - - ##[[KeyPgResume Resume]]## - - [[ProPgErrorHandling Error Handling]] + - ##[[KeyPgResumenext Resume]]## + - [[ProPgErrorHandling Gestion des erreurs]] {{fbdoc item="back" value="CatPgError|Error Handling Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgReturn.wakka b/fbdocs/manual/cache/KeyPgReturn.wakka index 9b7c3adad1..5f14d52a02 100644 --- a/fbdocs/manual/cache/KeyPgReturn.wakka +++ b/fbdocs/manual/cache/KeyPgReturn.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="RETURN"}}---- -Control flow statement to return from a procedure or ##[[KeyPgGosub Gosub]]##. +Déclaration de contrôle de flux pour revenir d'une procédure ou d'un ##[[KeyPgGosub GoSub]]##. {{fbdoc item="syntax"}}## **Return** [ //expression// ] -//or// +//ou// **Return** [ //label// ] ## {{fbdoc item="desc"}} - ##**Return**## is used to return from a procedure or return from a gosub ##[[KeyPgGosub Gosub]]##. + ##**Return**## est utilisé pour revenir d'une procédure ou d'un ##[[KeyPgGosub GoSub]]##. - Because ##[[KeyPgReturn Return]]## could mean return-from-gosub or return-from-procedure, ##[[KeyPgOptiongosub Option Gosub]]## and ##[[KeyPgOptionnogosub Option Nogosub]]## can be used to enable and disable ##[[KeyPgGosub Gosub]]## support. When ##[[KeyPgGosub Gosub]]## support is disabled, ##[[KeyPgReturn Return]]## is then recognized as return-from-procedure. When ##[[KeyPgGosub Gosub]]## support is enabled, ##[[KeyPgReturn Return]]## is then recognized as return-from-gosub. + Comme ##[[KeyPgReturn Return]]## signifie retour-d'un-gosub ou retour-d'une-procédure, ##[[KeyPgOptiongosub Option Gosub]]## et ##[[KeyPgOptionnogosub Option Nogosub]]## peuvent être utilisés pour activer et désactiver le support de ##[[KeyPgGosub GoSub]]##. Quand le support de ##[[KeyPgGosub GoSub]]## est désactivé, ##[[KeyPgReturn Return]]## est alors reconnu comme retour-d'une-procédure. Quand le support de ##[[KeyPgGosub GoSub]]## est activé, ##[[KeyPgReturn Return]]## est alors reconnu comme retour-d'un-gosub. - ##**Return**## (from procedure) is used inside a procedure to exit the procedure possibly with a return value. A ##[[KeyPgSub Sub]]## cannot specify a return return value. In a ##[[KeyPgFunction Function]]##, ##**Return**## must specify its return value. ##**Return** //expression//## is roughly equivalent to the ##Function = //expression// : [[KeyPgExit Exit]] Function## idiom. + ##**Return**## (d'une procédure) est utilisé dans une procédure pour sortir de la procédure peut-être avec une valeur de retour. Un ##[[KeyPgSub Sub]]## ne peut pas spécifier une valeur de retour. Dans une ##[[KeyPgFunction Function]]##, ##**Return**## doit préciser sa valeur de retour. ##**Return** //expression//## est à peu près équivalent à ##Function = //expression// : [[KeyPgExit Exit]] Function##. - ##**Return**## (from gosub) is used to return control back to the statement immediately following a previous ##[[KeyPgGosub Gosub]]## call. When used in combination with ##[[KeyPgGosub Gosub]]##, no return value can be specified. If the optional ##//label//## is specified, execution continues at the specified label. If no ##[[KeyPgGosub Gosub]]## was made, a runtime error is generated, and execution continues immediately after ##**Return**##. + ##**Return**## (d'un gosub) est utilisé pour redonner le contrôle à l'instruction qui suit immédiatement le dernier appel à ##[[KeyPgGosub GoSub]]##. Lorsqu'il est utilisé en combinaison avec ##[[KeyPgGosub GoSub]]##, aucune valeur de retour ne peut être spécifiée. Si l'option ##//label//## est spécifiée, l'exécution se poursuit à l'étiquette spécifiée. Si aucun ##[[KeyPgGosub GoSub]]## n'avait été exécuté, une erreur d'exécution est générée et l'exécution continue immédiatement après ##**Return**##. - A ##[[KeyPgGosub Gosub]]## should always have a matching ##**Return**## statement. However, if ##**Return**## (from gosub) is used where no ##[[KeyPgGosub Gosub]]## was made, a run-time error is generated. + Un ##[[KeyPgGosub GoSub]]## devrait toujours avoir un ##**Return**## correspondant. Toutefois, si ##**Return**## (depuis un gosub) est utilisé lorsqu'aucun ##[[KeyPgGosub GoSub]]## n'a été exécuté, une erreur d'exécution est générée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/return.bas"}}%%(freebasic) @@ -68,12 +68,12 @@ print r2.numerator & "/" & r2.denominator; " = "; print r3.numerator & "/" & r3.denominator%% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// dialect ##**Return**## always means return-from-procedure. - - In the //[[CompilerOptlang -lang qb]]// dialect, ##**Return**## means return-from-gosub by default unless changed with ##[[KeyPgOptionnogosub Option Nogosub]]##, in which case the compiler will recognize ##**Return**## as return-from-procedure. - - In the //[[CompilerOptlang -lang fblite]]// dialect, ##**Return**## means return-from-procedure by default unless changed with ##[[KeyPgOptiongosub Option Gosub]]##, in which case the compiler will recognize ##**Return**## as return-from-gosub. + - Dans le dialecte //[[CompilerOptlang -lang fb]]// ##**Return**## signifie toujours retour-d'une-procédure. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, ##**Return**## signifie retour-d'un-gosub par défaut sauf si cela a été changé avec ##[[KeyPgOptionnogosub Option Nogosub]]##, auquel cas le compilateur reconnaîtra ##**Return**## comme retour-d'une-procédure. + - Dans le dialecte //[[CompilerOptlang -lang fblite]]//, ##**Return**## signifie retour-d'une-procédure par défaut sauf si cela a été changé avec ##[[KeyPgOptiongosub Option Gosub]]##, auquel cas le compilateur reconnaîtra ##**Return**## comme retour-d'un-gosub. {{fbdoc item="diff"}} - - None when using the //[[CompilerOptlang -lang qb]]// dialect. + - Aucune en utilisant le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgSub Sub]]## diff --git a/fbdocs/manual/cache/KeyPgRgb.wakka b/fbdocs/manual/cache/KeyPgRgb.wakka index 8b4721cc15..cad613b90c 100644 --- a/fbdocs/manual/cache/KeyPgRgb.wakka +++ b/fbdocs/manual/cache/KeyPgRgb.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RGB"}}---- -Computes a valid color value for hi/truecolor modes +Calcule une valeur de couleur valide pour les modes "hi/truecolor" {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **RGB**(//r//,//g//,//b//) (([[KeyPgCuint cuint]](r) [[KeyPgOpShiftLeft shl]] 16) [[KeyPgOpOr or]] ([[KeyPgCuint cuint]](g) [[KeyPgOpShiftLeft shl]] 8) [[KeyPgOpOr or]] [[KeyPgCuint cuint]](b) [[KeyPgOpOr or]] &hFF000000) @@ -9,36 +9,36 @@ Computes a valid color value for hi/truecolor modes ## {{fbdoc item="param"}} ##//red//## - red color component value + valeur de la composante de couleur rouge ##//green//## - green color component value + valeur de la composante de couleur vert ##//blue//## - blue color component value + valeur de la composante de couleur bleu -{{fbdoc item="ret"}} - The combined color. +{{fbdoc item="section" value="Valeur renvoyée + La couleur correspondant à la combinaison. {{fbdoc item="desc"}} - ##//red//##, ##//green//## and ##//blue//## are components ranging ##0##..##255##. + ##//red//##, ##//green//## et ##//blue//## sont les composantes de la couleur - valeurs de ##0## à ##255##. - The ##**RGB**## function can be used to compute a valid color value for use while in hi/truecolor modes. It returns an unsigned integer in the format ##&hAARRGGBB##, where ##RR##, ##GG## and ##BB## equal the values passed to this function, in hexadecimal format. ##AA## is the implicit alpha value and is automatically set to ##&hFF## (opaque). - It is possible to retrieve the red, green, blue and alpha values from a color value, by using a combination of ##[[KeyPgOpAnd And]]## and ##[[KeyPgOpShiftRight Shr]]##. The second example below shows how to ##[[KeyPgPpdefine #Define]]## and use macros to do this. + La fonction ##**RGB**## est utilisée pour calculer une valeur de couleur valide pour les modes "hi/truecolor". Elle renvoie un entier non signé dans le format ##&hAARRVVBB##, où ##RR##, ##VV## et ##BB## sont égales aux valeurs passées à la fonction, dans le format hexadécimal. ##AA## est la valeur implicite de la transparence qui est automatiquement mise à ##&hFF## (opaque). + Il est possible de récupérer les valeurs rouge, vert, bleu et alpha à partir d'une valeur de couleur, en utilisant une combinaision de ##[[KeyPgOpAnd And]]## et ##[[KeyPgOpShiftRight Shr]]##. Le second exemple ci-dessous montre comment ##[[KeyPgPpdefine #define]]## et l'utilisation de macros permettent cela. - **Note for Windows API programmers**: The macro named ##RGB## in the Windows references has been renamed ##BGR## in the FB headers for Windows to avoid collisions. + **Note pour les programmeurs d'API Windows**: La macro nommée ##RGB## dans les références Windows a été renommée ##BGR## dans les en-têtes FB pour Windows pour éviter des collisions. {{fbdoc item="ex"}} - See ##[[KeyPgPutgraphics Put (Graphics)]]## example in addition. + Voir aussi l'exemple de ##[[KeyPgPutgraphics Put (Graphique)]]##. {{fbdoc item="filename" value="examples/manual/gfx/rgb.bas"}}%%(freebasic) -ScreenRes 640,480,32 '32 bit color -Line(0,0)-(319,479), Rgb(255,0,0) 'draws a bright red box on the left side of the window -Line(639,0)-(320,479), Rgb(0,0,255) 'draws a bright blue box on the right side of the window +ScreenRes 640,480,32 'couleur 32 bits +Line(0,0)-(319,479), RGB(255,0,0) 'dessine une boite rouge vif sur le cote gauche de la fenetre +Line(639,0)-(320,479), RGB(0,0,255) 'dessine une boite bleu vif sur le cote droit de la fenetre -Sleep 'wait before exiting +Sleep 'attend avant sortie %% {{fbdoc item="filename" value="examples/manual/gfx/rgb_get.bas"}}%%(freebasic) -'' setting and retrieving Red, Green, Blue and Alpha values +'' Valide et recupere valeurs;Rouge, Vert, Bleu et Alpha #define RGBA_R( c ) ( CUInt( c ) Shr 16 And 255 ) #define RGBA_G( c ) ( CUInt( c ) Shr 8 And 255 ) @@ -64,10 +64,10 @@ Print Using "Alpha: _&H\\ = ###"; Hex(a, 2); a %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgRgba RGBA]]## diff --git a/fbdocs/manual/cache/KeyPgRgba.wakka b/fbdocs/manual/cache/KeyPgRgba.wakka index ac1d745552..ccdab4de9d 100644 --- a/fbdocs/manual/cache/KeyPgRgba.wakka +++ b/fbdocs/manual/cache/KeyPgRgba.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RGBA"}}---- -Computes a valid color value including alpha (transparency) for hi/truecolor modes +Calcule une valeur de couleur valide incluant la transparence (alpha) pour les modes "hi/truecolor" {{fbdoc item="syntax"}}## [[KeyPgPpdefine #define]] **RGBA**(//r//,//g//,//b//,//a//) (([[KeyPgCuint cuint]](r) [[KeyPgOpShiftLeft shl]] 16) [[KeyPgOpOr or]] ([[KeyPgCuint cuint]](g) [[KeyPgOpShiftLeft shl]] 8) [[KeyPgOpOr or]] [[KeyPgCuint cuint]](b) [[KeyPgOpOr or]] ([[KeyPgCuint cuint]](a) [[KeyPgOpShiftLeft shl]] 24)) @@ -9,71 +9,71 @@ Computes a valid color value including alpha (transparency) for hi/truecolor mod ## {{fbdoc item="param"}} ##//red//## - red color component value + valeur de la composante de couleur rouge ##//green//## - green color component value + valeur de la composante de couleur vert ##//blue//## - blue color component value + valeur de la composante de couleur bleu ##//alpha//## - alpha component value + valeur de la composante alpha -{{fbdoc item="ret"}} - the combined color +{{fbdoc item="section" value="Valeur renvoyée + La couleur correspondant à la combinaison. {{fbdoc item="desc"}} - ##//red//##, ##//green//##, ##//blue//## and ##//alpha//## are components ranging ##0##..##255##. + ##//red//##, ##//green//##, ##//blue//## et ##//alpha//## sont les composantes - valeurs de ##0## à ##255##. - The ##**RGBA**## function can be used to compute a valid color value including an alpha channel for use while in hi/truecolor modes. It returns an unsigned integer in the format ##&hAARRGGBB##, where ##RR##, ##GG##, ##BB##, ##AA## equal the values passed to this function, in hexadecimal format. - It is possible to retrieve the red, green, blue and alpha values from a color value, by using a combination of ##[[KeyPgOpAnd And]]## and ##[[KeyPgOpShiftRight Shr]]##. The second example below shows how to ##[[KeyPgPpdefine #Define]]## and use macros to do this. + La fonction ##**RGBA**## est utilisée pour calculer une valeur de couleur valide incluant la transparence (canal alpha) pour une utilisation avec les modes "hi/truecolor". Elle renvoie un entier non signé du format ##&hAARRVVBB##, où ##RR##, ##VV##, ##BB##, ##AA## correspondent aux valeurs passées à la fonction, dans le format hexadécimal. + Il est possible de retrouver les valeurs rouge, vert, bleu et alpha à partir d'un valeur de couleur, en utilisant une combinaison de ##[[KeyPgOpAnd And]]## et ##[[KeyPgOpShiftRight Shr]]##. Le second exemple ci-dessous comment utiliser ##[[KeyPgPpdefine #define]]## et des macros pour ce faire. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/rgba.bas"}}%%(freebasic) -'open a graphics screen (320 * 240, 32-bit) +'ouvre ecran graphique (320 * 240, 32-bit) ScreenRes 320, 240, 32 Dim As Any Ptr img Dim As Integer x, y -'make an image that varies in transparency and color +'fabriquemake image en variant transparence et couleur img = ImageCreate(64, 64) For x = 0 To 63 For y = 0 To 63 PSet img, (x, y), RGBA(x * 4, 0, y * 4, (x + y) * 2) Next y Next x -Circle img, (31, 31), 25, RGBA(0, 127, 192, 192), ,,, F 'semi-transparent blue circle -Line img, (26, 20)-(38, 44), RGBA(255, 255, 255, 0), BF 'transparent white rectangle +Circle img, (31, 31), 25, RGBA(0, 127, 192, 192), ,,, F 'cercle bleu semi-transparent +Line img, (26, 20)-(38, 44), RGBA(255, 255, 255, 0), BF 'rectangle blanc transparent -'draw a background (diagonal white lines) +'dessine arriere-plan (lignes diagonales blanches) For x = -240 To 319 Step 10 Line (x, 0)-Step(240, 240), RGB(255, 255, 255) Next -Line (10, 10)-(310, 37), RGB(127, 0, 0), BF 'red box for text -Line (10, 146)-(310, 229), RGB(0, 127, 0), BF 'green box for Putting onto +Line (10, 10)-(310, 37), RGB(127, 0, 0), BF 'boite rouge pour texte +Line (10, 146)-(310, 229), RGB(0, 127, 0), BF 'boite verte pour Putting dessus -'draw the image and some text with PSET +'dessine image et texte avec PSET Draw String(64, 20), "PSet" Put(48, 48), img, PSet Put(48, 156), img, PSet -'draw the image and some text with ALPHA +'dessine image et texte avec ALPHA Draw String (220, 20), "Alpha" Put(208, 48), img, Alpha Put(208, 156), img, Alpha -'Free the image memory +'Libere memoire image ImageDestroy img -'Keep the window open until the user presses a key +'Attend touche appuyee Sleep %% -{{image class="center" title="RGBA example output" url="/images/rgba.png" }} +
    {{fbdoc item="filename" value="examples/manual/gfx/rgba_get.bas"}}%%(freebasic) -'' setting and retrieving Red, Green, Blue and Alpha values +'' valide et recupere Rouge, Vert, Bleu et Alpha/span> #define RGBA_R( c ) ( CUInt( c ) Shr 16 And 255 ) #define RGBA_G( c ) ( CUInt( c ) Shr 8 And 255 ) @@ -99,14 +99,15 @@ Print Using "Alpha: _&H\\ = ###"; Hex(a, 2); a %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgRgb RGB]]## - ##[[KeyPgColor Color]]## + - ##[[KeyPgRgb RGB]]## - ##[[KeyPgPpdefine #Define]]## -{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} + diff --git a/fbdocs/manual/cache/KeyPgRight.wakka b/fbdocs/manual/cache/KeyPgRight.wakka index 37b166f226..d446c7bbf2 100644 --- a/fbdocs/manual/cache/KeyPgRight.wakka +++ b/fbdocs/manual/cache/KeyPgRight.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RIGHT"}}---- -Returns the rightmost substring of a string +Retourne la sous-chaîne la plus à droite d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Right** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByval byval]] //n// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,43 +10,43 @@ Returns the rightmost substring of a string ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne de caractères source. ##//n//## - The substring length, in characters. + La longueur de la sous-chaîne, en caractères. -{{fbdoc item="ret"}} - Returns the rightmost substring from ##//str//##. +{{fbdoc item="section" value="Valeur retournée + Retourne la sous-chaîne la plus à droite à partir de ##//str//##. {{fbdoc item="desc"}} - Returns the rightmost ##//n//## characters starting from the right (end) of ##//str//##. If ##//str//## is empty, then the null string (##"####"##) is returned. If ##//n// <= 0## then the null string (##"####"##) is returned. If ##//n// > len(//str//)## then the entire source string is returned. + Retourne les ##//n//## caractères les plus à droite à partir de la droite (fin) de ##//str//##. Si ##//str//## est vide, alors la chaîne nulle (##"####"##) est retournée. Si ##//n// <= 0## alors la chaîne nulle (##"####"##) est retournée. Si ##//n// > len(//str//)## alors la chaîne entière est retournée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/right.bas"}}%%(freebasic) dim text as string = "hello world" print right(text, 5) %% - will produce the output: + produira la sortie:: %%world -%% -An Unicode example: -<< -dim text as wstring*20 +%%Un exemple Unicode: +##
    dim text as wstring*20 text = "Привет, мир!" print right(text, 5) 'displays " мир!" -<<::c:: +##; {{fbdoc item="target"}} - - DOS does not support the wide-character string version of **##Right##**. - +- DOS ne supporte pas la version large **##WString##** de la chaîne de **##Right##**. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. -{{fbdoc item="diff"}} - - QB does not support Unicode. +- Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. + {{fbdoc item="diff"}} + - QB ne supporte pas Unicode. {{fbdoc item="see"}} - ##[[KeyPgLeft Left]]## + +- ##[[KeyPgMidfunction Mid (Fonction)]]## + - ##[[KeyPgLeft Left]]## - ##[[KeyPgMidfunction Mid (Function)]]## {{fbdoc item="back" value="CatPgString|String Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgRmdir.wakka b/fbdocs/manual/cache/KeyPgRmdir.wakka index 2bd034223c..2a80e7f2c4 100644 --- a/fbdocs/manual/cache/KeyPgRmdir.wakka +++ b/fbdocs/manual/cache/KeyPgRmdir.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RMDIR"}}---- -Removes a folder/directory from the file system +Supprime un dossier/répertoire du système de fichiers {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Rmdir** ( [[KeyPgByref byref]] //folder// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Removes a folder/directory from the file system ## {{fbdoc item="param"}} ##//folder//## - The folder/directory to be removed. + Le dossier/répertoire à supprimer. -{{fbdoc item="ret"}} - Returns zero (0) on success, and negative one (-1) on failure. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si succès et non-zéro en cas d'échec. {{fbdoc item="desc"}} - Removes a folder from the file system. The function will fail if the folder is not empty. + Supprime un dossier du système de fichiers. La fonction échouera si le dossier n'est pas vide. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/rmdir.bas"}}%%(freebasic) @@ -26,11 +26,11 @@ If 0 <> result Then Print "error: unable to remove folder " & pathname & " in th %% {{fbdoc item="target"}} - - Linux requires the //folder// case matches the real name of the file. Windows and DOS are case insensitive. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. + - Linux nécessite que la casse de //folder// corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgShell Shell]]## diff --git a/fbdocs/manual/cache/KeyPgRnd.wakka b/fbdocs/manual/cache/KeyPgRnd.wakka index c0cde77ab2..45e89837ea 100644 --- a/fbdocs/manual/cache/KeyPgRnd.wakka +++ b/fbdocs/manual/cache/KeyPgRnd.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RND"}}---- -Returns a random [[KeyPgDouble double]] precision number in the range ##[0, 1)## +Renvoie un nombre aléatoire en [[KeyPgDouble Double]] précision dans l'intervalle ##[0, 1]## {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Rnd** ( [[KeyPgByval byval]] //seed// [[KeyPgAs as]] [[KeyPgSingle single]] = 1.0 ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -8,18 +8,18 @@ Returns a random [[KeyPgDouble double]] precision number in the range ##[0, 1)## //result// = **Rnd**( //seed// ) ## {{fbdoc item="param"}} - ##//number//## - Optional ##[[KeyPgSingle single]]## argument. If ##//seed//## has a value of zero, the last random number generated is repeated, for any other number a new random number is returned. With the QB-compatible algorithm, a negative number fully reseeds the generator. The default for no argument is to return a new random number. + ##//seed//## + Argument ##[[KeyPgSingle Single]]## facultatif. Si ##//seed//## a une valeur de zéro, le dernier nombre aléatoire généré est répété, pour tout autre nombre, un nouveau nombre aléatoire est renvoyé. Avec l'algorithme QB-compatible, un nombre négatif regénère entièrement le générateur. S'il n'y a aucun argument, par défaut un nouveau nombre aléatoire est retourné. -{{fbdoc item="ret"}} - Returns the random number generated. +{{fbdoc item="section" value="Valeur retournée + Retourne le nombre aléatoire généré. {{fbdoc item="desc"}} - Returns a number of type ##[[KeyPgDouble double]]## in the range ##[0, 1)## (i.e. ##0 <= **Rnd** < 1##), based on a random seed (see ##[[KeyPgRandomize Randomize]]##). + Renvoie un nombre de type ##[[KeyPgDouble Double]]## dans l'intervalle ##[0, 1)## (c'est à dire ##0 <= **Rnd** < 1##), basé sur une graine aléatoire (voir ##[[KeyPgRandomize Randomize]]##). - ##**Rnd**## can use a variety of different algorithms - see ##[[KeyPgRandomize Randomize]]## for details of the default and selectable algorithms. + ##**Rnd**## peut utiliser une variété d'algorithmes différents - voir ##[[KeyPgRandomize Randomize]]## pour les détails de l'algorithme par défaut et des algorithmes sélectionnables. - ##**Rnd**## will return the same sequence of numbers every time a program is run. This sequence can be changed by reseeding the generator. + ##**Rnd**## retournera la même séquence de nombres chaque fois que le programme est exécuté. Cette séquence peut être modifiée en régnérant le générateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/rnd.bas"}}%%(freebasic) @@ -47,18 +47,18 @@ print int(rnd_range(69, 421)) %% {{fbdoc item="lang"}} - The default algorithm used depends on the current dialect in use: - - With the //[[CompilerOptlang -lang fb]]// dialect, a 32 bit Mersenne Twister function with a granularity of 32 bits is used. - - With the //[[CompilerOptlang -lang qb]]// dialect, a function giving the same output as ##**Rnd**## in QB is used. The granularity is 24 bits. - - With the //[[CompilerOptlang -lang deprecated]]// and //[[CompilerOptlang -lang fblite]]// dialects, the function in the C runtime available in the system is used. The function available in Win32 has a granularity of 15 bits, and 32 bits in Linux and DOS. + L'algorithme utilisé par défaut dépend du dialecte en usage: - Avec le dialecte //[[CompilerOptlang -lang fb]]//, une fonction "Mersenne Twister" 32 bits avec une granularité de 32 bits est utilisée. + - Avec le dialecte //[[CompilerOptlang -lang qb]]//, une fonction donnant le même résultat que ##**Rnd**## dans QB est utilisée. La granularité est de 24 bits. + - Avec les dialectes //[[CompilerOptlang -lang deprecated]]// et //[[CompilerOptlang -lang fblite]]//, la fonction C disponible dans le système est utilisée. La fonction a une granularité de 15 bits dans Win32 et 32 bits sous Linux et DOS. + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - None, if compiled in the //[[CompilerOptlang -lang qb]]// dialect. Other dialects can also use the same seeding and generating algorithms by calling ##[[KeyPgRandomize Randomize]]## with the appropriate parameter. - - For the non-QB-compatible algorithms, if the optional argument is less than 0, it has the same meaning as passing an argument of 1. +- Aucune, si compilé avec le dialecte //[[CompilerOptlang -lang qb]]//. Les autres dialectes peuvent également utiliser la même génération et algorithmes de génération en appelant ##[[KeyPgRandomize Randomize]]## avec le paramètre approprié. + - Pour les algorithmes non-QB-compatibles, si l'argument optionnel est inférieur à 0, il est équivalent à passer 1 en argument. + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgRandomize Randomize]]## +- ##[[KeyPgRandomize Randomize]]## - ##[[KeyPgTimer Timer]]## - ##[[KeyPgInt Int]]## + - ##[[KeyPgInt Int]]## {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgRset.wakka b/fbdocs/manual/cache/KeyPgRset.wakka index b06e143997..d6caf4a3a2 100644 --- a/fbdocs/manual/cache/KeyPgRset.wakka +++ b/fbdocs/manual/cache/KeyPgRset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RSET"}}---- -Right justifies a string in a string buffer +Justification à droite d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Rset** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //dst// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //src// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) @@ -10,12 +10,12 @@ Right justifies a string in a string buffer ## {{fbdoc item="param"}} ##//dst//## - A ##[[KeyPgString string]]## or ##[[KeyPgWstring wstring]]## buffer to copy the text into. + Un tampon ##[[KeyPgString String]]## ou ##[[KeyPgWstring WString]]## pour copier le texte dedans. ##//src//## - The source ##[[KeyPgString string]]## or ##[[KeyPgWstring wstring]]## to be right justified. + La ##[[KeyPgString String]]## ou ##[[KeyPgWstring WString]]## source à justifier à droite. {{fbdoc item="desc"}} - ##**Rset**## right justifies text into the string buffer ##//dst//##, filling the right part of the string with ##//src//## and the left part with spaces. + ##**RSet**## justifie le texte à droite dans le tampon chaîne ##//dst//##, en remplissant la partie droite de la chaîne avec ##//src//## et la partie gauche avec des espaces. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/rset.bas"}}%%(freebasic) @@ -26,7 +26,7 @@ print "-[" & buffer & "]-" %% {{fbdoc item="diff"}} - - In QBasic the syntax was ##**Rset** //dst// = //src//## + - Dans QB, la syntaxe est ##**RSet** //dst// = //src//## {{fbdoc item="see"}} - ##[[KeyPgLset Lset]]## diff --git a/fbdocs/manual/cache/KeyPgRtrim.wakka b/fbdocs/manual/cache/KeyPgRtrim.wakka index 7d2d7bcce4..27ea08f97e 100644 --- a/fbdocs/manual/cache/KeyPgRtrim.wakka +++ b/fbdocs/manual/cache/KeyPgRtrim.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RTRIM"}}---- -Removes surrounding substrings or characters on the right side of a string +Enlève les sous-chaines qui entourent ou les caractères sur le côté droit d'une chaîne. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Rtrim** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [ **Any** ] [[KeyPgByref byref]] //trimset// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] = " " ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,19 +10,19 @@ Removes surrounding substrings or characters on the right side of a string ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne source. ##//trimset//## - The substring to trim. + La sous-chaîne à enlever. -{{fbdoc item="ret"}} - Returns the trimmed string. +{{fbdoc item="section" value="Valeur retournée + Retourne la chaîne "nettoyée" à droite. {{fbdoc item="desc"}} - This procedure trims surrounding characters from the right (end) of a source string. Substrings matching ##//trimset//## will be trimmed if specified, otherwise spaces ([[CptAscii ASCII]] code 32) are trimmed. + Cette procédure élimine les caractères entourant à droite (fin) de la chaîne source. Les sous-chaînes correspondant à ##//trimset//## seront éliminées si spécifiées, autrement les espaces ([[CptAscii ASCII]] code 32) sont éliminés. - If the ##**Any**## keyword is used, any character matching a character in ##//trimset//## will be trimmed. + Si le mot-clef ##**Any**## est utilisé, chaque caractère correspondant à un caractère dans ##//trimset//## sera éliminé. - All comparisons are case-sensitive. + Toutes les comparaisons sont sensibles à la casse. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/rtrim.bas"}}%%(freebasic) @@ -36,7 +36,7 @@ print "'" + rtrim(s2, "Baa") + "'" print "'" + rtrim(s2, any "Ba") + "'" %% - will produce the output: + produira la sortie: %% 'Article 101' @@ -47,14 +47,14 @@ print "'" + rtrim(s2, any "Ba") + "'" %% {{fbdoc item="target"}} - - DOS version/target of ""FreeBASIC"" does not support the wide-character version of ##**RTrim**##. + - DOS version/cible de FreeBASIC ne supporte pas la version larges-caractères de ##**RTrim**##. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - QB does not support specifying a ##//trimset//## string or the ##ANY## clause. + - QB ne supporte pas les spécifications ##//trimset//## ou ##ANY##. {{fbdoc item="see"}} - ##[[KeyPgLtrim Ltrim]]## diff --git a/fbdocs/manual/cache/KeyPgRun.wakka b/fbdocs/manual/cache/KeyPgRun.wakka index af586a90ee..34f69559d4 100644 --- a/fbdocs/manual/cache/KeyPgRun.wakka +++ b/fbdocs/manual/cache/KeyPgRun.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="RUN"}}---- -Transfers execution to an external program +Transfère l'exécution vers un programme externe {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub function]] **Run** ( [[KeyPgByref byref]] //program// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [[KeyPgByref byref]] //arguments// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] = "####" ) [[KeyPgAs as]] [[KeyPgString integer]] @@ -9,17 +9,17 @@ Transfers execution to an external program ## {{fbdoc item="param"}} ##//program//## - The file name (including file path) of the program (executable) to transfer control to. + Le nom du fichier (y compris le chemin du fichier) du programme (exécutable) à qui on transfère le contrôle. ##//arguments//## - The command-line arguments to be passed to the program. + Les arguments de ligne de commande à passer au programme. -{{fbdoc item="ret"}} - Returns negative one (##-1##) if the program could not be executed. +{{fbdoc item="section" value="Valeur retournée + Retourne (##-1##) si le programme ne peut être exécuté. {{fbdoc item="desc"}} - Transfers control over to an external program. When the program exits, execution will return to the system. + Transfère le contrôle à un programme externe. Quand ce programme se termine, l'exécution retourne au système. -{{fbdoc item="ex"}} +{{fbdoc item="section" value="Exmple {{fbdoc item="filename" value="examples/manual/system/run.bas"}}%%(freebasic) '' Attempt to transfer control to "program.exe" in the current directory. Dim result As Integer = Run("program.exe") @@ -29,16 +29,16 @@ Dim result As Integer = Run("program.exe") %% {{fbdoc item="target"}} - - Linux requires the //program// case matches the real name of the file. Windows and DOS are case insensitive. The program being run may be case sensitive for its command line parameters. - - Path separators in Linux are forward slashes ("##/##"). Windows uses backward slashes ("##\##") although some versions of Windows allow forward slashes. DOS uses backward slashes. + - Linux nécessite que la casse de ##//program//## corresponde au nom réel du fichier. Windows et DOS ne sont pas sensibles à la casse. Le programme exécuté peut être sensible à la casse pour ses paramètres de ligne de commande. + - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. {{fbdoc item="diff"}} - - ##**Run**## needs the full executable name, including extension (##.exe##) on platforms that have one (""Win32"", DOS). - - Returning an error code is new to ""FreeBASIC"". + - ##**Run**## nécessite le nom complet de l'exécutable, y compris l'extension (##.exe##) sur les plateformes qui ont un (Win32, DOS). + - Returner un code d'erreur est nouveau pour FreeBASIC. {{fbdoc item="see"}} - - ##[[KeyPgExec Exec]]## transfer temporarily, with arguments - - ##[[KeyPgChain Chain]]## transfer temporarily, without arguments - - ##[[KeyPgCommand Command]]## pick arguments + - ##[[KeyPgExec Exec]]## transfère temporairement, avec arguments + - ##[[KeyPgChain Chain]]## transfère temporairement, sans argument + - ##[[KeyPgCommand Command]]## chercher des arguments {{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgSadd.wakka b/fbdocs/manual/cache/KeyPgSadd.wakka index 42b4bf6d1f..09d16b3402 100644 --- a/fbdocs/manual/cache/KeyPgSadd.wakka +++ b/fbdocs/manual/cache/KeyPgSadd.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="SADD"}}---- -Returns a pointer to a string variable's data +Retourne un pointeur vers les données d'une variable chaîne {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] [[KeyPgOverload overload]] **Sadd** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sadd** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgWstring Wstring]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sadd** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgZstring Zstring]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] [[KeyPgOverload Overload]] **SAdd** ( [[KeyPgByref ByRef]] //str// [[KeyPgAs As]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **SAdd** ( [[KeyPgByref ByRef]] //str// [[KeyPgAs As]] [[KeyPgWstring WString]] ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **SAdd** ( [[KeyPgByref ByRef]] //str// [[KeyPgAs As]] [[KeyPgZstring ZString]] ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] ## {{fbdoc item="usage"}}## //result// = **Sadd**( //str// ) ## {{fbdoc item="param"}} ##//str//## - the string expression or variable to get the address of + l'expression chaîne ou variable dont on veut obtenir l'adresse -{{fbdoc item="ret"}} - A pointer to the data associated with ##//str//##. +{{fbdoc item="section" value="Valeur retournée + Un pointeur vers les données associées à ##//str//##. {{fbdoc item="desc"}} - Returns the memory offset of the string data in the string variable. + Retourne la position en mémoire des données dans la variable chaîne. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/memory/sadd.bas"}}%%(freebasic) @@ -31,7 +31,7 @@ Print SAdd(s) %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgOpStrptr Strptr]]## diff --git a/fbdocs/manual/cache/KeyPgScope.wakka b/fbdocs/manual/cache/KeyPgScope.wakka index 6d553da22d..a8a27b6a2e 100644 --- a/fbdocs/manual/cache/KeyPgScope.wakka +++ b/fbdocs/manual/cache/KeyPgScope.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCOPE...END SCOPE"}}---- -Statement to begin a new scope block +Déclaration pour commencer un nouveau bloc de portée pour les variables {{fbdoc item="syntax"}}## **Scope** @@ -7,11 +7,11 @@ Statement to begin a new scope block **End Scope** ## {{fbdoc item="desc"}} - The Scope block allows variables to be temporarily (re)defined and used in a program. When a variable is defined with ##[[KeyPgDim Dim]]## within a scope structure, that variable can be used until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. + Le bloc Scope permet aux variables d'être temporairement (re)définies et utilisées dans un programme. Quand une variable est définie avec ##[[KeyPgDim Dim]]## au sein d'une "structure de portée", cette variable peut être utilisée jusqu'à la fin de cette "structure de portée". Pendant ce temps, toutes les variables en dehors du champ d'application qui ont le même nom seront ignorées et ne seront pas accessibles par ce nom. - Any statements in the Scope block before the variable is dimensioned will use the variable as defined outside the Scope. + Toutes les déclarations dans le "bloc de portée" avant la variable ne soit dimensionnée va utiliser la variable telle que définie à l'extérieur de la portée. - ##**Scope..End Scope**## is not permitted when compiling with in the //[[CompilerOptlang -lang qb]]// dialect. + ##**Scope..End Scope**## n'est pas permis lors de la compilation en dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/variable/scope.bas"}}%%(freebasic) @@ -29,11 +29,11 @@ Print "x ="; x; ", "; "y ="; y %% {{fbdoc item="lang"}} - - Explicit SCOPE..END SCOPE blocks are available only in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects. - - Explicit SCOPE..END SCOPE blocks are not available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects. + - Des blocs explicites SCOPE..END SCOPE ne sont disponibles que dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang deprecated]]//. + - Des blocs explicites SCOPE..END SCOPE ne sont pas disponibles dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/KeyPgScreenCons.wakka b/fbdocs/manual/cache/KeyPgScreenCons.wakka index 2f0bbbbcbb..43efc69c52 100644 --- a/fbdocs/manual/cache/KeyPgScreenCons.wakka +++ b/fbdocs/manual/cache/KeyPgScreenCons.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREEN (Console)"}}---- -Gets the character or color attribute at a given location +Renvoie le caractère ou l'attribut de couleur à la position donnée {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Screen** ( [[KeyPgByval byval]] row [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] column [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] colorflag [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,31 +9,31 @@ Gets the character or color attribute at a given location ## {{fbdoc item="param"}} ##//row//## - 1-based offset from the top left corner of the console. + décalage vertical depuis le coin en haut à gauche de la console (base = 1). ##//column//## - 1-based offset from the top left corner of the console. + décalage horizontal depuis le coin en haut à gauche de la console (base = 1). ##//colorflag//## - If equal to 0, the [[CptAscii ASCII]] code is returned, otherwise the color attribute is returned. If omitted, it defaults to 0. + Si égal à 0, le code [[CptAscii ASCII]] est renvoyé, uatrement c'est l'attribut de couleur qui est renvoyé. S'il est omis, sa valeur par défaut est 0. -{{fbdoc item="ret"}} - The [[CptAscii ASCII]] or color attribute of the character. - At the moment (v0.18.5), if coordinates are out of screen, no error number is set and the value returned is not reliable. +{{fbdoc item="section" value="Valeur retournée + Le code [[CptAscii ASCII]] ou l'attribut de couleur du caractère. + A ce moment (v0.18.5), si les coordonnées sont hors de l'écran, aucun no d'erreur n'est attribué et la valeur retournée n'est pas fiable. {{fbdoc item="desc"}} - ##**Screen**## returns the character or the color attribute found at a given position of a console output. It works in console mode and in graphics mode. + ##**Screen**## rtourne le caractère ou l'attribut de couleur trouvé à la position donnée d'une sortie console. Fonctionne en mode console ou graphique. - The format of the color attribute depends on the current color depth: + Le format de l'attribut de couleur dépend de la profondeur de la couleur : - If the color type is a palette type with up to 4 bits per pixel (such as the Win32 console), then the color attribute is an 8-bit value, where the higher four bits hold the cell background color and the lower four bits hold the foreground (character) color. + Si le type de couleur est une palette de 4 bits par pixel (comme la console Win32), alors l'attribut de couleur est une valeur 8-bit, dans laquelle les 4 bits de poids fort correspondent à la couleur d'arrière-plan et les 4 bits de poids faible correspondent à la couleur de premier-plan (caractère). - If the color type is an 8-bit palette, then the color attribute is a 16-bit value, where the high byte holds the background color and the low byte holds the foreground color. + Si le type de couleur est une palette de 8 bits par pixel, alors l'attribut de couleur est une valeur 16-bit, dans laquelle l'octet de poids fort correspond à la couleur d'arrière-plan et l'octet de poids faible à la couleur de premier-plan. - If the color type is full color, then the color attribute is a 32-bit integer, holding a single color value. If ##//colorflag//## is equal to 1, then the foreground color is returned; if ##//colorflag//## is equal to 2, then the background color is returned. + Si nous sommes en ##//pleine couleur//##, alors l'attribut de couleur est un entier 32-bit, correspondant à une unique valeur de couleur. Si ##//colorflag//## est à 1, alors c'est la couleur d'arrière-plan qui est renvoyée; si ##//colorflag//## est à 2, alors c'est la couleur de premier-plan qui est renvoyée. - The color values for the standard 16 color palette are: + Les valeurs de couleur pour une palette standard de 16 couleurs sont : - {{table columns="4" cellpadding="2" cells="Value;Color;Value;Color;0;Black;8;Gray;1;Blue;9;Bright Blue;2;Green;10;Bright Green;3;Cyan;11;Bright Cyan;4;Red;12;Bright Red;5;Magenta;13;Pink;6;Brown;14;Yellow;7;White;15;Bright White"}} + {{table columns="" cellpadding="2" cells="Valeur;Couleur;Valeur;Couleur;0;Noir;8;Gris;1;Bleu;9;Bleu Clair;2;Vert;10;Vert Clair;3;Cyan;11;Cyan Clair;4;Rouge;12;Rouge Clair;5;Magenta;13;Rose;6;Marron;14;Jaune;7;Blanc;15;Blanc Brillant;
    {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/screen-func.bas"}}%%(freebasic) @@ -50,20 +50,20 @@ cell_color = attribute and &hf %% {{fbdoc item="filename" value="examples/manual/gfx/screen-func1.bas"}}%%(freebasic) -'' open a graphics screen with 4 bits per pixel -'' (alternatively, omit this line to use the console) +'' ouvre un ecran graphique avec 4 bits par pixel +'' (alternativement, omettez cette ligne pour utiliser la console) screenres 320, 200, 4 -'' print a character +'' affiche un caractere color 7, 1 print "A" dim as uinteger char, col, fg, bg -'' get the ASCII value of the character we've just printed +'' obtient la valeur ASCII du caractere que nous'avons affiche char = screen(1, 1, 0) -''get the color attributes +''obtient les attributs de couleur col = screen(1, 1, 1) fg = col and &HF bg = (col shr 4) and &HF @@ -75,19 +75,19 @@ sleep %% {{fbdoc item="filename" value="examples/manual/gfx/screen-func2.bas"}}%%(freebasic) -'' open a graphics screen with 8 bits per pixel +'' ouvre ecran graphique avec 8 bits par pixel screenres 320, 200, 8 -'' print a character +'' affiche un caractere color 30, 16 print "Z" dim as uinteger char, col, fg, bg -'' get the ASCII value of the character we've just printed +'' obtient la valeur ASCII du caractere que nous'avons affiche char = screen(1, 1, 0) -''get the color attributes +''obtient les attributs de couleur col = screen(1, 1, 1) fg = col and &HFF bg = (col shr 8) and &HFF @@ -99,19 +99,19 @@ sleep %% {{fbdoc item="filename" value="examples/manual/gfx/screen-func3.bas"}}%%(freebasic) -'' open a full-color graphics screen +'' ouvre ecran graphique pleine-couleur screenres 320, 200, 32 -'' print a character -color rgb(255, 255, 0), rgb(0, 0, 255) 'yellow on blue +'' affiche un caractere +Color RGB(255, 255, 0), RGB(0, 0, 255) 'jaune sur bleu print "M" dim as integer char, fg, bg -'' get the ASCII value of the character we've just printed +'' obtient la valeur ASCII du caractere que nous'avons affiche char = screen(1, 1, 0) -''get the color attributes +''obtient les attributs de couleur fg = screen(1, 1, 1) bg = screen(1, 1, 2) @@ -121,13 +121,13 @@ print using "Background color: &"; hex(bg, 8) sleep %% {{fbdoc item="target"}} - - On the Linux version, the value returned can differ from the character shown on the console. For example, unprintable control codes - such as the ##LF## character (##10##) that implicitly occurs after the end of ##[[KeyPgPrint Print]]##ed text - may be picked up instead of the untouched character in its place. + - Dans la version Linux, la valeur retournée peut différer du caractère affiché à l'écran. Par exemple, les codes de contrôle non-imprimables - comme le caractère ##LF## (##10##) qui apparaî implicitement à la fin d'une ligne de texte affiché par ##[[KeyPgPrint Print]]## - peuvent être utilisés à la place du caractère initial. -{{fbdoc item="diff"}} - - In QB ##**Screen**## triggered an error if the coordinates were out of screen. +
    + {{fbdoc item="section" value="Différences par rapport à QB -{{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## - - ##[[KeyPgColor Color]]## +- Dans QB ##**Screen**## déclanche une erreur si les coordonnées sont hors de l'écran. +
    + {{fbdoc item="see"}} -{{fbdoc item="back" value="CatPgConsole|Console Functions"}} \ No newline at end of file +- ##[[KeyPgScreengraphics Screen (Graphics)]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgScreencontrol.wakka b/fbdocs/manual/cache/KeyPgScreencontrol.wakka index 997f0b74f1..21523f1edd 100644 --- a/fbdocs/manual/cache/KeyPgScreencontrol.wakka +++ b/fbdocs/manual/cache/KeyPgScreencontrol.wakka @@ -1,129 +1,129 @@ {{fbdoc item="title" value="SCREENCONTROL"}}---- -Sets or gets internal graphics library settings +Définit ou obtient les paramètres internes de la bibliothèque graphique {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgSub sub]] **""ScreenControl""** ( [[KeyPgByval byval]] what [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] param1 [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] param2 [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] param3 [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] param4 [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) - [[KeyPgDeclare declare]] [[KeyPgSub sub]] **""ScreenControl""** ( [[KeyPgByval byval]] what [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByref byref]] param [[KeyPgAs as]] [[KeyPgString string]] = ##"####"## ) + [[KeyPgDeclare Declare]] [[KeyPgSub Sub]] **ScreenControl** ( [[KeyPgByval ByVal]] what [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByref ByRef]] param1 [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0, [[KeyPgByref ByRef]] param2 [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0, [[KeyPgByref ByRef]] param3 [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0, [[KeyPgByref ByRef]] param4 [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0 ) + [[KeyPgDeclare Declare]] [[KeyPgSub Sub]] **ScreenControl** ( [[KeyPgByval ByVal]] what [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByref ByRef]] param [[KeyPgAs As]] [[KeyPgString String]] = ##"####"## ) ## {{fbdoc item="usage"}}## - **""ScreenControl""**( //what// [, [ //param1// ][, [ //param2// ][, [ //param3// ][, [ //param4// ]]]]] ) - ##or,## - **""ScreenControl""**( //what// [, //param// ] ) + **ScreenControl**( //what// [, [ //param1// ][, [ //param2// ][, [ //param3// ][, [ //param4// ]]]]] ) + ##ou,## + **ScreenControl**( //what// [, //param// ] ) ## {{fbdoc item="param"}} ##//what//## - specifies the function to perform + spécifie la fonction à exécuter ##//param1//## - optional first integer parameter, contains value to be set on entry or value got on exit + premier paramètre entier optionnel, contient la valeur à valider en entrée ou la valeur à obtenir en sortie ##//param2//## - optional second integer parameter, contains value to be set on entry or value got on exit + second paramètre entier optionnel, contient la valeur à valider en entrée ou la valeur à obtenir en sortie ##//param3//## - optional third integer parameter, contains value to be set on entry or value got on exit + troisième paramètre entier optionnel, contient la valeur à valider en entrée ou la valeur à obtenir en sortie ##//param4//## - optional fourth integer parameter, contains value to be set on entry or value got on exit + quatrième paramètre entier optionnel, contient la valeur à valider en entrée ou la valeur à obtenir en sortie ##//param//## - optional string parameter, contains text to be set on entry or text got on exit + paramètre chaîne optionnel, contient le texte à valider en entrée ou à obtenir en sortie {{fbdoc item="desc"}} - This function can be used to set or get internal ""GfxLib"" states. The ##//what//## parameter specifies which operation to perform. On operations that set states, the ##//param*//## parameters must contain the values to be set. On operations that get states, ##//param*//## will hold the values returned by ""GfxLib"" when the function returns. + Cette fonction peut être utilisée pour définir ou obtenir des états internes de GfxLib. Le paramètre ##//what//## spécifie quelle opération exécuter. Pour les opérations initialisant des états, les paramètres ##//param*//## doivent contenir les valeurs à initialiser. Pour les opérations qui obtiennent des états, ##//param*//## contiendra les valeurs retournées par GfxLib quand la fonction retournera. The meaning of the ##//param*//## parameters depend on the ##//what//## parameter, whose possible values are defined as constants in ##fbgfx.bi##. In //[[CompilerDialects lang fb]]//, they are set to be stored in the ##FB## ##[[KeyPgNamespace Namespace]]##. - Below is a list of the supported ##//what//## constants - and their values as defined at time of writing - along with the parameters associated with them. + Voici une liste des constantes ##//what//## supportées - et leurs valeurs et leurs valeurs telles que définies au moment de la rédaction - ainsi que les paramètres qui leur sont associés. - __Supported operations__ + Opérations supportées - Note: * denotes operations that are allowed while a graphics mode has not yet been set via [[KeyPgScreengraphics Screen (Graphics)]] or [[KeyPgScreenres ScreenRes]]. For all other operations, return values are zero(##0##) or the empty string(##"####"##) and the operation has no effect if a graphics mode is not available at call time. + Note: * désigne les opérations qui sont autorisées tant qu'un mode graphique n'a pas encore été fixé par [[KeyPgScreengraphics Screen (Graphics)]] or [[KeyPgScreenres ScreenRes]]. Toutes les autres opérations, retournent la valeur zéro(##0##) ou la chaîne vide (##"####"##) et l'opération n'a aucun effet et l'opération n'a aucun effet si un mode graphique n'est pas disponible lors de l'appel. - **Get operations** - - ##GET_WINDOW_POS## (##0##) Returns the current window position, in desktop coordinates. + **Opérations pour "obtenir" une valeur** + - ##GET_WINDOW_POS## (##0##) Retourne la position courante de la fenêtre, en coordonnées du bureau. [OUT] ##//param1//## x [OUT] ##//param2//## y - - * ##GET_WINDOW_TITLE## (##1##) Returns the title of the program window. - [OUT] ##//param//## title - - ##GET_WINDOW_HANDLE## (##2##) Returns a handle to the program window. - [OUT] ##//param1//## handle; this is a ##HWND## in Windows, a "Window" XID in X11 - - * ##GET_DESKTOP_SIZE## (##3##) Returns the desktop size, in pixels. - [OUT] ##//param1//## width - [OUT] ##//param2//## height - - ##GET_SCREEN_SIZE## (##4##) Returns the current screen size in pixels. - [OUT] ##//param1//## width - [OUT] ##//param2//## height - - ##GET_SCREEN_DEPTH## (##5##) Returns current graphics mode screen depth. - [OUT] ##//param1//## bits per pixel - - ##GET_SCREEN_BPP## (##6##) Returns current graphics mode BPP. - [OUT] ##//param1//## bytes per pixel - - ##GET_SCREEN_PITCH## (##7##) Returns the current graphics mode framebuffer pitch, in bytes. + - * ##GET_WINDOW_TITLE## (##1##) Retourne le titre de la fenêtre du programme. + [OUT] ##//param//## titre + - ##GET_WINDOW_HANDLE## (##2##) Retourne une accroche (handle) vers la fenêtre du programme. + [OUT] ##//param1//## handle; c'est un ##HWND## pour Windows, un "Window" XID pour X11 + - * ##GET_DESKTOP_SIZE## (##3##) Retourne la taille du bureau, en pixels. + [OUT] ##//param1//## largeur + [OUT] ##//param2//## hauteur + - ##GET_SCREEN_SIZE## (##4##) Retourne la taille de l'écran en pixels. + [OUT] ##//param1//## largeur + [OUT] ##//param2//## hauteur + - ##GET_SCREEN_DEPTH## (##5##) Retourne la profondeur du mode graphique courant. + [OUT] ##//param1//## bits par pixel + - ##GET_SCREEN_BPP## (##6##) Retourne le mode graphique BPP courant. + [OUT] ##//param1//## octets par pixel + - ##GET_SCREEN_PITCH## (##7##) Retourne la longueur d'une ligne (pitch) du tampon image du mode graphique courant, en octets. [OUT] ##//param1//## pitch - - ##GET_SCREEN_REFRESH## (##8##) Returns the current graphics mode refresh rate, in hertz. - [OUT] ##//param1//## rate - - ##GET_DRIVER_NAME## (##9##) Returns the current graphics mode driver name. - [OUT] ##//param//## name - - ##GET_TRANSPARENT_COLOR## (##10##) Returns the transparent color value for the current graphics mode depth. - [OUT] ##//param1//## value - - ##GET_VIEWPORT## (##11##) Returns the current viewport as set by the [[KeyPgViewgraphics View (Graphics)]] statement, in screen coordinates. + - ##GET_SCREEN_REFRESH## (##8##) Retourne la fréquence de rafraîchissement du mode graphique, en hertz. + [OUT] ##//param1//## fréquence + - ##GET_DRIVER_NAME## (##9##) Retourne le nom du driver du mode graphique courant. + [OUT] ##//param//## nom + - ##GET_TRANSPARENT_COLOR## (##10##) Retourne la valeur de la couleur de la transparence pour la profondeur du mode graphique courant. + [OUT] ##//param1//## valeur + - ##GET_VIEWPORT## (##11##) Retourne la vue courante (viewport) courante initialisée par [[KeyPgViewgraphics View (Graphics)]], en coordonnées écran. [OUT] ##//param1//## x1 [OUT] ##//param2//## y1 [OUT] ##//param3//## x2 [OUT] ##//param4//## y2 - - ##GET_PEN_POS## (##12##) Returns the last graphical pen position, in screen coordinates. This position is used in graphics functions supporting relative coordinates using the ##[[KeyPgStep Step]]## keyword. + - ##GET_PEN_POS## (##12##) Retourne la dernière position du crayon graphique, en coordonnées écran. Cette position est utilisée dans les fonctions graphiques supportant les coordonnées relatives utilisant le mot-clef ##[[KeyPgStep Step]]##. [OUT] ##//param1//## x [OUT] ##//param2//## y - - ##GET_COLOR## (##13##) Returns the current graphics mode color. - [OUT] ##//param1//## foreground - [OUT] ##//param2//## background - - ##GET_ALPHA_PRIMITIVES## (##14##) Returns if primitives drawing support for alpha channel is enabled. - [OUT] ##//param1//## ##TRUE## (##-1##) if alpha primitives is enabled, ##FALSE## (##0##) otherwise - - ##GET_GL_EXTENSIONS## (##15##) Returns a string holding all supported GL extensions, or the empty string if not in ""OpenGL"" mode. - [OUT] ##//param//## supported GL extensions - - ##GET_HIGH_PRIORITY## (##16##) Returns if ##GFX_HIGH_PRIORITY## was specified in the flags passed to ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres Screenres]]##. - [OUT] ##//param1//## higher priority graphics processing enabled - - **Set operations** - - ##SET_WINDOW_POS## (##100##) Sets the current program window position, in desktop coordinates. + - ##GET_COLOR## (##13##) Retourne la couleur courante du mode graphique. + [OUT] ##//param1//## avant-plan + [OUT] ##//param2//## arrière-plan + - ##GET_ALPHA_PRIMITIVES## (##14##) Retourne si les primitives du support graphique de dessin pour le canal alpha sont validées. + [OUT] ##//param1//## ##TRUE## (##-1##) si les primitives alpha sont valides, ##FALSE## (##0##) autrement + - ##GET_GL_EXTENSIONS## (##15##) Retourne une chaîne contenant toutes les extensions GL supportées, ou une chaîne vide si pas de mode OpenGL valide. + [OUT] ##//param//## extensions GL supportées + - ##GET_HIGH_PRIORITY## (##16##) Retourne si ##GFX_HIGH_PRIORITY## a été spécifié dans les drapeaux passés à ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]##. + [OUT] ##//param1//## priorité de traitement graphique la plus haute validée + + **Opérations pour initialiser une valeur** + - ##SET_WINDOW_POS## (##100##) Définit la position de la fenêtre programme, en coordonnées bureau. [IN] ##//param1//## x [IN] ##//param2//## y - - * ##SET_WINDOW_TITLE## (##101##) Sets the current program window title. This is equivalent to calling ##[[KeyPgWindowtitle WindowTitle]]( //param// )##. - [IN] ##//param//## title - - ##SET_PEN_POS## (##102##) Sets the current graphical pen position, in screen coordinates. This position is used in graphics functions supporting relative coordinates using the ##[[KeyPgStep Step]]## keyword. + - * ##SET_WINDOW_TITLE## (##101##) Définit le titre de la fenêtre programme. Ceci est équivalent à appeler ##[[KeyPgWindowtitle WindowTitle]]( //param// )##. + [IN] ##//param//## titre + - ##SET_PEN_POS## (##102##) Définit la position courante du crayon graphique, en coordonnées écran. Cette position est utilisée dans les fonctions graphiques supportant les coordonnées relatives utilisant le mot-clef ##[[KeyPgStep Step]]##. [IN] ##//param1//## x [IN] ##//param2//## y - - * ##SET_DRIVER_NAME## (##103##) Sets the name of the internal graphics driver to be used in subsequent calls to ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres ScreenRes]]##. - [IN] ##//param//## driver name - - ##SET_ALPHA_PRIMITIVES## (##104##) Sets if primitives drawing should honor alpha channel. - [IN] ##//param1//## enabled - - * ##SET_GL_COLOR_BITS## (##105##) Sets the number of bits dedicated to the ""OpenGL"" color buffer + - * ##SET_DRIVER_NAME## (##103##) Définit le nom du driver graphique interne à utiliser dans les appels ultérieurs à ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]##. + [IN] ##//param//## nom du driver + - ##SET_ALPHA_PRIMITIVES## (##104##) Définit si les primitives de dessin respecte le canal alpha. + [IN] ##//param1//## valide + - * ##SET_GL_COLOR_BITS## (##105##) Définit le nombre de bits dédiés au tampon couleur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_COLOR_RED_BITS## (##106##) Sets the number of bits dedicated to the red component of the ""OpenGL"" color buffer + - * ##SET_GL_COLOR_RED_BITS## (##106##) Définit le nombre de bits dédiés à la composante rouge du tampon couleur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_COLOR_GREEN_BITS## (##107##) Sets the number of bits dedicated to the green component of the ""OpenGL"" color buffer + - * ##SET_GL_COLOR_GREEN_BITS## (##107##) Définit le nombre de bits dédiés à la composante vert du tampon couleur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_COLOR_BLUE_BITS## (##108##) Sets the number of bits dedicated to the blue component of the ""OpenGL"" color buffer + - * ##SET_GL_COLOR_BLUE_BITS## (##108##) Définit le nombre de bits dédiés à la composante bleu du tampon couleur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_COLOR_ALPHA_BITS## (##109##) Sets the number of bits dedicated to the alpha component of the ""OpenGL"" color buffer + - * ##SET_GL_COLOR_ALPHA_BITS## (##109##) Définit le nombre de bits dédiés à la composante alpha du tampon couleur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_DEPTH_BITS## (##110##) Sets the number of bits dedicated to the ""OpenGL"" depth buffer + - * ##SET_GL_DEPTH_BITS## (##110##) Définit le nombre de bits dédiés au tampon profondeur OpenGL [IN] ##//param1//## bits - - * ##SET_GL_STENCIL_BITS## (##111##) Sets the number of bits dedicated to the ""OpenGL"" stencil buffer + - * ##SET_GL_STENCIL_BITS## (##111##) Définit le nombre de bits dédiés au tampon stencil OpenGL [IN] ##//param1//## bits - - * ##SET_GL_ACCUM_BITS## (##112##) Sets the number of bits dedicated to the ""OpenGL"" accumulation buffer + - * ##SET_GL_ACCUM_BITS## (##112##) Définit le nombre de bits dédiés au tampon accumulation OpenGL [IN] ##//param1//## bits - - * ##SET_GL_ACCUM_RED_BITS## (##113##) Sets the number of bits dedicated to the red component of the ""OpenGL"" accumulation buffer + - * ##SET_GL_ACCUM_RED_BITS## (##113##) Définit le nombre de bits dédiés à la composante rouge du tampon accumulation OpenGL [IN] ##//param1//## bits - - * ##SET_GL_ACCUM_GREEN_BITS## (##114##) Sets the number of bits dedicated to the green component of the ""OpenGL"" accumulation buffer + - * ##SET_GL_ACCUM_GREEN_BITS## (##114##) Définit le nombre de bits dédiés à la composante vert du tampon accumulation OpenGL [IN] ##//param1//## bits - - * ##SET_GL_ACCUM_BLUE_BITS## (##115##) Sets the number of bits dedicated to the blue component of the ""OpenGL"" accumulation buffer + - * ##SET_GL_ACCUM_BLUE_BITS## (##115##) Définit le nombre de bits dédiés à la composante bleu du tampon accumulation OpenGL [IN] ##//param1//## bits - - * ##SET_GL_ACCUM_ALPHA_BITS## (##116##) Sets the number of bits dedicated to the alpha component of the ""OpenGL"" accumulation buffer + - * ##SET_GL_ACCUM_ALPHA_BITS## (##116##) Définit le nombre de bits dédiés à la composante alpha du tampon accumulation OpenGL [IN] ##//param1//## bits - - * ##SET_GL_NUM_SAMPLES## (##117##) Sets the number of samples to be used for ""OpenGL"" multisampling + - * ##SET_GL_NUM_SAMPLES## (##117##) Définit le nombre de "samples" à utiliser pour OpenGL multisampling [IN] ##//param1//## samples - **Other operations** - - ##POLL_EVENTS## (##200##) Cause the library to poll all events, ie to check the system event queue, specifically used for retrieving keyboard and mouse events. This is most useful for ""OpenGL"" code where ##[[KeyPgFlip Flip]]## is not used, as normally ##[[KeyPgFlip Flip]]## will cause these events to be polled. + **Autres opérations** + - ##POLL_EVENTS## (##200##)Oblige la bibliothèque à interroger tous les événements, c'est à dire de vérifier la file d'attente des événements système, utilisé spécifiquement pour déterminer les événements clavier ou souris. Ceci est très utile pour du code OpenGL ou ##[[KeyPgFlip Flip]]## n'est pas utilisé, car normalement ##[[KeyPgFlip Flip]]## provoque l'interrogation de ces événements. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screencontrol.bas"}}%%(freebasic) -'' include fbgfx.bi for some useful definitions +'' include fbgfx.bi pour certaines definitions #include "fbgfx.bi" using fb @@ -134,7 +134,7 @@ dim as any ptr img screenres 384, 64, 32,, GFX_SHAPED_WINDOW -'' create a fancy window shape +'' cree une forme fenetre fantaisie img = imagecreate(48,8) draw string img, (0, 0), "GfxLib" for y = 0 to 63 @@ -167,11 +167,11 @@ loop while not multikey(1) %% -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screencontrol""**##. +{{fbdoc item="section" value="Differences de dialectes + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screencontrol**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreencopy.wakka b/fbdocs/manual/cache/KeyPgScreencopy.wakka index 910b7bdf88..b03708eb5b 100644 --- a/fbdocs/manual/cache/KeyPgScreencopy.wakka +++ b/fbdocs/manual/cache/KeyPgScreencopy.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENCOPY"}}---- -Copies the contents of a graphical page into another graphical page +Copie le contenu d'une page graphique dans une autre page graphique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Screencopy** ( [[KeyPgByval byval]] //frompage// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //topage// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) @@ -9,31 +9,31 @@ Copies the contents of a graphical page into another graphical page ## {{fbdoc item="param"}} ##//frompage//## - page to copy from + page à copier ##//topage//## - page to copy to + page vers laquelle copier {{fbdoc item="desc"}} - ##//from_page//## is the page to copy from. If this argument is omitted, the current work page is assumed. + ##//from_page//## est la page que l'on copie. Si cet argument est omis, la page de travail courante est utilisée. - ##//to_page//## is the page to copy to. If this argument is omitted, the currently visible page is assumed. + ##//to_page//## est la page vers laquelle on copie. Si cet argument est omis, la page visible courante est utilisée. - Page numbers range from 0 to the num_pages specified when setting the graphics mode minus 1 + Les numéros de page varient de 0 à num_pages spécifié lors du réglage du mode graphique moins 1 - You can use this function to add a double buffer to your graphics. Any graphics screen mode supports this function; you must supply valid page numbers otherwise ##**Screencopy**## will have no effect. + Vous pouvez utiliser cette fonction pour ajouter un double tampon à vos graphiques. Tous les modes graphiques supportent cette fonction; vous devez fournir des numéros de page valides sinon ##**ScreenCopy**## n'aura aucun effet. - There are two other functons similar to this: ##[[KeyPgFlip Flip]]## and ##[[KeyPgPcopy PCopy]]##. ##[[KeyPgFlip Flip]]## is designed to work in ""OpenGL"" modes, while ##[[KeyPgPcopy PCopy]]## supports console pages on some platforms. Both do the same thing as ##**Screencopy**## in normal graphics modes. + Il existe deux autres fonctions similaires: ##[[KeyPgFlip Flip]]## et ##[[KeyPgPcopy PCopy]]##. ##[[KeyPgFlip Flip]]## est conçu pour fonctionner en mode OpenGL, alors que ##[[KeyPgPcopy PCopy]]## supporte les pages console sur certaines plates-formes. Les deux font la même chose que ##**ScreenCopy**## dans les modes graphiques normaux. -Example: - See ##[[KeyPgScreenset Screenset]]## example. +Exemple: + Voir l'exemple de ##[[KeyPgScreenset ScreenSet]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screencopy.bas"}}%%(freebasic) -'' 320x200x8, with 3 pages +'' 320x200x8, avec 3 pages screen 13,,3 -'' image for page #1 +'' image pour page #1 screenset 1, 0 cls circle( 160, 100 ), 90, 1 ,,,, f @@ -41,7 +41,7 @@ circle( 160, 100 ), 90, 15 print "Press 2 to copy page #2 to visible page" print "Press escape to exit" -'' image for page #2 +'' image pour page #2 screenset 2, 0 cls line( 50, 50 )-( 270, 150 ), 2, bf @@ -49,7 +49,7 @@ line( 50, 50 )-( 270, 150 ), 15, b print "Press 1 to copy page #1 to visible page" print "Press escape to exit" -'' page #0 is the visible page +'' page #0 est la page visible screenset 0, 0 cls print "Press 1 to copy page #1 to visible page" @@ -75,10 +75,10 @@ loop {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screencopy""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screencopy**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"". QB had ##[[KeyPgPcopy Pcopy]]## to do the same function. + - Nouveau pour FreeBASIC. QB a ##[[KeyPgPcopy PCopy]]## comme fonction équivalente. {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreenevent.wakka b/fbdocs/manual/cache/KeyPgScreenevent.wakka index ed6d1eced4..7440f6e86e 100644 --- a/fbdocs/manual/cache/KeyPgScreenevent.wakka +++ b/fbdocs/manual/cache/KeyPgScreenevent.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="SCREENEVENT"}}---- -Queries for and retrieves system events. +Recherche et récupère les événements du système. {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""ScreenEvent""** ( [[KeyPgByval byval]] event [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **ScreenEvent** ( [[KeyPgByval ByVal]] event [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] = 0 ) [[KeyPgAs As]] [[KeyPgInteger Integer]] ## {{fbdoc item="usage"}}## - //result// = **""ScreenEvent""**( [ //event// ] ) + //result// = **ScreenEvent**( [ //event// ] ) ## {{fbdoc item="param"}} ##//event//## - Specifies the buffer where the function should store the event data. + Spécifie le tampon où la fonction stockera les données événements. -{{fbdoc item="ret"}} - Returns ##-1## if there are pending events to be retrieved, ##0## otherwise. +{{fbdoc item="section" value="Valeur retournée + Retourne ##-1## s'il existe des événements en attente d'être récupérés, ##0## autrement. {{fbdoc item="desc"}} - This function returns the latest available system event from the internal ""GfxLib"" events queue. By "event" we mean any mouse or keyboard activity, for example. + Cette fonction retourne le dernier événement système disponible dans la file d'attente interne des événements GfxLib. Par "événement" on désigne une activité clavier ou souris quelconque. - The event data (if available) will be copied into the buffer pointed That should be declared as an ##[[KeyPgEvent Event]]## + Les données événement (si disponibles) seront copiées dans le tampon pointé par le paramètre "event" pointed et seront déclarées comme un ##[[KeyPgEvent Evénement]]## - __Querying for events__ - The function returns ##-1## if there are pending events to be retrieved, ##0## otherwise. If the ##//event//## parameter is set to ##0## (the default if omitted) ##[[KeyPgScreenevent ScreenEvent]]## will not be able to copy the event data and it will not dequeue it from the internal events queue. Calling the function this way can be useful to check if there are pending events without actually fetching them. + Interrogation des événements + La fonction retourne ##-1## s'il y a des événements en attente de récupération, ##0## autrement. Si le paramètre ##//event//## est mis à ##0## (valeur par défaut si omis) ##[[KeyPgScreenevent ScreenEvent]]## ne sera pas en mesure de copier les données d'événement et ne va pas les sortir de la file d'attente interne des événements. L'appel de la fonction de cette façon peut être utile pour vérifier s'il y a des événements disponibles sans les aller chercher. - __Note__ - If you receive a KEY_PRESS, KEY_RELEASE or KEY_REPEAT event, it does not clear the keyboard buffer. If you need the buffer to be clear after you receive the event, you will need to clear it manually. See ##[[KeyPgInkey Inkey]]##. + Note + Si vous recevez un événement KEY_PRESS, KEY_RELEASE ou KEY_REPEAT, il n'effacera pas le tampon clavier. Si vous désirez effacer le tampon clavier après réception d'un événement, vous devrez le faire manuellement. Voir ##[[KeyPgInkey Inkey]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screenevent.bas"}}%%(freebasic) -'' include fbgfx.bi for some useful definitions +'' include fbgfx.bi pour des definitions utiles #include "fbgfx.bi" #if __FB_LANG__ = "fb" -using fb '' constants and structures are stored in the FB namespace in lang fb +Using fb '' constantes et structures sont chargées dans l'espace de nom FB en langue fb #endif dim e as EVENT @@ -105,26 +105,28 @@ do print "program window lost focus" case EVENT_WINDOW_CLOSE end - end select - end if - - sleep 1 -loop -%% + End Select + End If + Sleep 1 + Loop -{{fbdoc item="target"}} - - ##**Screenevent**## does not return window related events in the DOS version, but does return input events. + %% +{{fbdoc item="section" value="Différences de plates-formes +- ##**ScreenEvent**## ne retourne pas les événements liés à la fenêtre dans la version DOS, mais retourne les événements d'entrée. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgEvent Event]]## - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + +- ##[[KeyPgScreengraphics Screen (Graphics)]]## - ##[[KeyPgInkey Inkey]]## + - ##[[KeyPgMultikey MultiKey]]## + - ##[[KeyPgGetmouse GetMouse]]## - ##[[KeyPgMultikey Multikey]]## - ##[[KeyPgGetmouse Getmouse]]## diff --git a/fbdocs/manual/cache/KeyPgScreenglproc.wakka b/fbdocs/manual/cache/KeyPgScreenglproc.wakka index 37e09da2f1..e53c303b65 100644 --- a/fbdocs/manual/cache/KeyPgScreenglproc.wakka +++ b/fbdocs/manual/cache/KeyPgScreenglproc.wakka @@ -1,33 +1,33 @@ {{fbdoc item="title" value="SCREENGLPROC"}}---- -Gets the address of an OpenGL procedure +Obtient l'adresse d'une procédure OpenGL {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""ScreenGLProc""** ( [[KeyPgByref byref]] procname [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **ScreenGLProc** ( [[KeyPgByref ByRef]] procname [[KeyPgAs As]] [[KeyPgConstQualifier Const]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgAny Any]] [[KeyPgPtr Ptr]] ## {{fbdoc item="param"}} ##//procname//## - name of the procedure to retrieve the address of + nom de la procédure dont on cherche à déterminer l'adresse {{fbdoc item="desc"}} - This function can be used to get the address of any OpenGL procedure, to be used to retrieve the pointers to new functions associated with OpenGL extensions. If given procedure named ##//procname//## cannot be found, ##**screenglproc**## will return NULL (0). + Cette fonction peut être utilisée pour obtenir l'adresse de n'importe quelle procédure OpenGL, pour déterminer les pointeurs de nouvelles fonctions associées avec des extensions OpenGL. Si la procédure nommée ##//procname//## ne peut être trouvée, ##**ScreenGLProc**## retournera NULL (0). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screenglproc.bas"}}%%(freebasic) -'' include fbgfx.bi for some useful definitions +'' include fbgfx.bi pour des definitions utiles #include "fbgfx.bi" dim SwapInterval as function(byval interval as integer) as integer dim extensions as string -'' Setup OpenGL and retrieve supported extensions +'' Initialise OpenGL et determine extensions supportees ScreenRes 640, 480, 32,, FB.GFX_OPENGL ScreenControl FB.GET_GL_EXTENSIONS, extensions if (instr(extensions, "WGL_EXT_swap_control") <> 0) then - '' extension supported, retrieve proc address + '' extension supportees, determine adresse procedure SwapInterval = ScreenGLProc("wglSwapIntervalEXT") if (SwapInterval <> 0) then - '' Ok, we got it. Set OpenGL to wait for vertical sync on buffer swaps + '' Ok, nous l'avons recupere. Valide OpenGL pour attendre for syncro verticale pour buffer swaps SwapInterval(1) end if end if @@ -35,13 +35,13 @@ end if {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screenglproc""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screenglproc**##. -{{fbdoc item="target"}} - - Not available for DOS target. +{{fbdoc item="section" value="Différences de plates-formes + - Non disponible pour cible DOS. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreengraphics.wakka b/fbdocs/manual/cache/KeyPgScreengraphics.wakka index c93cb2dd0e..5f48da0f96 100644 --- a/fbdocs/manual/cache/KeyPgScreengraphics.wakka +++ b/fbdocs/manual/cache/KeyPgScreengraphics.wakka @@ -1,93 +1,93 @@ {{fbdoc item="title" value="SCREEN (GRAPHICS)"}}---- -Initializes a graphics mode using QB-like mode numbers +Initialise un mode graphique avec des nombres comme dans QB {{fbdoc item="syntax"}}## **Screen** //mode// [, [ //depth// ] [, [ //num_pages// ] [, [ //flags// ] [, [ //refresh_rate// ]]]]] ## {{fbdoc item="param"}} ##//mode//## - is a QB style graphics screen mode number (see below). If ##//mode//## is ##0##, then any currently set graphics mode is closed, and all functions resume their normal console-mode functionality. See below for available modes. + est un mode graphique exprimé par un nombre comme dans QB (voir ci-dessous). Si ##//mode//## est ##0##, alors tout mode graphique courant est clos, et toutes les fonctions reprennent leurs fonctionnalité de mode console. Voir ci-dessous les modes disponibles. ##//depth//## - is the color depth in bits per pixel. This only has an effect for modes ##14## and higher. Values of ##8##, ##16## and ##32## are allowed. ##15## and ##24## are also allowed as aliases for ##16## and ##32##, respectively. If omitted, it defaults to ##8##. + est la profondeur de couleur en bits par pixel (bpp). Ceci n'a d'effet que pour les modes ##14## ou supérieurs. Les valeurs ##8##, ##16## and ##32## sont admises. ##15## et ##24## sont admises comme alias respectivement de ##16## et ##32##. Si omise, la valeur par défaut est ##8##. ##//num_pages//## - is the number of video pages you want, see below. If omitted, it defaults to ##1##. + est le nombre de pages vidéo que vous désirez, voir ci-dessous. S'il est omis, à ##1## par défaut. ##//flags//## - Are used to select several things as graphics driver, fullscreen mode. There are constants predefined in the ##fbgfx.bi## file ready to use. See below for available flags. + Sont utilisés pour sélectionner différentes choses telles que le driver graphique, le mode plein écran. Ce sont des constantes prédéfinies dans le fichier ##fbgfx.bi## prêt à l'usage. Voir ci-dessous les drapeaux (flags) disponibles. ##//refresh_rate//## - requests a refresh rate. If it is not available in the present card or the parameter is omitted, ""FreeBASIC"" chooses the rate automatically. + détermine une vitesse de rafraîchissement. Si ce choix n'est pas possible pour la carte graphique ou si le paramètre est omis, FreeBASIC choisit automatiquement cette vitesse. {{fbdoc item="desc"}} - ##**Screen**## tells the compiler to link the GfxLib and initializes a QB-only, QB-on-GUI or OpenGL graphics mode, depending on the ##//flags//## setting. + ##**Screen**## indique au compilateur de lier la GfxLib et initialise un mode graphique QB-only, QB-on-GUI ou OpenGL, en fonction du réglage de drapeaux ##//flags//## setting. - In QB-only modes a dumb window or fullscreen resolution is set, one or more buffers in standard memory are created, console commands are redirected to their graphic versions, a [[GfxDefPalettes default palette]] is set and an automatic screen refresh thread is started. QB-like graphics and console statements can be used. + Dans les modes de QB-only une fenêtre simple ou plein écran est activée, un ou plusieurs tampons en mémoire standard sont créés, les commandes de la console sont redirigées vers leur version graphique, [[GfxDefPalettes une palette par défaut]] est fixée et un rafraîchissement automatique de l'écran est démarré. Les déclarations QB-like graphiques et de la console peuvent être utilisées. - In QB-on-GUI modes one or more buffers in standard memory are created, console commands are redirected to their graphic versions and a [[GfxDefPalettes default palette]] is set. QB-like graphics and console statements can be used. It is up to the user to create a window and to refresh it with the contents of the graphics buffers. + En modes QB-on-GUI, un ou plusieurs tampons en mémoire standard sont créés, les commandes de la console sont redirigées vers leur version graphique et une [[GfxDefPalettes palette par défaut]] est fixée. Les déclarations QB-like graphiques et de la console peuvent être utilisées. C'est à l'utilisateur de créer une fenêtre et de la rafraîchir avec le contenu des tampons graphiques. - In OpenGL modes a dumb window or fullscreen resolution is set, one or more buffers in standard memory are created, and the OS's OpenGL library is initialized. From here OpenGL only OpenGL commands can be used; QB-like and console commands are forbidden. This allows to initialize OpenGL in a portable way; you can then also use [[KeyPgScreencontrol ScreenControl]] to properly customize the GL pixel format to be used before ##**Screen**## is called or to retrieve the list of supported OpenGL extensions after a mode has been set, and [[KeyPgScreenglproc ScreenGLProc]] to obtain extension function pointers. + En modes OpenGL, une fenêtre simple ou plein écran est activée, un ou plusieurs tampons en mémoire standard sont créés, et les librairies OpenGL de l'OS sont initialisées. A partir de là, seules les commandes OpenGL sont utilisables; les commandes QB-like et console sont interdites. Ceci permet d'initialiser OpenGL de façon portable; vous pouvez également utiliser [[KeyPgScreencontrol ScreenControl]] pour personnaliser le format GL de pixel utilisé avant que ##**Screen**## soit appelé ou de récupérer la liste des extensions OpenGL permises après un mode ait été mis en place, et [[KeyPgScreenglproc ScreenGLProc]] d'obtenir des pointeurs fonction d'extension. - Any buffer that is created in standard memory uses one of three supported internal pixel formats, depending on the desired color depth; see [[GfxInternalFormats Internal pixel formats]] for details. + Tout tampon mémoire qui est créé dans la mémoire standard utilise l'un des trois formats pixel internes supportés, dépendant de la profondeur de couleur désirée; voir [[GfxInternalFormats Formats internes de pixel ]] pour plus de détails. - If ##**Screen**## fails to set the required mode, an "Illegal function call" error is issued and the screen pointer is set to ##0##. Thus ##**Screen**## failures can be detected using standard ##[[KeyPgOnerror On Error]]## processing or retrieving the screen pointer with ##[[KeyPgScreenptr Screenptr]]##. + Si ##**Screen**## ne peut valider le mode requis, une erreur "Illegal function call" est affichée et le pointeur écran est mis à ##0##. Ces échecs de ##**Screen**## peuvent être détectés en utilisant le processus standard ##[[KeyPgOnerror On Error]]## ou en récupérant le pointeur écran avec ##[[KeyPgScreenptr ScreenPtr]]##. - Before setting a fullscreen mode the program should check if that mode is available in the graphics card using ##[[KeyPgScreenlist Screenlist]]##. + Avant de valider un mode plein écran le programme doit tester si ce mode est accessible par la carte graphique en utilisant ##[[KeyPgScreenlist ScreenList]]##. -__mode details__ - Available modes list: - QB compatibility modes: -{{table columns="6" cellpadding="1" cells="Mode nr;Resolution;Emulation;Text;char size;colors on screen;1;320x200;CGA ;40X25;8x8;16 background, 1 of four sets foreground;2;640x200;CGA;80x25;8x8;16 colors to 2 attributes;7;320x200;EGA;40x25;8x8;16 colors to 16 attributes;8;640x200;EGA;40x25;8x8;16 colors to 16 attributes;9;640x350;EGA;80x25 0r 80x43;8x14 or 8x8;16 colors to 16 attributes;11;640x480;VGA;80x30 or 80x60;8x16 or 8x8;256K colors to 2 attributes;12;640x480;VGA;80x30 or 80x60;8x16 or 8x8;256K colors to 16 attributes;13;320x200;MCGA;40X25;8X8;256K colors to 256 attributes"}} - New ""FreeBASIC"" modes: -{{table columns="6" cellpadding="1" cells="Mode nr;Resolution;Emulation;Text;char size;colors on screen;14;320x240;###;40x30;8x8;256K colors to 256 attributes or direct color; 15;400x300;###;50x37;8x8;256K colors to 256 attributes or direct color; 16;512x384;###;64x24 or 64x48;8x16 or 8x8;256K colors to 256 attributes or direct color;17;640x400;###;80x25 or 80x50;8x16 or 8x8;256K colors to 256 attributes or direct color;18;640x480;###;80x30 or 80x60;8x16 or 8x8;256K colors to 256 attributes or direct color; 19;800x600;###;100x37 or 100x75;8x16 or 8x8;256K colors to 256 attributes or direct color;20;1024x768;###;128x48 or 128x96;8x16 or 8x8;256K colors to 256 attributes or direct color; 21;1280x1024;###;160x64 or 160x128;8x16 or 8x8;256K colors to 256 attributes or direct color"}} +Informations sur le mode + Liste des modes disponibles: + Compatibilité avec les modes QB: +{{table columns="" cellpadding="2" cells="Mode nr;Résolution;Emulation;Texte;taille car;couleurs à l&aposécran;1;320x200;CGA ;40X25;8x8;16 background, 1 of four sets foreground;2;640x200;CGA;80x25;8x8;16 colors to 2 attributes;7;320x200;EGA;40x25;8x8;16 colors to 16 attributes;8;640x200;EGA;40x25;8x8;16 colors to 16 attributes;9;640x350;EGA;80x25 0r 80x43;8x14 or 8x8;16 colors to 16 attributes;11;640x480;VGA;80x30 or 80x60;8x16 or 8x8;256K colors to 2 attributes;12;640x480;VGA;80x30 or 80x60;8x16 or 8x8;256K colors to 16 attributes;13;320x200;MCGA;40X25;8X8;256K colors to 256 attributes;
    + Nouveaux modes FreeBASIC: +{{table columns="" cellpadding="2" cells="Mode nr;Resolution;Emulation;Text;char size;colors on screen;14;320x240; 40x30;8x8;256K colors to 256 attributes or direct color; 15;400x300; 50x37;8x8;256K colors to 256 attributes or direct color; 16;512x384; 64x24 or 64x48;8x16 or 8x8;256K colors to 256 attributes or direct color;17;640x400; 80x25 or 80x50;8x16 or 8x8;256K colors to 256 attributes or direct color;18;640x480; 80x30 or 80x60;8x16 or 8x8;256K colors to 256 attributes or direct color; 19;800x600; 100x37 or 100x75;8x16 or 8x8;256K colors to 256 attributes or direct color;20;1024x768; 128x48 or 128x96;8x16 or 8x8;256K colors to 256 attributes or direct color; 21;1280x1024; 160x64 or 160x128;8x16 or 8x8;256K colors to 256 attributes or direct color;
    -__##depth## details__ - For modes ##14## and up, the depth parameter changes the color depth to the specified new one; if depth is not specified, these modes run in 8bpp. For modes ##13## and below, ##//depth//## has no effect. +précisions sur ##depth (profondeur)## + Pour les modes ##14## et suivants, le paramètre depth (profondeur) change la profondeur de couleur par celle indiquée; si elle n'est pas spécifiée, ces modes fonctionnent en 8bpp. Pour les modes ##13## et avant, ##//depth//## n'a aucun effet. -__##num_pages## details__ - You can request any number of pages for any video mode; if you omit the parameter, only the visible page (number ##0##) will be available. A page is either the visible screen or an offscreen buffer, you can show a page while working on another one; see the ##[[KeyPgScreenset Screenset]]## statement for details. All pages are created in standard memory, the video card memory is never used for video buffering. +précisions sur ##num_pages## + Vous pouvez demander n'importe quel nombre de pages, pour un mode vidéo; si vous omettez le paramètre, seule la page visible (numéro ##0##) sera disponible. Une page est soit l'écran visible ou un tampon hors-écran, vous pouvez afficher une page tout en travaillant sur un autre; voir la déclaration ##[[KeyPgScreenset ScreenSet]]## pour plus de détails. Toutes les pages sont créées dans la mémoire standard, la mémoire de la carte vidéo n'est jamais utilisée pour la vidéo en mémoire tampon. -__##flags## details:__ +précisions sur ##flags##: -~If flags are omitted, ""FreeBASIC"" uses QB-compatible graphics in windowed (except in DOS) mode. These constants are defined in ##fbgfx.bi##. In the //[[CompilerOptlang -lang fb]]// dialect, these constants are part of the ##FB## ##[[KeyPgNamespace Namespace]]##. Note that most of the flags are not supported in DOS. +Si ##//flags//## est omis, FreeBASIC utilise un mode graphique fenêtré QB-compatible (sauf sous DOS). Ces constantes sont définies dans ##fbgfx.bi## . Dans le dialecte //[[CompilerOptlang -lang fb]]//, ces constantes font partie de ##FB## ##[[KeyPgNamespace Namespace]]##. Notez que la plupart des flags ne sont pas supportés sous DOS. -~Available flags: +flags utilisables: -~__graphic mode flags__ -~~-##GFX_NULL##: Starts a QB-on-GUI graphics mode. It creates a graphics buffer but not a window. User must implement the window, the events manager and and refresh screen as needed. This mode allows to mix ""FreeBASIC"" drawing functions with API-driven windows. This flag overrides all other mode flags. See an [[SrcPgGfxNull Example of GFX_NULL]] in Windows. -~~-##GFX_OPENGL##: Initializes OpenGL to draw in a dumb window. ""FreeBASIC"" graphic functions can't be used. The screen is not automatically updated, ##[[KeyPgFlip Flip]]## must be used. This option provides a portable way to initialize the OpenGL Library. -~~-If none of the above options is specified, ""FreeBASIC"" enters the QB-only graphics mode: it creates a buffer and a dumb window and sets a thread that automatically updates the screen and manages keyboard and mouse. The ""FreeBASIC"" drawing functions can be used. +flags mode graphique +##GFX_NULL##: Démarre un mode graphique QB-on-GUI. Il crée un tampon graphique mais pas une fenêtre. L'utilisateur doit réaliser la fenêtre, le gestionnaire d'événements et rafraîchir l'écran quand c'est nécessaire. Ce mode permet de mixer les fonctions graphiques de dessin avec des fenêtres "API-driven". Cet indicateur remplace tous les autres indicateurs de mode. Voir un [[SrcPgGfxNull Exemple de GFX_NULL]] sous Windows. +##GFX_OPENGL##: Initialise OpenGL pour dessiner dans une simple fenêtre. Les fonctions graphiques FreeBasic ne peuvent pas être utilisées. L'écran n'est pas mis à jour automatiquement, il faut utiliser ##[[KeyPgFlip Flip]]##. Cette option procure une méthode portable pour initialiser la libririe OpenGL. +Si aucune des options ci-dessus n'est spécifiée, FreeBasic passe en mode graphiques QB-only: il crée une mémoire tampon et une simple fenêtre et définit un thread qui met automatiquement à jour l'écran et gère le clavier et la souris. Les fonctions de dessin de FreeBASIC drawing sont accessibles. -~__window mode flags__ -~~Window mode flags are meaningless if ##GFX_NULL## mode is used -~~-##GFX_WINDOWED##: If windowed mode is supported, ""FreeBASIC"" opens a window of the requested size in the present desktop -~~-##GFX_FULLSCREEN##: The graphics card switch mode is switched to the requested mode and color depth and OS fullscreen mode is used. If the mode is not available in the present card ""FreeBASIC"" switches to windowed mode. -~~-If ##GFX_FULLSCREEN## is not specified, the behavior for ##GFX_WINDOWED## is assumed. -~~-##GFX_NO_SWITCH##: Prevents the user from changing to fullscreen or to windowed mode by pressing Alt-Enter. -~~-##GFX_NO_FRAME##: Creates a window without a border. -~~-##GFX_SHAPED_WINDOW##: Creates transparent regions wherever RGBA(255, 0, 255, 0) is drawn on the screen. -~~-##GFX_ALWAYS_ON_TOP##: Creates a window that stays always on top. +flags en mode Fenêtre +Les drapeaux du mode Fenêtre n'ont aucun sens si mode ##GFX_NULL##est utilisé +##GFX_WINDOWED##: Si le mode fenêtré est supporté, FreeBASIC ouvre une fenêtre de la taille requise sur le bureau actuel +##GFX_FULLSCREEN##: Le commutateur de mode graphique carte est commuté sur le mode demandé et la profondeur de couleur et le mode OS plein écran est utilisé. Si ce mode n'est pas utilisable avec la carte présente FreeBASIC commute le mode fenêtré. +Si ##GFX_FULLSCREEN## n'est pas précisé, le comportement pour ##GFX_WINDOWED## est assuré. +##GFX_NO_SWITCH##: Empêche l'utilisateur de passer en mode plein écran ou en mode fenêtré en appuyant sur Alt-Enter. +##GFX_NO_FRAME##: Crée une fenêtre sans bord. +##GFX_SHAPED_WINDOW##: Crée des zones transparentes où RGBA (255, 0, 255, 0) est dessiné sur l'écran. +##GFX_ALWAYS_ON_TOP##: Crée une fenêtre qui reste toujours sur le dessus: donc toujours visible. -~__option flags__ -~~Flags working in any mode, they activate special behaviors -~~-##GFX_ALPHA_PRIMITIVES##: Tells the graphics library to enable alpha channel support for all drawing primitives. This means the alpha specified in a color value (via either the [[KeyPgRgba RGBA]] macro or direct color in the form &hAARRGGBB) will always be used by all primitives. -~~-##GFX_HIGH_PRIORITY##: Tells the graphics library to enable a higher priority for graphics processing. Only has an effect on ##gdi## and ##DirectX## drivers on Win32 platform. +option drapeaux +Drapeaux travaillant dans n'importe quel mode, ils activent des comportements spéciaux +##GFX_ALPHA_PRIMITIVES##: Indique à la bibliothèque graphique pour activer le support du canal alpha pour toutes les primitives de dessin. Cela signifie que l'alpha spécifié dans une valeur de couleur (via [[KeyPgRgba RGBA]] une macro ou directement une couleur sous la forme &hAARRGGBB) sera toujours utilisé par toutes les primitives. +##GFX_HIGH_PRIORITY##: Indique à la bibliothèque graphique de permettre une plus grande priorité pour les processus graphiques. A un effet seulement sur les "drivers" ##gdi## et ##DirectX## d'une plate-forme Win32. -~__OpenGL Buffer flags__ -~~These flags work only in OpenGL graphics mode, must be combined with GFX_OPENGL -~~-##GFX_STENCIL_BUFFER##: Forces OpenGL to use Stencil buffer -~~-##GFX_ACCUMULATION_BUFFER##: Forces OpenGL to use Accumulation buffer -~~-##GFX_MULTISAMPLE##: Requests fullscreen anti-aliasing through the ARB_multisample extension +drapeaux Tampon OpenGL Buffer +Ces drapeaux ne fonctionnent qu'en mode graphique OpenGL, ils doivent être combinés avec GFX_OPENGL +##GFX_STENCIL_BUFFER##: Force OpenGL à utiliser le Tampon Stencil +##GFX_ACCUMULATION_BUFFER##: Force OpenGL à utiliser le Tampon Accumulation +##GFX_MULTISAMPLE##: Demande plein écran anti-aliasing à travers l'extension ARB_multisample - Depending on whether the ##GFX_FULLSCREEN## parameter is present or not, ##**Screen**## will try to set the specified video mode in fullscreen or windowed mode, respectively. If fullscreen mode is set and the system cannot set specified mode in fullscreen, it'll try in windowed mode. If windowed mode is set and the system fails to open a window for specified mode, it will try fullscreen. If everything fails, ##**Screen**## will have no effect and execution will resume from the statement following the ##**Screen**## call. You should take care of checking if a graphics mode has been set or not, and behave accordingly; a way to check if ##**Screen**## is successful is to test the return value of the ##[[KeyPgScreenptr Screenptr]]## function; see its page for details. + Dépendant de la présence ou non du paramètre ##GFX_FULLSCREEN##, ##**Screen**## essaiera de valider le mode vidéo spécifié en mode plein écran ou fenêtré, respectivement. Si le mode plein écran est validé et que le système ne peut valider le mode spécifié en plein écran, il essaiera en mode fenêtré. Si le mode fenêtré est validé et que le système ne peut pas ouvrir une fenêtre dans le mode spécifié, il essaiera en plein écran. Si rien ne fonctionne, ##**Screen**## n'aura aucun effet et l'exécution reprend à la déclaration suivant l'appel à ##**Screen**##. Vous devez prendre soin de vérifier si un mode graphique a été validé ou pas, et réagir en conséquence; une méthode pour vérifier si ##**Screen**## a réussi est de tester la valeur retournée du ##[[KeyPgScreenptr ScreenPtr]]## de la fonction; voir sa page pour plus de détails. -__Graphics mode console__ - Console commands (##[[KeyPgLocate Locate]]##, ##[[KeyPgPrint Print]]##), input can be used both with standard QB ##**Screen**## modes and with the extended ones too, provided the standard color depth is not modified by using the second argument of ##**Screen**##. Where the table says more than one text resolution is available for the text mode, the required text resolution can be requested by using ##[[KeyPgWidth Width]]##. Any characters ##[[KeyPgPrint Print]]##ed will erase the background around them; it does not use a transparent background. +Mode graphique console + Les commandes console (##[[KeyPgLocate Locate]]##, ##[[KeyPgPrint Print]]##), peuvent être utilisées aussi bien avec les modes standard QB ##**Screen**## qu'avec les extensions, à condition que la profondeur de couleur standard ne soit pas modifiée à l'aide du second argument de ##**Screen**##. Lorsque le tableau indique que plusieurs résolutions du texte sont disponibles pour le mode texte, la résolution de texte demandée peut être obtenue avec ##[[KeyPgWidth Width]]##. Tous les caractères affichés par ##[[KeyPgPrint Print]]## effacent l'arriere-plan autour d'eux; pas d'utilisation d'un arriere-plan transparent. -__Other details__ +Autres détails - While in windowed mode, clicking on the window close button will add a keypress of ##[[KeyPgChr Chr]](255)&"k"## to the ##[[KeyPgInkey Inkey]]## buffer. Clicking on the Maximize window button will switch to fullscreen mode if possible. A successful ##**Screen**## call sets currently visible and working pages both to page number ##0##, resets the palette to the specified mode one (see Default palettes), resets the clipping region to the size of the screen, disables custom coordinates mappings, moves the graphics cursor to the center of the screen, moves the text cursor to the top-left corner of the screen and sets foreground and background colors to bright white and black respectively. + En mode fenêtré, cliquer sur le bouton "fermeture" de la fenêtre ajoute un "touche appuyée" (keypress) ##[[KeyPgChr Chr]](255)&"k"## dans le tampon ##[[KeyPgInkey Inkey]]##. Cliquer sur le bouton "Maximiser" validera le mode plein écran si c'est possible. Un appel réussi de ##**Screen**## valide les pages visible et de travail, toutes lesdeux, à la page numéro ##0##, réinitialise la palette à celle du mode spécifié (voir Palettes par défaut), réinitialise la région de découpage (clipping) à la taille de l'écran, désactive les mappages utilisateur de coordonnées, place le curseur graphique au centre de l'écran, place le curseur texte dans le coin en haut à gauche de l'écran et et valide les couleurs d'avant-plan et d'arrière-plan respectivement vers le blanc brillant et le noir. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screen.bas"}}%%(freebasic) -' Sets screen mode 13 (320*200, 8bpp) +' Valide mode ecran 13 (320*200, 8bpp) Screen 13 Print "Screen mode 13 set" @@ -97,14 +97,14 @@ Sleep {{fbdoc item="filename" value="examples/manual/gfx/screen2.bas"}}%%(freebasic) #include "fbgfx.bi" #if __FB_LANG__ = "fb" -Using FB '' Screen mode flags are in the FB namespace in lang FB +Using FB '' Drapeaux mode ecran sont dans espace de nom FB en langage FB #endif -' Sets screen mode 18 (640*480) with 32bpp color depth and 4 pages, in windowed mode; switching disabled +' Valide mode ecran 18 (640*480) avec profondeur couleur 32bpp et 4 pages, en mode fenetre commutation desactivee Screen 18, 32, 4, (GFX_WINDOWED or GFX_NO_SWITCH) -' Check to make sure Screen was opened successfully +' Verifie que ecran ouvert avec succes If ScreenPtr = 0 Then Print "Error setting video mode!" End @@ -114,32 +114,32 @@ Print "Successfully set video mode" Sleep %% -{{fbdoc item="target"}} - - In DOS, Windowing and OpenGL related switches are not available, see also [[GfxLib GfxLib overview]] +{{fbdoc item="section" value="Différences de plates-formes + - En DOS, Fenêtrage et OpenGL et les interrupteurs connexes ne sont pas disponibles, voir aussi [[GfxLib Vue d'ensemble de GfxLib]] {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the usage is: + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, l'usage est: ##**Screen** //mode// [, [ //depth// ] [, [ //num_pages// ] [, [ //flags// ] [, [ //refresh_rate// ]]]]]## - - In the //[[CompilerOptlang -lang qb]]// dialect, the usage is: + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, l'usage est: ##**Screen** [//mode//] [,[//active_page//][,[//visible_page//]]]## {{fbdoc item="diff"}} - - None in the //[[CompilerOptlang -lang qb]]// dialect. - - In QB the syntax was ##**Screen** //mode//,//colormode//,//active_page//,//visible_page//##. Of those parameters ""FreeBASIC"" supports only //mode// and redefines the rest. The use of ##**Screen** ,,apage,vpage## to swap screen pages is only available in the //[[CompilerOptlang -lang qb]]// dialect. - - ##[[KeyPgScreenset Screenset]]## should be used in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Aucune dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Dans QB la syntaxe est ##**Screen** //mode//,//colormode//,//active_page//,//visible_page//##. De ces paramètres FreeBASIC supporte seulement //mode// et redéfinit le rest. L'utilisation de ##**Screen** ,,apage,vpage## pour permuter les pages est utilisable seulement dans le dialecte //[[CompilerOptlang -lang qb]]//. + - ##[[KeyPgScreenset ScreenSet]]## est utilisable dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="see"}} - ##[[KeyPgScreenCons Screen (Console)]]## - - ##[[KeyPgScreenres Screenres]]## More flexible alternative to ##**Screen**## - - ##[[KeyPgScreenlist Screenlist]]## Check display modes available for FB ""GfxLib"" to use - - ##[[KeyPgScreencontrol Screencontrol]]## Select driver and more + - ##[[KeyPgScreenres ScreenRes]]## Alternative plus flexible à ##**Screen**## + - ##[[KeyPgScreenlist ScreenList]]## Recherche les modes utilisables pour FB GfxLib + - ##[[KeyPgScreencontrol ScreenControl]]## Selection driver et plus - ##[[KeyPgScreenlock Screenlock]]## - ##[[KeyPgScreenunlock Screenunlock]]## - - ##[[KeyPgScreenptr Screenptr]]## Semi-low level access + - ##[[KeyPgScreenptr ScreenPtr]]## Accès au niveau "Semi-low" - ##[[KeyPgScreenset Screenset]]## - ##[[KeyPgScreencopy Screencopy]]## - ##[[KeyPgScreeninfo Screeninfo]]## - ##[[KeyPgScreenglproc Screenglproc]]## - - ##[[GfxInternalFormats Internal pixel formats]]## + - ##[[GfxInternalFormats Formats internes des pixels]]## {{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgScreeninfo.wakka b/fbdocs/manual/cache/KeyPgScreeninfo.wakka index b1bd0a3359..d0792e9fb3 100644 --- a/fbdocs/manual/cache/KeyPgScreeninfo.wakka +++ b/fbdocs/manual/cache/KeyPgScreeninfo.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENINFO"}}---- -Retrieves information about current video mode or the desktop. +Récupère les informations sur le mode vidéo courant ou le bureau. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Screeninfo** ( [[KeyPgByref byref]] //w// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //h// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //depth// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //bpp// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //pitch// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //rate// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByref byref]] //driver// [[KeyPgAs as]] [[KeyPgString string]] = "####" ) @@ -9,28 +9,28 @@ Retrieves information about current video mode or the desktop. ## {{fbdoc item="param"}} ##//w//## - Width. + Largeur. ##//h//## - Height. + Hauteur. ##//depth//## - Color depth in bits. + Profondeur de couleur en bits. ##//bpp//## - Bytes per pixel. + Octets par pixel. ##//pitch//## - Bytes per scan line. + Octets par ligne de scan. ##//rate//## - Refresh rate. + Fréquence de rafraîchissement. ##//driver//## - Driver name. + Nom du driver. {{fbdoc item="desc"}} - This function can be useful to get current mode informations like graphics driver name, color depth, screen size and more. + Cette fonction peut être utile pour obtenir des informations sur le mode courant comme le nom du driver, la profondeur de couleur, la taille de l'écran, entre autres. - If ##**Screeninfo**## is called when no graphics mode is set, it returns the information about the desktop. + Si ##**ScreenInfo**## est appelé et qu'aucun mode graphique n'est initialisé, l'information retournée concernera le bureau. - Here's a description of available fields: + Ci-dessous une description des différents champs utilisables: - {{table columns="2" cellpadding="1" cells="w;Width of the screen in pixels;h;Height of the screen in pixels;depth;Current pixel format bits per pixel: this can be 1, 2, 4, 8, 16, or 32;pitch;Size of a framebuffer row in bytes;rate;Current refresh rate, or 0 if unknown;driver;Name of current graphics driver in use, like DirectX or X11"}} + {{table columns="" cellpadding="2" cells="w;Largeur de l'écran en pixels;h;Hauteur de l'écran en pixels;depth;Format courant en bits par pixel: 1, 2, 4, 8, 16, or 32 sont possibles;pitch;Taille, en octets, d'une ligne du tampon image;rate;Fréquence de rafraîchissement courante, ou 0 si inconnue;driver;Nom du driver graphique courant utilisé, comme DirectX ou X11;
    {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screeninfo.bas"}}%%(freebasic) @@ -39,22 +39,22 @@ dim depth as integer dim driver_name as string SCREEN 15, 32 -' Obtain info about current mode +' Obtient info sur mode courant SCREENINFO w, h, depth,,,,driver_name PRINT STR(w) + "x" + STR(h) + "x" + STR(depth); PRINT " using " + driver_name + " driver" SLEEP -' Quit graphics mode and obtain info about desktop +' Quitte mode graphique et obtient info sur bureau SCREEN 0 SCREENINFO w, h, depth PRINT "Desktop running at " + STR(w) + "x" + STR(h) + "x" + STR(depth); %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screeninfo""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screeninfo**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreenlist.wakka b/fbdocs/manual/cache/KeyPgScreenlist.wakka index 65c9ab1ff7..989eead6fe 100644 --- a/fbdocs/manual/cache/KeyPgScreenlist.wakka +++ b/fbdocs/manual/cache/KeyPgScreenlist.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENLIST"}}---- -Finds available fullscreen video modes +Détermine les modes plein écran valides {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Screenlist** ( [[KeyPgByval byval]] //depth// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,41 +9,41 @@ Finds available fullscreen video modes ## {{fbdoc item="param"}} ##//depth//## - the color depth for which the list of modes is requested (supported depths are 8, 15, 16, 24 and 32) + la profondeur de couleur pour laquelle on détermine la liste de modes (les profondeurs supportées sont 8, 15, 16, 24 and 32) -{{fbdoc item="ret"}} - returns 0, when there are no more resolutions to read. +{{fbdoc item="section" value="Valeur retournée + retourne 0, s'il n'y a aucune résolution à lire. -{{fbdoc item="desc"}} - It works like the ##[[KeyPgDir Dir]]## function: the first call to the function requires the ##//depth//## parameter to be specified, it returns the lowest supported resolution for the requested depth. Further calls to ##**Screenlist**## without arguments returns the next resolutions. When no more resolutions are available, ##[[KeyPgScreenlist Screenlist]]## returns 0. +Fonctionnement identique à celui de la fonction ## 0) return value. + ##**ScreenPtr**## peut être utilisé pour vérifier si un appel à ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]## a réussi, réussite indiquée par une valeur retounée non-NULL (<> 0). - In order to access a pixel in the screen buffer, you will need to know the screen's width, height, bytes per pixel and pitch (bytes per row). This information can be found out using ##[[KeyPgScreeninfo Screeninfo]]##. - Each row in the frame buffer is ##//pitch//## bytes long. The frame buffer consists of ##//height//## rows, stored in order of their position on the screen, running from top to bottom, left to right. + Afin d'accéder à un pixel dans le tampon écran, vous devez connaître la largeur, la hauteur, le nombre de bits par pixel et d'octets par ligne (pitch) de l'écran. Ces informations sont données par ##[[KeyPgScreeninfo ScreenInfo]]##. + Chaque ligne du tampon image a ##//pitch//## octets de longueur. Le tampon image est constitué de ##//height//## lignes, stockées dans l'ordre de leur position à l'écran, en allant du haut vers le bas et de la gauche vers la droite. - Because of the design of ""FreeBasic"" graphics library, ##**Screenptr**## (if non-ZERO) will always point to the backbuffer, and never to actual video RAM. + En raison de la conception de la bibliothèque de graphique FreeBasic, ##**ScreenPtr**## (si non-ZERO) pointe toujours vers le tampon et non vers la RAM vidéo réelle. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screenptr.bas"}}%%(freebasic) Const SCREEN_WIDTH = 640, SCREEN_HEIGHT = 480 Dim As Integer w, h, bypp, pitch -'' Make 8-bit screen. +'' Ecran 8-bit. Screenres SCREEN_WIDTH, SCREEN_HEIGHT, 8 -'' Get screen info (w and h should match the constants above, bypp should be 1) +'' Recupere info ecran (w et h doivent correspondre aux constantes ci-dessus, bypp doit etre 1) Screeninfo w, h, , bypp, pitch -'' Get the address of the frame buffer. An Any Ptr -'' is used here to allow simple pointer arithmetic +'' Recupere adresse du tampon image. Un pointeur "Any Ptr" +'' est utilise ici pour allouer un simple pointeur arithmetique Dim buffer As Any Ptr = Screenptr() If (buffer = 0) Then Print "Error: graphics screen not initialized." @@ -40,36 +40,36 @@ If (buffer = 0) Then End -1 End If -'' Lock the screen to allow direct framebuffer access +'' Verrouille ecran pour acceder directement au tampon Screenlock() - '' Find the address of the pixel in the centre of the screen - '' It's an 8-bit pixel, so use a UByte Ptr. + '' Recupere addresse du pixel au centre ecran + '' C'est un pixel 8-bit, donc utilisation pointeur UByte. Dim As Integer x = w \ 2, y = h \ 2 Dim As Ubyte Ptr pixel = buffer + (y * pitch) + (x * bypp) - '' Set the pixel color to 10 (light green). + '' Couleur pixel a 10 (vert clair). *pixel = 10 -'' Unlock the screen. +'' Deverrouille ecran. Screenunlock() -'' Wait for the user to press a key before closing the program +'' Attend touche appuyee pour clore programme Sleep %% {{fbdoc item="filename" value="examples/manual/gfx/screenptr2.bas"}}%%(freebasic) Const SCREEN_WIDTH = 256, SCREEN_HEIGHT = 256 Dim As Integer w, h, bypp, pitch -'' Make 32-bit screen. +'' Ecran 32-bit. ScreenRes SCREEN_WIDTH, SCREEN_HEIGHT, 32 -'' Get screen info (w and h should match the constants above, bypp should be 4) +'' Recupere info ecran (w et h doivent correspondre aux constantes ci-dessus, bypp doit etre 4) ScreenInfo w, h, , bypp, pitch -'' Get the address of the frame buffer. An Any Ptr -'' is used here to allow simple pointer arithmetic +'' Recupere adresse du tampon image. Un pointeur "Any Ptr" +'' est utilise ici pour allouer un simple pointeur arithmetique Dim buffer As Any Ptr = Screenptr() If (buffer = 0) Then Print "Error: graphics screen not initialized." @@ -77,48 +77,48 @@ If (buffer = 0) Then End -1 End If -'' Lock the screen to allow direct framebuffer access +'' Verrouille ecran pour acceder directement au tampon ScreenLock() - '' Set row address to the start of the buffer + '' Adresse ligne debut tampon Dim As Any Ptr row = buffer - '' Iterate over all the pixels in the screen: + '' Boucle sur tous pixels ecran: For y As Integer = 0 To h - 1 - '' Set pixel address to the start of the row - '' It's a 32-bit pixel, so use a UInteger Ptr + '' Adresse pixel sur ligne + '' c'est un pixel 32-bit, donc utilisation pointeur UInteger Ptr Dim As UInteger Ptr pixel = row For x As Integer = 0 To w - 1 - '' Set the pixel value + '' Place valeur pixel *pixel = Rgb(x, x Xor y, y) - '' Get the next pixel address - '' (UInteger Ptr will increment by 4 bytes) + '' Adresse pixel suivant + '' (UInteger Ptr incrementera par 4 octets) pixel += 1 Next x - '' Go to the next row + '' Ligne suivante row += pitch Next y -'' Unlock the screen. +'' Deverrouille ecran. ScreenUnlock() -'' Wait for the user to press a key before closing the program +'' Attend appui sur touche avant fermer programme Sleep %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screenptr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screenptr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreenres.wakka b/fbdocs/manual/cache/KeyPgScreenres.wakka index a7165d6fc4..edc7006f2f 100644 --- a/fbdocs/manual/cache/KeyPgScreenres.wakka +++ b/fbdocs/manual/cache/KeyPgScreenres.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENRES"}}---- -Initializes a graphics mode by specifying horizontal and vertical resolution +Initialise un mode graphique par spécification de la résolution horizontale et verticale {{fbdoc item="syntax"}}## **Screenres** //width// [[KeyPgAs as]] [[KeyPgInteger integer]], //height// [[KeyPgAs as]] [[KeyPgInteger integer]], //depth// [[KeyPgAs as]] [[KeyPgInteger integer]] = 8, //num_pages// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1, //flags// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, //refresh_rate// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 @@ -9,44 +9,44 @@ Initializes a graphics mode by specifying horizontal and vertical resolution ## {{fbdoc item="param"}} ##//width//##, ##//height//## - The display width and height, respectively. For fullscreen mode, the user should check the availability of the resolution using ##[[KeyPgScreenlist Screenlist]]##. + Respectivement, la largeur et la hauteur de l'affichage. Pour les modes plein écran, l'utilisateur doit vérifier l'existence de la résolution choisie en utilisant ##[[KeyPgScreenlist ScreenList]]##. ##//depth//## - The color depth in bits per pixel. Valid color depths are: 1, 2, 4, 8, 16 and 32. Values of 15 and 24 are also allowed as aliases for 16 and 32, respectively. If omitted, the default is 8 bits per pixel. 8 bits and below will give a palette image. The default palette will be the first ##2^//depth//## colors of the 256-color palette used in ##[[KeyPgScreengraphics Screen]] 13##. + La profondeur de couleur en bits par pixel. Les profondeurs de couleur utilisables sont: 1, 2, 4, 8, 16 et 32. Les valeurs 15 et 24 sont aussi possibles comme aliases, respectivement, de 16 et 32. Si omis, la valeur par défaut est de 8 bits par pixel. 8 bits et les valeurs inférieures donneront ue palette image. La palette par défaut sera la première des ##2^//depth//## couleurs des "256-color palette" utilisées dans ##[[KeyPgScreengraphics Screen]] 13##. ##//num_pages//## - The number of video pages to create, defaults to 1. (see below) + Le nombre de pages vidéo à créer, 1 par défaut. (voir ci-dessous) ##//flags//## - Used to set various properties of the screen, including fullscreen mode and the graphics driver used. (see ##[[KeyPgScreengraphics Screen]]## or the standard header "fbgfx.bi" for available flags) + Utilisés pour valider différentes propriétés de l'écran, y compris le mode plein écran et le driver graphique utilisé. (voir ##[[KeyPgScreengraphics Screen]]## ou le fichier en-tête "fbgfx.bi" pour la liste des drapeaux utilisables) ##//refresh_rate//## - The refresh rate of the screen, defaults to an appropriate value. (invalid refresh rates will be ignored) + La fréquence de rafraîchissement de l'écran, une valeur appropriée est donnée par défaut. (des fréquences non conformes seront ignorées) {{fbdoc item="desc"}} - ##**Screenres**## tells the compiler to link the GfxLib and initializes a QB-only, QB-on-GUI or OpenGL graphics mode, depending on the ##//flags//## setting + ##**ScreenRes**## demande au compilateur d'utiliser GfxLib et d'initialiser un QB-only, QB-on-GUI ou mode graphique OpenGL, en fonction des valeurs de ##//flags//## - In non-fullscreen modes, the resolution does not have to match any resolution of the graphics card. Resolutions like ##555x111## are possible, GfxLib will create a window of such size. See Platform differences for DOS issues. + Dans les modes non-plein-écran, la résolution n'a pas à correspondre à une résolution de la carte graphique. Des résolutions comme ##555x111## sont possibles, GfxLib créera une fenêtre de cette taille. Voir les "Différences de plate-forme" pour ces sorties DOS. - The font size in ##**Screenres**## modes is set to 8x8 by default. This can be changed by setting the number of text rows/columns, using the ##[[KeyPgWidth Width]]## function. + La taille de la police de caractères dans les modes ##**ScreenRes**## est de 8x8 par défaut. On peut la changer, en validant un nombre de lignes/colonnes, en utilisant la fonction ##[[KeyPgWidth Width]]##. - In QB-only modes a dumb window or fullscreen resolution is set, one or more buffers in standard memory are created, console commands are redirected to their graphic versions, a [[GfxDefPalettes default palette]] is set and an automatic screen refresh thread is started. QB-like graphics and console statements can be used. + Dans les modes QB-only une simple fenêtre ou un écran haute résolution est validé, un ou plusieurs tampons sont créés en mémoire standard, les commandes graphiques sont redirigées vers leur version graphique, une [[GfxDefPalettes palette par défaut]] est validée et un "thread" de rafraîchissement automatique de l'écran est lancé. QB-like graphics and console statements can be used. - In QB-on-GUI modes one or more buffers in standard memory are created, console commands are redirected to their graphic versions and a [[GfxDefPalettes default palette]] is set. QB-like graphics and console statements can be used. It is up to the user to create a window and to refresh it with the contents of the graphics buffers. + En modes QB-on-GUI, un ou plusieurs tampons sont créés en mémoire standard, les commandes graphiques sont redirigées vers leur version graphique et une [[GfxDefPalettes palette par défaut]] est validée. Les états graphiques et console QB-like sont utilisables. Il appartient à l'utilisateur de créer une fenêtre et de la mettre à jour avec les contenus des tampons graphiques. - In OpenGL modes a dumb window or fullscreen resolution is set, one or more buffers in standard memory are created, and the system's OpenGL library is initialized. From here only OpenGL commands can be used to write to the graphics buffer. QB-like and console commands are forbidden. This mode allows to initialize OpenGL in a portable way. + Dans les modes OpenGL, une simple fenêtre ou un écran haute résolution est validé, un ou plusieurs tampons sont créés en mémoire standar, et la librairie OpenGL du système est initialisée. À partir de ce moment, les commandes OpenGL sont utilisables pour écrire dans le tampon graphique. Les commandes QB-like et console sont interdites. Ce mode permet d'initialiser OpenGL de façon portable. - See the details in ##[[KeyPgScreengraphics Screen (Graphics)]]## keyword. + Voir les détails dans ##[[KeyPgScreengraphics Screen (Graphics)]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screenres.bas"}}%%(freebasic) dim a as integer, b as integer -ScreenRes 640, 480, 8 'This line will set the screen mode to 640x480x8. - 'The following code block will draw diagonal lines over the whole screen. +ScreenRes 640, 480, 8 'Cette ligne valide le mode ecran 640x480x8. + 'Le bloc de code suivant trace lignes diagonales sur tout l'ecran. For a = 1 to 640 For b = 1 to 480 Pset (a,b),(a + b) AND 255 Next b Next a - 'The following line will print "Hello World!" over the lines we've drawn. + 'La ligne suivante ecrit "Hello World!" sur les lignes tracees. Print "Hello world!!" Sleep @@ -54,25 +54,25 @@ End %% {{fbdoc item="target"}} - - In DOS, Windowing and OpenGL related switches are not available, see also [[GfxLib GfxLib overview]] + - Sous DOS, les drapeaux Windowing et OpenGL ne sont pas disponibles, voir aussi [[GfxLib Vue d'ensemble GfxLib]] {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screenres""**##. + - Non disponible en dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screenres**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen]]## The QB-like way to set graphics mode - - ##[[KeyPgScreenlist Screenlist]]## Check display modes available for FB ""GfxLib"" to use - - ##[[KeyPgScreencontrol Screencontrol]]## Select driver and more + - ##[[KeyPgScreengraphics Screen]]## La méthode QB-like pour établir les modes graphiques + - ##[[KeyPgScreenlist ScreenList]]## Recherche des modes disponibles pour utiliser FB GfxLib + - ##[[KeyPgScreencontrol ScreenControl]]## Sélection du driver entre autres - ##[[KeyPgScreenlock Screenlock]]## - ##[[KeyPgScreenunlock Screenunlock]]## - - ##[[KeyPgScreenptr Screenptr]]## Semi-low level access + - ##[[KeyPgScreenptr ScreenPtr]]## Accès niveau Semi-low - ##[[KeyPgScreenset Screenset]]## - ##[[KeyPgScreencopy Screencopy]]## - ##[[KeyPgScreeninfo Screeninfo]]## - ##[[KeyPgScreenglproc Screenglproc]]## - - ##[[GfxInternalFormats Internal pixel formats]]## + - ##[[GfxInternalFormats Formats pixel internes]]## {{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgScreenset.wakka b/fbdocs/manual/cache/KeyPgScreenset.wakka index 9f0260f942..e63574ec05 100644 --- a/fbdocs/manual/cache/KeyPgScreenset.wakka +++ b/fbdocs/manual/cache/KeyPgScreenset.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENSET"}}---- -Sets current work and visible pages +Valide la page de travail et la page visible {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Screenset** ( [[KeyPgByval byval]] //work_page// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //visible_page// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) @@ -9,30 +9,30 @@ Sets current work and visible pages ## {{fbdoc item="param"}} ##//work_page//## - index to working page + indice de la page de travail ##//visible_page//## - index to visible page + indice de la page visible {{fbdoc item="desc"}} - ##**Screenset**## allows to set the current working page and the current visible page. Page numbers range from 0 to the num_pages specified when setting the graphics mode minus 1 . You can use this function to achieve page-flipping or double-buffering. If you omit ##//work_page//## but not ##//visible_page//##, only visible page is changed. If you omit ##//visible_page//## but not ##//work_page//##, only work page is changed. If you omit both arguments, both work page and visible page are reset to page 0. + ##**ScreenSet**## permet de déterminer la page courante de travail ainsi que la page visible. Les numéros de page vont de 0 à num_pages spécifié lors de la validation du mode graphique moins 1. Vous pouvez utiliser cette fonction pour utiliser les techniques de la "permutation de page" (page-flipping) ou du "double tampon" (double-buffering). Si vous omettez ##//work_page//## mais pas ##//visible_page//##, seule la page visible changera. Si vous omettez les deux arguments, les deux pages, de travail et visible, correspondront à la page 0. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/screenset.bas"}}%%(freebasic) -' Set good old 320x200 in 8bpp mode, but with 2 pages +' Valide bon vieux mode, 320x200 en 8bpp mais avec 2 pages SCREEN 13, ,2 COLOR ,15 DIM x AS INTEGER x = -40 -' Let's work on page 1 while we display page 0 +' Travail sur page 1 pendant nous affichons page 0 SCREENSET 1, 0 DO CLS LINE (x, 80)-(x + 39, 119), 4, BF x = x + 1 IF (x > 319) THEN x = -40 - ' Wait for vertical sync - WAIT &h3DA, 8 - ' Copy work page to visible page + ' Attente syncro verticale + Wait &h3DA, 8 + ' Copy page travail vers page visible SCREENCOPY LOOP WHILE INKEY = "" @@ -40,10 +40,10 @@ LOOP WHILE INKEY = "" {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screenset""**##. + - Non disponible en dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screenset**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## diff --git a/fbdocs/manual/cache/KeyPgScreensync.wakka b/fbdocs/manual/cache/KeyPgScreensync.wakka index f7b0e85a0d..ecb266ed40 100644 --- a/fbdocs/manual/cache/KeyPgScreensync.wakka +++ b/fbdocs/manual/cache/KeyPgScreensync.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENSYNC"}}---- -Synchronizes display updates with hardware +Synchronises les mises à jour d'affichage avec le "hardware" {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Screensync** ( ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -7,36 +7,40 @@ Synchronizes display updates with hardware {{fbdoc item="usage"}}## //result// = **Screensync** ## -{{fbdoc item="ret"}} - Zero if successful, or non-zero if a graphics mode was not previously set. +{{fbdoc item="section" value="Valeur retournée + Zéro si réussi, ou non-zéro si un mode graphique n'a pas encore été validé. {{fbdoc item="desc"}} - This GfxLib statement stops the execution of the program until the graphics card signals it has ended tracing a frame and is going to start the new one. If the program uses the small interval of time between frames to redraw the image, the flickering is greatly reduced. + Cette fonction GfxLib arrêtes l'exécution du programme tant que la carte graphique n'a pas terminé le balayage complet de l'écran et va en commencer un autre. Si le programme utilise le très petit intervalle de temps entre deux affichages pour redessiner l'image, le scintillement est grandement atténué. - The use of the QB-compatible form WAIT &H3DA,8 is deprecated. + L'utilisation de la forme QB-compatible WAIT &H3DA,8 est obsolète. -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/screensync.bas"}}%%(freebasic) -'main loop -DO + {{fbdoc item="ex"}} + + %%(freebasic) + +'boucle principale +Do +' effectue entree utilisateur +' calcule_une_frame - ' do user input - ' calculate_a_frame + ScreenSync + ' dessine_ une_ frame - SCREENSYNC + Loop Until Inkey <> "" - ' draw_ a_ frame + %% -LOOP UNTIL INKEY <> "" -%% - - {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screensync""**##. +- Non disponible en dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screensync**##. + {{fbdoc item="diff"}} - - New to ""FreeBASIC"". - - QBasic used WAIT &H3DA,8 for this purpose. + - Nouveau pour FreeBASIC. + +- QBasic utilisait WAIT &H3DA,8 pour cela. + {{fbdoc item="see"}} + - ##[[KeyPgWait Wait]]## {{fbdoc item="see"}} - ##[[KeyPgWait Wait]]## diff --git a/fbdocs/manual/cache/KeyPgScreenunlock.wakka b/fbdocs/manual/cache/KeyPgScreenunlock.wakka index bea4c35485..9dd22aa711 100644 --- a/fbdocs/manual/cache/KeyPgScreenunlock.wakka +++ b/fbdocs/manual/cache/KeyPgScreenunlock.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SCREENUNLOCK"}}---- -Unlocks work page's framebuffer +Déverrouille le tampon de la page de travail {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Screenunlock** ( [[KeyPgByval byval]] //startline// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //endline// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) @@ -9,33 +9,33 @@ Unlocks work page's framebuffer ## {{fbdoc item="param"}} ##//startline//## - optional argument specifying first screen line to be updated. If omitted, top screen line is assumed. + paramètre optionnel spécifiant la première ligne écran à mettre à jour. Si omis, considère la première ligne en haut de l'écran. ##//endline//## - optional argument specifying last screen line to be updated. If omitted, bottom screen line is assumed. + paramètre optionnel spécifiant la dernière ligne écran à mettre à jour. Si omis, considère la dernière ligne en bas de l'écran. {{fbdoc item="desc"}} - ##**Screenunlock**## unlocks the current work page assuming it was previously locked by calling ##[[KeyPgScreenlock Screenlock]]## and lets the system restart updating the screen regularly. When called with ##start_line## and ##end_line## , only the screen area between those lines is assumed to have changed, and will be updated. + ##**ScreenUnlock**## déverrouille la page de travail courante à condition qu'elle ait été verrouillée précédemment en appelant ##[[KeyPgScreenlock ScreenLock]]## et permet le redémarrage du système avec mise à jour de l'écran régulièrement. Lors d'un appel avec ##start_line## et ##end_line## , seule la zone comprise entre ces deux lignes est prise en compte pour être modifiée, et sera mise à jour. - An internal counter exists that remembers the screen lock state, thus ##**Screenunlock**## has an effect only on a screen that is locked. A screen that has not been locked with ##**Screenlock**## cannot get unlocked, however ##**Screenunlock**## still will force an update of given area or full screen. + Il existe un compteur interne qui mémorise l'état du verrouillage de l'écran, donc ##**ScreenUnlock**## n'a d'effet que sur un écran verrouillé précédemment. Un écran qui n'a pas été verrouillé avec ##**ScreenLock**## ne peut être déverrouillé, cependant un nouveau ##**ScreenUnlock**## forcera la mise à jour d'une zone donnée ou de l'écran. - Calls to ##**Screenunlock**## must be paired with matching calls to ##**[[KeyPgScreenlock Screenlock]]**##. Only the first call to ##**[[KeyPgScreenlock Screenlock]]**## actually performs a locking operation. Subsequent calls to ##**Screenlock**## only increment the lock counter. Conversely, ##**Screenunlock**## only decrements the lock counter until it reaches zero at which time the actual unlock operation will be performed. Using ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres Screenres]]## will release all locks and set the lock counter back to zero before changing screen modes. + A un certain nombre d'appels à ##**ScreenUnlock**## doit correspondre le même nombre d'appels à ##**[[KeyPgScreenlock ScreenLock]]**##. Seul le premier appel à ##**[[KeyPgScreenlock ScreenLock]]**## procède effectivement à une opération de verrouillage. Les appels suivants à ##**ScreenLock**## incrémentent seulement le compteur de verrouillage. À l'inverse, ##**ScreenUnlock**## décrémente seulement le compteur de verrouillage jusqu'à ce qu'il atteigne zéro, à ce moment-là seulement, l'actuelle opération de déverrouillage sera effectuée. L'utilisation de ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]## annulera tous les verrouillages et mettra le compteur à zéro avant de changer de mode écran. - All graphic statements automatically lock the screen before the function call, and unlock the screen afterwards, so you do not need to do this explicitly using ##**[[KeyPgScreenlock Screenlock]]**## and ##**Screenunlock**##. You only need to lock the screen when you wish to access the screen (framebuffer) directly using ##[[KeyPgScreenptr Screenptr]]## or when you wish to group several graphic statements together so their effects appear simultaneously on screen, thus avoiding potential screen flicker during screen updates. + Toutes les déclarations graphiques verrouillent automatiquement l'écran avant l'appel de fonction et déverrouillent l'écran par la suite, vous n'avez donc pas besoin de faire cela explicitement en utilisant ##**[[KeyPgScreenlock ScreenLock]]**## et ##**ScreenUnlock**##. Vous devez seulement verrouiller l'écran lorsque vous désirez accéder directement à l'écran (framebuffer) à l'aide de ## [[KeyPgScreenptr ScreenPtr ]] ## ou lorsque vous souhaitez regrouper plusieurs déclarations graphiques ensemble afin que leurs effets apparaissent simultanément à l'écran, évitant ainsi les scintillements pendant les mises à jour de l'écran. - Warning (Win32, Linux) : The screen is locked by stopping the thread that processes also the OS' events. This means the screen should be locked only for the short time required to redraw it, and no user input will be received while the screen is locked. + Après l'appel de ##**ScreenUnlock**##, tous les états graphiques peuvent être utilisés en toute sécurité, d'autre part accèder directement au tampon image de la page de travail via ##[[KeyPgScreenptr ScreenPtr]]## peut être utilisé seulement après un nouveau verrouillage de l'écran avec ##[[KeyPgScreenlock ScreenLock]]##. -{{fbdoc item="ex"}} - See ##[[KeyPgScreenptr Screenptr]]## example. +Attention (Win32, Linux) : l'écran est verrouillé par arrêt du "thread" qui gère aussi les événements de l'OS. Cela signifie que l'écran ne doit être verrouillé que pour un laps de temps le plus court possible pendant lequel il est redessiné, et aucune entrée utilisateur n'est valide pendant que l'écran est verrouillé. + {{fbdoc item="ex"}} -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Screenunlock""**##. +Voir l'exemple de ##[[KeyPgScreenptr ScreenPtr]]##. + {{fbdoc item="lang"}} -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" +- Non disponible en dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Screenunlock**##. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} +- Nouveau pour FreeBASIC + {{fbdoc item="see"}} - ##[[KeyPgScreengraphics Screen (Graphics)]]## - - ##[[KeyPgScreenlock Screenlock]]## - - ##[[KeyPgScreenptr Screenptr]]## + - ##[[KeyPgScreenlock ScreenLock]]## -{{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file +- ##[[KeyPgScreenptr ScreenPtr]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgSecond.wakka b/fbdocs/manual/cache/KeyPgSecond.wakka index 29ea53fdaf..6ae8c89ec2 100644 --- a/fbdocs/manual/cache/KeyPgSecond.wakka +++ b/fbdocs/manual/cache/KeyPgSecond.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SECOND"}}---- -Gets the seconds from a [[ProPgDates Date Serial]] +Récupère les secondes de l'heure à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Second** ( [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,14 +10,14 @@ Gets the seconds from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date serial + la "date serial" -{{fbdoc item="ret"}} - Returns the seconds from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Retourne les secondes à partir d'une variable contenant une date sous forme de [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/second.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ Print Format(ds, "yyyy/mm/dd hh:mm:ss "); Second(ds) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgSeekreturn.wakka b/fbdocs/manual/cache/KeyPgSeekreturn.wakka index bd64d56dc4..ea31e04732 100644 --- a/fbdocs/manual/cache/KeyPgSeekreturn.wakka +++ b/fbdocs/manual/cache/KeyPgSeekreturn.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="SEEK (Function)"}}---- -Gets the position of the next read/write operation for a file or device +Obtient la position de la prochaine opération de lecture/écriture pour un fichier ou un périphérique {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Seek** ( [[KeyPgByval byval]] //filenum// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] ## {{fbdoc item="param"}} ##//filenum//## - file number of an open file + numéro de fichier d'un fichier ouvert -{{fbdoc item="ret"}} - The file position where the next read or write operation will take place. +{{fbdoc item="section" value="Valeur retournée + La position à laquelle la prochaine lecture ou écriture sur un fichier va se produire. {{fbdoc item="desc"}} - The position is given in records if the file was opened in ##[[KeyPgRandom Random]]## access mode, in bytes in any other case. The file position returned is 1-based, so the first record of a file is 1. + La position est donnée en enregistrements si le fichier a été ouvert en mode d'accès ##[[KeyPgRandom Random]]## en octets dans les autres cas. La position est basée sur 1 -- le 1er enregistrement est à la position 1. - The ##[[KeyPgSeekset Seek]]## statement is used to set the position of the next read or write operation. + La fonction ##[[KeyPgSeekset Seek]]## est utilisée pour déterminer la position de la prochaine opération de lecture ou d'écriture. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/seek-func.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ close #f %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgSeekset Seek (Statement)]]## diff --git a/fbdocs/manual/cache/KeyPgSeekset.wakka b/fbdocs/manual/cache/KeyPgSeekset.wakka index d920a7d68d..ddf620aa37 100644 --- a/fbdocs/manual/cache/KeyPgSeekset.wakka +++ b/fbdocs/manual/cache/KeyPgSeekset.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="SEEK (Statement)"}}---- -Sets the position of the next read/write operation on a file +Définit la position de la prochaine opération de lecture/écriture sur un fichier {{fbdoc item="syntax"}}## **Seek** [#]//filenum//, //position// ## {{fbdoc item="param"}} ##//filenum//## - file number of an opened a file + numéro de fichier d'un fichier ouvert ##//position//## - the new position for i/o operations + la nouvelle position pour les opérations d'entrée/sortie {{fbdoc item="desc"}} - Sets the position at which the next read or write operation on a file will occur. + Définit la position à laquelle la prochaine lecture ou écriture sur un fichier va se produire. - The position is given in records if the file was opened in ##[[KeyPgRandom Random]]## access mode, in bytes in any other case. The position is 1 based -- the first record of a file is at position 1. + La position est donnée en enregistrements si le fichier a été ouvert en mode d'accès ##[[KeyPgRandom Random]]##, en octets dans les autres cas. La position est basée sur 1 -- le 1er enregistrement est à la position 1. - The ##[[KeyPgSeekreturn Seek]]## function is used to get the position of the next read or write operation. + La fonction ##[[KeyPgSeekreturn Seek]]## est utilisée pour déterminer la position de la prochaine opération de lecture ou d'écriture. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/seek-statment.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ close #f %% {{fbdoc item="diff"}} - - None + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgSeekreturn Seek (Function)]]## diff --git a/fbdocs/manual/cache/KeyPgSelectcase.wakka b/fbdocs/manual/cache/KeyPgSelectcase.wakka index 0b32988bd3..47a622c4f8 100644 --- a/fbdocs/manual/cache/KeyPgSelectcase.wakka +++ b/fbdocs/manual/cache/KeyPgSelectcase.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SELECT CASE"}}---- -Conditional statement block +Bloc d'instructions conditionnelles {{fbdoc item="syntax"}}## **Select Case** //expression// @@ -8,7 +8,7 @@ Conditional statement block [ **Case Else** ] [//statements//] **End Select** -//or// +//ou// **Select Case** As Const //integer_expression// [ **Case** //constant// | //enumeration// ] [ //statements// ] @@ -18,32 +18,33 @@ Conditional statement block ## {{fbdoc item="desc"}} - ##**Select Case**## executes specific code depending on the value of an expression. The expression is evaluated once, and compared against each ##**Case**##, in order, until a matching expression is found. The code inside the matching Case branch is executed, and the program skips down to the end of the ##**Select Case**## block. ##**Case Else**## matches any case not already matched, so if there is a ##**Case Else**##, at least one ##**Case**## is guaranteed to be executed. If no ##**Case**##s match, the whole ##**Select Case**## block will be skipped. + ##**Select Case**## exécute le code spécifique en fonction de la valeur d'une expression. L'expression est évaluée une fois et comparée ensuite à chaque ##**Case**##, dans l'ordre, jusqu'à ce qu'une expression qui correspond soit trouvée. Le code à l'intérieur de la branche ##**Case**## correspondant est exécuté et le programme saute vers le bas à la fin du bloc ##**Select Case**##. ##**Case Else**## sera choisi si aucune autre ##**Case**## ne correspond, donc si il y a un ##**Case Else**##, au moins un ##**Case**## est assuré d'être exécuté. Si aucun ##**Case**## ne correspond, le bloc ##**Select Case**## entier sera sauté. - ##**End Select**## is used to close the ##**Select Case...End Select**## block. + ##**End Select**## est utilisé pour terminer le bloc ##**Select Case...End Select**##. - Note for C users: In ""FreeBASIC"", ##**Select Case**## works like a ##switch## block where all cases have a ##break## at the end. As there is no fall-through, multiple options must be put in an expression list in a single ##**Case**##. + Note pour les utilisateurs du langage C: En FreeBASIC, ##**Select Case**## fonctionne comme un bloc ##switch## où tous les ##**Case**## ont un ##break## à la fin. Comme il n'y a pas d'échec, des options multiples doivent être placées dans une liste d'expressions dans un unique ##**Case**##. - Besides integer types, floating point and string expressions are also supported with the first syntax. + Outre les types entiers, des expressions en virgule flottante et chaîne sont également prises en charge avec la première syntaxe. - Syntax of an expression list: + Syntaxe d'une liste d'expressions: ##{ //expression// | //expression// **To** //expression// | **Is** //relational operator// //expression// }[, ...]## - - ##//expr//##: evaluates ##//expr//##, and compares for equality with the original expression. If they are equal, then a match has been found. This could be considered as a shorthand for "##**Is** = //expr//##" (see below). - - ##//expr1// **To** //expr2//##: evaluates ##//expr1//## and checks to see if it is less than or equal to the original expression. If so, it evaluates ##//expr2//##, and checks to see if it is greater than or equal to the original expression. If so, then a match has been found. - - ##**Is** //relational_operator// //expr//##: evaluates ##//expr//##, and compares the original operation against it, using the supplied ##//relational_operator//## (##=##, ##>##, ##<##, ##<>##, ##<=##, ##>=##). If the comparison is true, then a match has been found. + - ##//expr//##: évalue ##//expr//## et la compare pour voir si elle est égale à l'expression d'origine. Si elles sont égales, alors une correspondance a été trouvée. Cela pourrait être considéré comme un raccourci pour "##**Is** = //expr//##" (voir plus loin). + - ##//expr1// **To** //expr2//##: évalue ##//expr1//## et détermine si elle est inférieure ou égale à l'expression originale. Si c'est le cas, elle évalue ##//expr2//## et détermine si elle est supérieure ou égale à l'expression originale. Si c'est le cas, alors une correspondance a été trouvée. + - ##**Is** //relational_operator// //expr//##: évalue ##//expr//## et compare l'opération d'origine sur elle, en utilisant le ##//relational_operator//## (##=##, ##>##, ##<##, ##<>##, ##<=##, ##>=##). Si la comparaison est vraie, alors une correspondance a été trouvée. - Multiple checks can be made in each ##**Case**##, by separating them by a comma (##,##). Once a match is found, the program finishes its checks, and goes on to execute the code statements for that ##**Case**## block. No further expressions are evaluated or checked. + Des vérifications multiples peuvent être faites dans chaque ##**Case**##, en les séparant par une virgule (##,##). Une fois qu'une correspondance est trouvée, le programme termine ses contrôles et continue d'exécuter les instructions de code pour ce bloc ##**Case**##. Aucune autre expression n'est évaluée ou vérifiée. - example of expression lists: - {{table columns="2" cellpadding="1" cells="Case 1 ;constant;Case 5.4 To 10.1;range;Case Is > 3;bigger than-smaller than;Case 1, 3, 5, 7 to 9;match against a set of values;Case x ;value of a variable"}} + Exemples de listes d'expressions: + {{table columns="" cellpadding="2" cells="Case 1 ;constante;Case 5.4 To 10.1;plage: de ... à ...;Case Is > 3;plus grand que - plus petit que;Case 1, 3, 5, 7 to 9;correspondance dans un ensemble de valeurs;Case x ;valeur d'une variable;
    - If ##**As Const**## is used, only ##[[KeyPgInteger Integer]]## constants can be evaluated and the expression list supports single constants and enumerations only. "##**To**##" ranges are supported, but "##**Is**##" relational operators are not. + Si ##**As Const**## est utilisé, seules des constantes ##[[KeyPgInteger Integer]]## peuvent être évaluées et la liste expressions ne prend en charge que les constantes et les énumérations. Les plages "##**To**##" sont prises en charge, mais les opérateurs relationnels "##**Is**##" ne le sont pas. - With ##**As Const**##, a jump table is created to contain the full range of integer ##**Case**##s handled. This allows ##**Select Case As Const**## to be faster than ##**Select Case**##. However, the size of the range of values is limited, and the largest value in the range may be no higher than the smallest value + 4096. + Avec ##**As Const**##, une table de sauts est créée pour contenir l'ensemble des entiers ##**Case**## traîtés. Cela rend ##**Select Case As Const**## plus rapide que ##**Select Case**##. Toutefois, la taille de la plage de valeurs est limitée, et la plus grande valeur dans la gamme ne peut être plus élevée que la plus petite valeur + 4096. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/control/select.bas"}}%%(freebasic) + + %%(freebasic) dim choice as integer input "Choose a number between 1 and 10: "; choice @@ -60,6 +61,69 @@ case 5 to 10 case else print "number is outside the 1-10 range" end select +%% + + {{fbdoc item="diff"}} +- ##**Select Case As Const**## n'existait pas dans QB + +- Dans le cas "##//expr1// TO //expr2//##", QB voulait toujours évaluer les deux expressions, même si ##//expr1//## était supérieure à l'exression d'origine. + +{{fbdoc item="see"}} +- ##[[KeyPgIfthen If...Then]]## + +for i as integer = 1 to N + select case i + case 1, 3, 5, 7, 9 + dummy += 1 + case 2, 4, 6, 8, 10 + dummy += 1 + case 11 to 20 + dummy += 1 + case 21 to 30 + dummy += 1 + case 31 + dummy += 1 + case 32 + dummy += 1 + case 33 + dummy += 1 + case is >= 34 + dummy += 1 + case else + print "can't happen" + end select +next + +print using "SELECT CASE: ##.### seconds"; timer() - t +t = timer() + +for i as integer = 1 to N + select case as const i + case 1, 3, 5, 7, 9 + dummy += 1 + case 2, 4, 6, 8, 10 + dummy += 1 + case 11 to 20 + dummy += 1 + case 21 to 30 + dummy += 1 + case 31 + dummy += 1 + case 32 + dummy += 1 + case 33 + dummy += 1 + case else + if( i >= 34 ) then + dummy += 1 + else + print "can't happen" + end if + end select +next + +print using "SELECT CASE AS CONST: ##.### seconds"; timer() - t +sleep %% {{fbdoc item="diff"}} diff --git a/fbdocs/manual/cache/KeyPgSetdate.wakka b/fbdocs/manual/cache/KeyPgSetdate.wakka index edfae7ec3a..b66d6e0b6f 100644 --- a/fbdocs/manual/cache/KeyPgSetdate.wakka +++ b/fbdocs/manual/cache/KeyPgSetdate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SETDATE"}}---- -Sets the current system date +Fixe la date du système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Setdate** ( [[KeyPgByref byref]] //newdate// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Sets the current system date ## {{fbdoc item="param"}} ##//newdate//## - the new date to set + la nouvelle date à valider -{{fbdoc item="ret"}} - Returns zero on success or non-zero on failure on all ports except DOS. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro si succès ou non-zéro si échec sur tous les ports sauf DOS. {{fbdoc item="desc"}} - To set the date you just format ##//newdate//## and send to ##**Setdate**## in a valid format following one of the following: ##"mm-dd-yy"##, ##"mm-dd-yyyy"##, ##"mm/dd/yy"##, or ##"mm/dd/yyyy"## (##mm## is the month, ##dd## is the day, ##yy## or ##yyyy## is the year. + Pour valider la nouvelle date, formatez seulement ##//newdate//## et envoyez-la à ##**SetDate**## dans l'un des formats valides qui suivent: ##"mm-dd-yy"##, ##"mm-dd-yyyy"##, ##"mm/dd/yy"##, or ##"mm/dd/yyyy"## (##mm## est le mois, ##dd## est le jour, ##yy## ou ##yyyy## est l'année. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/setdate.bas"}}%%(freebasic) @@ -27,7 +27,7 @@ SetDate m + "/" + d + "/" + y %% {{fbdoc item="diff"}} - - The DATE statement was used in QB and the syntax was "//DATE = string//" + - La déclaration DATE était utilisée dans QB et la syntaxe était "//DATE = string//" {{fbdoc item="see"}} - ##[[KeyPgDate Date]]## diff --git a/fbdocs/manual/cache/KeyPgSetenviron.wakka b/fbdocs/manual/cache/KeyPgSetenviron.wakka index 7cfe566c2a..52bc362080 100644 --- a/fbdocs/manual/cache/KeyPgSetenviron.wakka +++ b/fbdocs/manual/cache/KeyPgSetenviron.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SETENVIRON"}}---- -Sets a system environment variable +Définit une variable d'environnement système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Setenviron** ( [[KeyPgByref byref]] //varname// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Sets a system environment variable ## {{fbdoc item="param"}} ##//varname//## - The name of the environment variable to set. + Le nom de la variable d'environnement à définir. -{{fbdoc item="ret"}} - Return zero (0) if successful, non-zero otherwise. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro (0) si succès et non-zéro en cas d'échec. {{fbdoc item="desc"}} - Modifies system environment variables. There are several variables available for editing other than the default ones on your system. An example of this would be fbgfx, where you can choose the form of graphics driver the FreeBASIC graphics library will use. + Modifie les variables d'environnement système. Il y a plusieurs variables disponibles pour l'édition autres que celles par défaut sur votre système. Un exemple de ceci serait "fbgfx", où vous pouvez choisir la forme de pilote graphique de la bibliothèque graphiques FreeBasic à utiliser. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/setenviron.bas"}}%%(freebasic) @@ -66,7 +66,7 @@ ScreenUnlock %% {{fbdoc item="diff"}} - - In QB, ##**Setenviron**## was called ##**Environ**##. + - Dans QB, ##**SetEnviron**## est nommé ##**Environ**##. {{fbdoc item="see"}} - ##[[KeyPgEnviron Environ]]## diff --git a/fbdocs/manual/cache/KeyPgSetmouse.wakka b/fbdocs/manual/cache/KeyPgSetmouse.wakka index df39bd55e3..555f498909 100644 --- a/fbdocs/manual/cache/KeyPgSetmouse.wakka +++ b/fbdocs/manual/cache/KeyPgSetmouse.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SETMOUSE"}}---- -Sets the position and visibility of the mouse cursor +Gère la position et la visibilité du curseur de la souris {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Setmouse** ( [[KeyPgByval byval]] //x// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //y// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //visibility// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1, [[KeyPgByval byval]] //clip// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -8,49 +8,49 @@ Sets the position and visibility of the mouse cursor //result// = **Setmouse**([ //x// ] [, [ //y// ] [, [ //visibility// ] [, [ //clip// ]]]]) ## {{fbdoc item="param"}} - (For each parameter, ##-1## is a special value indicating "no changes.") + (Pour chaque paramètre, ##-1## est une valeur spéciale indiquant "pas de changements".) ##//x//## - optional - set x coordinate + facultatif - coordonnée x ##//y//## - optional - set y coordinate + facultatif - coordonnée y ##//visibility//## - optional - set visibility: ##1## indicates visible, ##0## indicates hidden + facultatif - visibilité: ##1## signifie visible, ##0## signifie invisible ##//clip//## - optional - set clipping: ##1## indicates mouse is clipped to graphics window, ##0## indicates no clipping + facultatif - limitation fenêtre: ##1## souris limitée par rapport à la fenêtre graphique, ##0## signifie pas de limitation -{{fbdoc item="ret"}} - Zero (##0##) on success, non-zero to indicate failure. +{{fbdoc item="section" value="Valeur retournée + Zéro (##0##) si succès, non-zéro pour indiquer un échec. {{fbdoc item="desc"}} - ##**Setmouse**## will set the (##//x//##, ##//y//##) coordinates of the mouse pointer, as well as setting its visibility. THe mouse position is set using the ##//x//## and ##//y//## parameters. The mouse will be visible if visibility is set to ##1##, and invisible if visibility is set to ##0##. ##**Setmouse**## is intended for graphics modes initiated using the ##[[KeyPgScreengraphics Screen (Graphics)]]## statement only. + ##**SetMouse**## validera les coordonnées (##//x//##, ##//y//##) du pointeur de la souris, ainsi que la visibilité de celui-ci. La position de la souris est validée en utilisant les paramètres ##//x//## et ##//y//##. La souris sera visible si ##//visibility//## est mise à ##1##, et invisible si mise à ##0##. ##**SetMouse**## est destiné aux modes graphiques initialisés seulement avec ##[[KeyPgScreengraphics Screen (Graphics)]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/setmouse.bas"}}%%(freebasic) Dim As Integer x, y, buttons -' create a screen 640*480 +' cree un ecran 640*480 ScreenRes 640, 480 Print "Click the mouse button to center the mouse" Do - ' get mouse x, y and button state (wait until mouse is onscreen) + ' recupere etat x, y et bouton (attend tant que souris est sur ecran) Do: Sleep 1: Loop While GetMouse( x, y , , buttons) <> 0 If buttons And 1 Then - ' on left mouse click, center mouse + ' si clique bouton gauche, souris centre SetMouse 320, 240 End If - ' run loop until Escape is pressed + ' boucle jusqu'a Escape est appuyé Loop Until Inkey = Chr(27) %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Setmouse""**##. + - Non disponible en dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Setmouset**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgGetmouse Getmouse]]## diff --git a/fbdocs/manual/cache/KeyPgSettime.wakka b/fbdocs/manual/cache/KeyPgSettime.wakka index 81ea57888c..caab70c3f0 100644 --- a/fbdocs/manual/cache/KeyPgSettime.wakka +++ b/fbdocs/manual/cache/KeyPgSettime.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SETTIME"}}---- -Sets the current system time +Fixe l'heure courante du système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Settime** ( [[KeyPgByref byref]] //newtime// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Sets the current system time ## {{fbdoc item="param"}} ##//newtime//## - the new time to set + la nouvelle heure à valider -{{fbdoc item="ret"}} - Returns zero on success or non-zero on failure on all ports except DOS. +{{fbdoc item="section" value="Valeur retournée + Retourne zéro si succès ou non-zéro si échec sur tous les ports sauf DOS. {{fbdoc item="desc"}} - To set the time, format the date and send to ##Settime## in one of the following formats: ##"hh:mm:ss"##, ##"hh:mm"##, or ##"hh"## (##hh## is the hour, ##mm## is the minute, and ##ss## is the second). + Pour fixer la nouvelle heure, formatez seulement ##//newtime//## et envoyez-le à ##**SetDate**## dans l'un des formats valides qui suivent: ##"hh:mm:ss"##, ##"hh:mm"##, ou ##"hh"## (##hh## est l'heure, ##mm## les minutes, and ##ss## les secondes). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/settime.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ SETTIME "1:20:30" %% {{fbdoc item="diff"}} - - The ##[[KeyPgTime Time]]## statement was used QB and the syntax was ##TIME = //newtime//##. + - La déclaration ##[[KeyPgTime Time]]## était utilisée dans QB et la syntaxe était "##TIME = //newtime//##. {{fbdoc item="see"}} - ##[[KeyPgTime Time]]## diff --git a/fbdocs/manual/cache/KeyPgSgn.wakka b/fbdocs/manual/cache/KeyPgSgn.wakka index 2ca638f19b..d17cd793b4 100644 --- a/fbdocs/manual/cache/KeyPgSgn.wakka +++ b/fbdocs/manual/cache/KeyPgSgn.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SGN"}}---- -Returns the sign part of a number +Renvoie la partie signe d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,18 +9,18 @@ Returns the sign part of a number ## {{fbdoc item="param"}} ##//number//## - the number + le nombre -{{fbdoc item="ret"}} - Returns the sign part of ##//number//##. - - If //number// is greater than zero, then SGN returns 1. - - If //number// is equal to zero, then SGN returns 0. - - If //number// is less than zero, then SGN returns -1. +{{fbdoc item="section" value="Valeur retournée + Renvoie la partie signe de ##//number//##. + - Si //number// est supérieur à zéro, SGN retourne 1. + - Si //number// est égal à zéro, SGN retourne 0. + - Si //number// est inférieur à zéro, SGN retourne -1. {{fbdoc item="desc"}} - The required ##//number//## argument can be any valid numeric expression. If ##//number//## is an uninitialized variable, zero is returned. + L'argument obligatoire ##//number//## peut être n'importe quelle expression numérique valide. Si ##//number//## est une variable non initialisée, zéro est retourné. - The ##**Sgn**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types. + L'##[[KeyPgOperator Operator]]## unaire ##**Sgn**## peut être surchargé avec un type défini par l'utilisateur. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/sgn.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ PRINT SGN ( 42.658 ) PRINT SGN ( N ) %% -The output would look like: +Affichera: %% -1 0 @@ -41,10 +41,10 @@ The output would look like: %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, cet opérateur ne peut pas être surchargé. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgAbs Abs]]## diff --git a/fbdocs/manual/cache/KeyPgShared.wakka b/fbdocs/manual/cache/KeyPgShared.wakka index a3f6d60dc0..759b5a5272 100644 --- a/fbdocs/manual/cache/KeyPgShared.wakka +++ b/fbdocs/manual/cache/KeyPgShared.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SHARED"}}---- -Variable declaration modifier specifying visibility throughout a module +Modificateur de déclaration de variable spécifiant sa visibilité à travers un module {{fbdoc item="syntax"}}## [[KeyPgDim Dim]] **Shared** ... @@ -7,9 +7,9 @@ Variable declaration modifier specifying visibility throughout a module [[KeyPgCommon Common]] **Shared** ... ## {{fbdoc item="desc"}} - ##Shared## makes module-level variables visible inside ##[[KeyPgSub Sub]]##s and ##[[KeyPgFunction Function]]##s. If ##Shared## is not used on a module-level variable's declaration, it is stored on the stack of the implicit main function and therefore only visible to the module-level code in that file. + ##**Shared**## rend les variables de niveau module visibles à l'intérieur des ##[[KeyPgSub Sub]]##s et des ##[[KeyPgFunction Function]]##s. Si ##**Shared**## n'est pas utilisé dans une déclaration de variable de niveau module, elle est stockée sur la pile de la fonction "main" implicite et donc visible uniquement pour le code au niveau du module dans ce fichier. - Note: A shared variable may only be initialised with a constant value: its starting value is set at the start of the program before any code is run, and so it cannot depend on any variables or functions in it. + Note: Une variable "shared"(partagée) peut être initialisée seulement avec une valeur constante: may only be initialised with a constant value: sa valeur de départ est fixée au début du programme avant qu'aucun code ne soit exécuté, et ainsi il ne peut pas dépendre des variables ou des fonctions contenues dans ce programme. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/variable/shared.bas"}}%%(freebasic) @@ -33,7 +33,7 @@ End Sub %% {{fbdoc item="diff"}} - - The ##Shared## statement inside scope blocks -- functions, subs, if/thens, and loops -- is not supported. Use ##Dim##|##Redim##|##Common Shared## in the main program instead. Or if you're inside a scope block and ##Redim##ming a variable or array previously set up with ##Shared##, just do a ##Redim## without ##Shared##; it will work fine and won't ruin anything. + - La déclaration ##//Shared//## à l'intérieur de blocs de visibilité -- fonctions, sub, if/then, et boucles -- n'est pas supporté. Utilisez plutôt ##//Dim//##|##//Redim//##|##//Common Shared//## dans le programme principal. Si vous êtes dans un bloc de visibilité et que vous ##//Redim//##ensionnez une variable ou un tableau précédemment mis en place avec ##//Shared//##, exécutez seulement un ##//Redim//## sans ##//Shared//##; cela fonctionnera très bien et ne détruira rien. {{fbdoc item="see"}} - ##[[KeyPgCommon Common]]## diff --git a/fbdocs/manual/cache/KeyPgShell.wakka b/fbdocs/manual/cache/KeyPgShell.wakka index 59d8d9cb4f..a34e3e566f 100644 --- a/fbdocs/manual/cache/KeyPgShell.wakka +++ b/fbdocs/manual/cache/KeyPgShell.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SHELL"}}---- -Sends a command to the system command interpreter +Envoie une commande à l'interpréteur de commandes du système {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Shell** ( [[KeyPgByref byref]] //command// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,13 +9,13 @@ Sends a command to the system command interpreter ## {{fbdoc item="param"}} ##//command//## - A string specifying the command to send to the command interpreter. + Une chaîne spécifiant la commande à envoyer à l'interpréteur de commandes. -{{fbdoc item="ret"}} - If ##//command// = ""##, or else the command could not be executed, -1 is returned. Otherwise, the command is executed and its exit code is returned. +{{fbdoc item="section" value="Valeur retournée + Si ##//command// = ""##, ou encore la commande n'a pas pu être exécutée, -1 est renvoyé. Sinon, la commande est exécutée et son code de sortie est renvoyé. {{fbdoc item="desc"}} - Program execution will be suspended until the command interpreter exits. + L'exécution du programme sera suspendu jusqu'à ce que l'interpréteur de commandes s'arrête. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/shell.bas"}}%%(freebasic) @@ -27,15 +27,15 @@ shell "ls" %% {{fbdoc item="target"}} - - Linux requires the //command// case matches the real name of the command. Windows and DOS are case insensitive. The program being shelled may be case sensitive for its command line parameters. - - Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes. + - Linux nécessite que la casse de ##//command//## corresponde au nom réel de la commande. Windows et DOS ne sont pas sensibles à la casse. Le programme exécuté dans le "shell" peut être sensible à la casse pour ses paramètres de ligne de commande. - Les séparateurs de chemin de Linux sont des barres obliques /. Windows utilise des barres obliques vers l'arrière \ mais il admet des barres obliques . DOS utilise des barres obliques en arrière \. + {{fbdoc item="diff"}} -{{fbdoc item="diff"}} - - QB allowed SHELL on its own without a "command" argument which caused a default command shell to be started. Execution in the main program would suspend until exit from the command shell. +- QB permet SHELL de sa propre initiative, sans un argument "commande" qui démarre une commande "shell", par défaut. L'exécution dans le programme principal sera suspendue jusqu'à la sortie de l'interpréteur de commandes. + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgExec Exec]]## +- ##[[KeyPgExec Exec]]## + - ##[[KeyPgRun Run]]## - ##[[KeyPgRun Run]]## {{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgShort.wakka b/fbdocs/manual/cache/KeyPgShort.wakka index 3b89e45077..c52c2be2dc 100644 --- a/fbdocs/manual/cache/KeyPgShort.wakka +++ b/fbdocs/manual/cache/KeyPgShort.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="SHORT"}}---- -Standard data type: 16 bit signed +Type de données standard: nombre entier signé de 16 bits {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Short** ## {{fbdoc item="desc"}} - 16-bit signed whole-number data type. Can hold values from -32768 to 32767. + Type de données: nombre entier signé de 16 bits. Peut contenir des valeurs de -32768 à 32767. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/short.bas"}}%%(freebasic) @@ -13,15 +13,15 @@ Standard data type: 16 bit signed Dim y As Short = CShort(&H7FFF) Print "Short Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%Short Range = -32768 to 32767%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Short""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Short**##. {{fbdoc item="diff"}} - - The name "short" is new to ""FreeBASIC"", however they are the same as integers in QB + - Le nom "short" est nouveau pour FreeBASIC, toutefois, ils sont identiques aux entiers de QB {{fbdoc item="see"}} - ##[[KeyPgUshort Ushort]]## diff --git a/fbdocs/manual/cache/KeyPgSin.wakka b/fbdocs/manual/cache/KeyPgSin.wakka index 9f664aba4c..b64b5054d4 100644 --- a/fbdocs/manual/cache/KeyPgSin.wakka +++ b/fbdocs/manual/cache/KeyPgSin.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SIN"}}---- -Returns the sine of a number +Retourne le sinus d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sin** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Returns the sine of a number ## {{fbdoc item="param"}} ##//number//## - the angle (in radians) + l'angle (en radians) -{{fbdoc item="ret"}} - Returns the sine of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of -1 to 1. +{{fbdoc item="section" value="Value retournée + Retourne le sinus de l'argument ##//number//## comme un ##[[KeyPgDouble Double]]## dans l'intervalle de -1 à 1. {{fbdoc item="desc"}} - The argument ##//number//## is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). The required ##//number//## argument can be any valid numeric expression. If ##//number//## is an uninitialized variable, zero is returned. + L'argument ##//number//## est mesuré en [[TutMathAngles radians]] (non pas en [[TutMathAngles degrés]]). L'argument obligatoire ##//number//## peut être n'importe quelle expression numérique valide. Si ##//number//## est une variable non-initialisée, zéro est retourné. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/sin.bas"}}%%(freebasic) @@ -23,23 +23,23 @@ CONST PI AS DOUBLE = 3.1415926535897932 DIM a AS DOUBLE DIM r AS DOUBLE INPUT "Please enter an angle in degrees: ", a -r = a * PI / 180 'Convert the degrees to Radians +r = a * PI / 180 'Convert the degrees to Radians PRINT "" PRINT "The sine of a" ; a; " degree angle is"; SIN ( r ) SLEEP %% -The output would look like: +Affichera: %% Please enter an angle in degrees: 30 The sine of a 30 degree angle Is 0.5 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgAsin Asin]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgSingle.wakka b/fbdocs/manual/cache/KeyPgSingle.wakka index 6b3e18d442..9cef40eb52 100644 --- a/fbdocs/manual/cache/KeyPgSingle.wakka +++ b/fbdocs/manual/cache/KeyPgSingle.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="SINGLE"}}---- -Standard data type: 32 bit floating point +Type de données standard: nombre à virgule flottante de 32 bits {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Single** ## {{fbdoc item="desc"}} - Single is a 32-bit, floating point data type used to store decimal numbers. They can hold positive values in the range ##1.401298e-45## to ##3.402823e+38##, or negative values in the range ##-1.401298e-45## to ##-3.402823e+38##, or zero (##0##). They contain at most 24 bits of precision, or about 6 decimal digits. + ##**Single**## est un type de nombre de 32 bits, à virgule flottante utilisé pour stocker des nombres décimaux. Ils peuvent contenir des valeurs de ##1.401298e-45## à ##3.402823e+38##, ou des valeurs négatives de ##-1.401298e-45## à ##-3.402823e+38##, ou zéro (##0##). Ils ont une précision au plus de 24 bits ou de 6 chiffres après la virgule. - They are similar to ##[[KeyPgDouble Double]]## data types, but less precise. + Ils sont similaires aux ##[[KeyPgDouble Double]]##, mais moins précis. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/single.bas"}}%%(freebasic) @@ -21,11 +21,11 @@ sleep %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgDouble Double]]## More precise float type + - ##[[KeyPgDouble Double]]## Type de nombres à virgule flottante plus précis - ##[[KeyPgCsng Csng]]## - - [[TblVarTypes]] Table with variable types overview, limits and suffixes + - ##[[TblVarTypes Types de variables standard et leurs limites]]##: Tableau des types de variables, leurs limites et suffixes {{fbdoc item="back" value="CatPgStdDataTypes|Standard Data Types"}} diff --git a/fbdocs/manual/cache/KeyPgSizeof.wakka b/fbdocs/manual/cache/KeyPgSizeof.wakka index 0a4678f86c..300bdcc81a 100644 --- a/fbdocs/manual/cache/KeyPgSizeof.wakka +++ b/fbdocs/manual/cache/KeyPgSizeof.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="SIZEOF"}}---- -Returns the size of a variable or type in bytes. +Retourne la taille d'une variable ou d'un type en octets. {{fbdoc item="syntax"}}## **Sizeof** ( //variable// | [[DataType DataType]] ) ## {{fbdoc item="desc"}} - The ##**Sizeof**## operator returns the number of bytes taken up by a ##//variable//## or ##[[DataType DataType]]##. + L'opérateur ##**SizeOf**## retourne le nombre d'octets prises par une ##//variable//## ou un ##[[DataType DataType]]##. - Different from ##[[KeyPgLen Len]]##, when used with fixed-length strings (including fixed-length ##[[KeyPgZstring Zstring]]##s and ##[[KeyPgWstring Wstring]]##s) it will return the number of bytes they use, and when used with variable-length strings, it will return the size of the string descriptor. + Différent de ##[[KeyPgLen Len]]##, lorsqu'il est utilisé avec des chaînes de longueur fixe (inclus les chaînes à longueur fixe ##[[KeyPgZstring ZString]]## et ##[[KeyPgWstring WString]]##) il retournera le nombre d'octets qu'elles utilisent, et quand il est utilisé avec des chaînes de longueur variable, il retournera la longueur de descripteur de chaîne. - Note: When used with arrays, ##**Sizeof**## returns the size of a single element of the array. This differs from its behavior in C, where arrays could only be a fixed size, and ##sizeof()## would return the number of it used. - For clarity, it is recommended that you avoid this potential confusion, and use ##**Sizeof**## directly on an array element, rather than the whole array. + Note: Lors d'une utilisation avec des tableaux, ##**SizeOf**## retourne la taille d'un seul élément du tableau. Ceci différe du comportement en langage C, où les tableaux ne peuvent avoir qu'une taille fixée, et ##sizeof()## retournera le nombre qui est utilisé. + Pour plus de clarté, il est recommandé d'éviter cette confusion potentielle, et utiliser ##**SizeOf**## directement sur un élément de tableau, plutôt que sur le tableau entier. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/misc/sizeof.bas"}}%%(freebasic) @@ -27,10 +27,10 @@ Print SizeOf(foo) {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Sizeof""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Sizeof**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLen Len]]## diff --git a/fbdocs/manual/cache/KeyPgSleep.wakka b/fbdocs/manual/cache/KeyPgSleep.wakka index 74fec35c7e..3fb02d9b3b 100644 --- a/fbdocs/manual/cache/KeyPgSleep.wakka +++ b/fbdocs/manual/cache/KeyPgSleep.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SLEEP"}}---- -Waits until a specified time has elapsed, or a key is pressed. +Attend jusqu'à ce qu'un certain délai soit écoulé ouqu'une touche soit appuyée. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sleep** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //amount// [[KeyPgAs as]] [[KeyPgInteger integer]] = -1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,20 +10,20 @@ Waits until a specified time has elapsed, or a key is pressed. ## {{fbdoc item="param"}} ##//amount//## - Optional number of milliseconds to wait (default is to wait for a key press). + Nombre facultatif de millisecondes à attendre (par défaut on attend qu'une touche soit appuyée). ##//keyflag//## - Optional flag; give it a value of 1 to specify that the wait cannot be interrupted by a key press. + Drapeau optionnel; lui donner une valeur de 1 sert à préciser que l'attente ne peut être interrompue par une touche. {{fbdoc item="desc"}} - ##**Sleep**## will wait until ##//amount//## milliseconds (can be seconds in //[[CompilerOptlang -lang qb]]//, see below) given elapsed (if any value was passed) or until the user presses a key. If ##//amount//## is below 100 ms then ##**Sleep**## will always wait the full requested amount (key presses are ignored). + ##**Sleep**## attendra jusqu'à ce que ##//amount//## millisecondes (peut être en secondes dans //[[CompilerOptlang -lang qb]]//, voir plus loin) soit écoulé (si une valeur a été passée) ou jusqu'à ce que l'utilisateur appuie sur une touche. Si ##//amount//## est inférieur à 100 ms, alors ##**Sleep**## attendra toujours le temps demandé au complet (appui sur touche ignoré). - Include the second parameter, ##1##, for a "deep" sleep, which cannot be interrupted by pressing a key. + Inclure le second paramètre, ##1##, pour un "profond" du sommeil, qui ne peut être interrompu en appuyant sur une touche. - The accuracy of ##**Sleep**## is variable depending on the OS cycle time (Windows NT/2K/XP: 15 ms, 9x/Me: 50 ms, Linux 10ms, DOS 55 ms). + La précision de ##**Sleep**## est variable en fonction de la durée du cycle du système d'exploitation (Windows NT/2K/XP: 15 ms, 9x/Me: 50 ms, Linux 10ms, DOS 55 ms). - Call ##**Sleep**## with 25ms or less to release time-slice when waiting for user input or looping inside a thread. This will prevent the program from unnecessarily hogging the CPU. + Appeler ##**Sleep**## avec 25ms ou moins pour réaliser un découpage du temps lors de l'attente d'une entrée utilisateur ou d'une boucle dans un "thread". Cela permettra d'éviter que le programme monopolise inutilement le CPU. - ##**Sleep**## does not clear the keyboard buffer and any keys pressed during a call to ##**Sleep**## are retained and can be read using ##[[KeyPgInkey Inkey]]##. In order to wait for a key press, and remove the key from the buffer, ##[[KeyPgGetkey Getkey]]## can be used instead. + ##**Sleep**## n'efface pas la mémoire tampon du clavier et les touches pressées lors d'un appel à ##**Sleep**## sont conservée et peuvent être lues avec ##[[KeyPgInkey Inkey]]##. Afin d'attendre l'appui sur une touche et retirer la clé du tampon mémoire, ##[[KeyPgGetkey GetKey]]## peut être utilisé à la place. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/sleep.bas"}}%%(freebasic) @@ -35,12 +35,12 @@ sleep 500 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the ##//amount//## value is in **milliseconds**. - - In the //[[CompilerOptlang -lang qb]]// dialect, the ##//amount//## value is in **seconds** as in QB. If the second parameter ##//keyflag//## is given, or the keyword is written as ##**""__Sleep""**## the value is expected to be in **milliseconds**. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, la valeur de ##//amount//## est en **millisecondes**. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, la valeur de ##//amount//## est en **secondes** comme dans QB. Si le deuxième paramètre ##//keyflag//## est donné, ou le mot-clé ##**__Sleep**## est donné, la valeur est attendue en **millisecondes**. {{fbdoc item="diff"}} - - None in the //[[CompilerOptlang -lang qb]]// dialect. - - In QB, the delay was given in whole seconds only and did not support the ##//keyflag//## parameter. + - Aucune dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Dans QB, le délai est donné secondes et le paramètre ##//keyflag//## n'est pas supporté. {{fbdoc item="see"}} - ##[[KeyPgTimer Timer]]## diff --git a/fbdocs/manual/cache/KeyPgSpace.wakka b/fbdocs/manual/cache/KeyPgSpace.wakka index b316db2211..59909719e7 100644 --- a/fbdocs/manual/cache/KeyPgSpace.wakka +++ b/fbdocs/manual/cache/KeyPgSpace.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SPACE"}}---- -Creates a string of a given length filled with spaces (##" "##) +Crée une chaîne d'une longueur donnée remplie avec des espaces (##" "##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Space**( [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -9,13 +9,13 @@ Creates a string of a given length filled with spaces (##" "##) ## {{fbdoc item="param"}} ##//count//## - An integer type specifying the length of the string to be created. + Un entier spécifiant la longueur de la chaîne à créer. -{{fbdoc item="ret"}} - The created string. An empty string will be returned if ##//count//## <= 0. +{{fbdoc item="section" value="Valeur retournée + La chaîne créée. Une chaîne vide est retournée si ##//count//## <= 0. {{fbdoc item="desc"}} - ##**Space**## creates a string with the specified number of spaces. + ##**Space**## crée une chaîne avec le nombre spécifié d'espaces. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/space.bas"}}%%(freebasic) @@ -25,11 +25,11 @@ print a ' prints: x x %% {{fbdoc item="lang"}} - - The string type suffix ##$## is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix ##$## is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne ##$## est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne ##$## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWspace Wspace]]## diff --git a/fbdocs/manual/cache/KeyPgSpc.wakka b/fbdocs/manual/cache/KeyPgSpc.wakka index 2568c26678..114ab5ce10 100644 --- a/fbdocs/manual/cache/KeyPgSpc.wakka +++ b/fbdocs/manual/cache/KeyPgSpc.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SPC"}}---- -Output function to skip spaces when writing to screen or file +Fonction qui affiche des espaces supplémentaires lors d'une écriture à l'écran ou dans un fichier {{fbdoc item="syntax"}}## **Spc**( //columns// ) @@ -9,10 +9,10 @@ Output function to skip spaces when writing to screen or file ## {{fbdoc item="param"}} ##//spaces//## - number of spaces to skip + nombre d'espaces à ajouter {{fbdoc item="desc"}} - ##**Spc**## skips over the given number of ##//spaces//## when ##[[KeyPgPrint Print]]##ing to screen or to a file. The character cells skipped over are left unchanged. + ##**Spc**## ajoute un certain nombre d'espaces ##//(spaces)//## lors d'un ##[[KeyPgPrint Print]]## à l'écran ou dans un fichier. Les cellules caractère sautées restent inchangées. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/spc.bas"}}%%(freebasic) @@ -36,7 +36,7 @@ Print A1; Spc(35 - Len(A1)); B1 Print A2; Spc(35 - Len(A2)); B2 %% -The output would look like: +La sortie ressemblera à: ##%% FIRST NAME LAST NAME ---------- ---------- @@ -45,7 +45,7 @@ Bob Smith %%## {{fbdoc item="diff"}} - - In QBASIC, spaces were printed in the gap, while in ""FreeBASIC"", the characters are just skipped over and left untouched. The ##[[KeyPgSpace Space]]## function can still be used to achieve this effect. + - En QBASIC, des espaces sont imprimés dans l'intervalle, tandis que dans FreeBasic, les caractères sont simplement sautés et laissés intacts. La fonction ##[[KeyPgSpace Space]]## peut être utilisée dans le même but. {{fbdoc item="see"}} - ##[[KeyPgTab Tab]]## diff --git a/fbdocs/manual/cache/KeyPgSqr.wakka b/fbdocs/manual/cache/KeyPgSqr.wakka index 6af0b4de4e..3b86656ab1 100644 --- a/fbdocs/manual/cache/KeyPgSqr.wakka +++ b/fbdocs/manual/cache/KeyPgSqr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SQR"}}---- -Returns a square root of a number +Retourne la racine carrée d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sqr** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,17 +9,17 @@ Returns a square root of a number ## {{fbdoc item="param"}} ##//number//## - the number (greater than or equal to zero) + le nombre (supérieur ou égal à zéro) -{{fbdoc item="ret"}} - Returns the square root of the argument ##//number//##. +{{fbdoc item="section" value="Valeur retournée + Retourne la racine carrée de l'argument ##//number//##. - If ##//number//## equals zero, **Sqr** returns zero. + Si ##//number//## égale zéro, **Sqr** retourne zéro. - If ##//number//## is less than zero, **Sqr** returns a special value representing "not defined", printing like """NaN""" or "IND", exact text is platform dependent. + Si ##//number//## inférieur à zéro, **Sqr** retourne une valeur spéciale signifiant "non défini", affichée "NaN" ou "IND", le texte exact dépendant de la plate-forme de travail. {{fbdoc item="desc"}} - This is the same as raising the argument //number// to the one-half power: y = x ^ (1/2) . The required ##//number//## argument can be any valid numeric expression greater than or equal zero. + C'est identique à l'élévation de l'argument //number// à la puissance un demi: y = x ^ (1/2) . L'argument obligatoire ##//number//## peut ê tre n'importe expression numérique valide supérieure ou égale à zéro. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/sqr.bas"}}%%(freebasic) @@ -36,7 +36,7 @@ PRINT "The hypotenuse has a length of: " ; SQR ( a * a + b * b ) SLEEP %% -The output would look like: +Affichera: %% Pythagorean theorem , right triangle @@ -47,9 +47,9 @@ The hypotenuse has a length of: 5 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - [[CatPgMath Arithmetic Operators]] + - [[CatPgMath Les opérateurs arithmétiques]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgStatic.wakka b/fbdocs/manual/cache/KeyPgStatic.wakka index c7587ed827..7812ca8061 100644 --- a/fbdocs/manual/cache/KeyPgStatic.wakka +++ b/fbdocs/manual/cache/KeyPgStatic.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="STATIC"}}---- -Defines variables, objects and arrays having static storage +Définit les variables, les objets et les tableaux ayant un stockage statique {{fbdoc item="syntax"}}## **Static** //symbol// [ ( [ //subscripts// ] ) ] [ [[KeyPgAs as]] [[DataType DataType]] ] [ , ... ] - //or// + //ou// { [[KeyPgSub sub]]|[[KeyPgFunction function]] } //proc_header// **Static** [ ... ] [[KeyPgEndblock end]] { [[KeyPgSub sub]]|[[KeyPgFunction function]] } ## {{fbdoc item="param"}} ##//symbol//## - variable or array symbol name. + nom symbole d'une variable ou d'un tableau. ##//subscripts//## - a comma-separated list of subscript ranges. + une liste de "subscript ranges" séparés par des virgules. ##//proc_header//## - procedure header for a procedure definition. + entête de procédure pour une définition de la procédure. {{fbdoc item="desc"}} - Specifies [[ProPgStorageClasses static storage]] for variables, objects and arrays; they are allocated at program startup and deallocated upon exit. Objects are constructed once when they are defined, and destructed upon program exit. + Spécifie [[ProPgStorageClasses stockage statique]] pour des variables, des objets et des tableaux; l'allocation ayant lieu au démarrage du programme et la désallocation à sa fermeture. Les objets sont construits dès qu'ils sont définis et détruits à la fermeture du programme. - When declaring static arrays, only [[ProPgLiterals numeric literals]], [[KeyPgConst constants]] or [[KeyPgEnum enumerations]] may be used as subscript range values. Static variable-length arrays must be declared empty (no subscript range list) and resized using ##[[KeyPgRedim Redim]]## before used. + Lors de la déclaration de tableaux statiques, seuls les [[ProPgLiterals littéraux numériques]], les [[KeyPgConst Constantes]] ou les [[KeyPgEnum Enumérations]] peuvent être utilisés comme valeurs de la plage d'indices. Les tableaux statiques de longueur variable doivent être déclarés vides (pas de liste de plage d'indices) et redimensionnés en utilisant ##[[KeyPgRedim ReDim]]## avant utilisation. - In both iterative and recursive blocks, like looping [[CatPgControlFlow control flow statements]] or procedures, static variables, objects and arrays local to the block are guaranteed to occupy the same storage across all instantiations of the block. For example, procedures that call themselves - either directly or indirectly - share the same instances of their local static variables. + Dans les blocs itératifs et récursifs, comme les boucles de [[CatPgControlFlow déclaration de contrôle de flux]] ou les procédures, les variables statiques, les objets et les tableaux locaux du bloc sont garantis d'occuper le même espace de stockage dans toutes les instanciations du bloc. Par exemple, des procédures qui s'appellent elles-mêmes - que ce soit directement ou indirectement - partagent les mêmes instances de leurs variables locales statiques. - When used with module-level and member procedure declarations, ##**Static**## specifies [[ProPgStorageClasses static storage]] for all local variables, objects and arrays. + Lorsqu'il est utilisé au niveau module et de déclarations de procédure membre, ##**Static**## spécifie [[ProPgStorageClasses stockage statique]] pour toutes les variables locales, objets et tableaux. - ##[[KeyPgStaticMember Static (Member)]]## is also used in member procedure declarations to specify static member procedures. + ##[[KeyPgStaticMember Static (Membre)]]## est aussi utilisé pour des déclarations de procédure membre pour spécifier des procédures membre statiques. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/variable/static.bas"}}%%(freebasic) @@ -49,16 +49,16 @@ Number of times called: 2 %% {{fbdoc item="diff"}} - - ""QuickBASIC"" allows variables and arrays to be declared using the ##**Static**## keyword within procedures and ##DEF FN## routines only. - - ##**Static**## forces local visibility of variables and arrays in ""QuickBASIC"" ##DEF FN## routines. ""FreeBASIC"" supports neither ##DEF FN## routines nor this usage of ##**Static**##. - - Using ##[[KeyPgStaticMember Static]]## to specify static member procedures is new to ""FreeBASIC"". + - QuickBASIC permet de déclarer les variables et les tableaux en utilisant le mot clé ##**Static**## seulement dans les procédures et les routines ##DEF FN##. - ##**Static**## force la visibilité locale des variables et des tableaux dans les routines QuickBASIC ##DEF FN##. FreeBASIC ne supporte ni les routines ##DEF FN## ni cette utilisation de ##**Static**##. + - Utiliser ##[[KeyPgStaticMember Static]]## pour spécifier des membres de procédures statiques est nouveau pour FreeBASIC. + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - ##[[KeyPgStaticMember Static (Member)]]## - - ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]## +- ##[[KeyPgStaticMember Static (Member)]]## + - ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim ReDim]]## - ##[[KeyPgSub Sub (Module)]]##, ##[[KeyPgFunction Function (Module)]]## - ##[[KeyPgMemberSub Sub (Member)]]##, ##[[KeyPgMemberFunction Function (Member)]]## - ##[[KeyPgOptionstatic Option Static]]## - ##[[ProPgStorageClasses Storage Classes]]## + - ##[[ProPgStorageClasses Storage Classes]]## {{fbdoc item="back" value="CatPgProcedures|Procedures"}}{{fbdoc item="back" value="CatPgVariables|Variable Declarations"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgStaticMember.wakka b/fbdocs/manual/cache/KeyPgStaticMember.wakka index df2fa75ab4..0b9e9a03ce 100644 --- a/fbdocs/manual/cache/KeyPgStaticMember.wakka +++ b/fbdocs/manual/cache/KeyPgStaticMember.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STATIC (Member)"}}---- -Declaration specifier for a static member procedure. +Spécificateur de déclaration de membre statique d'une procédure. {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -8,14 +8,14 @@ Declaration specifier for a static member procedure. ## {{fbdoc item="param"}} ##//typename//## - name of a user defined data type + nom d'un type de données défini par l'utilisateur ##//membertype//## - ##[[KeyPgMemberSub Sub]]## or ##[[KeyPgMemberFunction Function]]##. + ##[[KeyPgMemberSub Sub]]## ou ##[[KeyPgMemberFunction Function]]##. ##//membername// ...## - Name of the member to declare or define with parameter list or return value following. + Nom du membre à déclarer ou définir avec la liste de paramètres ou valeur de retour qui suit. {{fbdoc item="desc"}} - When declaring a member procedure, ##**Static**## specifies that the member procedure not have an implicit instance argument passed to it, and thus can only access values passed to it. Static member procedures may access Private or Protected members in their type, but to call procedures you must pass the Object as an additional first parameter. You may call a static member procedure anywhere in your code just like any other procedure in a type, i.e. //variable of the type//.//static procedure name//(//arguments//). The address of a static member function can also be assigned to a function pointer using the standard [[KeyPgOpProcptr ProcPtr()]] or the [[KeyPgOpAt @ Operator]] usage. + Lors de la déclaration d'un membre de procédure, ##**Static**## indique que le membre de la procédure n'a pas une instance d'argument implicite qui lui est passée, et par conséquent ne peut accéder qu'aux valeurs qui lui sont passées. Les membres statiques des procédures peuvent accéder aux membres "Private" ou "Protected" dans leur type, mais pour appeler les procédures vous devez passer l'Object comme un premier paramètre additionnel. Vous pouvez appeler une procédure membre statique n'importe où dans votre code, tout comme n'importe quelle autre procédure dans un type, à savoir //variable of the type//.//static procedure name//(//arguments//). L'adresse d'une fonction membre statique peut également être affectée à un pointeur de fonction en utilisant l'utilisation standard [[KeyPgOpProcptr Procptr()]] ou [[KeyPgOpAt @ Operator]]. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/static.bas"}}%%(freebasic) @@ -83,7 +83,7 @@ next i %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## diff --git a/fbdocs/manual/cache/KeyPgStdcall.wakka b/fbdocs/manual/cache/KeyPgStdcall.wakka index 7604a87f43..c61d4ca64b 100644 --- a/fbdocs/manual/cache/KeyPgStdcall.wakka +++ b/fbdocs/manual/cache/KeyPgStdcall.wakka @@ -1,38 +1,38 @@ {{fbdoc item="title" value="STDCALL"}}---- -Specifies a //stdcall//-style calling convention in a procedure declaration +Spécifie une convention d'appel de style-//stdcall// dans une déclaration de procédure {{fbdoc item="syntax"}}## - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Stdcall** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **stdcall** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Stdcall** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[KeyPgDeclare Declare]] [[[KeyPgStatic Static]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **stdcall** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **Stdcall** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgOverload Overload]]] **stdcall** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[[KeyPgModuleConstructor Constructor]] [//priority//]] [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgSub Sub]] - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **Stdcall** [[[KeyPgAlias Alias]] //"""external_name"""//] [([//parameter_list//])] [[KeyPgAs as]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] [[KeyPgFunction Function]] //procedure_name// [[[KeyPgOverload Overload]]] **stdcall** [[[KeyPgAlias Alias]] //"external_name"//] [([//parameter_list//])] [[KeyPgAs As]] //return_type// [[[KeyPgStatic Static]]] [[[KeyPgExport Export]]] //..procedure body..// [[KeyPgEnd End]] [[KeyPgFunction Function]] ## {{fbdoc item="desc"}} - In procedure declarations, ##**Stdcall**## specifies that a procedure will use the //stdcall// calling convention. In the //stdcall// calling convention, any parameters are to be passed (pushed onto the stack) in the reverse order in which they are listed, that is, from right to left. The procedures need not preserve the ##EAX##, ##ECX## or ##EDX## registers, and must clean up the stack (pop any parameters) before it returns. + Dans une déclaration de procédure, ##**stdcall**## précise que la procédure va utiliser la convention d'appel //stdcall//. Dans la convention d'appel //stdcall//, tous les paramètres doivent être passés (push = pousser sur la pile) dans l'ordre inverse de celui où ils ont été listés, c'est à dire, de la droite vers la gauche. Les procédures n'ont pas besoin de préserver les registres ##EAX##, ##ECX## ou ##EDX## et doivent nettoyer la pile (pop = sortir tous les paramètres) avant le retour. - ##**Stdcall**## is not allowed to be used with variadic procedure declarations (those with the last parameter listed as "##[[KeyPgDots ...]]##"). + ##**stdcall**## n'est pas autorisé à être utilisé avec les déclarations de procédures "à variations" (variadic) (celles qui ont le dernier paramètre répertorié par "##[[KeyPgDots ...]]##"). - //stdcall// is the default calling convention on Windows, unless another calling convention is explicitly specified or implied by one of the [[KeyPgExternBlock EXTERN blocks]]. //stdcall// is also the standard (or most common) calling convention used in BASIC languages, and the Windows API. + //stdcall// est la convention d'appel par défaut sous Windows, è moins qu'une autre convention d'appel ne soit explicitement spécifiée ou implicitement par [[KeyPgExternBlock Extern Blocks]]. //stdcall// est aussi la convention standard (ou la plus commune) utilisée par les langages BASIC et de l'API Windows. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/stdcall.bas"}}%%(freebasic) Declare Function Example stdcall (param1 As Integer, param2 As Integer) As Integer Declare Function Example2 cdecl (param1 As Integer, param2 As Integer) As Integer -Function Example stdcall (param1 As Integer, param2 As Integer) As Integer +Function Exemple stdcall (param1 As Integer, param2 As Integer) As Integer ' This is an STDCALL function, the first parameter on the stack is param2, since it was pushed last. Print param1, param2 Return param1 Mod param2 End Function -Function Example2 cdecl (param1 As Integer, param2 As Integer) As Integer +Function Exemple2 cdecl (param1 As Integer, param2 As Integer) As Integer ' This is a CDECL function, the first parameter on the stack is param1, since it was pushed last. Print param1, param2 Return param1 Mod param2 @@ -40,10 +40,10 @@ End Function %% {{fbdoc item="target"}} - - On Windows systems, //stdcall// procedures have an "@//N//" decoration added to their internal/external name, where //N// is the size of the parameter list, in bytes. + - Sur les systèmes Windows, les procédures //stdcall// ont un "@ N" décoration ajouté à leur nom interne / externe, où N est la taille de la liste des paramètres, en octets. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - [[KeyPgPascal Pascal]], [[KeyPgCdecl Cdecl]] diff --git a/fbdocs/manual/cache/KeyPgStep.wakka b/fbdocs/manual/cache/KeyPgStep.wakka index f945e5fb25..91dfc7930c 100644 --- a/fbdocs/manual/cache/KeyPgStep.wakka +++ b/fbdocs/manual/cache/KeyPgStep.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STEP"}}---- -Statement modifier. +Modification de déclaration. {{fbdoc item="syntax"}}## [[KeyPgFornext For]] //iterator// = //initial_value// To //end_value// **Step** //increment// @@ -11,9 +11,9 @@ Statement modifier. [[KeyPgPaint Paint]] [ //target//, ] STEP ( //x//, //y// ) [, [ //paint// ][, [ //border_color// ] ] ] ## {{fbdoc item="desc"}} - In a ##[[KeyPgFornext For]]## statement, ##**Step**## specifies the increment of the loop iterator with each loop. + Dans une déclaration ##[[KeyPgFornext For]]##, ##**Step**## indique l'incrémentation de l'itération de la boucle à chaque boucle. - In a ##[[KeyPgLinegraphics Line]]##, ##[[KeyPgCircle Circle]]## or ##[[KeyPgPaint Paint]]## statement, ##**Step**## indicates that the following coordinate has values relative to the graphics cursor. + Dans une déclaration ##[[KeyPgLinegraphics Line]]##, ##[[KeyPgCircle Circle]]## ou ##[[KeyPgPaint Paint]]##, ##**Step**## indique que les coordonnées qui suivent ont des valeurs relatives à la position du curseur graphique. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/step.bas"}}%%(freebasic) diff --git a/fbdocs/manual/cache/KeyPgStick.wakka b/fbdocs/manual/cache/KeyPgStick.wakka index f66b8d031a..9e86bbd50d 100644 --- a/fbdocs/manual/cache/KeyPgStick.wakka +++ b/fbdocs/manual/cache/KeyPgStick.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STICK"}}---- -Reads axis position from attached gaming devices +Lit la position des axes à partir de périphériques de jeu {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Stick** ( [[KeyPgByval byval]] //axis// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Reads axis position from attached gaming devices ## {{fbdoc item="param"}} ##//axis//## - the axis number to query for position + le numéro de l'axe dont on recherche la position -{{fbdoc item="ret"}} - Returns a number between 1 and 200 for specified ##//axis//##, otherwise zero (0), if the device is not attached. +{{fbdoc item="section" value="Valeur retournée + Renvoie un nombre entre 1 et 200 pour l'##//axis//## spécifié, sinon zéro (0), si le périphérique n'est pas lié. {{fbdoc item="desc"}} - ##**Stick**## will retrieve the axis position for the first and second axes on the first and second gaming devices. ##//axis//## must be a number between 0 and 3 having the following meaning: + ##**Stick**## permettra de récupérer la position de l'axe pour le premier et second axes des premier et deuxième périphériques de jeu. ##//axis//## doit être un nombre entre 0 et 3 ont la signification suivante: - {{table columns="2" cells="Axis;Returns;0;X position of gaming device A;1;Y position of gaming device A when STICK(0) was called;2;X position of gaming device B when STICK(0) was called;3;Y position of gaming device B when STICK(0) was called"}} + {{table columns="" cellpadding="2" cells="Axes;Retourne;0;Position X du dispositif de jeu A;1;Position Y du dispositif de jeu A quand STICK(0) a été appelé2;Position X du dispositif de jeu B lorsque STICK (0) a été appelé3;Position Y du dispositif de jeu B lorsque STICK (0) a été appelé
    - ##**Stick(0)**## must first be called to obtain the positions for the other axes. + ##**Stick(0)**## doit d'abord être appelé en premier pour obtenir les positions des autres axes. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/stick.bas"}}%%(freebasic) @@ -57,10 +57,10 @@ Loop %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// dialect. + - Disponible seulement avec le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgGetjoystick Getjoystick]]## diff --git a/fbdocs/manual/cache/KeyPgStop.wakka b/fbdocs/manual/cache/KeyPgStop.wakka index f78bce1412..244a353b58 100644 --- a/fbdocs/manual/cache/KeyPgStop.wakka +++ b/fbdocs/manual/cache/KeyPgStop.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STOP"}}---- -Halts program execution, and waits for a key press before ending the program. +Arrête l'exécution du programme et attend qu'une touche soit appuyée avant de terminer le programme. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Stop** ( [[KeyPgByval byval]] //retval// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) @@ -9,23 +9,25 @@ Halts program execution, and waits for a key press before ending the program. ## {{fbdoc item="param"}} ##//retval//## - Error code returned to system. + Code d'erreur retourné au système. {{fbdoc item="desc"}} - Halts the execution of the program and stands by. It's provided as a help to debugging, as it preserves the memory and doesn't close files. For normal program termination the ##[[KeyPgEnd End]]## keyword should be used. An optional return value, an integer, can be specified to return an error code to the system. If no return value is given, a value of 0 is automatically returned. + Arrête l'exécution du programme et attend. Prévu comme une aide au débogage, car il préserve la mémoire et ne ferme pas les fichiers. Pour terminer normalement le programme, le mot-clé ##[[KeyPgEnd End]]## ne doit être utilisé. Une valeur de retour facultative, un nombre entier, peut être spécifiée pour retourner un code d'erreur au système. Si aucune valeur de retour n'est donnée, une valeur de 0 est automatiquement retournée. + + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/debug/stop.bas"}}%%(freebasic) -print "this text is shown" -sleep -stop -print "this text will never be shown" +Print "this text is shown" +Sleep +Stop +Print "this text will never be shown" %% - {{fbdoc item="diff"}} - - None -{{fbdoc item="see"}} +- Aucune + {{fbdoc item="see"}} + +- ##[[KeyPgEnd End]]## - ##[[KeyPgEnd End]]## {{fbdoc item="back" value="CatPgMisc|Miscellaneous"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgStr.wakka b/fbdocs/manual/cache/KeyPgStr.wakka index 8c527e647f..42dd11809a 100644 --- a/fbdocs/manual/cache/KeyPgStr.wakka +++ b/fbdocs/manual/cache/KeyPgStr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STR"}}---- -Returns a string representation of a number or Unicode character string +Retourne une chaîne représentation d'un nombre ou d'une chaîne de caractères Unicode {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Str** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //n// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -17,19 +17,19 @@ Returns a string representation of a number or Unicode character string ## {{fbdoc item="usage"}}## //result// = **Str**[$]( //number// ) - //or// + //ou// //result// = **Str**( //string// ) ## {{fbdoc item="param"}} ##//number//## - Numeric expression to convert to a string. + Expression numérique à transformer en chaîne. ##//string//## - String expression to convert to a string. + Chaîne expression à convertir en chaîne. {{fbdoc item="desc"}} - ##**Str**## converts numeric variables to their string representation. Used this way it is the ##[[KeyPgString String]]## equivalent to ##[[KeyPgWstr Wstr]]## applied to numeric variables, and the opposite of the ##[[KeyPgVal Val]]## function, which converts a string into a number. + ##**Str**## convertit des variables numériques en leur représentation sous forme de chaîne. Utiliser ce moyen est l'équivalent ##[[KeyPgString String]]## à ##[[KeyPgWstr WStr]]## appliqué à des variables numériques, et l'opposé de la fonction ##[[KeyPgVal Val]]##, qui convertit une chaîne en nombre. - ##**Str**## also converts Unicode character strings to ASCII character strings. Used this way it does the opposite of ##[[KeyPgWstr Wstr]]##. If an ASCII character string is given, that string is returned unmodified. + ##**Str**## convertit aussi les chaînes de caractères Unicode en chaînes de caractères ASCII. Utilisé de cette façon c'est l'opposé de ##[[KeyPgWstr WStr]]##. Si une chaîne de caractères ASCIIIf est donnée, elle sera retournée non-modifiée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/str.bas"}}%%(freebasic) @@ -41,15 +41,15 @@ print a, b %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// dialect, ##**Str**## will left pad a positive number with a space. - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Dans le dialecte //[[CompilerOptlang -lang qb]]//, ##**Str**## complètera à gauche un nombre positif avec des espaces. + - Le suffixe de type chaîne ##"$"## est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type chaîne ##"$"## est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="target"}} - - DOS version/target of FreeBASIC does not support the wide-character string version of ##**Str**##. + - DOS version/cible de FreeBASIC ne supporte pas la version larges caractères de ##**Str**##. {{fbdoc item="diff"}} - - QB does not support the wide-character string version of ##**Str**##. + - QB ne supporte pas la version larges caractères de ##**Str**##. {{fbdoc item="see"}} - ##[[KeyPgVal Val]]## diff --git a/fbdocs/manual/cache/KeyPgStrig.wakka b/fbdocs/manual/cache/KeyPgStrig.wakka index 5e3bd58bb4..000697fd4e 100644 --- a/fbdocs/manual/cache/KeyPgStrig.wakka +++ b/fbdocs/manual/cache/KeyPgStrig.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STRIG"}}---- -Reads button state from attached gaming devices +Lecture de l'état d'un bouton des périphériques de jeu {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Strig** ( [[KeyPgByval byval]] //button// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Reads button state from attached gaming devices ## {{fbdoc item="param"}} ##//button//## - the button to query for state + le bouton dont on recherche l'état -{{fbdoc item="ret"}} - Returns -1 (pressed) or 0 (not-pressed) to indicate the state of the ##//button//## requested. +{{fbdoc item="section" value="Valeur retournée + Retourne -1 (appuyé) ou 0 (non-appuyé) pour indiquer l'état du ##//button//## choisi. {{fbdoc item="desc"}} - ##**Strig**## will retrieve the button state for the first and second buttons on the first and second gaming devices. ##//button//## must be a number between 0 and 7 and has the following meaning: + ##**Strig**## permettra de récupérer l'état du bouton pour les premier et deuxième boutons sur les premier et deuxième dispositifs de jeu. ##//button//## doit être un nombre entre 0 et 7 et a la signification suivante: - {{table columns="2" cells="Button;State to return;0;First button on gaming device A pressed since STICK(0) was called;1;First button on gaming device A is pressed;2;First button on gaming device B pressed since STICK(0) was called;3;First button on gaming device A is pressed;4;Second button on gaming device A pressed since STICK(0) was called;5;First button on gaming device A is pressed;6;Second button on gaming device B pressed since STICK(0) was called;7;First button on gaming device A is pressed"}} + {{table columns="" cellpadding="2" cells="Bouton;Etat à retourner;0;Le premier bouton sur le périphérique de jeu A appuyé depuis que STICK(0) a été appelé1;Le premier bouton sur le périphérique de jeu A est appuyé2;Le premier bouton sur le périphérique de jeu B appuyé depuis que STICK(0) a été appelé3;Le premier bouton sur le périphérique de jeu B est appuyé4;Le second bouton sur le périphérique de jeu A appuyé depuis que STICK(0) a été appelé5;Le second bouton sur le périphérique de jeu A est appuyé6;Le second bouton sur le périphérique de jeu B appuyé depuis que STICK(0) a été appelé7;Le second bouton sur le périphérique de jeu B est appuyé
    - Calling ##**Stick(0)**## will reset the state returned where ##//button//## is equal to 0, 2, 4, or 6. + Appeler ##**Stick(0)**## réinitialisera l'état retourné où ##//button//## est égal à 0, 2, 4, ou 6. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/input/strig.bas"}}%%(freebasic) @@ -57,10 +57,10 @@ Loop %% {{fbdoc item="lang"}} - - Only available in the //[[CompilerOptlang -lang qb]]// dialect. + - Disponible seulement avec le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgGetjoystick Getjoystick]]## diff --git a/fbdocs/manual/cache/KeyPgString.wakka b/fbdocs/manual/cache/KeyPgString.wakka index e4ee574f14..7a7f4e3600 100644 --- a/fbdocs/manual/cache/KeyPgString.wakka +++ b/fbdocs/manual/cache/KeyPgString.wakka @@ -1,38 +1,58 @@ {{fbdoc item="title" value="STRING"}}---- -Standard data type: 8 bit character string +Type de données standard : chaîne de caractères 8 bits. {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **String** [ * //size//] ## {{fbdoc item="desc"}} - A ##**String**## is an array of characters. + Une ##**String**## est un tableau de caractères. - A ##**String**## declared without the ##//size//## parameter is dynamically resized depending on the length of the string. The length can range from 0 bytes to 2 gigabytes. A descriptor contains a pointer to the actual string and the length of the string. ##[[KeyPgOpVarptr Varptr]]## will return a pointer to the descriptor, while ##[[KeyPgOpStrptr Strptr]]## will point to the actual string. - Despite the use of the descriptor, an implicit ##NULL## character (##[[KeyPgChr chr]](0)##) is added to the end of the string, to allow passing them to functions in external libraries without making slow copies. ""FreeBASIC""'s internal functions will ignore this character, and not treat it as part of the string. + Une ##**String**## déclarée sans le paramètre ##//size//## est redimensionnée dynamiquement en fonction de la longueur de la chaîne. La longueur peut aller de 0 octets à 2 gigaoctets. Un descripteur contient un pointeur vers la chaîne et sa longueur. ##[[KeyPgOpVarptr VarPtr]]## retourne un pointeur vers le descripteur, alors que ##[[KeyPgOpStrptr StrPtr]]## pointe vers la chaîne elle-même. + + Malgré l'utilisation du descripteur, un caractère implicite ##NULL## (##[[KeyPgChr Chr]](0)##) est ajouté à la fin de la chaîne, pour permettre de les passer à des fonctions de bibliothèques externes sans en faire des copies qui sont très lentes. Les fonctions internes de FreeBASIC's ignoreront ce caractère, et ne le traiteront pas comme faisant partie de la chaîne. - A ##**String**## declared with a ##//fixed size//## is a QB-style fixed length string, with the exception that unused characters are set to 0, regardless of what "-lang" compiler option is used. It has no descriptor and it is not resized to fit its contents. As in QB, if data overflows the size of the string, it is truncated on the right side. - Fixed length strings are also terminated with a ##NULL## character, and so they use ##//size// + 1## bytes of space. This ##NULL## terminator may be removed in future, to prevent the redundant character complicating data layout in user-defined ##[[KeyPgType Type]]##s. + Une ##**String**## déclarée avec ##//fixed size//## est une chaîne de style QB de longueur fixe, exception faite que les caractères non utilisés sont mis à 0, quel que soit l'option compilateur "-lang" utilisée. Elle n'a pas de descripteur et n'est pas redimensionnées pour s'adapter à son contenu. Comme dans QB, s'il y a débordement de données par rapport à la taille de la chaîne, elle est tronquée sur le côté droit. - String variable names need not end in a dollar sign ##$## as in other dialects of BASIC. In //[[CompilerDialects lang fb]]// variable suffixes, including the dollar sign, are disallowed entirely. + Les chaînes à longueur fixe sont aussi terminées par un caractère ##NULL##, et utilisent donc ##//size// + 1## octets d'espace. Ce terminateur ##NULL## pourrait être retiré à l'avenir, pour empêcher le caractère redondant de compliquer la disposition des données dans les ##[[KeyPgType Type]]##s définis par l'utilisateur. - Note: When passing ##**String**##s as parameters to ##[[KeyPgSub Sub]]##s, they should always be passed by reference (##[[KeyPgByref ByRef]]##). Currently, ##[[KeyPgByval ByVal]]## does not pass a copy of the string, but a ##[[KeyPgPtr Pointer]]## to the string data. This can cause unexpected behavior. + Les noms de variables String n'ont pas à être terminés par le signe dollar ##$## comme dans les autres dialectes du BASIC. Dans les suffixes de variables du langage //[[CompilerDialects lang fb]]//, inclure le signe dollar, est totalement interdit. + Note: Quand on passe des ##**String**##s comme paramètres de ##[[KeyPgSub Sub]]##s, elles doivent toujours être passées par référence (##[[KeyPgByref ByRef]]##). Actuellement, ##[[KeyPgByval ByVal]]## ne passe pas une copie de la chaîne, mais un ##[[KeyPgPtr Pointeur]]## vers les données de la chaîne. Cela peut entraîner un comportement inattendu. -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/datatype/string.bas"}}%%(freebasic) -'' Compile with -lang fblite or qb + {{fbdoc item="ex"}} + %%(freebasic) + +'' Compile avec -lang fblite ou qb #lang "fblite" +'' Longueur-variable -'' Variable-length Dim a As String -a = "Hello" -'' Or +a = "Hello" +'' Ou Dim b$ -b$ = "World" -'' Fixed-length +b$ = "World" +'' Longueur-fixe Dim c As String * 32 + +c = "Hello World" +%% + +{{fbdoc item="diff"}} +- Dans QB les chaînes sont limitées à 32767 caractères. + +- Dans QB, les caractères non utilisés d'une chaîne de longueur fixe sont initialisés avec 32 (espace, ou "", en ASCII). +- Dans QB les chaînes statiques ou à taille fixe sont souvent utilisées dans des enregistrements pour représenter un nombre d'octets de données; par exemple, une chaîne de longueur 1 pour représenter 1 octet dans une UDT lue à partir d'un fichier. Ceci n'est pas possible en FreeBASIC cat les chaînes ont toujours un caractère ##NULL## à la fin. Quand vous convertissez du code QBasic qui lit des UDTs à partir de fichiers, assurez-vous que toutes les instances de "##As String * //n//##" sont remplacées par "##As uByte (0 to //n// - 1)##" ou vos fichiers seront incompatibles. + {{fbdoc item="see"}} + - ##[[KeyPgStringFunction String (Fonction)]]## + - ##[[KeyPgZstring ZString]]## +- ##[[KeyPgWstring WString]]## + +- ##[[KeyPgStr Str]]## + +- ##[[KeyPgOpStrptr StrPtr]]## +- ##[[KeyPgOpVarptr VarPtr]]## c = "Hello World" %% @@ -43,6 +63,7 @@ c = "Hello World" {{fbdoc item="see"}} - ##[[KeyPgStringFunction String (Function)]]## + - ##[[KeyPgSpace Space]]## - ##[[KeyPgZstring Zstring]]## - ##[[KeyPgWstring Wstring]]## - ##[[KeyPgStr Str]]## diff --git a/fbdocs/manual/cache/KeyPgStringFunction.wakka b/fbdocs/manual/cache/KeyPgStringFunction.wakka index 708c85c938..7344c9f054 100644 --- a/fbdocs/manual/cache/KeyPgStringFunction.wakka +++ b/fbdocs/manual/cache/KeyPgStringFunction.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="STRING (Function)"}}---- -Creates and fills a string of a certain length with a certain character +Crée et remplit une chaîne d'une longueur donnée avec un caractère donné {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **String** ( [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //ch_code// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,22 +7,22 @@ Creates and fills a string of a certain length with a certain character ## {{fbdoc item="usage"}}## //result// = **String**[$]( //count//, //ch_code// ) - ##//or//## + ##//ou//## //result// = **String**[$]( //count//, //ch// ) ## {{fbdoc item="param"}} ##//count//## - An integer specifying the length of the string to be created. + Un entier spécifiant la longueur de la chaîne à créer. ##//ch_code//## - An integer specifying the ASCII character code to be used to fill the string. + Un entier spécifiant le code ASCII du caractère utilisé pour remplir la chaîne. ##//ch//## - A string whose first character is to be used to fill the string. + Une chaîne dont le premier caractère sera utilisé pour remplir la chaîne. -{{fbdoc item="ret"}} - The created string. An empty string will be returned if either ##//ch//## is an empty string, or ##//count//## <= 0. +{{fbdoc item="section" value="Valeur retournée + La chaîne créée. Une chaîne vide sera retournée si ##//ch//## est une chaîne vide, ou si ##//count//## <= 0. {{fbdoc item="desc"}} - A list of [[CptAscii ASCII character codes]]. + Une liste de [[CptAscii codes ASCII de caractères]]. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/string.bas"}}%%(freebasic) @@ -32,14 +32,14 @@ end 0 %% {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe "$" de type de chaîne est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe "$" de type de chaîne est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgString String]] (data type)## + - ##[[KeyPgString String]] (type de donnée)## - ##[[KeyPgSpace Space]]## {{fbdoc item="back" value="CatPgString|String Functions"}} diff --git a/fbdocs/manual/cache/KeyPgSub.wakka b/fbdocs/manual/cache/KeyPgSub.wakka index 9e42c2f494..0bb22d5eff 100644 --- a/fbdocs/manual/cache/KeyPgSub.wakka +++ b/fbdocs/manual/cache/KeyPgSub.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="SUB"}}---- -Defines a procedure +Définit une procédure {{fbdoc item="syntax"}}## - [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] **Sub** //identifier// [[[KeyPgCdecl CDecl]]|[[KeyPgPascal Pascal]]|[[KeyPgStdcall StdCall]]] [[[KeyPgOverload Overload]]] [[[KeyPgAlias Alias]] //external_identifier//] [( [//parameter_list//] )] [[[KeyPgStatic Static]]] + [[[KeyPgPublic Public]]|[[KeyPgPrivate Private]]] **Sub** //identifier// [[[KeyPgCdecl cdecl]]|[[KeyPgPascal pascal]]|[[KeyPgStdcall stdcall]]] [[[KeyPgOverload Overload]]] [[[KeyPgAlias Alias]] //external_identifier//] [( [//parameter_list//] )] [[[KeyPgStatic Static]]] //statements// ... [[[KeyPgReturn Return]]] @@ -17,31 +17,31 @@ Defines a procedure [[KeyPgEndblock End]] Sub ## {{fbdoc item="param"}} - ##//identifier//##: the name of the subroutine - ##//external_identifier//##: externally visible (to the linker) name enclosed in quotes + ##//identifier//##: le nom du sous-programme + ##//external_identifier//##: nom visible de l'extérieur (à l'éditeur de liens) entre guillemets ##//parameter_list//##: parameter[, parameter[, ...]] ##//parameter//##: ##[[[KeyPgByref ByRef]]|[[KeyPgByval ByVal]]] //identifier// [[[KeyPgAs As]] //type//] [= //default_value//]## - ##//identifier//##: the name of the variable referenced in the subroutine - ##//type//##: the type of variable - ##//default_value//##: the value of the argument if none is specified in the call - ##//statements//##: one or more statements that make up the subroutine body + ##//identifier//##: le nom de la variable référencée dans la sous-routine + ##//type//##: le type de la variable + ##//default_value//##: la valeur de l'argument si rien n'est spécifié dans l'appel + ##//statements//##: une ou plusieurs déclarations qui composent le corps du sous-programme {{fbdoc item="desc"}} - A subroutine is a block of code which may be called at any time from a program. This code may need to be executed multiple times, and subroutines provide an invaluable means to simplify code by replacing these blocks of code with a single subroutine call. A subroutine also serves to allow a user to extend the ""FreeBASIC"" language to provide custom commands. Many of the functions built into ""FreeBASIC"" are merely subroutines part of a "runtime library" linked to by default. + Un sous-programme est un bloc de code qui peut être appelé à tout moment à partir d'un programme. Ce code peut être exécuté plusieurs fois, et les sous-programmes fournissent un précieux moyen de simplifier le code en remplaçant ces blocs de code par un unique sous-programme. Un sous-programme permet aussi à un utilisateur d'étendre le langage FreeBasic en lui fournissant des commandes personnalisées. Beaucoup de fonctions intégrées dans FreeBASIC sont simplement des sous-programmes faisant partie d'une "bibliothèque d'exécution" liée par défaut. - The ##**Sub**## keyword marks the beginning of a subroutine, and its end is marked by ##**End Sub**##. The "name" parameter is the name by which this subroutine is called. For instance, if the declaration is "##**Sub**...**End Sub**##", the user can execute the code in between "##**Sub** foo##" and "##**End Sub**##" by using "##foo##" as a statement. This code is executed separate from the code which calls the subroutine, so any variable names, unless they are shared, are not available to the subroutine. Values can, however, be passed using parameters. + Le mot-clef ##**Sub**## marque le début d'un sous-programme et sa fin est marquée par ##**End Sub**##. Le paramètre "name = nom" est le nom sous lequel ce sous-programme est appelé. Par exemple, si la déclaration est "##**Sub**...**End Sub**##", l'utilisateur peut exécuter le code entre "##**Sub** foo##" et "##**End Sub**##" en utilisant "##foo##" comme une déclaration. Ce code est exécuté est indépendamment du code qui appelle le sous-programme, de sorte que tous les noms de variables, sauf si elles sont partagées (shared), ne sont pas disponibles pour le sous-programme. Des valeurs peuvent, toutefois, être passées en utilisant des paramètres. - Parameters are the arguments passed to any statement. For instance, if a user executes a statement as "##[[KeyPgPrint Print]] 4##", the value "4" is passed to the function "##[[KeyPgPrint Print]]##". Parameters that need to be passed to a subroutine are supplied by one or more parameter arguments in the "##**Sub**##" keyword. Creating a subroutine with "##**Sub** mysub(foo, bar)...**End Sub**##", allows the code in between "##**Sub**##" and "##**End Sub**##" to refer to the first passed argument as "foo" and the second passed argument as "bar". If a parameter is given a default value, that parameter is optional. + Les paramètres sont les arguments passés à une déclaration. Par exemple, si un utilisateur exécute une instruction comme "##[[KeyPgPrint Print]] 4##", la valeur "4" est passée à la fonction "##[[KeyPgPrint Print]]##". Les paramètres qui doivent être transmis à un sous-programme sont fournis par un ou plusieurs arguments paramètres dans le mot-clé "##**Sub**##". Créer un sous-programme avec "##**Sub** mysub(foo, bar)...**End Sub**##", permet au code entre "##**Sub**##" et "##**End Sub**##" de désigner le premier argument passé en tant que "foo" et le deuxième argument passé en tant que "bar". Si un paramètre est donné avec une valeur par défaut, ce paramètre est facultatif. - Parameters must also have a supplied type, in the form "##//parameter// as //type//##". If this is omitted, ##//type//## is assumed to be ##[[KeyPgInteger Integer]]##. A passed value MUST be of the type specified. + Les paramètres doivent également avoir un type, de la forme "##//parameter// As //type//##". S'il est omis, ##//type//## sera ##[[KeyPgInteger Integer]]##. Une valeur passée DOIT être du type spécifié. - A subroutine can also specify how parameters are passed, either as "##[[KeyPgByref Byref]]##" or "##[[KeyPgByval Byval]]##", as shown in the syntax definition. If a parameter is "##[[KeyPgByref Byref]]##", the parameter name literally becomes a reference to the original variable passed to the subroutine. Any changes made to that variable will be reflected outside of the subroutine. If a parameter is passed "##[[KeyPgByval Byval]]##", however, the value of any passed variable is copied into a new variable, and any changes made to it will not affect the original. (Note: this does not currently apply to ##[[KeyPgString String]]##s, and "##[[KeyPgByval Byval]]##" should be avoided with them for the time being.) + Un sous-programme peut également spécifier la manière dont les paramètres sont passés, soit "##[[KeyPgByref ByRef = par reférence]]##", soit "##[[KeyPgByval ByVal = par valeur]]##", comme indiqué dans la définition de syntaxe. Si un paramètre est "##[[KeyPgByref ByRef]]##", le nom du paramètre devient littéralement une référence à la variable d'origine transmise au sous-programme. Toutes les modifications apportées à cette variable seront reflétées à l'extérieur du sous-programme. Si un paramètre est passé "##[[KeyPgByval ByVal]]##", toutefois, la valeur d'une variable passée est copiée dans une nouvelle variable et toute modification apportée à celle-ci n'affectera pas l'original. (Note: cela ne s'applique pas actuellement aux ##[[KeyPgString String]]##s et "##[[KeyPgByval ByVal]]##" doit être évitée avec elles pour le moment.) - The ##[[KeyPgStatic Static]]## specifier indicates that the values of all local variables defined in the sub should be preserved between calls. To specify individual local variables as static see the ##[[KeyPgStatic Static]]## keyword. + Le spécificateur ##[[KeyPgStatic Static]]## indique que les valeurs de toutes les variables locales définies dans le sous-programme doivent être préservées entre les appels. Pour spécifier des variables locales statiques voir le mot-clé ##[[KeyPgStatic Static]]##. - Sub is the same as ##[[KeyPgFunction Function]]##, except it does not allow a value to be returned. + Sub est identique à ##[[KeyPgFunction Function]]##, sauf qu'il ne permet pas de retourner une valeur. - The second syntax defines either a constructor or destructor using the ##[[KeyPgModuleConstructor Constructor]]## and ##[[KeyPgModuleDestructor Destructor]]## keywords, respectively. Constructor subroutines are executed before the first line of code in the module, while destructors execute on module exit. Note the public access specifier and empty parameter list for both constructors and destructors. + La seconde syntaxe définit soit un constructeur, soit destructeur en utilisant les mots-clefs ##[[KeyPgModuleConstructor Constructor]]## et ##[[KeyPgModuleDestructor Destructor]]##, respectivement. Les constructeurs de sous-programmes sont exécutés avant la première ligne de code du module, tandis que les destructeurs sont exécutés à la sortie du module. Notez le spécificateur d'accès public et la liste des paramètres vide pour les constructeurs et destructeurs. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/procs/sub-1.bas"}}%%(freebasic) @@ -74,12 +74,12 @@ TestSub %% {{fbdoc item="lang"}} - - The //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects keep the QB convention: parameters are ##[[KeyPgByref Byref]]## by default. - - In the //[[CompilerOptlang -lang fb]]// dialect, numeric parameters are passed ##[[KeyPgByval Byval]]## by default. ##[[KeyPgString String]]##s and UDTs are passed ##[[KeyPgByref Byref]]## by default. + - Les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]// conservent à la Convention QB: les paramètres sont ##[[KeyPgByref ByRef]]## par défaut. + - Dans le dialecte //[[CompilerOptlang -lang fb]]//, les paramètres numériques sont passés ##[[KeyPgByval ByVal]]## par défaut. Les ##[[KeyPgString String]]##s et types définis par l'utilisateur sont passés ##[[KeyPgByref ByRef]]## par défaut. {{fbdoc item="diff"}} - - Public and Private access specifiers are new to ""FreeBASIC"". - - Constructor subroutines are new to ""FreeBASIC"". + - Les spécificateurs d'accès "Public" et "Private" sont nouveaux pour FreeBASIC. + - Les constructeurs de sous-programmes sont nouveaux pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]## diff --git a/fbdocs/manual/cache/KeyPgSwap.wakka b/fbdocs/manual/cache/KeyPgSwap.wakka index 26049840d0..f3cadf92a4 100644 --- a/fbdocs/manual/cache/KeyPgSwap.wakka +++ b/fbdocs/manual/cache/KeyPgSwap.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="SWAP"}}---- -Exchanges the values of two variables +Echange les valeurs de deux variables {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Swap** ([[KeyPgByref byref]] //a// [[KeyPgAs as]] [[KeyPgAny any]], [[KeyPgByref byref]] //b// [[KeyPgAs as]] [[KeyPgAny any]] ) ## {{fbdoc item="param"}} ##//a//## - A value to swap. + Une valeur à échanger. ##//b//## - A value to swap. + Une valeur à échanger. {{fbdoc item="desc"}} - Swaps the value of two variables. + Echange les valeurs de deux variables. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/memory/swap.bas"}}%%(freebasic) @@ -26,9 +26,9 @@ print a, b %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - - ##[[KeyPgOpAssignment Operator = (Assignment)]]## + - ##[[KeyPgOpAssignment Opérateur = (Affectation)]]## {{fbdoc item="back" value="CatPgMemory|Memory Functions"}} diff --git a/fbdocs/manual/cache/KeyPgSystem.wakka b/fbdocs/manual/cache/KeyPgSystem.wakka index 876133592f..ba8b9a52e8 100644 --- a/fbdocs/manual/cache/KeyPgSystem.wakka +++ b/fbdocs/manual/cache/KeyPgSystem.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="SYSTEM"}}---- -Closes all open files and ends the program +Ferme tous les fichiers ouverts et termine le programme {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **System** ( [[KeyPgByval byval]] //retval// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) @@ -9,12 +9,12 @@ Closes all open files and ends the program ## {{fbdoc item="param"}} ##//retval//## - Error code returned to system. + Le code d'erreur retourné au système. {{fbdoc item="desc"}} - Closes all open files and returns to the system. An optional return value, an integer, can be specified to return an error code to the system. If no return value is given, a value of 0 is automatically returned. This is the same as ##[[KeyPgEnd End]]## and is here for compatibility between older BASIC dialects. It is recommended to use ##[[KeyPgEnd End]]## instead. + Ferme tous les fichiers ouverts et retourne au système. Une valeur de retour facultative (un nombre entier) peut être spécifiée pour retourner un code d'erreur au système. Si aucune valeur de retour n'est donnée, une valeur de 0 est automatiquement retournée. Ceci est identique à ##[[KeyPgEnd End]]## et existe pour compatibilité avec les anciens dialectes BASIC. Il est recommandé d'utiliser ##[[KeyPgEnd End]]## à la place. - Usage of this statement does not cleanly close scope. Variables and memory are not destroyed automatically and object destructors are not called. Calling the required destructors and other clean-up should be explicitly performed before a ##**System**## statement. + L'utilisation de cette déclaration ne fermera pas proprement la portée. Les variables et la mémoire ne sont pas détruits automatiquement et destructeurs d'objets ne sont pas appelés. L'appel des destructeurs (et autres) nécessaires au nettoyage doit être explicitement effectué avant l'exécution de ##**System**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/system/system.bas"}}%%(freebasic) @@ -24,7 +24,7 @@ print "this text will never be shown" %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgEnd End]]## diff --git a/fbdocs/manual/cache/KeyPgTab.wakka b/fbdocs/manual/cache/KeyPgTab.wakka index 5e33e4f9fb..c0648173ca 100644 --- a/fbdocs/manual/cache/KeyPgTab.wakka +++ b/fbdocs/manual/cache/KeyPgTab.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TAB"}}---- -Sets the column when writing to screen or file +Définit la colonne lors de l'écriture à l'écran ou dans un fichier {{fbdoc item="syntax"}}## **Tab**( //col_num// ) @@ -9,11 +9,11 @@ Sets the column when writing to screen or file ## {{fbdoc item="param"}} ##//column//## - ##1##-based column number to move to + numéro de colonne à définir (la 1ère colonne a le numéro 1 et non pas 0) {{fbdoc item="desc"}} - ##**Tab**## will move the cursor to given ##//column//## number when ##[[KeyPgPrint Print]]##ing to screen or to a file. Character cells skipped over between the old and new cursor positions are left unchanged. - If the current column is greater than ##//column//##, then ##**Tab**## will move the cursor to the requested column number on the next line. If the current column is equal to ##//column//##, then the cursor will not move anywhere. + ##**Tab**## déplace le curseur vers le numéro de ##//column//## donné lors d'un ##[[KeyPgPrint Print]]## à l'écran ou dans un fichier. Les cellules caractère sautées entre l'ancienne et la nouvelle position du curseur restent inchangées. + Si la colonne courante est supérieure à ##//column//##, alors ##**Tab**## déplace le curseur au numéro de colonne demandé sur la ligne suivante. Si la colonne courante est égale à ##//column//##, alors le curseur ne se déplace pas. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/tab.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ Print A1; Tab(35); B1 Print A2; Tab(35); B2 %% -The output would look like: +La sortie donnera: ##%% FIRST NAME LAST NAME ---------- ---------- @@ -41,7 +41,7 @@ Bob Smith %%## {{fbdoc item="diff"}} - - In QBASIC, spaces were printed in the gap, while in ""FreeBASIC"", the characters are just skipped over and left untouched. + - Avec QBASIC, les espaces sont affichés dans l'intervalle, alors qu'avec FreeBASIC, les caractères sont seulement sautés et restent inchangés. {{fbdoc item="see"}} - ##[[KeyPgSpc Spc]]## diff --git a/fbdocs/manual/cache/KeyPgTan.wakka b/fbdocs/manual/cache/KeyPgTan.wakka index 5615d74e7c..a5f5359414 100644 --- a/fbdocs/manual/cache/KeyPgTan.wakka +++ b/fbdocs/manual/cache/KeyPgTan.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TAN"}}---- -Gets the tangent of a number +Obtient la tangente d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Tan** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -9,13 +9,13 @@ Gets the tangent of a number ## {{fbdoc item="param"}} ##//number//## - the angle (in radians) + l'angle (en radians) -{{fbdoc item="ret"}} - Returns the tangent of the argument ##//number//## as a ##[[KeyPgDouble Double]]## within the range of -infinity to infinity. +{{fbdoc item="section" value="Valeur retournée + Renvoie la tangente de l'argument ##//number//## comme un ##[[KeyPgDouble Double]]## dans l'intervalle de -infinité à infinité. {{fbdoc item="desc"}} - The argument ##//number//## is measured in [[TutMathAngles radians]] (not [[TutMathAngles degrees]]). The required //number// argument can be any valid numeric expression. If ##//number//## is an uninitialized variable, zero is returned. + L'argument ##//number//## est mesuré en [[TutMathAngles radians]] (non en [[TutMathAngles degrés]]). L'argument //number// peut être n'importe quelle expression numérique valide. Si ##//number//## est une variable non-initialisée, zéro est retourné. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/math/tan.bas"}}%%(freebasic) @@ -23,24 +23,24 @@ CONST PI AS DOUBLE = 3.1415926535897932 DIM a AS DOUBLE DIM r AS DOUBLE INPUT "Please enter an angle in degrees: ", a -r = a * PI / 180 'Convert the degrees to Radians +r = a * PI / 180 'Convert the degrees to Radians PRINT "" PRINT "The tangent of a" ; a; " degree angle is"; TAN ( r ) SLEEP %% -The output would look like: +Affichera: %% Please enter an angle in degrees: 75 The tangent of a 75 degree angle Is 3.732050807568878 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgAtn Atn]]## - ##[[KeyPgAtan2 Atan2]]## - - [[TutMathIntroTrig A Brief Introduction To Trigonometry]] + - [[TutMathIntroTrig Une brève introduction à la trigonométrie]] {{fbdoc item="back" value="CatPgMath|Math"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgThen.wakka b/fbdocs/manual/cache/KeyPgThen.wakka index ee2e2f9f94..2411b29d7a 100644 --- a/fbdocs/manual/cache/KeyPgThen.wakka +++ b/fbdocs/manual/cache/KeyPgThen.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="THEN"}}---- -Control flow statement for conditional branching. +Déclaration de contrôle de flux pour un branchement conditionnel. {{fbdoc item="syntax"}}## **If** //expression// **Then** //statement(s)// [**Else** //statement(s)//] -//or// +//ou// **If** //expression// **Then** : //statement(s)// [**Else** //statement(s)//] : **End If** -//or// +//ou// **If** //expression// **Then** //statement(s)// [ **Elseif** //expression// **Then** ] @@ -15,7 +15,7 @@ Control flow statement for conditional branching. **End If** ## {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgIfthen If...Then]]## diff --git a/fbdocs/manual/cache/KeyPgThis.wakka b/fbdocs/manual/cache/KeyPgThis.wakka index ac8f783552..7b12d17a13 100644 --- a/fbdocs/manual/cache/KeyPgThis.wakka +++ b/fbdocs/manual/cache/KeyPgThis.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="This"}}---- -Hidden instance parameter passed to non-static member functions in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## +Paramètre instance caché passé aux membres non-statiques des fonctions d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## {{fbdoc item="syntax"}}## **this**.//fieldname// @@ -9,9 +9,9 @@ Hidden instance parameter passed to non-static member functions in a ##[[KeyPgTy End With ## {{fbdoc item="desc"}} - ##**This**## is a hidden parameter passed to all non-static member functions of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. Non-static member functions are procedures declared inside the body of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## and include ##[[KeyPgMemberSub Sub]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, assignment or cast ##[[KeyPgOperator Operator]]##, and ##[[KeyPgProperty Property]]## procedures. + ##**This**## est un paramètre caché passé à toutes les fonctions membres non-statiques d'une ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. Les fonctions membres non-statiques sont des procédures déclarées à l'intérieur du corps d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## et comprennent ##[[KeyPgMemberSub Sub]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, opérateurs d'assignation ou cast, et les procédures ##[[KeyPgProperty Property]]##. - The ##**This**## parameter has the same data type as the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## in which the procedure is declared. + Le paramètre ##**This**## a le même type de donnée que le ##[[KeyPgType Type]]## ou la ##[[KeyPgClass Class]]## où la procédure est déclarée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/this.bas"}}%%(freebasic) @@ -39,7 +39,7 @@ END SUB %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## diff --git a/fbdocs/manual/cache/KeyPgThreadCreate.wakka b/fbdocs/manual/cache/KeyPgThreadCreate.wakka index 7e074486fc..72a9d1d75f 100644 --- a/fbdocs/manual/cache/KeyPgThreadCreate.wakka +++ b/fbdocs/manual/cache/KeyPgThreadCreate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="THREADCREATE"}}---- -Starts a user-defined procedure in a separate execution thread +Démarre une procédure définie par l'utilisateur dans un "thread" d'exécution distinct {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Threadcreate** ( [[KeyPgByval byval]] //proc// [[KeyPgAs as]] [[KeyPgSub sub]] ( [[KeyPgByval byval]] [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ), [[KeyPgByval byval]] //param// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] = 0, [[KeyPgByval byval]] //stack_size// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] @@ -9,82 +9,175 @@ Starts a user-defined procedure in a separate execution thread ## {{fbdoc item="param"}} ##//proc//## - A pointer to the ##[[KeyPgSub Sub]]## intended to work as a thread. + Un pointeur vers le ##[[KeyPgSub Sub]]## prévue pour travailler comme un "thread". ##//param//## - Optional [[KeyPgAny any]] [[KeyPgPtr ptr]] argument for the ##[[KeyPgSub Sub]]## pointed to by ##//proc//## (it can be a pointer to a structure or an array if more arguments are needed). + Argument facultatif [[KeyPgAny Any]] [[KeyPgPtr Ptr]] pour la ##[[KeyPgSub Sub]]## pointée par ##//proc//## (peut être un pointeur vers une structure ou un tableau si plusieurs arguments sont nécessaires). ##//stack_size//## - Optional number of bytes to reserve for this thread's stack. + Nombre (facultatif) d'octets à réserver pour la pile de ce "thread". -{{fbdoc item="ret"}} - **Threadcreate** returns an ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle to the thread created, or the null pointer (0) on failure. +{{fbdoc item="section" value="Valeur retournée + **Threadcreate** retourne un "handle" ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## vers le "thread" créé, ou le pointeur nul (0) en cas d'échec. {{fbdoc item="desc"}} - The user function is started as a thread executes in parallel with the main part of the program. The OS achieves this by assigning it to a different processor if it exists, or using the waiting times in the main program. + La fonction utilisateur est lancée comme un "thread" exécuté en parallèle avec la partie principale du programme. Le système d'exploitation atteint cet objectif en l'assignant à un processeur différent si il existe, ou en utilisant les temps d'attente dans le programme principal. - Before closing, a program must wait for the termination of all the threads it has launched; see ##[[KeyPgThreadWait Threadwait]]##. + Avant fermeture, un programme doit attendre l'achèvement de tous les "threads" qu'il a lancés; voir ##[[KeyPgThreadWait ThreadWait]]##. - To avoid simultaneous access to shared resources from different threads, FreeBASIC implements mutexes, mutual exclusion locks that can be "owned" by a single thread when doing critical work. See ##[[KeyPgMutexCreate Mutexcreate]]##, ##[[KeyPgMutexLock Mutexlock]]##, ##[[KeyPgMutexUnlock Mutexunlock]]##, ##[[KeyPgMutexDestroy Mutexdestroy]]##. + Pour éviter l'accès simultané aux ressources partagées à partir de "threads" différents, FreeBasic met en œuvre les "mutex", les verrous d'exclusion mutuelle qui peuvent être "possédés" par un seul "thread" lors d'un travail critique. Voir ##[[KeyPgMutexCreate MutexCreate]]##, ##[[KeyPgMutexLock MutexLock]]##, ##[[KeyPgMutexUnlock MutexUnlock]]##, ##[[KeyPgMutexDestroy MutexDestroy]]##. - On some systems, the stack automatically grows beyond ##//stack_size//## if more space is needed; on others, this is the fixed maximum allowed. Behavior is undefined when more stack is used than the reserved size on systems where stacks are not able to grow. + Sur certains systèmes, la pile augmente automatiquement au-delà de ##//stack_size//## si plus d'espace est nécessaire; sur les autres, c'est le maximum permis. Le comportement est imprévisible en cas de dépassement de pile, par rapport à ce qui était réservé, dans les cas où la pile n'est pas capable de s'agrandir. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/threadcreate.bas"}}%%(freebasic) + + %%(freebasic) Dim Shared terminate As Integer = 0 +Sub mythread (param As Any Ptr) +Dim As Double t = Timer +While( 1 ) -Sub mythread (param As Any Ptr) - - dim as double t = timer - While( 1 ) - - Print "*"; - - '' pause for .1 second - while( abs( timer - t ) < .1 ) - sleep 1, 1 - wend - t = timer - - If terminate=1 Then Exit Sub +Print "*"; + +'' pause for .1 second + +While( Abs( Timer - t ) < .1 ) +Sleep 1, 1 Wend - -End Sub + t = Timer + If terminate=1 Then Exit Sub + Wend + End Sub + Dim thread As Any Ptr + Dim b As Integer + Dim As Double t + Print "Main program prints dots" + Print "Thread prints asterisks" + thread = ThreadCreate( @mythread, 0 ) + + Print "Thread launched"; + While b < 30 + Print "."; + '' pause for .1 second + While( Abs( Timer - t ) < .1 ) -Dim thread As Any Ptr -Dim b As Integer -dim as double t + Sleep 1, 1 + Wend +t = Timer -Print "Main program prints dots" -Print "Thread prints asterisks" -thread = ThreadCreate( @mythread, 0 ) -Print "Thread launched"; +b += 1 + Wend + terminate=1 +Print "Terminate launched"; -While b < 30 - - Print "."; - - '' pause for .1 second - while( abs( timer - t ) < .1 ) - sleep 1, 1 - wend - t = timer + ThreadWait (thread) + Print "Thread terminated" + + Sleep + %% + {{fbdoc item="lang"}} + - Les "Thread" n'existent pas dans le dialecte //[[CompilerOptlang -lang qb]]//. + {{fbdoc item="target"}} + - La version DOS de FreeBASIC ne permet pas les "threads", car l'OS ne les supporte pas. + - Dans Linux les "threads" sont toujours démarrés dans l'ordre de leur création, ceci n'est pas possible sous Win32. Il s'agit de l'OS, pas une question FreeBasic. + {{fbdoc item="diff"}} + - Nouveau pour FreeBASIC + + {{fbdoc item="see"}} + - ##[[KeyPgThreadWait ThreadWait]]## + - ##[[KeyPgMutexCreate MutexCreate]]## + - ##[[KeyPgMutexLock MutexLock]]## + - ##[[KeyPgMutexUnlock MutexUnlock]]## + - ##[[KeyPgMutexDestroy MutexDestroy]]## + + '' Clean up when finished + MutexDestroy(ttylock) +%% - b += 1 + {{fbdoc item="filename" value="examples/manual/threads/threads2.bas"}}%%(freebasic) +sub print_dots(byref char as string) + for i as integer = 0 to 29 + print char; + sleep cint(rnd() * 100), 1 + next +end sub + +sub mythread(param as any ptr) + '' Work (other thread) + print_dots("*") +end sub + + randomize(timer()) + + print " main thread: ." + print "other thread: *" + + '' Launch another thread + dim as any ptr thread = threadcreate(@mythread, 0) + + '' Work (main thread) + print_dots(".") + + '' Wait until other thread has finished, if needed + threadwait(thread) + print + sleep +%% -Wend - -terminate=1 -Print "Terminate launched"; -ThreadWait (thread) -Print "Thread terminated" -Sleep + {{fbdoc item="filename" value="examples/manual/threads/threads3.bas"}}%%(freebasic) +'' Threaded consumer/producer example using mutexes + +dim shared as any ptr produced, consumed + +sub consumer( byval param as any ptr ) + for i as integer = 0 to 9 + mutexlock produced + print ", consumer gets:", i + sleep 500 + mutexunlock consumed + next +end sub + +sub producer( byval param as any ptr ) + for i as integer = 0 to 9 + print "Producer puts:", i; + sleep 500 + mutexunlock produced + mutexlock consumed + next i +end sub + + dim as any ptr consumer_id, producer_id + + produced = mutexcreate + consumed = mutexcreate + if( ( produced = 0 ) or ( consumed = 0 ) ) then + print "Error creating mutexes! Exiting..." + end 1 + end if + + mutexlock produced + mutexlock consumed + consumer_id = threadcreate(@consumer) + producer_id = threadcreate(@producer) + if( ( producer_id = 0 ) or ( consumer_id = 0 ) ) then + print "Error creating threads! Exiting..." + end 1 + end if + + threadwait consumer_id + threadwait producer_id + + mutexdestroy consumed + mutexdestroy produced + + sleep %% {{fbdoc item="lang"}} - Threading is not allowed in ##-lang qb## {{fbdoc item="target"}} - - **Threadcreate** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. + - **Threadcreate** is not available with the DOS version / target of ""FreeBASIC"", because multithreading is not supported by DOS kernel nor the used extender. + - In Linux the threads are always started in the order they are created, this can't be assumed in ""Win32"". It's an OS, not a ""FreeBASIC"" issue. {{fbdoc item="diff"}} - New to ""FreeBASIC"" diff --git a/fbdocs/manual/cache/KeyPgThreadWait.wakka b/fbdocs/manual/cache/KeyPgThreadWait.wakka index 7563d2b21b..09c92363d4 100644 --- a/fbdocs/manual/cache/KeyPgThreadWait.wakka +++ b/fbdocs/manual/cache/KeyPgThreadWait.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="THREADWAIT"}}---- -Waits until the designated thread has been completed before returning +Attend jusqu'à ce que le "thread" désigné ait terminé son exécution avant de retourner {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Threadwait** ( [[KeyPgByval byval]] //id// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]] ) @@ -9,87 +9,33 @@ Waits until the designated thread has been completed before returning ## {{fbdoc item="param"}} ##//id//## - ##[[KeyPgAny any]] [[KeyPgPtr ptr]]## handle of a thread created by ##[[KeyPgThreadCreate Threadcreate]]## + Le handle ##[[KeyPgAny Any]] [[KeyPgPtr Ptr]]## d'un "thread" créé par ##[[KeyPgThreadCreate ThreadCreate]]## {{fbdoc item="desc"}} - ##Threadwait## doesn't return until the thread designated by ##//id//## ends. ##Threadwait## does not force the thread to end; if a thread requires a signal to force its end, a mechanism such as shared variables must be used. + ##Threadwait## ne retourne pas tant que le "thread" désigné par ##//id//## se termine. ##Threadwait## ne force pas le "thread" à terminer son exécution; si un "thread" a besoin d'un signal pour terminer son exécution, un mécanisme tel qu'une variable partagée doit être utilisé. - Threads are launched by the ##[[KeyPgThreadCreate Threadcreate]]## function. + Les "threads" sont lancés par la fonction ##[[KeyPgThreadCreate ThreadCreate]]##. - To avoid simultaneous access to shared resources from different threads, FreeBASIC implements mutexes, mutual exclusion locks that can be "owned" by a single thread when doing critical work. See ##[[KeyPgMutexCreate Mutexcreate]]##, ##[[KeyPgMutexLock Mutexlock]]##, ##[[KeyPgMutexUnlock Mutexunlock]]##, ##[[KeyPgMutexDestroy Mutexdestroy]]## + Pour éviter l'accès simultané aux ressources partagées à partir de "threads" différents, FreeBASIC met en œuvre les mutex, les verrous d'exclusion mutuelle qui peut être "possédé" par un seul "thread" lors d'une tôche critique. Voir ##[[KeyPgMutexCreate MutexCreate]]##, ##[[KeyPgMutexLock MutexLock]]##, ##[[KeyPgMutexUnlock MutexUnlock]]##, ##[[KeyPgMutexDestroy MutexDestroy]]## {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/threads/threadwait.bas"}}%%(freebasic) -dim shared printsync as any ptr + %%(freebasic) -sub mythread(byval idp as any ptr) - var id = cint(idp) - dim as double t, w - dim as integer i, n +Dim Shared printsync As Any Ptr + Sub mythread(ByVal idp As Any Ptr) - if( id = 1 ) then +Var id = CInt(idp) + Dim As Double t, w + Dim As Integer i, n + +If( id = 1 ) Then w = 1 - n = 10 - else + +n = 10 + Else w = 0.3 n = 5 - end if - - for i = 1 to n - - mutexlock printsync - print "Thread #"; id; ": on step #"; i - mutexunlock printsync - - '' simulate some work - t = timer - while( timer - t ) < w - wend - - next i - - mutexlock printsync - print "Thread #"; id; " is done " - mutexunlock printsync - -end sub - -dim as any ptr t1, t2 - -print "Starting threads ... " - -'' create a mutex to sync printing -printsync = MutexCreate() - -'' create 2 threads, each taking a different -'' amount of time to complete -t1 = threadcreate( @mythread, cast(any ptr, 1) ) -t2 = threadcreate( @mythread, cast(any ptr, 2) ) - -'' wait for threads to complete -threadwait( t1 ) -threadwait( t2 ) - -mutexdestroy printsync - -print "All done." -%% - -{{fbdoc item="lang"}} - - Threading is not allowed in ##-lang qb## - -{{fbdoc item="target"}} - - **Threadwait** is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender. - - In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue. - -{{fbdoc item="diff"}} - - New to Freebasic - -{{fbdoc item="see"}} - - ##[[KeyPgThreadCreate Threadcreate]]## - - ##[[KeyPgMutexCreate Mutexcreate]]## - - ##[[KeyPgMutexLock Mutexlock]]## - - ##[[KeyPgMutexUnlock Mutexunlock]]## - - ##[[KeyPgMutexDestroy Mutexdestroy]]## + End If + For i = 1 To n -{{fbdoc item="back" value="CatPgThreading|Threading Support Functions"}} \ No newline at end of file +MutexLock printsync \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgTime.wakka b/fbdocs/manual/cache/KeyPgTime.wakka index 277e48d73f..d2be5f793f 100644 --- a/fbdocs/manual/cache/KeyPgTime.wakka +++ b/fbdocs/manual/cache/KeyPgTime.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TIME"}}---- -Returns the current system time as a string +Retourne l'heure courante du système sous forme d'une chaîne {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Time** ( ) [[KeyPgAs as]] [[KeyPgString string]] @@ -7,11 +7,11 @@ Returns the current system time as a string {{fbdoc item="usage"}}## //result// = **Time** ## -{{fbdoc item="ret"}} - Returns the current system. +{{fbdoc item="section" value="Valeur retournée + Retourne l'heure courante du système. {{fbdoc item="desc"}} - Returns the current system time in the format ##hh:mm:ss##. + Retourne l'heure courante du système dans le format ##hh:mm:ss##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/time.bas"}}%%(freebasic) @@ -19,7 +19,7 @@ print "the current time is: "; time %% {{fbdoc item="diff"}} - - The QB TIME statement (to set the system time) is now called ##[[KeyPgSettime Settime]]##. + - La déclaration QB TIME (pour définir la date système) est maintenant appelée ##[[KeyPgSetdate SetTime]]##. {{fbdoc item="see"}} - ##[[KeyPgDate Date]]## diff --git a/fbdocs/manual/cache/KeyPgTimeValue.wakka b/fbdocs/manual/cache/KeyPgTimeValue.wakka index cc60ad36da..5da2046a91 100644 --- a/fbdocs/manual/cache/KeyPgTimeValue.wakka +++ b/fbdocs/manual/cache/KeyPgTimeValue.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="TIMEVALUE"}}---- -Gets a [[ProPgDates Date Serial]] from a time string +Forme une [[ProPgDates Date Serial]] à partir d'une chaîne heure {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""TimeValue""** ( [[KeyPgByref byref]] //timestring// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **TimeValue** ( [[KeyPgByref ByRef]] //timestring// [[KeyPgAs As]] [[KeyPgString String]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""TimeValue""**( //timestring// ) + //result// = **TimeValue**( //timestring// ) ## {{fbdoc item="param"}} ##//timestring//## - the string to convert + la chaîne à convertir -{{fbdoc item="ret"}} - Returns a [[ProPgDates Date Serial]] from a time string. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates Date Serial]] à partir d'une chaîne heure. {{fbdoc item="desc"}} - The time string must be in the format ##"23:59:59"## or ##"11:59:59PM"## + La chaîne heure doit avoir le format ##"23:59:59"## ou ##"11:59:59PM"## - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/timevalue.bas"}}%%(freebasic) @@ -31,7 +31,7 @@ Print Format(ds, "hh:mm:ss") %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgTimer.wakka b/fbdocs/manual/cache/KeyPgTimer.wakka index b3301c425b..2eecf0adcb 100644 --- a/fbdocs/manual/cache/KeyPgTimer.wakka +++ b/fbdocs/manual/cache/KeyPgTimer.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TIMER"}}---- -Returns the amount of time that has passed since a static reference point. +Retourne le temps écoulé par rapport à un point de référence fixe. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Timer** ( ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -7,14 +7,14 @@ Returns the amount of time that has passed since a static reference point. {{fbdoc item="usage"}}## //result// = **Timer** ## -{{fbdoc item="ret"}} - Returns a ##[[KeyPgDouble double]]## precision result with the time, in seconds, since a static reference point. +{{fbdoc item="section" value="Valeur retournée + Retourne un résultat ##[[KeyPgDouble Double]]## précision avec le temps écoulé, en secondes, par rapport à un point de référence statique. {{fbdoc item="desc"}} - The ##**Timer**## function is useful for finding out how long a section of code takes to run, or for control the timing of your code. To find out how much time has passed between two points in your program, you can record the value of ##**Timer**## at the start and end points, and then subtract the start value from the end value. + La fonction ##**Timer**## est utile pour déterminer quelle durée de temps s'écoule lors de l'exécution d'une portion de code, ou pour contrôler le déroulement de votre code. Pour déterminer quel temps s'est écoulé entre deux points de votre programme, vous pouvez enregistrer la valeur de ##**Timer**## aux points de départ et de fin, et puis soustraire la valeur de départ à celle de fin. - On some platforms, the value of ##**Timer**## resets to zero at midnight (see below), so if the start and end time are on either side of the reset point, the difference will be negative. This could cause unexpected behavior in some programs. In those cases, adding ##86400## (the number of seconds in 24 hours) to the difference should return the correct result. If the time taken is longer than a day, then it will be also be necessary to check the number of days that have elapsed. + Sur certaine plates-formes, la valeur de ##**Timer**## est remise à zéro à minuit (voir ci-dessous), donc si les temps de départ et de fin sont de chaque côté du point de remise à zéro, la différence sera négative. Ce qui peut produire des effets imprévus dans certains programmes. Dans ce cas, ajoutez ##86400## (nombre de secondes de 24 heures) à la différence pour obtenir le résultat correct. Si la durée dépasse un jour, il est alors nécessaire de déterminer le nombre de jours écoulés. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/timer.bas"}}%%(freebasic) @@ -29,18 +29,18 @@ Loop Until (Timer - Start) > 2.5 Print "Done." %% -{{fbdoc item="target"}} - - On ""Win32"" and Linux, if the program must wait for periods of 0.1 seconds or more, ##[[KeyPgSleep Sleep]]## should be used, this allows other programs to run during the waiting period. For shorter delays, a loop using TIMER can be more precise. - - The reference point chosen varies, depending on the platform. On Windows, the time is measured relative to the point the computer was booted up. On DOS, the time is measured relative to Jan 1 1970. +{{fbdoc item="section" value="Différences de plates-formes + - Sous Win32 et Linux, si le programme doit attendre pour des périodes de 0.1 seconde ou plus, ##[[KeyPgSleep Sleep]]## doit être utilisé, ce qui permet aux autres programmes de fonctionner pendant la période d'attente. Pour des délais plus courts, une boucle utilisant TIMER sera plus précise. + - Le point de référence varie en fonction de la plate-forme. Sous Windows, le temps est mesuré par rapport au point où l'ordinateur a été mis en route. Sous DOS, le temps est mesuré par rapport au 1er Janvier 1970. -~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle Single]]##-precision variables, also it shouldn't be multiplied (to get 1/10 seconds or so) and stored in 32-bit integer variables then// +//Note pour les utilisateurs DOS: actuellement, le nombre de secondes depuis 1970 dépasse ##10^9##, et il est donc impossible de le stocker dans une variable ##[[KeyPgSingle Single (simple)]]##-précision, il ne peut pas non plus être multiplié (pour obtenir les 1/10 de secondes ou plus) et stocké dans une variable entière, donc// - - The precision of TIMER varies, depending on the computer used. If the processor has a precision timer (as the Performance Counter Pentium processors from Intel have) and the OS uses it, the precision is linked to the processor clock and microseconds can be expected. With older processors (386, 486), and always in DOS, the resolution is 1/18 second. + - La précision de TIMER varie, en fonction de l'ordinateur utilisé. Si le processeur dispose d'un compteur de précision (comme les processeurs Performance Counter Pentium d'Intel) et que le système d'exploitation l'utilise, la précision est liée à l'horloge du processeur et on peut espérer la micro-seconde. Avec des processeurs plus anciens (386, 486), et toujours sous DOS, la résolution est de 1/18 de seconde. - - Usage of TIMER can cause disk accesses in DOS, see [[http://www.freebasic.net/forum/viewtopic.php?t=12985 forum]] for analysis and solutions + - L'utilisation de TIMER peut provoquer des accès disque sous DOS, voir [[http://www.freebasic.net/forum/viewtopic.php?t=12985">forum]] pour analyse et solutions {{fbdoc item="diff"}} - - In QB TIMER returned the number of seconds from last midnight, and its accuracy was 1/18 secs + - Dans QB, TIMER retourne le nombre de secondes à partir de minuit, et la précision est de 1/18 s {{fbdoc item="see"}} - ##[[KeyPgTime Time]]## diff --git a/fbdocs/manual/cache/KeyPgTimeserial.wakka b/fbdocs/manual/cache/KeyPgTimeserial.wakka index 5b35eef3f9..b8f517b0ee 100644 --- a/fbdocs/manual/cache/KeyPgTimeserial.wakka +++ b/fbdocs/manual/cache/KeyPgTimeserial.wakka @@ -1,29 +1,29 @@ {{fbdoc item="title" value="TIMESERIAL"}}---- -Gets a [[ProPgDates Date Serial]] for the specified hours, minutes, and seconds +Forme une [[ProPgDates Date Serial]] avec les heures, minutes et secondes spécifiées {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""TimeSerial""** ( [[KeyPgByval byval]] //hour// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //minute// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //second// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgDouble double]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **TimeSerial** ( [[KeyPgByval ByVal]] //hour// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //minute// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //second// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgDouble Double]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""TimeSerial""**( //hours//, //minutes//, //seconds// ) + //result// = **TimeSerial**( //hours//, //minutes//, //seconds// ) ## {{fbdoc item="param"}} - ##//hour//## - number of hours, in the range 0-23 + ##//hours//## + nombre d'heures, de 0 à 23 ##//minute//## - number of minutes + nombre de minutes ##//second//## - number of seconds + nombre de secondes -{{fbdoc item="ret"}} - Returns a [[ProPgDates date serial]] containing the time formed by the values in the ##//hours//##, ##//minutes//## and ##//seconds//## parameters.The date serial returned has no integer part. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[ProPgDates date serial]] contenant l'heure formée avec les valeurs des paramètres ##//hours//##, ##//minutes//## et ##//seconds//##. La "date serial" retournée n'a pas de partie entière. {{fbdoc item="desc"}} - ##//hours//## must be specified in the range 0-23 + ##//hours//## doit avoir une valeur de 0 à 23 - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/timeserial.bas"}}%%(freebasic) @@ -35,7 +35,7 @@ Print Format(ds, "yyyy/mm/dd hh:mm:ss") %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgTo.wakka b/fbdocs/manual/cache/KeyPgTo.wakka index b527e85458..a73edbf5b8 100644 --- a/fbdocs/manual/cache/KeyPgTo.wakka +++ b/fbdocs/manual/cache/KeyPgTo.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TO"}}---- -Statement modifier to specify a range. +Déclaration de modification de déclaration d'une plage. {{fbdoc item="syntax"}}## FOR //iterator// //intial_value// TO //ending_value// @@ -14,27 +14,27 @@ Statement modifier to specify a range. DIM //variable_identifier//( //lower_bound// TO //upper_bound// ) AS //type_specifier// ## {{fbdoc item="desc"}} - The TO keyword is used to define a certain numerical range. This keyword is valid only if used with [[KeyPgFornext FOR ... NEXT]], [[KeyPgSelectcase SELECT / CASE]] and [[KeyPgDim DIM]] statements. + Le mot-clef TO est utilisé pour définir une certaine plage numérique. Il est valide seulement s'il est utilisé avec [[KeyPgFornext For ... Next]], [[KeyPgSelectcase Select / Case]] et [[KeyPgDim Dim]]. - In the first syntax, the TO keyword defines the initial and ending values of the iterator in a FOR statement. + Dans la première syntaxe, le mot-clef TO définit les valeurs initiales et finales de l'itérateur dans une déclaration FOR. - In the second syntax, the TO keyword defines lower and upper bounds for CASE comparisons. + Dans la deuxième syntaxe, le mot-clef TO définit les bornes inférieures et supérieures de comparaisons CASE. - In the third syntax, the TO keyword defines the array bounds in a DIM statement + Dans la troisième syntaxe, le mot-clef TO définit les bornes inférieures et supérieures d'une déclaration DIM - For more information, see [[KeyPgFornext FOR...NEXT]], [[KeyPgDim DIM]] and [[KeyPgSelectcase SELECT CASE]]. + Pour plus d'informations, voir [[KeyPgFornext For...Next]], [[KeyPgDim Dim]] et [[KeyPgSelectcase Select Case]]. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/misc/to.bas"}}%%(freebasic) -'' this program uses bound variables along with the TO keyword to create an array, store random -'' temperatures inside the array, and to determine output based upon the value of the temperatures +'' ce programme utilise variables bornes avec le mot-clef t;TO pour creer un tableau, stocke temperatures aleatoires +'' dans le tableau, et determine sortie basee sur la valeur des temperatures Randomize Timer -'' define minimum and maximum number of temperatures we will create +'' definit nombre minimum et maximum de temperatures a creer Const minimum_temp_count As Integer = 1 Const maximum_temp_count As Integer = 10 -'' define the range of temperatures zones in which bacteria breed rapidly (in degrees) +'' definit plage des zones temperatures dans lesquelles bacteries se reproduisent rapidement (en degres) Const min_low_danger As Integer = 40 Const max_low_danger As Integer = 69 Const min_medium_danger As Integer = 70 @@ -42,16 +42,16 @@ Const max_medium_danger As Integer = 99 Const min_high_danger As Integer = 100 Const max_high_danger As Integer = 130 -'' define array to hold temperatures using our min/max temp count bounds +'' definit tableau pour stocker temperatures en utilisant notre min/max compteur Dim As Integer array( minimum_temp_count To maximum_temp_count ) -'' declare a for loop that iterates from minimum to maximum temp count +'' declare une boucle FOR de mimni a maxi Dim As Integer it For it = minimum_temp_count To maximum_temp_count array( it ) = Int( Rnd( 1 ) * 200 ) + 1 - '' display a message based on temperature using our min/max danger zone bounds + '' affiche un message base sur temperatures utilisant min max Select Case array( it ) Case min_low_danger To max_low_danger Color 11 @@ -73,7 +73,7 @@ Sleep %% {{fbdoc item="diff"}} - - none + - Aucune {{fbdoc item="see"}} - ##[[KeyPgFornext For...Next]]## diff --git a/fbdocs/manual/cache/KeyPgTransGfx.wakka b/fbdocs/manual/cache/KeyPgTransGfx.wakka index c204a53ecf..3cb80a2e8c 100644 --- a/fbdocs/manual/cache/KeyPgTransGfx.wakka +++ b/fbdocs/manual/cache/KeyPgTransGfx.wakka @@ -1,49 +1,50 @@ {{fbdoc item="title" value="TRANS"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which selects transparent background as the blitting method +Paramètre de la fonction graphique ##[[KeyPgPutgraphics Put]]## qui sélectionne l'arière-plan transparent comme méthode de "blitting" {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Trans** ## {{fbdoc item="param"}} ##**Trans**## - Required. + Requis. {{fbdoc item="desc"}} - ##**Trans**## selects transparent background as the method for blitting an image buffer. This is similar to the ##PSET## method, but pixels containing the mask color are skipped. - For 8-bit color images, the mask color is palette index 0. For 16/32-bit color images, the mask color is Magenta, which is ##[[KeyPgRgb RGB]](255, 0, 255)##. The alpha value is ignored when checking for the mask color in 32-bit images. + ##**Trans**## utilise l'arrière-plan transparent comme méthode d'écriture dans un tampon image (blitting). Similaire à la méthode ##PSET##, mais les pixels contenant le masque de couleur sont ignorés. + Pour les images couleur 8-bit, le masque de couleur est l'indice de palette 0. Pour les images couleur 16/32-bit, le masque de couleur est Magenta, c'est à dire ##[[KeyPgRgb RGB]](255, 0, 255)##. La valeur alpha est ignorée lors de la vérification pour le masque pour les images 32-bit. {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/gfx/put-trans.bas"}}%%(freebasic) -'' set up a screen: 320 * 200, 16 bits per pixel + %%(freebasic) +'' ecran: 320 * 200, 16 bits par pixel screenres 320, 200, 16 -'' set up an image with the mask color as the background. +'' image avec le masque couleur comme arriere-plan. dim img as any ptr = imagecreate( 32, 32, rgb(255, 0, 255) ) circle img, (16, 16), 15, rgb(255, 255, 0), , , 1, f circle img, (10, 10), 3, rgb( 0, 0, 0), , , 2, f circle img, (23, 10), 3, rgb( 0, 0, 0), , , 2, f circle img, (16, 18), 10, rgb( 0, 0, 0), 3.14, 6.28 -'' Put the image with PSET (gives the exact contents of the image buffer) +'' Put l'image avec PSET (donne le contenu exact du tampon image) draw string (110, 50 - 4), "Image put with PSET" put (60 - 16, 50 - 16), img, pset -'' Put the image with TRANS +'' Put l'image avec TRANS draw string (110, 150 - 4), "Image put with TRANS" put (60 - 16, 150 - 16), img, trans -'' free the image memory +'' libere memoire image imagedestroy img -'' wait for a keypress +'' attend touche appuyee sleep %% -{{image class="center" title="Put Trans example output" url="/images/trans.png"}} +
    {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgPutgraphics Put (Graphics)]]## -{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} \ No newline at end of file +{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}} + diff --git a/fbdocs/manual/cache/KeyPgTrim.wakka b/fbdocs/manual/cache/KeyPgTrim.wakka index e9b535b149..1bd8ce83f5 100644 --- a/fbdocs/manual/cache/KeyPgTrim.wakka +++ b/fbdocs/manual/cache/KeyPgTrim.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TRIM"}}---- -Removes surrounding substrings or characters on the left and right side of a string +Enlève les sous-chaînes qui entourent ou les caractères sur les côtés gauche et droit d'une chaîne. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Trim** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]], [ **Any** ] [[KeyPgByref byref]] //trimset// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] = " " ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,19 +10,19 @@ Removes surrounding substrings or characters on the left and right side of a str ## {{fbdoc item="param"}} ##//str//## - The source string. + La chaîne source. ##//trimset//## - The substring to trim. + La sous-chaîne à enlever. -{{fbdoc item="ret"}} - Returns the trimmed string. +{{fbdoc item="section" value="Valeur retournée + Retourne la chaîne "nettoyée" à gauche et à droite. {{fbdoc item="desc"}} - This procedure trims surrounding characters from the left (beginning) and right (end) of a source string. Substrings matching ##//trimset//## will be trimmed if specified, otherwise spaces ([[CptAscii ASCII]] code 32) are trimmed. + Cette procédure élimine les caractères entourant à gauche (début) et à droite (fin) de la chaîne source. Les sous-chaînes correspondant à ##//trimset//## seront éliminées si spécifiées, autrement les espaces ([[CptAscii ASCII]] code 32) sont éliminés. - If the ##**Any**## keyword is used, any character matching a character in ##//trimset//## will be trimmed. + Si le mot-clef ##**Any**## est utilisé, chaque caractère correspondant à un caractère dans ##//trimset//## sera éliminé. - All comparisons are case-sensitive. + Toutes les comparaisons sont sensibles à la casse. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/trim.bas"}}%%(freebasic) @@ -34,25 +34,25 @@ dim s2 as string = "BaaBaaaaB With You aaBBaaBaa" Print "'" + trim(s2, "Baa") + "'" Print "'" + trim(s2, any "Ba") + "'" %% - will produce the output: + produira la sortie: %% '... Stuck in the middle ...' 'Stuck in the middle' 'aaB With You aaB' -' With You ' +' With You ' %% {{fbdoc item="target"}} - - DOS version/target of ""FreeBASIC"" does not support the wide-character version of ##**Trim**##. + - DOS version/cible de FreeBASIC ne supporte pas la version larges-caractères de ##**Trim**##. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Trim""**##. - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Trim**##. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - [[KeyPgLtrim Ltrim]] diff --git a/fbdocs/manual/cache/KeyPgType.wakka b/fbdocs/manual/cache/KeyPgType.wakka index ebc1d35d00..ca56338c20 100644 --- a/fbdocs/manual/cache/KeyPgType.wakka +++ b/fbdocs/manual/cache/KeyPgType.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TYPE"}}---- -Declares a user-defined type. +Déclare un type défini par l'utilisateur. {{fbdoc item="syntax"}}## @@ -26,134 +26,134 @@ Declares a user-defined type. ## {{fbdoc item="param"}} ##//alignment//## - Specifies the byte alignment for data fields. + Spécifie l'alignement d'octets pour les champs de données. ##//fieldname//## - Name of the data field or member procedure. + Nom du champ de données ou d'un membre de procédure. ##//external_name//## - Name of field as seen when externally linked. + Nom de domaine si liens externes. ##//parameters//## - The parameters to be passed to a member procedure. + Les paramètres à passer à un membre de procédure. ##//array subscripts//## - Subscripts to declare a fixed-length array. + Les indices pour déclarer un tableau de longueur fixe. ##//bits//## - Number of bits a data field occupies. + Nombre de bits occupés par un champ de données. ##//initializer//## - Default initializer for the data field. + Initialisation par défaut pour le champ de données. ##//operatorname//## - The name of the operator to be overloaded. + Le nom de l'opérateur à surcharger. ##//calling convention specifier//## - Can be ##[[KeyPgCdecl Cdecl]]##, ##[[KeyPgStdcall Stdcall]]## or ##[[KeyPgPascal Pascal]]##. + Peut être ##[[KeyPgCdecl cdecl]]##, ##[[KeyPgStdcall stdcall]]## or ##[[KeyPgPascal pascal]]##. {{fbdoc item="desc"}} - ##**Type**## is used to declare custom data types containing one or more bit, scalar, array or other ##**Type**## fields. + ##**Type**## est utilisé pour déclarer des types de données contenant un ou plusieurs bits, scalaire, tableau ou d'autres champs de ##**Type**##. - Types support member functions including ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgProperty Property]]## and ##[[KeyPgMemberSub Sub]]##. + Supporte membre de fonctions incluant ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgProperty Property]]## et ##[[KeyPgMemberSub Sub]]##. - Fields default to ##[[KeyPgVisPublic Public:]]## member access unless, ##[[KeyPgVisPrivate Private:]]## or ##[[KeyPgVisProtected Protected:]]## is specified. + Les champs seront, par défaut, des membres à accès ##[[KeyPgVisPublic Public:]]## sauf si, ##[[KeyPgVisPrivate Private:]]## ou ##[[KeyPgVisProtected Protected:]]## est spécifié. - An anonymous ##[[KeyPgUnion Union]]## can be nested in a ##**Type**## declaration. + Une ##[[KeyPgUnion Union]]## anonyme peut être imbriquée dans une déclaration de ##**Type**##. - The optional ##[[KeyPgField Field]]=//number//## when given will change the default field alignment. ##[[KeyPgField Field]]=1## will disable any alignment, making the ##**Type**## contiguous in memory. + ##[[KeyPgField Field]]=//number//## est facultatif, s'il existe, il change l'alignement par défaut des champs. ##[[KeyPgField Field]]=1## annule tout alignement, rendant le ##**Type**## contigu en mémoire. - ##**Type**## can be used to return a temporary type variable. See ##[[KeyPgTypeTemp Type()]]##. + ##**Type**## peut être utilisé pour retourner une variable de type temporaire. Voir ##[[KeyPgTypeTemp Type()]]##. - ##**Type**## can be used to declare a type definition ( i.e. an alias or alternative name ) for an already declared or yet to be declared type. See ##[[KeyPgTypeAlias Type (Alias)]]## + ##**Type**## peut être utilisé pour déclarer une définition de type ( c'est à dire un alias ou un autre nom ) pour un type déjà déclaré ou qui va être déclaré. Voir ##[[KeyPgTypeAlias Type (Alias)]]## - Data fields may have an optional default ##//initializer//## value. This default value initializes the data field immediately before any constructor is called. + Les champs de données peuvent avoir une valeur facultative ##//initializer//## par défaut. Cette valeur par défaut initialise le champ de données immédiatement avant tout appel du constructeur. - ##[[KeyPgStaticMember Static]]## immediately preceding ##[[KeyPgMemberSub Sub]]## or ##[[KeyPgMemberFunction Function]]## indicates that no hidden ##[[KeyPgThis This]]## parameter is to be passed to the member procedure. + ##[[KeyPgStaticMember Static]]## qui précède immédiatement ##[[KeyPgMemberSub Sub]]## ou ##[[KeyPgMemberFunction Function]]## indique qu'aucun paramètre caché ##[[KeyPgThis This]]## doit être transmis au membre de la procédure. - ##[[KeyPgConstMember Const]]## immediately preceding ##[[KeyPgMemberSub Sub]]## or ##[[KeyPgMemberFunction Function]]## indicates that the hidden ##[[KeyPgThis This]]## parameter is to be considered read-only. + ##[[KeyPgConstMember Const]]## qui précède immédiatement ##[[KeyPgMemberSub Sub]]## ou ##[[KeyPgMemberFunction Function]]## indique que le paramètre caché ##[[KeyPgThis This]]## est à considérer comme en lecture-seulement (read-only). - **Warning** Special care must be taken when using a user defined type for file I/O. It is recommended to use ##Field = 1## for such cases, and it may be required to read files created by other applications. - UDTs that contain pointers to data should not be written to file as-is: when the data is read later, the pointers will almost certainly be invalid, and the data they pointed to will no longer be available. Instead, custom input/output routines should be used, to save the allocated data in a different format in the file. This includes UDTs containing variable-length strings. - Additionally, reading fixed length strings in UDT's from files is problematic: at present, fixed-length strings contain an extra NULL character on the end. To preserve alignment the field would need to be declared with one char less than the actual size and accessing the field by its name makes the last character unavailable. It also means there may be potential problems passing the string to functions that expect the NULL character to be there. - A better solution is to use ubyte arrays, this requires a couple of auxiliary functions converting to/from string. See the example. + **Avertissement:** +
  • Des précautions particulières doivent être prises lors de l'utilisation d'un type défini par l'utilisateur pour les entrées/sorties (I / O) fichier. Il est recommandé d'utiliser ##Field = 1## pour de tels cas, et cela peut être nécessaire pour lire les fichiers créés par d'autres applications. +
  • Les types de données utilisateur qui contiennent des pointeurs vers des données ne doivent pas être écrits dans le fichier tel quel: lorsque les données sont lues plus tard, les pointeurs seront presque toujours invalides, et les données qu'ils pointaient ne seront plus disponibles. Au lieu de cela, des routines d'entrée / sortie personnalisés doivent être utilisées, pour sauver les données allouées dans un format différent dans le fichier. Cela inclut les types de données utilisateur contenant des chaînes de longueur variable. +
  • En outre, la lecture de chaînes de longueur fixe dans un type utilisateur à partir de fichiers est problématique: à l'heure actuelle, les chaînes de longueur fixe contiennent un caractère NULL supplémentaires à la fin. Afin de préserver l'alignement le champ devra être déclaré avec un nombre de caractères inférieur à la taille réelle et l'accès au champ par son nom rendra le dernier caractère indisponible. Cela signifie également qu'il peut y avoir des problèmes potentiels en passant la chaîne aux fonctions qui attendent d'avoir là un caractère NULL. +
  • Une meilleure solution consiste à utiliser des tableaux de type ##**UByte**##, cela nécessite un couple de fonctions auxiliaires de conversion ##//'vers / à partir de'//## la chaîne. Voir l'exemple. {{fbdoc item="ex"}} -This is an example of a QB-style type, not including procedure definitions -{{fbdoc item="filename" value="examples/manual/udt/type1.bas"}}%%(freebasic) +Ceci est un exemple de style QB-style, ne comprenant pas des définitions de procédure TYPE clr - red AS UBYTE - green AS UBYTE - blue AS UBYTE -END TYPE + Type clr + red As UByte + green As UByte +blue As UByte -DIM c AS clr +End Type +Dim c As clr c.red = 255 c.green = 128 c.blue = 64 -%% -And this is an example of a type working as an object: -{{fbdoc item="filename" value="examples/manual/udt/type2.bas"}}%%(freebasic) +%% +Et ceci un exemple d'un type fontionnant comme un objet: +'' Example showing the problems with fixed length string fields in UDTs '' Example showing the problems with fixed length string fields in UDTs '' Suppose we have read a GIF header from a file '' signature width height -dim as zstring*(10+1) z => "GIF89a" + mkshort(10) + mkshort(11) -print "Using fixed-length string" +Dim As ZString*(10+1) z => "GIF89a" + MKShort(10) + MKShort(11) -type hdr1 field = 1 - as string*(6-1) sig /' We have to dimension the string with 1 char - ' less to avoid misalignments '/ - as ushort wid, hei -end type +Print "Using fixed-length string" + Type hdr1 Field = 1 + As String*(6-1) sig /' We have to dimension the string with 1 char + ' less to avoid misalignments '/ +As UShort wid, hei -dim as hdr1 ptr h1 = cptr(hdr1 ptr, @z) -print h1->sig, h1->wid, h1->hei '' Prints GIF89 (misses a char!) 10 11 +End Type +Dim As hdr1 Ptr h1 = CPtr(hdr1 Ptr, @z) -'' We can do comparisons only with the 5 visible chars and creating a temporary string with LEFT +Print h1->sig, h1->wid, h1->hei '' Prints GIF89 (misses a char!) 10 11 -if left(h1->sig, 5) = "GIF89" then print "ok" else print "error" +'' We can do comparisons only with the 5 visible chars and creating a temporary string with LEFT +If Left(h1->sig, 5) = "GIF89" Then Print "ok" Else Print "error" '' Using a ubyte array, we need an auxiliary function to convert it to a string -function ub2str( ub() as ubyte ) as string - dim as integer length = ubound(ub) + 1 - dim as string res = space(length) - for i as integer = 0 to length-1 - res[i] = ub(i): next - function = res -end function + Function ub2str( ub() As UByte ) As String + Dim As Integer length = UBound(ub) + 1 + Dim As String res = Space(length) + For i As Integer = 0 To length-1 + res[i] = ub(i): Next +Function = res + +End Function +Print -print -print "Using an array of ubytes" +Print "Using an array of ubytes" + Type hdr2 Field = 1 + sig(0 To 6-1) As UByte '' Dimension 6 +As UShort wid, hei -type hdr2 field = 1 - sig(0 to 6-1) as ubyte '' Dimension 6 - as ushort wid, hei -end type +End Type +Dim As hdr2 Ptr h2 = CPtr(hdr2 Ptr, @z) -dim as hdr2 ptr h2 = cptr(hdr2 ptr, @z) '' Viewing and comparing is correct but a conversion to string is required +Print ub2str(h2->sig()), h2->wid, h2->hei '' Prints GIF89a 10 11 (ok) +If ub2str(h2->sig()) = "GIF89a" Then Print "ok" Else Print "error" '' Prints ok -print ub2str(h2->sig()), h2->wid, h2->hei '' Prints GIF89a 10 11 (ok) -if ub2str(h2->sig()) = "GIF89a" then print "ok" else print "error" '' Prints ok %% - -{{fbdoc item="target"}} - - The default field alignment is 4 bytes for DOS and Linux targets. - - The default field alignment is 8 bytes for Windows targets. + {{fbdoc item="target"}} + - L'alignement des champs par défaut est de 4 octets pour les cibles DOS et Linux. -{{fbdoc item="lang"}} - - Object-related features such as functions declared inside ##**Type**## blocks are supported only with the //[[CompilerOptlang -lang fb]]// dialect since version 0.17b - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the default field alignment depends on the target platform. - - With the //[[CompilerOptlang -lang qb]]// dialect the fields are aligned to byte boundaries by default, unless otherwise specified. - - To force byte alignment use ##FIELD=1##. +- L'alignement des champs par défaut est de 8 octets pour les cibles Windows. + {{fbdoc item="lang"}} +
  • Les fonctionnalités relatives aux objets telles que les fonctions déclarées à l'intérieur de blocs ##**Type**## sont prises en charge uniquement avec le dialecte //[[CompilerOptlang -lang fb]]// depuis la version 0.17b + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang fblite]]//, l'alignement des champs par défaut dépend de la plate-forme cible. + - Avec le dialecte //[[CompilerOptlang -lang qb]]// les champs sont alignés à l'octet limites par défaut, sauf indication contraire. -{{fbdoc item="diff"}} - - At present, fixed-length strings have an extra, redundant character on the end, which means they take up one more byte than they do in QB. For this reason, UDTs that use them are not compatible with QB when used for file I/O. +- Pour forcer l'alignement octet utilisez ##FIELD=1##. + {{fbdoc item="diff"}} -{{fbdoc item="see"}} +- A l'heure actuelle, les chaînes de longueur fixe ont un supplément, le caractère redondant de fin, ce qui signifie qu'elles prennent un octet supplémentaire par rapport à QB. Pour cette raison, les types définis par l'utilisateur qui les utilisent ne sont pas compatibles avec QB lorsqu'ils les utilisent pour les Entrées / Sories de fichier. + {{fbdoc item="see"}} - ##[[KeyPgTypeAlias Type (Alias)]]## - ##[[KeyPgTypeTemp Type (Temporary)]]## - ##[[KeyPgUnion Union]]## - ##[[KeyPgEnum Enum]]## - - ##[[KeyPgTypeof Typeof]]## + - ##[[KeyPgTypeof TypeOf]]## - ##[[KeyPgOffsetof OffsetOf]]## - ##[[KeyPgField Field]]## - - ##[[KeyPgWith With]]## -{{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file +- ##[[KeyPgWith With]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgTypeAlias.wakka b/fbdocs/manual/cache/KeyPgTypeAlias.wakka index 8d49758427..d6d6d4c21c 100644 --- a/fbdocs/manual/cache/KeyPgTypeAlias.wakka +++ b/fbdocs/manual/cache/KeyPgTypeAlias.wakka @@ -1,19 +1,19 @@ {{fbdoc item="title" value="Type (Alias)"}}---- -Declares an alternative name for a type +Déclare un autre nom pour un type {{fbdoc item="syntax"}}## **Type** //typename// [[KeyPgAs as]] //symbol// ## {{fbdoc item="param"}} ##//typename//## - new alternative name. + nouveau nom de remplacement. ##//symbol//## - symbol or data type declaration to associate with ##//typename//##. + symbole ou déclaration de type de données à associer à ##//typename//##. {{fbdoc item="desc"}} - ##//symbol//## may refer to any declared data type including a built-in data type, ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## pointer, ##[[KeyPgType Type]]## declaration, ##[[KeyPgUnion Union]]## declaration, or ##[[KeyPgEnum Enum]]## declaration. + ##//symbol//## peut se référer à tout type de données déclaré, y compris un type-intégré de données, ##[[KeyPgSub Sub]]## ou pointeur de ##[[KeyPgFunction Function]]##, déclaration de ##[[KeyPgType Type]]##, déclaration d'##[[KeyPgUnion Union]]##, ou déclaration d'##[[KeyPgEnum Enum]]##ération. - A type alias can be used to allow forward declarations of [[CatPgUserDefTypes User Defined Types]]. + Un alias de type peut être utilisé pour permettre des déclarations anticipées de [[CatPgUserDefTypes Types définis par l'utilisateur]]. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/type-fwd.bas"}}%%(freebasic) @@ -36,7 +36,7 @@ with p.ChildList(0) .Name = "Jr." .ParentRef = @p '' ... -end with +End With with p.ChildList(0) print .Name; " is child of "; .parentRef->Name @@ -44,7 +44,7 @@ end with %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type...End Type]]## diff --git a/fbdocs/manual/cache/KeyPgTypeTemp.wakka b/fbdocs/manual/cache/KeyPgTypeTemp.wakka index 27253a7977..459a27328e 100644 --- a/fbdocs/manual/cache/KeyPgTypeTemp.wakka +++ b/fbdocs/manual/cache/KeyPgTypeTemp.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Temporary Types"}}---- -Creates a temporary copy of a user defined type +Crée une copie temporaire d'un type défini par l'utilisateur {{fbdoc item="syntax"}}## //result// = **Type**( //initializers//, ... ) @@ -8,19 +8,19 @@ Creates a temporary copy of a user defined type ## {{fbdoc item="param"}} ##//initializers//## - Initial values for the type + Valeurs initiales pour le type ##//typename//## - The name of the ##[[KeyPgType Type]]## or ##[[KeyPgUnion Union]]## + Le nom du ##[[KeyPgType Type]]## ou de l'##[[KeyPgUnion Union]]## -{{fbdoc item="ret"}} - A temporary copy of the type. +{{fbdoc item="section" value="Valeur retournée + Une copie temporaire du type. {{fbdoc item="desc"}} - Used to create an anonymous and temporary type. If ##//typename//## is not explicitly given, it will be inferred from its usage. Usage of the temporary copy may include assigning it to a variable, passing it as a parameter to a procedure, or returning it as a value from a procedure. + Utilisé pour créer un type anonyme et temporaire. Si ##//typename//## n'est pas explicitement donné, il sera déduit de par son utilisation. L'utilisation de la copie temporaire peut être de l'assigner à une variable, de la passer comme un parametre à une procédure, ou comme valeur retournée par une procédure. - The ##[[KeyPgConstructor Constructor]]## for the type, if there is one, will be called when the temporary copy is created. And the ##[[KeyPgDestructor Destructor]]## for the type, if there is one, will be called immediately after its use. + Le ##[[KeyPgConstructor Constructor]]## du type, s'il existe, devrait être appelé quand la copie temporaire est créée. Et le ##[[KeyPgDestructor Destructor]]## du type, s'il existe, devrait être appelé immédiatement après son utilisation. - It can also be used as an even shorter shortcut than ##[[KeyPgWith With]]## (see below) if you are changing all the records. + Il peut également être utilisé comme un raccourci encore plus court que ##[[KeyPgWith With]]## (voir plus loin) si vous changez tous les enregistrements. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/temp-type.bas"}}%%(freebasic) @@ -99,7 +99,7 @@ test( type( 1 ) ) %% {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type...End Type]]## diff --git a/fbdocs/manual/cache/KeyPgTypeof.wakka b/fbdocs/manual/cache/KeyPgTypeof.wakka index 590ae067c0..6008ee534b 100644 --- a/fbdocs/manual/cache/KeyPgTypeof.wakka +++ b/fbdocs/manual/cache/KeyPgTypeof.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="TYPEOF"}}---- -Returns the type of a variable. +Retourne le type d'une variable. {{fbdoc item="syntax"}}## **Typeof** ( //variable// | //datatype// ) @@ -7,25 +7,25 @@ Returns the type of a variable. {{fbdoc item="param"}} ##//variable//## - A variable of any type. + Une variable de n'importe quel type. ##//datatype//## - A [[DataType DataType]]. + Un [[DataType DataType]]. {{fbdoc item="desc"}} - Typeof is a compiler intrinsic that replaces itself with the type of the variable passed to it. It can either be used in a variable declaration (Example 1) or it can be used in the preprocessor for comparison, printing. (Example 2) + ##**Typeof**## est un compilateur intrinsèque qui se remplace par le type de la variable qui lui est passée. Il peut être utilisé dans une déclaration de variable (Exemple 1) ou il peut être utilisé dans le préprocesseur pour comparaison, impression. (Example 2) - Typeof also supports passing any intrinsic data type, or user-defined type, not only variables defined as those types. Also supported are expressions, the type is inferred from the expression (much like [[KeyPgVar Var]]) + ##**Typeof**## peut également passer n'importe quel type de données intrinsèques, ou de type défini par l'utilisateur, et non pas uniquement des variables définies comme étant les types. Les expressions sont aussi prises en charge, le type est déterminé à partir de l'expression (un peu comme [[KeyPgVar Var]]) {{fbdoc item="ex"}} -Example 1: +Exemple 1: {{fbdoc item="filename" value="examples/manual/misc/typeof1.bas"}}%%(freebasic) Dim As Integer foo Dim As TypeOf(67.2) bar '' '67.2' is a literal double Dim As TypeOf( foo + bar ) teh_double '' double + integer results in double Print Len(teh_double) %% -Example 2: +Exemple 2: {{fbdoc item="filename" value="examples/manual/misc/typeof2.bas"}}%%(freebasic) Dim As String foo #print TypeOf(foo) @@ -35,10 +35,10 @@ Dim As String foo %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type...End Type]]## diff --git a/fbdocs/manual/cache/KeyPgUbound.wakka b/fbdocs/manual/cache/KeyPgUbound.wakka index fa352cae1d..4fd6ba23a0 100644 --- a/fbdocs/manual/cache/KeyPgUbound.wakka +++ b/fbdocs/manual/cache/KeyPgUbound.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="UBOUND"}}---- -Returns the upper bound of an array's dimension +Renvoie la limite supérieure d'une dimension d'un tableau {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Ubound** ( array() [[KeyPgAs as]] [[KeyPgAny any]], [[KeyPgByval byval]] //dimension// [[KeyPgAs as]] [[KeyPgInteger integer]] = 1 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Returns the upper bound of an array's dimension ## {{fbdoc item="param"}} ##//array//## - an array of any type + un tableau de n'importe quel type ##//dimension//## - the dimension to get upper bound of + la dimension dont on veut obtenir la limite supérieure -{{fbdoc item="ret"}} - Returns the upper bound of an array's dimension. +{{fbdoc item="section" value="Valeur retournée + Renvoie la limite supérieure d'une dimension d'un tableau. {{fbdoc item="desc"}} - ##**Ubound**## returns the largest value that can be used as an index into a particular dimension of an array. + ##**UBound**## retourne la valeur la plus grande pouvant servir d'indice d'une dimension particulière d'un tableau. - Array dimensions are numbered from one (##1##) to ##//n//##, where ##//n//## is the total number of dimensions. If ##//dimension//## is not specified, ##**Ubound**## will return the upper bound of the first dimension. If ##//dimension//## is less than one (##1##) or greater than the total number of dimensions (##//n//##) in the array, the result is undefined. + Les dimensions d'un tableau sont numérotées de un (1) à //n//, dans lequel //n// est le nombre total de dimensions. Si ##//dimension//## n'est pas spécifié, ##**UBound**## retournera la limite supérieure de la première dimension. Si ##//dimension//## est inférieur à un (1) ou supérieur au nombre total de dimensions (//n//) du tableau, le résultat est indéfini. {{fbdoc item="ex"}} diff --git a/fbdocs/manual/cache/KeyPgUbyte.wakka b/fbdocs/manual/cache/KeyPgUbyte.wakka index bf5bc7ac13..4b7cc479ba 100644 --- a/fbdocs/manual/cache/KeyPgUbyte.wakka +++ b/fbdocs/manual/cache/KeyPgUbyte.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="UBYTE"}}---- -Standard data type: 8 bit unsigned +Type de données standard: nombre de 8 bits non-signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Ubyte** ## {{fbdoc item="desc"}} - 8-bit unsigned whole-number data type. Can hold a value in the range of 0 to 255. + Nombre entier de 8 bits non-signé. Peut contenir des valeurs de 0 à 255. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/ubyte2.bas"}}%%(freebasic) @@ -19,15 +19,15 @@ PRINT "ubytevar= ", ubytevar Dim y As UByte = &HFF Print "UByte Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%UByte Range = 0 to 255%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ubyte""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ubyte**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgByte Byte]]## diff --git a/fbdocs/manual/cache/KeyPgUcase.wakka b/fbdocs/manual/cache/KeyPgUcase.wakka index 4df1bb8cd9..eef8dc01b9 100644 --- a/fbdocs/manual/cache/KeyPgUcase.wakka +++ b/fbdocs/manual/cache/KeyPgUcase.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="UCASE"}}---- -Returns an upper case copy of a string +Retourne une copie en lettres majuscules d'une chaîne de caractères {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Ucase** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgString string]] @@ -10,34 +10,34 @@ Returns an upper case copy of a string ## {{fbdoc item="param"}} ##//str//## - String to convert to uppercase. + Chaîne de caractères à convertir en majuscules. -{{fbdoc item="ret"}} - Uppercase copy of ##//str//##. +{{fbdoc item="section" value="Valeur retournée + Copie en lettres majuscules de ##//str//##. {{fbdoc item="desc"}} - Returns a copy of ##//str//## with all of the letters converted to upper case. + Retourne une copie de ##//str//## avec toutes les lettres converties en lettres majuscules. - If ##//str//## is empty, the null string (##"####"##) is returned. + Si ##//str//## est vide, une chaîne nulle (##"####"##) est retournée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/ucase.bas"}}%%(freebasic) print ucase("AbCdEfG") %% - will produce the output: + produira la sortie: %%ABCDEFG %% {{fbdoc item="target"}} - - The wide-character string version of ##**Ucase**## is not supported for DOS target. + - La version large chaîne ##**WString**## de ##**UCase**## n'est pas supportée pour la cible DOS. {{fbdoc item="lang"}} - - The string type suffix "$" is obligatory in the //[[CompilerOptlang -lang qb]]// dialect. - - The string type suffix "$" is optional in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang fb]]// dialects. + - Le suffixe de type de chaîne "$" est obligatoire dans le dialecte //[[CompilerOptlang -lang qb]]//. + - Le suffixe de type de chaîne "$" est facultatif dans les dialectes //[[CompilerOptlang -lang fblite]]// et //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - QB does not support Unicode. + - QB ne supporte pas Unicode. {{fbdoc item="see"}} - ##[[KeyPgLcase Lcase]]## diff --git a/fbdocs/manual/cache/KeyPgUinteger.wakka b/fbdocs/manual/cache/KeyPgUinteger.wakka index 98d59dafa1..976a919df7 100644 --- a/fbdocs/manual/cache/KeyPgUinteger.wakka +++ b/fbdocs/manual/cache/KeyPgUinteger.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="UINTEGER"}}---- -Standard data type: 32 bit unsigned +Type de données standard: nombre de 32 bits non-signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Uinteger** ## {{fbdoc item="desc"}} - 32-bit unsigned whole-number data type. Can hold values from 0 to 4294967295. + Nombre entier de 32 bits non-signé. Peut contenir des valeurs de 0 à 4294967295. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/uinteger.bas"}}%%(freebasic) @@ -13,15 +13,15 @@ Standard data type: 32 bit unsigned Dim y As UInteger = &HFFFFFFFF Print "UInteger Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%UInteger Range = 0 to 4294967295%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Uinteger""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Uinteger**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgInteger Integer]]## diff --git a/fbdocs/manual/cache/KeyPgUlong.wakka b/fbdocs/manual/cache/KeyPgUlong.wakka index 58f554b9c9..fe96811587 100644 --- a/fbdocs/manual/cache/KeyPgUlong.wakka +++ b/fbdocs/manual/cache/KeyPgUlong.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="ULONG"}}---- -Standard data type: unsigned integer having same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## +Type de données standard: nombre entier non-signe qui a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])## {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Ulong** ## {{fbdoc item="desc"}} - Depending on the platform, same as ##[[KeyPgUinteger Uinteger]]## or ##[[KeyPgUlongint Ulongint]]##. A 32-bit or 64-bit unsigned whole-number data type. + En fonction de la plate-forme, identique à ##[[KeyPgUinteger UInteger]]## ou ##[[KeyPgUlongint ULongInt]]##. Un nombre entier non-signé de 32 bits ou 64 bits. - ##**Ulong**## has the same size as ##[[KeyPgSizeof Sizeof]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. + ##**Ulong**## a la même taille que ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/ulong.bas"}}%%(freebasic) @@ -15,14 +15,14 @@ Standard data type: unsigned integer having same size as ##[[KeyPgSizeof Sizeof] Dim y As ULong = &HFFFFFFFF Print "ULong Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%ULong Range = 0 to 4294967295%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ulong""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ulong**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLong Long]]## diff --git a/fbdocs/manual/cache/KeyPgUlongint.wakka b/fbdocs/manual/cache/KeyPgUlongint.wakka index d5aa8f8461..4d824b3593 100644 --- a/fbdocs/manual/cache/KeyPgUlongint.wakka +++ b/fbdocs/manual/cache/KeyPgUlongint.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="ULONGINT"}}---- -Standard data type: 64 bit unsigned +Type de données standard: nombre de 64 bits non-signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Ulongint** ## {{fbdoc item="desc"}} - A 64-bit unsigned whole-number data type. Can hold values from 0 to 18 446 744 073 709 551 615 + Nombre entier de 64 bits non-signé. Peut contenir des valeurs de 0 à 18 446 744 073 709 551 615 {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/ulongint.bas"}}%%(freebasic) @@ -13,15 +13,15 @@ Dim x As ULongInt = 0 Dim y As ULongInt = &HFFFFFFFFFFFFFFFFull Print "ULongInt Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%ULongInt Range = 0 to 18446744073709551615%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ulongint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ulongint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgLongint Longint]]## diff --git a/fbdocs/manual/cache/KeyPgUnion.wakka b/fbdocs/manual/cache/KeyPgUnion.wakka index eeeebb25d8..a79c924636 100644 --- a/fbdocs/manual/cache/KeyPgUnion.wakka +++ b/fbdocs/manual/cache/KeyPgUnion.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="UNION"}}---- -Declares a union user defined type. +Déclare un type union défini par l'utilisateur. {{fbdoc item="syntax"}}## **Union** //typename// @@ -10,20 +10,20 @@ Declares a union user defined type. ## {{fbdoc item="param"}} ##//typename//## - Name of the ##**Union**## + Nom de l'##**Union**## ##//fieldname//## - Name of a data field member + Nom d'un membre champ de données ##//member function declaration//## - Any of the supported member functions + N'importe quelle fonction membre supportée {{fbdoc item="desc"}} - Unions are similar to a ##[[KeyPgType Type]]## structure, except that the elements of a union occupy the same space in memory. The size of the Union is the size of the largest data item. A data item can be an unnamed ##[[KeyPgType Type]]## . Since they occupy the same space, only a single element can be used. + Une ##**Union**## est similaire à un ##[[KeyPgType Type]]## structure, sauf que les éléments d'une ##**Union**## occupent le même espace dans la mémoire. La taille de l'##**Union**## est celle du plus grand élément de données. Un élément de données peut être d'un ##[[KeyPgType Type]]## sans nom. Comme ils occupent le même espace, un seul élément peut être utilisé. - Unnamed unions can be nested inside a type structure and unnamed types can be nested inside an union . See Example. + Des ##**Union**## sans nom peuvent être imbriquées dans un type structure et des types sans nom peuvent être imbriqués à l'intérieur d'une ##**Union**##. Voir Exemple. - Unions support member functions including ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgProperty Property]]## and ##[[KeyPgMemberSub Sub]]##. All members of a union are public and access control is not supported. + Les ##**Union**## supportent des fonctions membres inclus ##[[KeyPgConstructor Constructor]]##, ##[[KeyPgDestructor Destructor]]##, ##[[KeyPgMemberFunction Function]]##, ##[[KeyPgOperator Operator]]##, ##[[KeyPgProperty Property]]## et ##[[KeyPgMemberSub Sub]]##. Tous les membres d'une ##**Union**## sont publics et le contrôle d'accès n'est pas supporté. - A ##**Union**## can be passed as a user defined type to overloaded operator functions. + Une ##**Union**## peut être passée comme un type défini par l'utilisateur pour surcharger des fonctions opérateurs. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/union.bas"}}%%(freebasic) @@ -72,11 +72,11 @@ sleep %% {{fbdoc item="lang"}} - - Object-related features as functions defined inside the ##**Union**## block are supported only in the //[[CompilerOptlang -lang fb]]// dialect. - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Union""**##. + - Les fonctionnalités relatives aux objets telles que les fonctions déclarées à l'intérieur de blocs ##**Union**## ne sont supportées que dans le dialecte //[[CompilerOptlang -lang fb]]//. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Union**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgUnlock.wakka b/fbdocs/manual/cache/KeyPgUnlock.wakka index 633327bfac..1d36e80838 100644 --- a/fbdocs/manual/cache/KeyPgUnlock.wakka +++ b/fbdocs/manual/cache/KeyPgUnlock.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="UNLOCK"}}---- -Removes a previous access restriction (lock) on a file +Supprime une restriction d'accès précédente (lock) sur un fichier {{fbdoc item="syntax"}}## **Unlock** #//filenum//, //record// @@ -7,27 +7,27 @@ Removes a previous access restriction (lock) on a file ## {{fbdoc item="param"}} ##//filenum//## - The file number used to ##[[KeyPgOpen Open]]## the file. + Le numéro de fichier utilisé pour ##[[KeyPgOpen Open (=ouvrir)]]## le fichier. ##//record//## - The record (##[[KeyPgRandom Random]]## files) to unlock. + L'enregistrement (fichiers en mode ##[[KeyPgRandom Random]]##) à déverrouiller. ##//start//## - The first byte position (##[[KeyPgBinary Binary]]## files) in a range to unlock. + La première position, dans une plage de positions, en octets (fichiers en mode ##[[KeyPgBinary Binary]]##) à déverrouiller. ##//end//## - The last byte position (##[[KeyPgBinary Binary]]## files) in a range to unlock. + La dernière position, dans une plage de positions, en octets (fichiers en mode ##[[KeyPgBinary Binary]]## ) à déverrouiller. {{fbdoc item="desc"}} - ##**Unlock**## removes the temporary access restriction set by ##[[KeyPgLock Lock]]##. + ##**Unlock**## supprime la restriction d'accès temporaire mise en place par ##[[KeyPgLock Lock]]##. - It is strongly recommended to use the same arguments used in the previous ##[[KeyPgLock Lock]]##. + Il est fortement recommandé d'utiliser les mêmes arguments que ceux utilisés dans le précédent ##[[KeyPgLock Lock]]##. - **Note: This command does not always work, neither as documented nor as expected. It appears to be broken at the moment.** + **Note: Cette commande ne fonctionne pas toujours, ni comme dans la documentation, ni comme espéré. Elle apparaît comme "cassée" pour le moment.** {{fbdoc item="ex"}} - For an example see ##[[KeyPgLock Lock]]##. + Pour un exemple voir ##[[KeyPgLock Lock]]##. {{fbdoc item="diff"}} - - Currently, FB cannot implicitly unlock the entire file - - In ##[[KeyPgRandom Random]]## mode, FB cannot unlock a range of records + - Actuellement, FB ne peut pas implicitement déverrouiller l'ensemble des fichiers + - En mode ##[[KeyPgRandom Random]]##, FB ne peut pas déverrouiller un ensemble d'enregistrements {{fbdoc item="see"}} - ##[[KeyPgLock Lock]]## diff --git a/fbdocs/manual/cache/KeyPgUnsigned.wakka b/fbdocs/manual/cache/KeyPgUnsigned.wakka index 3d5b8aa35c..bbd92b1801 100644 --- a/fbdocs/manual/cache/KeyPgUnsigned.wakka +++ b/fbdocs/manual/cache/KeyPgUnsigned.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="UNSIGNED"}}---- -Integer data type modifier +Modificateur du type de données [[KeyPgInteger Integer (= entier)]] {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Unsigned** //{integer-based data type}// ## {{fbdoc item="desc"}} - Forces an integer-based data type to be unsigned (cannot contain negative numbers, but has it's maximum value doubled). + Force un nombre entier de base à être non-signé (ne peut contenir de nombres négatifs, mais voit sa valeur maximum doublée). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/unsigned.bas"}}%%(freebasic) @@ -20,10 +20,10 @@ print x {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Unsigned""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Unsigned**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgUinteger Uinteger]]## diff --git a/fbdocs/manual/cache/KeyPgUntil.wakka b/fbdocs/manual/cache/KeyPgUntil.wakka index f322eb74e0..37ca65d7ca 100644 --- a/fbdocs/manual/cache/KeyPgUntil.wakka +++ b/fbdocs/manual/cache/KeyPgUntil.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="UNTIL"}}---- -Conditional clause used in ##[[KeyPgDoloop Do..Loop]]## statements. +Clause conditionnelle utilisée dans les déclarations ##[[KeyPgDoloop Do..Loop]]##. {{fbdoc item="syntax"}}## Do **Until** //condition// - or + ou Loop **Until** //condition// ## {{fbdoc item="desc"}} - ##**Until**## is used with the ##[[KeyPgDoloop Do...Loop]]## structure. + ##**Until**## est utilisé avec la structure ##[[KeyPgDoloop Do...Loop]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/control/until.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ LOOP UNTIL a > 10 %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDoloop Do...Loop]]## diff --git a/fbdocs/manual/cache/KeyPgUshort.wakka b/fbdocs/manual/cache/KeyPgUshort.wakka index eb58a65ba3..5241eb9f38 100644 --- a/fbdocs/manual/cache/KeyPgUshort.wakka +++ b/fbdocs/manual/cache/KeyPgUshort.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="USHORT"}}---- -Standard data type: 16 bit unsigned +Type de données standard: nombre de 16 bits non-signé {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Ushort** ## {{fbdoc item="desc"}} - 16-bit unsigned whole-number data type. Can hold values from 0 to 65535. + Nombre entier de 16 bits non-signé. Peut contenir des valeurs de 0 à 65535. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/ushort.bas"}}%%(freebasic) @@ -13,15 +13,15 @@ Standard data type: 16 bit unsigned Dim y As UShort = &HFFFF Print "UShort Range = "; x; " to "; y %% - **Output:** + **Affichage:** %%UShort Range = 0 to 65535%% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Ushort""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Ushort**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgShort Short]]## diff --git a/fbdocs/manual/cache/KeyPgUsing.wakka b/fbdocs/manual/cache/KeyPgUsing.wakka index 37f4fc1d74..2b7f71688b 100644 --- a/fbdocs/manual/cache/KeyPgUsing.wakka +++ b/fbdocs/manual/cache/KeyPgUsing.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="USING (Namespaces)"}}---- -Brings namespace symbols into the current scope +Déplace l'espace de noms dans la portée courante {{fbdoc item="syntax"}}## **Using** //identifier// [, //identifier// [, ...] ] ## {{fbdoc item="param"}} - ##//identifier//##: The name of the ##[[KeyPgNamespace Namespace]]## that you want to use. + ##//identifier//##: Le nom de l' ##[[KeyPgNamespace Namespace = Espace de noms]]## que vous voulez utiliser. {{fbdoc item="desc"}} - The ##**Using**## command allows all symbols from a given namespace to be accessed without the namespace's name prefix. Unlike ""C++"" but like C#, the ##[[KeyPgNamespace Namespace]]## keyword is not needed after ##**Using**##, because individual symbols cannot be inherited from a namespace. Inheriting a whole namespace can save typing, but sometimes some meaning of the code can be lost, and conflicts with other symbols could be created. + La commande ##**Using**## rend tous les symboles - d'un espace de noms donné - accessibles sans le préfixe nom de l'espace de noms. Contrairement à C++, mais comme C#, le mot-clef ##[[KeyPgNamespace Namespace]]## n'est pas nécessaire après ##**Using**##, car les symboles individuels ne peuvent pas être hérités d'un espace de noms. Hériter un espace de noms entier permet de sauver le typage, mais cependant un certain sens du code peut être perdu et des conflits avec d'autres symboles pourraient être créés. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/module/using.bas"}}%%(freebasic) @@ -32,7 +32,7 @@ Dim OtherVariable As T %% {{fbdoc item="diff"}} - - QB had the ##**Using**## keyword, but for other purposes. Namespaces did not exist in QB. + - QB avait le mot-clé ##**Using**##, mais dans d'autres buts. Les espaces de noms n'existaient pas dans QB. {{fbdoc item="see"}} - ##[[KeyPgPrintusing Print Using]]## diff --git a/fbdocs/manual/cache/KeyPgVaArg.wakka b/fbdocs/manual/cache/KeyPgVaArg.wakka index defeec383f..b10a967d66 100644 --- a/fbdocs/manual/cache/KeyPgVaArg.wakka +++ b/fbdocs/manual/cache/KeyPgVaArg.wakka @@ -1,51 +1,24 @@ {{fbdoc item="title" value="VA_ARG"}}---- -Returns the current argument from a variable argument list. +Retourne l'argument courant à partir d'une liste variable d'arguments. {{fbdoc item="syntax"}}## //variable// = **va_arg** ( //argument_list//, [[DataType datatype]] ) ## {{fbdoc item="desc"}} - The ##**va_arg**## macro allows the use of a variable number of arguments within a function. ##**va_arg**## returns the current argument in the list, ##//argument_list//##, with an expected data type of ##//datatype//##. Before ##**va_arg**## can be used, it must be Initialized with the command ##[[KeyPgVaFirst va_first]]##. Unlike the C macro with the same name, ##**va_arg**## does not automatically increment ##//argument_list//## to the next argument within the list. The command ##[[KeyPgVaNext va_next]]## must be used for this purpose. + La macro ##**va_arg**## permet l'utilisation d'un nombre variable d'arguments dans une fonction. ##**va_arg**## retourne l'argument en cours dans la liste, ##//argument_list//##, avec un type de données attendu ##//datatype//##. Avant que ##**va_arg**## puisse être utilisé, il doit être initialisé ##[[KeyPgVaFirst va_first]]##. Contrairement à la macro C ayant le même nom, ##**va_arg**## n'incrémente pas automatiquement ##//argument_list//## sur l'argument suivant dans la liste. La commande ##[[KeyPgVaNext va_next]]## doit être utilisée pour cela. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/va_arg.bas"}}%%(freebasic) + %%(freebasic) ' Note that CDECL is used here --> it must be used with an ellipsis argument (...). -FUNCTION Avg cdecl (Count as INTEGER, ... ) AS DOUBLE - DIM ARG AS ANY PTR - DIM SUM AS DOUBLE = 0 - DIM i AS INTEGER - - ARG = VA_FIRST() + Function Avg cdecl (Count As Integer, ... ) As Double - FOR i = 1 TO COUNT - SUM += VA_ARG(ARG, DOUBLE) - ARG = VA_NEXT(ARG,DOUBLE) - NEXT i - RETURN SUM/COUNT -end function +Dim ARG As Any Ptr + Dim SUM As Double = 0 -PRINT AVG (4, 3.4,5.0,3.2,4.1) -PRINT AVG (2, 65.2,454.65481) +Dim i As Integer + ARG = va_first() + For i = 1 To COUNT + SUM += va_arg(ARG, Double) -SLEEP -%% - -The output would look like: -%% -3.925 -259.927405 -%% - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__va_arg""**##. - -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" - -{{fbdoc item="see"}} - - ##[[KeyPgDots ... (Ellipsis)]]## - - ##[[KeyPgVaFirst va_first]]## - - ##[[KeyPgVaNext va_next]]## - -{{fbdoc item="back" value="CatPgProcedures|Procedures"}}{{fbdoc item="back" value="CatPgVarArg|Variable Argument list"}} \ No newline at end of file +ARG = va_next(ARG,Double) \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgVaFirst.wakka b/fbdocs/manual/cache/KeyPgVaFirst.wakka index acb8fe7625..8f46242342 100644 --- a/fbdocs/manual/cache/KeyPgVaFirst.wakka +++ b/fbdocs/manual/cache/KeyPgVaFirst.wakka @@ -1,40 +1,110 @@ {{fbdoc item="title" value="VA_FIRST"}}---- -Returns the first argument in a variable argument list +Retourne le premier argument dans une liste d'arguments variable {{fbdoc item="syntax"}}## //pointer_variable// = **va_first**() ## {{fbdoc item="desc"}} - The ##**va_first**## function initializes a [[ProPgPointers pointer]], //pointer_variable//, to point to the first variable argument passed to a function. + La fonction ##**va_first**## initialise un [[ProPgPointers pointer]], //pointer_variable//, qui pointe sur le premier argument variable passé à la fonction. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/va_first.bas"}}%%(freebasic) -FUNCTION Avg cdecl (Count as INTEGER, ... ) AS DOUBLE - DIM ARG AS ANY PTR - DIM SUM AS DOUBLE = 0 - DIM i AS INTEGER +{{fbdoc item="filename" value="examples/manual/procs/vararg1.bas"}}%%(freebasic) +Function Avg cdecl (Count As Integer, ... ) As Double + Dim ARG As Any Ptr + Dim sum As Double = 0 + Dim i As Integer - ARG = VA_FIRST() + arg = Va_First() - FOR i = 1 TO COUNT - SUM += VA_ARG(ARG, DOUBLE) - ARG = VA_NEXT(ARG,DOUBLE) - NEXT i - RETURN SUM/COUNT + For i = 1 To count + sum += Va_Arg(arg, Double) + ARG = va_next(ARG,Double) + Next i + + Return SUM/COUNT end function -PRINT AVG (4, 3.4,5.0,3.2,4.1) -PRINT AVG (2, 65.2,454.65481) - -SLEEP +Print AVG (4, 3.4,5.0,3.2,4.1) +Print AVG (2, 65.2,454.65481) +Sleep %% -The output would look like: +Le résultat devrait ressembler à: %% 3.925 259.927405 %% +{{fbdoc item="lang"}} +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Va_first**##. +{{fbdoc item="diff"}} + - Nouveau pour FreeBASIC + {{fbdoc item="see"}} + + - ##[[KeyPgDots ... (Ellipse - suggestion)]]## + - ##[[KeyPgVaArg va_arg]]## + - ##[[KeyPgVaNext va_next]]## + while (todo > 0) + dim as integer char = *p + p += 1 + todo -= 1 + + '' Is it a format char? + if (char = asc("%")) then + if (todo = 0) then + '' % at the end + print "%"; + exit while + end if + + '' The next char should tell the type + char = *p + p += 1 + todo -= 1 + + '' Print var-arg, depending on the type + select case char + '' integer? + case asc("i") + print str(va_arg(arg, integer)); + '' Note, different from C: va_next() must be + '' used as va_arg() won't update the pointer. + arg = va_next(arg, integer) + + '' long integer? (64-bit) + case asc("l") + print str(va_arg(arg, longint)); + arg = va_next(arg, longint) + + '' single or double? + '' Note: because the C ABI, all singles passed on + '' var-args are converted to doubles. + case asc( "f" ), asc( "d" ) + print str(va_arg(arg, double)); + arg = va_next(arg, double) + + '' string? + case asc("s") + '' Strings are passed byval, so the length is unknown + print *va_arg(arg, zstring ptr); + arg = va_next(arg, zstring ptr) + + end select + + '' Ordinary char, just print as-is + else + print chr( char ); + end if + wend +end sub + + dim as string s = "bar" + + myprintf(!"integer=%i, longint=%l single=%f, double=%d, string=%s, string=%s\n", _ + 1, 1ll shl 32, 2.2, 3.3, "foo", s) + + sleep +%% {{fbdoc item="lang"}} - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Va_first""**##. diff --git a/fbdocs/manual/cache/KeyPgVaNext.wakka b/fbdocs/manual/cache/KeyPgVaNext.wakka index 212faa6e84..b5ffc73f4b 100644 --- a/fbdocs/manual/cache/KeyPgVaNext.wakka +++ b/fbdocs/manual/cache/KeyPgVaNext.wakka @@ -1,50 +1,24 @@ {{fbdoc item="title" value="VA_NEXT"}}---- -Returns a pointer to the next argument in a variable argument list +Renvoie un pointeur sur l'argument suivant dans une liste d'arguments variable {{fbdoc item="syntax"}}## //Argument_Pointer// = **va_next** (//Argument_List//, [[DataType datatype]] ) ## {{fbdoc item="desc"}} - The ##**va_next**## macro points to the next argument within the list ##//Argument_List//## of the type ##//datatype//##. + La macro ##**va_next**## pointe vers l'argument suivant dans la liste ##//Argument_List//## de type ##//datatype//##. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/procs/va_next.bas"}}%%(freebasic) -FUNCTION Avg cdecl (Count as INTEGER, ... ) AS DOUBLE - DIM ARG AS ANY PTR - DIM SUM AS DOUBLE = 0 - DIM i AS INTEGER - - ARG = VA_FIRST() + %%(freebasic) - FOR i = 1 TO COUNT - SUM += VA_ARG(ARG, DOUBLE) - ARG = VA_NEXT(ARG,DOUBLE) - NEXT i - RETURN SUM/COUNT -end function +Function Avg cdecl (Count As Integer, ... ) As Double + Dim ARG As Any Ptr -PRINT AVG (4, 3.4,5.0,3.2,4.1) -PRINT AVG (2, 65.2,454.65481) +Dim SUM As Double = 0 + Dim i As Integer -SLEEP -%% +ARG = va_first() + For i = 1 To COUNT + SUM += va_arg(ARG, Double) + ARG = va_next(ARG,Double) -The output would look like: -%% -3.925 -259.927405 -%% - - -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Va_next""**##. - -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" - -{{fbdoc item="see"}} - - [[KeyPgDots ... (Ellipsis)]] - - ##[[KeyPgVaArg va_arg]]## - - ##[[KeyPgVaFirst va_first]]## - -{{fbdoc item="back" value="CatPgProcedures|Procedures"}}{{fbdoc item="back" value="CatPgVarArg|Variable Argument list"}} \ No newline at end of file +Next i \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgVal.wakka b/fbdocs/manual/cache/KeyPgVal.wakka index 0a95d412af..a0784bb9ec 100644 --- a/fbdocs/manual/cache/KeyPgVal.wakka +++ b/fbdocs/manual/cache/KeyPgVal.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VAL"}}---- -Converts a string to a floating point number +Conversion d'une chaîne en un nombre à virgule flottante {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Val** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgDouble double]] @@ -10,23 +10,23 @@ Converts a string to a floating point number ## {{fbdoc item="param"}} ##//strnum//## - the string containing a number to convert + la chaîne contenant le nombre à convertir -{{fbdoc item="ret"}} - Returns a converted ##[[KeyPgDouble Double]]## precision number +{{fbdoc item="section" value="Valeur retournée + Retourne un nombre converti en nombre ##[[KeyPgDouble Double]]## précision - If the first character of the string is invalid, ##**Val**## will return ##0##. + Si le premier caractère de la chaîne est invalide, ##**Val**## retournera ##0##. {{fbdoc item="desc"}} - ##**Val**("10")## will return ##10.0##, and ##**Val**("10.10")## will return ##10.1##. The function parses the string from the left, skipping any white space, and returns the longest number it can read, stopping at the first non-suitable character it finds. Scientific notation is recognized, with ##"D"## or ##"E"## used to specify the exponent. + ##**Val**("10")## retournera ##10.0##, et ##**Val**("10.10")## retournera ##10.1##. La fonction analyse la chaîne à partir de la gauche, en sautant tout espace blanc, et retourne le plus long nombre qu'elle peut lire, s'arrêtant au premier caractère non-approprié, qu'elle trouve. La notation scientifique est reconnue, en utilisant ##"D"## ou ##"E"## pour préciser l'exposant. - ##**Val**## can be used to convert integer numbers in binary / octal / hexadecimal format, if they have the relevant identifier (##"&B"## / ##"&O"## / ##"&H"##) prefixed, for example: ##**Val**("&HFF")## returns ##255##. + ##**Val**## peut convertir des nombres entiers dans le format binaire / octal / hexadécimal, s'il y a devant l'identificateur pertinent (##"&B"## / ##"&O"## / ##"&H"##), par exemple: ##**Val**("&HFF")## retourne ##255##. **Note**: - If you want to get an integer value from a string, consider using ##[[KeyPgValint ValInt]]## or ##[[KeyPgVallng ValLng]]## instead. They are faster, since they don't use floating-point numbers, and only ##[[KeyPgVallng ValLng]]## provides full 64-bit precision for ##[[KeyPgLongint LongInt]]## types. + Si vous souhaitez obtenir une valeur entière à partir d'une chaîne, pensez plutôt à utiliser ##[[KeyPgValint ValInt]]## ou ##[[KeyPgVallng ValLng]]##. Ils sont plus rapides, car ils n'utilisent pas de nombres à virgule flottante, et seul ##[[KeyPgVallng ValLng]]## procure une pleine précision 64-bit pour les types ##[[KeyPgLongint LongInt (entier long)]]##. - If you want to convert a number into string format, use the ##[[KeyPgStr Str]]## function. + Si vous voulez convertir un nombre en une chaîne, utilisez la fonction ##[[KeyPgStr Str]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/val.bas"}}%%(freebasic) @@ -41,7 +41,7 @@ print a, b %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgCdbl Cdbl]]## diff --git a/fbdocs/manual/cache/KeyPgValint.wakka b/fbdocs/manual/cache/KeyPgValint.wakka index 91fe27b037..586465720d 100644 --- a/fbdocs/manual/cache/KeyPgValint.wakka +++ b/fbdocs/manual/cache/KeyPgValint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VALINT"}}---- -Converts a string to an integer number +Conversion d'une chaîne en nombre entier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Valint** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //strnum// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,19 +10,19 @@ Converts a string to an integer number ## {{fbdoc item="param"}} ##//strnum//## - the string to convert + la chaîne à convertir -{{fbdoc item="ret"}} - Returns an ##[[KeyPgInteger Integer]]## of the converted string +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgInteger Integer (entier)]]## de la chaîne convertie - If the first character of the string is invalid, ##**Valint**## will return ##0##. + Si le premier caractère de la chaîne n'est pas valide, ##**ValInt**## retournera ##0##. {{fbdoc item="desc"}} - For example, ##**Valint**("10")## will return ##10##, and ##**Valint**("10.60")## will return ##10## as well. The function parses the string from the left, skipping any white space, and returns the longest number it can read, stopping at the first non-suitable character it finds. Any non-numeric characters, including decimal points and exponent specifiers, are considered non-suitable, for example, ##**Valint**("23.1E+6")## will just return ##23##. + Par exemple, ##**ValInt**("10")## retournera ##10##, et ##**ValInt**("10.60")## retournera ##10##. La fonction analyse la chaîne à partir de la gauche, en sautant tout espace blanc, et retourne le plus long nombre qu'elle peut lire, s'arrêtant au premier caractère non-approprié, qu'elle trouve. Tout caractère non-numérique, inclus les points décimaux et les spécificateurs d'exposant, sont considérés comme non-appropriés. Par exemple, ##**ValInt**("23.1E+6")## retournera seulement ##23##. - ##**Valint**## can be used to convert integer numbers in [[KeyPgBin binary]] / [[KeyPgOct octal]] / [[KeyPgHex hexadecimal]] format, if they have the relevant identifier (##"&B"## / ##"&O"## / ##"&H"##) prefixed, for example: ##**Valint**("&HFF")## returns ##255##. + ##**ValInt**## peut convertir des nombres entiers en format [[KeyPgBin Binaire]] / [[KeyPgOct Octal]] / [[KeyPgHex Hexadécimal]], s'il y a devant l'identificateur pertinent (##"&B"## / ##"&O"## / ##"&H"##), par exemple: ##**ValInt**("&HFF")## retourne ##255##. - If you want to convert a number into string format, use the ##[[KeyPgStr Str]]## function. + Si vous voulez convertir un nombre en une chaîne, utilisez la fonction ##[[KeyPgStr Str]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/valint.bas"}}%%(freebasic) @@ -38,10 +38,10 @@ print a, b {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Valint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Valint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCint Cint]]## diff --git a/fbdocs/manual/cache/KeyPgVallng.wakka b/fbdocs/manual/cache/KeyPgVallng.wakka index 3f3fcc0886..fe50a39d9b 100644 --- a/fbdocs/manual/cache/KeyPgVallng.wakka +++ b/fbdocs/manual/cache/KeyPgVallng.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VALLNG"}}---- -Converts a string to a long integer +Conversion d'une chaîne en nombre entier long {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Vallng** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //strnum// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgLongint longint]] @@ -10,19 +10,19 @@ Converts a string to a long integer ## {{fbdoc item="param"}} ##//strnum//## - the string to convert + la chaîne à convertir -{{fbdoc item="ret"}} - Returns a ##[[KeyPgLongint longint]]## of the converted string +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgInteger LongInt (entier long)]]## de la chaîne convertie - If the first character of the string is invalid, ##**Vallng**## will return ##0##. + Si le premier caractère de la chaîne n'est pas valide, ##**ValLng**## retournera ##0##. {{fbdoc item="desc"}} - For example, ##**Vallng**("10")## will return ##10##, and ##**Vallng**("10.60")## will return ##10## as well. The function parses the string from the left, skipping any white space, and returns the longest number it can read, stopping at the first non-suitable character it finds. Any non-numeric characters, including decimal points and exponent specifiers, are considered non-suitable, for example, ##**Vallng**("23.1E+6")## will just return ##23##. + Par exemple, ##**ValLng**("10")## retournera ##10##, et ##**ValLng**("10.60")## retournera ##10##. La fonction analyse la chaîne à partir de la gauche, en sautant tout espace blanc, et retourne le plus long nombre qu'elle peut lire, s'arrêtant au premier caractère non-approprié, qu'elle trouve. Tout caractère non-numérique, inclus les points décimaux et les spécificateurs d'exposant, sont considérés comme non-appropriés. Par exemple, ##**ValLng**("23.1E+6")## retournera seulement ##23##. - ##**Vallng**## can be used to convert integer numbers in [[KeyPgBin binary]] / [[KeyPgOct octal]] / [[KeyPgHex hexadecimal]] format, if they have the relevant identifier (##"&B"## / ##"&O"## / ##"&H"##) prefixed, for example: ##**Vallng**("&HFF")## returns ##255##. + ##**ValLng**## peut convertir des nombres entiers en format [[KeyPgBin Binaire]] / [[KeyPgOct Octal]] / [[KeyPgHex Hexadécimal]], s'il y a devant l'identificateur pertinent (##"&B"## / ##"&O"## / ##"&H"##), par exemple: ##**ValLng**("&HFF")## retourne ##255##. - If you want to convert a number into string format, use the ##[[KeyPgStr Str]]## function. + Si vous voulez convertir un nombre en une chaîne, utilisez la fonction ##[[KeyPgStr Str]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/vallng.bas"}}%%(freebasic) @@ -38,10 +38,10 @@ print a, b {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Vallng""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Vallng**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgClngint Clngint]]## diff --git a/fbdocs/manual/cache/KeyPgValuint.wakka b/fbdocs/manual/cache/KeyPgValuint.wakka index 26d5be92b2..42352433d0 100644 --- a/fbdocs/manual/cache/KeyPgValuint.wakka +++ b/fbdocs/manual/cache/KeyPgValuint.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VALUINT"}}---- -Converts a string to an integer number +Conversion d'une chaîne en nombre entier non signé {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Valuint** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //strnum// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]] @@ -10,19 +10,19 @@ Converts a string to an integer number ## {{fbdoc item="param"}} ##//strnum//## - the string to convert + la chaîne à convertir -{{fbdoc item="ret"}} - Returns a ##[[KeyPgUinteger Uinteger]]## of the converted string +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgUinteger UInteger (entier non-signé)]]## de la chaîne convertie - If the first character of the string is invalid, ##**Valuint**## will return ##0##. + Si le premier caractère de la chaîne n'est pas valide, ##**ValUInt**## retournera ##0##. {{fbdoc item="desc"}} - For example, ##**Valuint**("10")## will return ##10##, and ##**Valuint**("10.60")## will return ##10## as well. The function parses the string from the left, skipping any white space, and returns the longest number it can read, stopping at the first non-suitable character it finds. Any non-numeric characters, including decimal points and exponent specifiers, are considered non-suitable, for example, ##**Valuint**("23.1E+6")## will just return ##23##. + Par exemple, ##**ValUInt**("10")## retournera ##10##, et ##**ValUInt**("10.60")## retournera ##10##. La fonction analyse la chaîne à partir de la gauche, en sautant tout espace blanc, et retourne le plus long nombre qu'elle peut lire, s'arrêtant au premier caractère non-approprié, qu'elle trouve. Tout caractère non-numérique, inclus les points décimaux et les spécificateurs d'exposant, sont considérés comme non-appropriés. Par exemple, ##**ValUInt**("23.1E+6")## retournera seulement ##23##. - ##**Valuint**## can be used to convert integer numbers in [[KeyPgBin binary]] / [[KeyPgOct octal]] / [[KeyPgHex hexadecimal]] format, if they have the relevant identifier (##"&B"## / ##"&O"## / ##"&H"##) prefixed, for example: ##**Valuint**("&HFF")## returns ##255##. + ##**ValUInt**## peut convertir des nombres entiers en format [[KeyPgBin Binaire]] / [[KeyPgOct Octal]] / [[KeyPgHex Hexadécimal]], s'il y a devant l'identificateur pertinent (##"&B"## / ##"&O"## / ##"&H"##), par exemple: ##**ValUInt**("&HFF")## retourne ##255##. - If you want to convert a number into string format, use the ##[[KeyPgStr Str]]## function. + Si vous voulez convertir un nombre en une chaîne, utilisez la fonction ##[[KeyPgStr Str]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/valuint.bas"}}%%(freebasic) @@ -38,10 +38,10 @@ print a, b {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Valuint""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Valuint**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgVal Val]]## diff --git a/fbdocs/manual/cache/KeyPgValulng.wakka b/fbdocs/manual/cache/KeyPgValulng.wakka index de374ae000..6e47633ef4 100644 --- a/fbdocs/manual/cache/KeyPgValulng.wakka +++ b/fbdocs/manual/cache/KeyPgValulng.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VALULNG"}}---- -Converts a string to a unsigned long integer +Conversion d'une chaîne en nombre entier long non-signé {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Valulng** [[KeyPgOverload overload]] ( [[KeyPgByref byref]] //strnum// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]] @@ -10,19 +10,19 @@ Converts a string to a unsigned long integer ## {{fbdoc item="param"}} ##//strnum//## - the string to convert + la chaîne à convertir -{{fbdoc item="ret"}} - Returns a ##[[KeyPgUlongint ulongint]]## of the converted string +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgUlongint ULongInt (entier long non-signé)]]## de la chaîne convertie - If the first character of the string is invalid, ##**Valulng**## will return ##0##. + Si le premier caractère de la chaîne n'est pas valide, ##**ValULng**## retournera ##0##. {{fbdoc item="desc"}} - For example, ##**Valulng**("10")## will return ##10##, and ##**Valulng**("10.60")## will return ##10## as well. The function parses the string from the left, skipping any white space, and returns the longest number it can read, stopping at the first non-suitable character it finds. Any non-numeric characters, including decimal points and exponent specifiers, are considered non-suitable, for example, ##**Valulng**("23.1E+6")## will just return ##23##. + Par exemple, ##**ValULng**("10")## retournera ##10##, et ##**ValULng**("10.60")## retournera ##10##. La fonction analyse la chaîne à partir de la gauche, en sautant tout espace blanc, et retourne le plus long nombre qu'elle peut lire, s'arrêtant au premier caractère non-approprié, qu'elle trouve. Tout caractère non-numérique, inclus les points décimaux et les spécificateurs d'exposant, sont considérés comme non-appropriés. Par exemple, ##**ValULng**("23.1E+6")## retournera seulement ##23##. - ##**Valulng**## can be used to convert integer numbers in [[KeyPgBin binary]] / [[KeyPgOct octal]] / [[KeyPgHex hexadecimal]] format, if they have the relevant identifier (##"&B"## / ##"&O"## / ##"&H"##) prefixed, for example: ##**Valulng**("&HFF")## returns ##255##. + ##**ValULng**## peut convertir des nombres entiers en format [[KeyPgBin Binaire]] / [[KeyPgOct Octal]] / [[KeyPgHex Hexadécimal]], s'il y a devant l'identificateur pertinent (##"&B"## / ##"&O"## / ##"&H"##), par exemple: ##**ValULng**("&HFF")## retourne ##255##. - If you want to convert a number into string format, use the ##[[KeyPgStr Str]]## function. + Si vous voulez convertir un nombre en une chaîne, utilisez la fonction ##[[KeyPgStr Str]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/valulng.bas"}}%%(freebasic) @@ -38,10 +38,10 @@ print a, b {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Valulng""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Valulng**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgCulngint Culngint]]## diff --git a/fbdocs/manual/cache/KeyPgVar.wakka b/fbdocs/manual/cache/KeyPgVar.wakka index dc08967786..7c3dac0a23 100644 --- a/fbdocs/manual/cache/KeyPgVar.wakka +++ b/fbdocs/manual/cache/KeyPgVar.wakka @@ -1,75 +1,75 @@ {{fbdoc item="title" value="VAR"}}---- -Declares a variable whose type is implied from the initializer expression +Déclare une variable dont le type est implicite dans l'expression d'initialisation {{fbdoc item="syntax"}}## **Var** [[[KeyPgShared shared]]] //symbolname// = //expression//[, //symbolname// = //expression//] ## {{fbdoc item="desc"}} - ##**Var**## declares a variable whose type is implied from the initializer expression. It is illegal to specify an explicit type in a ##**Var**## declaration. The initializer expression does not have to be a constant, it can be, or, it can be any variable of any type. Note: ##[[KeyPgWstring Wstring]]## is not supported with ##**Var**##, due to the fact that there is no var-len ##[[KeyPgWstring Wstring]]## type. This isn't likely to change, due to the complexities involved with handling Unicode. + ##**Var**## déclare une variable dont le type est implicite dans l'expression d'initialisation. Il est illégal de spécifier un type explicite dans une déclaration ##**Var**##. L'expression d'initialisation n'a pas à être une constante, elle peut être n'importe quelle variable de n'importe quel type. - Since the type of the variable is inferred from what you assign into it, it's helpful to know how literals work. Any literal number without a decimal point defaults to ##[[KeyPgInteger Integer]]##. A literal number //with// a decimal point defaults to ##[[KeyPgDouble Double]]##. + Note: ##[[KeyPgWstring WString]]## n'est pas supporté avec ##**Var**##, dû au fait qu'il n'y a pas de ##[[KeyPgWstring WString]]## de type ##//var-len//##. Ce n'est pas susceptible de changer, en raison de la complexité de la gestion Unicode. - All ##[[KeyPgZstring Zstring]]## expressions, including string literals and dereferenced ##[[KeyPgZstring Zstring]]## ##[[KeyPgPtr Ptr]]##s, will be given the ##[[KeyPgString String]]## variable type. + Puisque le type de la variable est déduit de ce que vous lui attribuez, il est utile de savoir comment les littéraux de travaillent. Tout nombre littéral sans point décimal sera par défaut un ##[[KeyPgInteger Integer = entier]]##. Un nombre littéral //avec// un point décimal sera par défaut un ##[[KeyPgDouble Double]]##. - Explicit suffixes may be used on literal variables, to change/clarify their type. See [[ProPgLiterals Literals]] and [[TblVarTypes Variable Types]] for some more information about suffixes that can be used on literals. + Toutes les expressions ##[[KeyPgZstring ZString]]##, y compris les littéraux de chaîne et les pointeurs ##[[KeyPgPtr Ptr]]## ##[[KeyPgZstring ZString]]## déréférencés, auront le type de variable ##[[KeyPgString String]]## variable type. - Note: Suffixes must appear on the initializer, not on the variable. Trying to use ##**Var**## with a variable that has a suffix will throw a compile error. + Des suffixes explicites peuvent être utilisés sur des variables littérales, pour changer/clarifier leur type. Voir [[ProPgLiterals Les littéraux]] et [[TblVarTypes Les types de variables]] pour plus d'information sur les suffixes utilisables sur les littéraux. +Note: Les suffixes doivent figurer sur l'initialisation, et non sur la variable. Essayer d'utiliser ##**Var**## avec une variable qui a un suffixe produira une erreur de compilation. {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/variable/var.bas"}}%%(freebasic) var a = cast(byte, 0) -var b = cast(short, 0) -var c = cast(integer, 0) -var d = cast(longint, 0) -var au = cast(ubyte, 0) -var bu = cast(ushort, 0) -var cu = cast(uinteger, 0) -var du = cast(ulongint, 0) -var e = cast(single, 0.0) -var f = cast(double, 0.0) -var g = @c '' integer ptr -var h = @a '' byte ptr -var s2 = "hello" '' var-len string +Var a = Cast(Byte, 0) +Var b = Cast(Short, 0) +Var c = Cast(Integer, 0) +Var d = Cast(LongInt, 0) +Var au = Cast(UByte, 0) +Var bu = Cast(UShort, 0) +Var cu = Cast(UInteger, 0) +Var du = Cast(ULongInt, 0) +Var e = Cast(Single, 0.0) +Var f = Cast(Double, 0.0) +Var g = @c '' integer ptr +Var h = @a '' byte ptr -var ii = 6728 '' implicit integer -var id = 6728.0 '' implicit double +Var s2 = "hello" '' var-len string +Var ii = 6728 '' implicit integer -print "Byte: ";len(a) -print "Short: ";len(b) -print "Integer: ";len(c) -print "Longint: ";len(d) -print "UByte: ";len(au) -print "UShort: ";len(bu) -print "UInteger: ";len(cu) -print "ULongint: ";len(du) -print "Single: ";len(e) -print "Double: ";len(f) -print "Integer Pointer: ";len(g) -print "Byte Pointer: ";len(h) -print "Variable String: ";len(s2) -print -print "Integer: ";len(ii) -print "Double: ";len(id) +Var id = 6728.0 '' implicit double +Print "Byte: ";Len(a) +Print "Short: ";Len(b) +Print "Integer: ";Len(c) +Print "Longint: ";Len(d) +Print "UByte: ";Len(au) +Print "UShort: ";Len(bu) +Print "UInteger: ";Len(cu) +Print "ULongint: ";Len(du) +Print "Single: ";Len(e) +Print "Double: ";Len(f) +Print "Integer Pointer: ";Len(g) +Print "Byte Pointer: ";Len(h) +Print "Variable String: ";Len(s2) +Print +Print "Integer: ";Len(ii) -sleep -%% +Print "Double: ";Len(id) +Sleep -{{fbdoc item="diff"}} - - New to ""FreeBASIC"" 0.17 +%% + {{fbdoc item="diff"}} -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Var""**##. +- Nouveau pour FreeBASIC 0.17 + {{fbdoc item="lang"}} -{{fbdoc item="see"}} +- Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Var**##. + {{fbdoc item="see"}} - ##[[KeyPgCommon Common]]## - ##[[KeyPgDim Dim]]## - ##[[KeyPgErase Erase]]## - ##[[KeyPgExtern Extern]]## - ##[[KeyPgLbound LBound]]## - - ##[[KeyPgRedim Redim]]## + - ##[[KeyPgRedim ReDim]]## - ##[[KeyPgPreserve Preserve]]## - ##[[KeyPgShared Shared]]## - ##[[KeyPgStatic Static]]## - - ##[[KeyPgUbound UBound]]## -{{fbdoc item="back" value="CatPgVariables|Variable Declarations"}} \ No newline at end of file +- ##[[KeyPgUbound UBound]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgViewgraphics.wakka b/fbdocs/manual/cache/KeyPgViewgraphics.wakka index 2dbcef9f4e..872c317268 100644 --- a/fbdocs/manual/cache/KeyPgViewgraphics.wakka +++ b/fbdocs/manual/cache/KeyPgViewgraphics.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="VIEW (GRAPHICS)"}}---- -Sets new physical coordinate mapping and clipping region +Valide la "cartographie" des nouvelles coordonnées physiques et de la zone de visualisation graphique (clipping region) {{fbdoc item="syntax"}}## **View** @@ -8,24 +8,24 @@ Sets new physical coordinate mapping and clipping region ## {{fbdoc item="param"}} ##//x1//## ##[[KeyPgAs as]] [[KeyPgInteger Integer]]##, ##//y1//## ##[[KeyPgAs as]] [[KeyPgInteger Integer]]## - The horizontal and vertical offsets, in pixels, of one corner of the viewport relative to the top-left corner of the screen. + Coordonnées horizontales et verticales, en pixels, relatives au coin en haut à gauche de l'écran, d'un coin de la zone de visualisation graphique (viewport). ##//x2//## ##[[KeyPgAs as]] [[KeyPgInteger Integer]]##, ##//y2//## ##[[KeyPgAs as]] [[KeyPgInteger Integer]]## - The horizontal and vertical offsets, in pixels, of the opposite corner of the viewport relative to the top-left corner of the screen. + Coordonnées horizontales et verticales, en pixels, relatives au coin en haut à gauche de l'écran, du coin opposé de la zone de visualisation graphique (viewport). ##//fill_color//## ##[[KeyPgAs as]] [[KeyPgUinteger UInteger]]## - The color to fill the new viewport. + Couleur de remplissage de la nouvelle zone de visualisation graphique. ##//border_color//## ##[[KeyPgAs as]] [[KeyPgUinteger UInteger]]## - The color of the border to draw around the new viewport. + Couleur des bords à tracer autour de la nouvelle zone de visualisation graphique. {{fbdoc item="desc"}} - The //viewport//, or clipping region, is a rectangular area of the graphics screen, outside of which no drawing will be done. That is, only drawing done within this area will be shown. A graphics screen must be created with ##[[KeyPgScreengraphics Screen]]## or ##[[KeyPgScreenres ScreenRes]]## before calling ##**View**## or ##**View Screen**##. + La //viewport//, ou "clipping region" (zone de visualisation graphique), est une zone rectangulaire de l'écran graphique, en-dehors de laquelle aucun tracé n'est possible. That is, only drawing done within this area will be shown. Un écran graphique doit avoir été créé avec ##[[KeyPgScreengraphics Screen]]## ou ##[[KeyPgScreenres ScreenRes]]## avant d'appeler ##**View**## ou ##**View Screen**##. - The first statement sets the viewport to encompass the entire screen, which is the default viewport for a new graphics screen. + La première déclaration définit la fenêtre pour englober la totalité de l'écran, c'est la valeur par défaut de la zone de visualisation graphique pour un nouvel écran graphique. - The second and third statements both allow a new viewport to be defined. The corners of the viewport are specified by the ##//x1//##, ##//y1//##, ##//x2//## and ##//y2//## parameters. ##//fill_color//## and ##//border_color//## are both in the format accepted by ##[[KeyPgColor Color]]##. The indicated effects for each parameter only occur if that parameter is specified. + Les deuxième et troisième déclarations permettent, toutes les deux, une nouvelle zone de visualisation graphique à définir. Les coins de la zone de visualisation graphique sont donnés par les paramètres ##//x1//##, ##//y1//##, ##//x2//## et ##//y2//##. ##//fill_color//## et ##//border_color//## sont tous les deux dans un format valide pour ##[[KeyPgColor Color]]##. Les effets indiqués pour chaque paramètre ne se produisent que si celui-ci est spécifié. - The second statement modifies the co-ordinate mapping of the graphics screen such that co-ordinates specified for drawing statements and procedures are relative to the top-left corner of the viewport. + La seconde déclaration modifie la cartographie des coordonnées de l'écran graphique de façon à ce que les coordonnées spécifiées pour les opérations de dessin soient relatives au en haut à gauche de la zone de visualisation graphique. - The third statement modifies the co-ordinate mapping of the graphics screen such that co-ordinates specified for drawing statements and procedures are relative to the top-left corner of the screen. + La troisième déclaration modifie la cartographie des coordonnées de l'écran graphique de façon à ce que les coordonnées spécifiées pour les opérations de dessin soient relatives au en haut à gauche de la zone de visualisation graphique. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/view.bas"}}%%(freebasic) @@ -41,7 +41,7 @@ cls line (215,135)-(425,345),1,bf view (220,140)-(420,340) k=0 -'move sprite +'deplace sprite do i=100*sin(k*.02)+50: j=100* sin(k*.027)+50 screensync @@ -55,8 +55,8 @@ imagedestroy(ip) %% {{fbdoc item="diff"}} - - QBASIC preserves the ##WINDOW## coordinate mapping after subsequent calls to ##VIEW##. - - ""FreeBASIC's"" current behavior is to preserve the ##WINDOW## coordinates after calls to ##VIEW##, or when working on images, meaning that the coordinate mapping may undergo scaling/translations if the viewport changes. (If a ##WINDOW## hasn't been set, there is no coordinate mapping, and so it doesn't change after calls to ##VIEW##.) The behavior may change in future, but consistent behavior can be assured over inconstent viewport coordinates by re-calling ##WINDOW## whenever you change the ##VIEW##. + - QBASIC conserve la cartographie des coordonnées de ##WINDOW## après des appels successifs à ##VIEW##. + - Le comportement actuel de FreeBASIC est conserver les coordonnéesde ##WINDOW## après des appels à ##VIEW##, ou lors d'une tâche sur une image, ce qui signifie que les coordonnées de cartographie peuvent faire l'objet "mise-à-l'échelle/déplacements" si la zone de visualisation graphique change. (Si une ##WINDOW## a été définie, il n'y a pas de cartographie des coordonnées, et ainsi pas de changements après des appels à ##VIEW##.) Ce comportement peut changer à l'avenir, mais un comportement cohérent peut être assuré au cours de la visualisation de coordonnées inconsistantes de la zone de visualisation graphique par un rappel de ##WINDOW## lorsque vous changez ##VIEW##. {{fbdoc item="see"}} - ##[[KeyPgViewtext View Print]]## diff --git a/fbdocs/manual/cache/KeyPgViewtext.wakka b/fbdocs/manual/cache/KeyPgViewtext.wakka index 3e3300aa00..ca7c92c4a0 100644 --- a/fbdocs/manual/cache/KeyPgViewtext.wakka +++ b/fbdocs/manual/cache/KeyPgViewtext.wakka @@ -1,18 +1,18 @@ {{fbdoc item="title" value="VIEW PRINT"}}---- -Sets the printable area of the screen +Valide la zone utilisable pour l'affichage de la console {{fbdoc item="syntax"}}## **View Print** [ //firstrow// **To** //lastrow// ] ## {{fbdoc item="param"}} ##//firstrow//## - first row of print area + première ligne de la zone d'affichage ##//lastrow//## - last row of print area + dernière ligne de la zone d'affichage {{fbdoc item="desc"}} - Sets the boundaries of the console screen text area to the lines starting at first up to and including last. Lines are counted starting with ##1##. The text cursor is moved to the beginning of the first line specified. - If the row numbers are omitted, the entire screen is used as the text area. + Définit les limites de la zone de texte de l'écran console de la ligne de départ en premier jusqu'à la dernière comprise. Les lignes sont numérotées en commençant à ##1##. Le curseur texte est déplacé au début de la première ligne spécifiée. + Si les numéros de ligne sont omis, la totalité de l'écran est utilisée comme la zone de texte. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/view.bas"}}%%(freebasic) @@ -23,7 +23,7 @@ Color , 1 Cls %% -##**View Print**## can be used in graphics mode to avoid the text output overwriting graphics: +##**View Print**## peut être utilisé, en mode graphique, pour éviter les sorties de texte écrasant les représentations graphiques: {{fbdoc item="filename" value="examples/manual/console/view-gfx.bas"}}%%(freebasic) screen 12 dim as integer R,Y,x,y1 @@ -45,7 +45,7 @@ loop until len(inkey) {{fbdoc item="diff"}} - - None. + - Aucune. {{fbdoc item="see"}} - ##[[KeyPgCls Cls]]## diff --git a/fbdocs/manual/cache/KeyPgVisPrivate.wakka b/fbdocs/manual/cache/KeyPgVisPrivate.wakka index f797ecef89..9750dfdf67 100644 --- a/fbdocs/manual/cache/KeyPgVisPrivate.wakka +++ b/fbdocs/manual/cache/KeyPgVisPrivate.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PRIVATE: (Access Control)"}}---- -Specifies private member access control in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## +Spécifie le contrôle d'accès privé (private) à un membre de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -9,16 +9,16 @@ Specifies private member access control in a ##[[KeyPgType Type]]## or ##[[KeyPg ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## + nom de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## ##//member declarations//## - declarations for fields, functions, or enumerations + déclarations pour les champs, fonctions ou énumérations {{fbdoc item="desc"}} - ##**Private:**## indicates that ##//member declarations//## following it have private access. Private members are accessible only from inside a member function for the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + ##**Private:**## indique que les ##//member declarations//## qui suivent ont un accès privé. Les membres privés ne sont accessibles qu'à l'intérieur d'une fonction membre pour ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. - ##//member declarations//## following ##**Private:**## are private until a different access control specifier is given, like ##[[KeyPgVisPublic Public:]]## or ##[[KeyPgVisProtected Protected:]]##. + Les ##//member declarations//## qui suivent ##**Private:**## sont privés jusqu'à ce qu'un spécificateur de contrôle d'accès différent ne soit donné, comme ##[[KeyPgVisPublic Public:]]## ou ##[[KeyPgVisProtected Protected:]]##. - Members in a ##[[KeyPgType Type]]## declaration are ##**Public:**## by default if no member access control specifier is given. + Les membres d'une déclaration ##[[KeyPgType Type]]## sont ##**Public:**## par défaut si aucun spécificateur de contrôle d'accès n'est donné. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/private.bas"}}%%(freebasic) @@ -45,14 +45,14 @@ myVariable.number = 69 %% {{fbdoc item="lang"}} - - Available only in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgVisPublic Public:]]## (Access Control) - - ##[[KeyPgVisProtected Protected:]]## (Access Control) + - ##[[KeyPgVisPublic Public:]]## (Contrôle d'accès) + - ##[[KeyPgVisProtected Protected:]]## (Contrôle d'accès) - ##[[KeyPgType Type]]## {{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgVisProtected.wakka b/fbdocs/manual/cache/KeyPgVisProtected.wakka index 1e18f38243..575ca2ca09 100644 --- a/fbdocs/manual/cache/KeyPgVisProtected.wakka +++ b/fbdocs/manual/cache/KeyPgVisProtected.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PROTECTED: (Access Control)"}}---- -Specifies protected member access control in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## +Spécifie le contrôle d'accès protégé (protected) à un membre de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -9,18 +9,18 @@ Specifies protected member access control in a ##[[KeyPgType Type]]## or ##[[Key ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## + nom de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## ##//member declarations//## - declarations for fields, functions, or enumerations + déclarations pour les champs, fonctions ou énumérations {{fbdoc item="desc"}} - ##**Protected:**## indicates that ##//member declarations//## following it have protected access. Protected members are accessible only from inside a member function for the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, and classes which are derived from the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + ##**Protected:**## indique que les ##//member declarations//## qui suivent ont un accès protégé. Les membres protégés ne sont accessibles qu'à l'intérieur d'une fonction membre pour ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## et les classes dérivées de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. - ##//member declarations//## following ##**Protected:**## are protected until a different access control specifier is given, like ##[[KeyPgVisPrivate Private:]]## or ##[[KeyPgVisPublic Public:]]##. + ##//member declarations//## qui suivent ##**Protected:**## sont protégés jusqu'à ce qu'un spécificateur de contrôle d'accès différent ne soit donné, comme ##[[KeyPgVisPrivate Private:]]## ou ##[[KeyPgVisPublic Public:]]##. - Members in a ##[[KeyPgType Type]]## declaration are ##**Public:**## by default if no member access control specifier is given. + Les membres d'une déclaration ##[[KeyPgType Type]]## sont ##**Public:**## par défaut si aucun spécificateur de contrôle d'accès n'est donné. - NOTE: This keyword is supported in the latest fbc compiler, however, its usefulness is limited since classes and inheritance are **Not** yet supported. + NOTE: Ce mot-clef est supporté dans le dernier compilateur fbc, cependant, son utilité est limitée puisque les classes et l'héritage **ne sont pas** encore supportés. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/protected.bas"}}%%(freebasic) @@ -28,15 +28,15 @@ Specifies protected member access control in a ##[[KeyPgType Type]]## or ##[[Key %% {{fbdoc item="lang"}} - - Available only in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## - - ##[[KeyPgVisPrivate Private:]]## (Access Control) - - ##[[KeyPgVisPublic Public:]]## (Access Control) + - ##[[KeyPgVisPrivate Private:]]## (Contrôle d'accès) + - ##[[KeyPgVisPublic Public:]]## (Contrôle d'accès) - ##[[KeyPgType Type]]## {{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgVisPublic.wakka b/fbdocs/manual/cache/KeyPgVisPublic.wakka index 156887c161..da66fc9f55 100644 --- a/fbdocs/manual/cache/KeyPgVisPublic.wakka +++ b/fbdocs/manual/cache/KeyPgVisPublic.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="PUBLIC: (Access Control)"}}---- -Specifies public member access control in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## +Spécifie un contrôle d'accès public aux membres de ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## {{fbdoc item="syntax"}}## [[KeyPgType Type]] //typename// @@ -9,16 +9,16 @@ Specifies public member access control in a ##[[KeyPgType Type]]## or ##[[KeyPgC ## {{fbdoc item="param"}} ##//typename//## - name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## - ##//member declarations//## - declarations for fields, functions, or enumerations + nom de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## + ##//déclarations des membres//## + déclarations pour les champs, fonctions ou énumérations {{fbdoc item="desc"}} - ##**Public:**## indicates that ##//member declarations//## following it have public access. Public members are accessible with any usage of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + ##**Public:**## indique que les ##//member declarations//## qui suivent ont un accès public. Des membres ##**public**## sont accessibles pour toute utilisation de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##. - ##//member declarations//## following ##**Public:**## are public until a different access control specifier is given, like ##[[KeyPgVisPrivate Private:]]## or ##[[KeyPgVisProtected Protected:]]## + Les ##//member declarations//## qui suivent ##**Public:**## sont publics tant qu'aucun contrôle d'accès différent n'est spécifié, comme ##[[KeyPgVisPrivate Private:]]## ou ##[[KeyPgVisProtected Protected:]]## - Members in a ##[[KeyPgType Type]]## declaration are ##**Public:**## by default if no member access control specifier is given. + Les membres d'une déclaration ##[[KeyPgType Type]]## sont ##**Public:**## par défaut si aucun contrôle d'accès différent n'est spécifié. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/public.bas"}}%%(freebasic) @@ -44,15 +44,15 @@ myVariable.setNome( "FreeBASIC" ) %% {{fbdoc item="lang"}} - - Available only in the //[[CompilerOptlang -lang fb]]// dialect. + - Disponible seulement dans le dialecte //[[CompilerOptlang -lang fb]]//. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgClass Class]]## - - ##[[KeyPgVisPrivate Private:]]## (Access Control) - - ##[[KeyPgVisProtected Protected:]]## (Access Control) + - ##[[KeyPgVisPrivate Private:]]## (Contrôle d'accès) + - ##[[KeyPgVisProtected Protected:]]## (Contrôle d'accèsl) - ##[[KeyPgPublic Public]]## - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgWait.wakka b/fbdocs/manual/cache/KeyPgWait.wakka index 6dd3854a1b..943aae4051 100644 --- a/fbdocs/manual/cache/KeyPgWait.wakka +++ b/fbdocs/manual/cache/KeyPgWait.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WAIT"}}---- -Reads from a hardware port with a mask. +Lecture d'un port "hardware" avec un masque. {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Wait** ( [[KeyPgByval byval]] //port// [[KeyPgAs as]] [[KeyPgUshort ushort]] , [[KeyPgByval byval]] //and_mask// [[KeyPgAs as]] [[KeyPgInteger integer]] , [[KeyPgByval byval]] //xor_mask// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0 ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -9,17 +9,17 @@ Reads from a hardware port with a mask. ## {{fbdoc item="param"}} ##//port//## - Port to read. + Port à lire. ##//and_mask//## - Mask value to [[KeyPgOpAnd And]] the port value with. + Valeur du masque pour effectuer un [[KeyPgOpAnd And]] avec la valeur du port. ##//xor_mask//## - Mask value to [[KeyPgOpXor Xor]] the port value with. + Valeur du masque pour effectuer un [[KeyPgOpAnd Xor]] avec la valeur du port. -{{fbdoc item="ret"}} - 0 if successful, -1 on failure. +{{fbdoc item="section" value="Valeur retournée + 0 si succès, -1 si échec. {{fbdoc item="desc"}} - ##**Wait**## keeps reading ##//port//## until the reading ANDed with ##//and_mask//## and optionally XORed with ##//xor_mask//## gives a non-zero result. + ##**Wait**## lit en boucle le ##//port//## jusqu'à ce que la valeur lue combinée par un AND avec ##//and_mask//## ou éventuellement combinée par un XOR avec ##//xor_mask//## donne un résultat non-nul (non-zéro). {{fbdoc item="ex"}} @@ -29,9 +29,9 @@ screensync 'FreeBASIC way of accomplishing the same thing %% {{fbdoc item="target"}} - - In the Windows and Linux versions three port numbers (&H3C7, &H3C8, &H3C9) are hooked by the graphics library when a graphics mode is in use to emulate VGA palette handling as in QB. This use is deprecated; use ##[[KeyPgPalette Palette]]## to retrieve and set palette colors. + - Sous Windows et Linux trois numéros de port (&H3C7, &H3C8, &H3C9) sont utilisés par la bibliothèque graphique quand un mode graphique est en cours d'utilisation pour émuler la gestion de la palette VGA comme dans QB. Cette utilisation est obsolète; utilisez ##[[KeyPgPalette Palette]]## pour récupérer et définir la palette des couleurs. - - Using true port access in the Windows version requires the program to install a device driver for the present session. For that reason, Windows executables using hardware port access should be run with administrator permits each time the computer is restarted. Further runs don't require admin rights as they just use the already installed driver. The driver is only 3K in size and is embedded in the executable. + - L'utilisation de l'accès au direct port (non émulé) dans la version Windows nécessite l'installation du pilote de périphérique pour la présente session. Pour cette raison, les exécutables Windows utilisant l'accès au port du matériel doivent être exécutés avec les droits administrateur chaque fois que l'ordinateur est redémarré. D'autres lancements ne nécessiteront pas de droits administrateur car ils n'auront qu'à utiliser le pilote déjà installé. Le pilote n'a qu'une taille de 3K et est intégré dans l'exécutable. {{fbdoc item="see"}} - ##[[KeyPgInp Inp]]## diff --git a/fbdocs/manual/cache/KeyPgWbin.wakka b/fbdocs/manual/cache/KeyPgWbin.wakka index 20b9cb9b67..d87b36e402 100644 --- a/fbdocs/manual/cache/KeyPgWbin.wakka +++ b/fbdocs/manual/cache/KeyPgWbin.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WBIN"}}---- -Returns the binary wstring (Unicode) representation of a number +Retourne la "wstring" (Unicode) binaire représentant un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Wbin** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -19,19 +19,19 @@ Returns the binary wstring (Unicode) representation of a number ## {{fbdoc item="param"}} ##//number//## - A whole number or expression evaluating to a whole number. + Un nombre entier ou expression à évaluer. ##//digits//## - Optional number of digits to return. + Facultatif: nombre de chiffres de la chaîne à retourner. -{{fbdoc item="ret"}} - Returns a binary [[KeyPgString string]] representation of //number//. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[KeyPgString String (chaîne)]] binaire représentant un //number//. {{fbdoc item="desc"}} - Returns a ##[[KeyPgWstring wstring]}## (Unicode) representing the binary value of the integer ##//expression//##. Binary digits range from 0 to 1. + Retourne ##[[KeyPgWstring wstring]}## (Unicode) représentant la valeur binaire de l'entier ##//expression//##. Chiffres binaires de 0 à 1. - If you specify ##//digits//## > 0, the result wstring will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, le résultat ##//wstring//## aura exactement cette longueur. Il sera tronqué ou complété avec des zéros sur la gauche, si nécessaire. - The length of the ##[[KeyPgWstring wstring]}## will not go longer than the maximum number of digits required for the type of ##//expression//## (32 for an integer, 64 for floating point or longint) + La longueur de ##[[KeyPgWstring wstring]}## ne sera pas plus grande que le nombre maximum de bits requis pour le type de ##//expression//## (32 pour un entier, 64 pour un nombre à virgule flottante ou un entier long) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/wbin.bas"}}%%(freebasic) @@ -39,21 +39,21 @@ PRINT WBIN(54321) PRINT WBIN(54321, 5) PRINT WBIN(54321, 20) %% - will produce the output: + produira la sortie: %%1101010000110001 10001 00001101010000110001 %% {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of FreeBASIC. + - (w)strings Unicode ne sont pas supportées par le portage DOS de FreeBASIC. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wbin""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__WBin**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgBin Bin]]## diff --git a/fbdocs/manual/cache/KeyPgWchr.wakka b/fbdocs/manual/cache/KeyPgWchr.wakka index 63687b6fb1..8d2d84e892 100644 --- a/fbdocs/manual/cache/KeyPgWchr.wakka +++ b/fbdocs/manual/cache/KeyPgWchr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WCHR"}}---- -Returns a wide-character string containing one or more Unicode characters +Retourne une chaîne de larges caractères contenant un ou plusieurs caractères Unicode {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] Wchr ( [[KeyPgByval byval]] //ch// [[KeyPgAs as]] [[KeyPgInteger integer]] [, ... ] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -9,37 +9,37 @@ Returns a wide-character string containing one or more Unicode characters ## {{fbdoc item="param"}} ##//ch//## - The Unicode integer value of a character. + La valeur entière Unicode d'un caractère. -{{fbdoc item="ret"}} - Returns a wide-character string. +{{fbdoc item="section" value="Valeur retournée + Retourne une chaîne de larges caractères. {{fbdoc item="desc"}} - ##**Wchr**## returns a wide-character string containing the character(s) represented by the Unicode values passed to it. + ##**WChr**## retourne une chaîne de larges caractères contenant le(s) caractère(s) représenté(s) par la(les) valeur(s) Unicode qui lui sont passée(s). - When ##**Wchr**## is used with numerical constants or literals, the result is evaluated at compile-time, so it can be used in variable initializers. + Quand ##**WChr**## est utilisé avec des constantes numériques ou littérales, le résultat est évalué lors de la compilation, de sorte qu'il peut être utilisé dans des initialiseurs de variable. - Not all Unicode characters can be displayed on any machine, the characters available depend on the font presently in use in the console. Graphics modes can't display Unicode characters, as the GfxLib built-in font is not Unicode. + Tous les caractères Unicode ne sont pas forcément affichables sur n'importe quelle machine, les caractères accessibles dépendent de la police de caractères utilisée sur la console. Les modes graphiques ne peuvent pas afficher les caractères Unicode, car la police intégrée GfxLib n'est pas Unicode. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/wchr.bas"}}%%(freebasic) print "the character represented by the UNICODE code of 934 is:"; WCHR(934) print "multiple UNICODE characters:"; WCHR(933, 934, 935) %% - will produce the output: + produira la sortie: -<<Φ -ΥΦΧ<<::c:: +
    Φ +ΥΦΧ; {{fbdoc item="target"}} - - DOS does not support ##**Wchr**##. + - DOS ne supporte pas ##**WChr**##. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wchr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Wchr**##. {{fbdoc item="diff"}} - - New to Freebasic + - Nouveau pour Freebasic {{fbdoc item="see"}} - ##[[KeyPgChr Chr]]## diff --git a/fbdocs/manual/cache/KeyPgWeekday.wakka b/fbdocs/manual/cache/KeyPgWeekday.wakka index 9e9621ef37..6f13bc5ef2 100644 --- a/fbdocs/manual/cache/KeyPgWeekday.wakka +++ b/fbdocs/manual/cache/KeyPgWeekday.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WEEKDAY"}}---- -Gets the number of day of the week from a [[ProPgDates Date Serial]] +Récupère le numéro du jour de la semaine à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Weekday** ( [[KeyPgByval byval]] //serial// [[KeyPgAs as]] [[KeyPgDouble double]] , [[KeyPgByval byval]] //firstdayofweek// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbusesystem ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,22 +10,22 @@ Gets the number of day of the week from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date + la date ##//firstdayofweek//## - the first day of the week + le premier jour de la semaine -{{fbdoc item="ret"}} - Returns the week day number from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Récupère le numéro du jour de la semaine à partir d'une variable contenant une date sous forme d'une [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - The week day values must be in the range 1-7, its meaning depends on the ##//firstdayofweek//## parameter + Les valeurs du jour de la semaine doivent être comprises entre 1 et 7, leur signification dépend du paramètre ##//firstdayofweek//##. - ##//firstdayofweek//## is optional. + ##//firstdayofweek//## est facultatif. - {{table columns="3" cellpadding="1" cells="value;first day of week;constant;omitted;sunday;###;0;local settings;fbUseSystem;1;sunday;fbSunday;2;monday;fbMonday;3;tuesday;fbTuesday;4;wednesday;fbWednesday;5;thursday;fbThursday;6;friday;fbFriday;7;saturday;fbSaturday"}} + {{table columns="" cellpadding="2" cells="valeur;1er jour de la semaine;constante;omis;sunday = dimanche; 0;paramètres locaux;fbUseSystem;1;sunday;fbSunday;2;monday = lundi;fbMonday;3;tuesday = mardi;fbTuesday;4;wednesday = mercredi;fbWednesday;5;thursday = jeudi;fbThursday;6;friday = vendredi;fbFriday;7;saturday = samedi;fbSaturday;
    - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/weekday.bas"}}%%(freebasic) @@ -37,7 +37,7 @@ print format(a, "yyyy/mm/dd hh:mm:ss "); weekday(a) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgWeekdayname.wakka b/fbdocs/manual/cache/KeyPgWeekdayname.wakka index dfba5bb2a4..b8a0ceda09 100644 --- a/fbdocs/manual/cache/KeyPgWeekdayname.wakka +++ b/fbdocs/manual/cache/KeyPgWeekdayname.wakka @@ -1,34 +1,34 @@ {{fbdoc item="title" value="WEEKDAYNAME"}}---- -Gets the name of a week day from its integral representation +Récupère le nom d'un jour de la semaine à partir de sa représentation entière {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""WeekdayName""** ( [[KeyPgByval byval]] //weekday// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //abbreviate// [[KeyPgAs as]] [[KeyPgInteger integer]] = 0, [[KeyPgByval byval]] //firstdayofweek// [[KeyPgAs as]] [[KeyPgInteger integer]] = fbUseSystem ) [[KeyPgAs as]] [[KeyPgString string]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WeekdayName** ( [[KeyPgByval ByVal]] //weekday// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //abbreviate// [[KeyPgAs As]] [[KeyPgInteger Integer]] = 0, [[KeyPgByval ByVal]] //firstdayofweek// [[KeyPgAs As]] [[KeyPgInteger Integer]] = fbUseSystem ) [[KeyPgAs As]] [[KeyPgString String]] ## {{fbdoc item="usage"}}## #include "vbcompat.bi" - //result// = **""WeekdayName""**( //weekday// [, //abbreviate// [, //firstdayofweek// ] ] ) + //result// = **WeekdayName**( //weekday// [, //abbreviate// [, //firstdayofweek// ] ] ) ## {{fbdoc item="param"}} ##//weekday//## - the number of the day of the week + le numéro du jour de la semaine ##//abbreviate//## - flag to indicate that name should be abbreviated + drapeau indiquant que le nom doit être abrégé ##//firstdayofweek//## - first day of the week + 1er jour de la semaine {{fbdoc item="ret"}} - Returns the local operating system language day of week name from the ##//weekday//## value 1 to 7. + Retourne le nom du jour dans le langage du système d'exploitation local à partir de ##//weekday//## valeur de 1 à 7. {{fbdoc item="desc"}} - How ##//weekday//## is interpreted depends on the ##//firstdayofweek//## parameter. + La manière dont ##//weekday//## est interprété dépend du paramètre ##//firstdayofweek//##. - If ##//abbreviate//## is true, a 3 letter abbreviation is returned, if false or omitted, the whole name is returned. + Si ##//abbreviate//## est vrai, une abréviation de 3 lettres est retournée, s'il est faux ou omis, le nom complet est retourné. - ##//firstdayofweek//## is an optional parameter specified as follows: + ##//firstdayofweek//## est un paramètre facultatif spécifié comme suit: - {{table columns="3" cellpadding="1" cells="value;first day of week;constant;omitted;sunday;###;0;local settings;fbUseSystem;1;sunday;fbSunday;2;monday;fbMonday;3;tuesday;fbTuesday;4;wednesday;fbWednesday;5;thursday;fbThursday;6;friday;fbFriday;7;saturday;fbSaturday"}} + {{table columns="" cellpadding="2" cells="valeur;1er jour de la semaine;constante;omis;sunday = dimanche; 0;paramètres locaux;fbUseSystem;1;sunday = dimanche;fbSunday;2;monday = lundi;fbMonday;3;tuesday = mardi;fbTuesday;4;wednesday = mercredi;fbWednesday;5;thursday = jeudi;fbThursday;6;friday = vendredi;fbFriday;7;saturday = samedi;fbSaturday;
    - The compiler will not recognize this function unless ##vbcompat.bi## or ##datetime.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## ou ##datetime.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/weekdayname.bas"}}%%(freebasic) @@ -40,7 +40,7 @@ Print Format(a, "yyyy/mm/dd hh:mm:ss "); WeekDayName(WeekDay(a)) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in Visual Basic. + - N'existe pas dans QB. Cette fonction est apparue dans Visual Basic. {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgWend.wakka b/fbdocs/manual/cache/KeyPgWend.wakka index 86f3ad16c1..0a520debf2 100644 --- a/fbdocs/manual/cache/KeyPgWend.wakka +++ b/fbdocs/manual/cache/KeyPgWend.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WEND"}}---- -Control flow statement. +Déclaration de contrôle de flux. {{fbdoc item="syntax"}}## **While** [//condition//] @@ -7,10 +7,10 @@ Control flow statement. **Wend** ## {{fbdoc item="desc"}} - Wend specifies the end of a ##[[KeyPgWhilewend While...Wend]]## loop block. + ##**Wend**## spécifie la fin d'un bloc de boucle ##[[KeyPgWhilewend While...Wend]]##. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWhilewend While...Wend]]## diff --git a/fbdocs/manual/cache/KeyPgWhex.wakka b/fbdocs/manual/cache/KeyPgWhex.wakka index 7091bb3eb6..418558bc52 100644 --- a/fbdocs/manual/cache/KeyPgWhex.wakka +++ b/fbdocs/manual/cache/KeyPgWhex.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WHEX"}}---- -Returns the hexadecimal wstring (Unicode) representation of a number +Retourne la **wstring** (Unicode) hexadécimale representation d'un nombre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Whex** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -19,19 +19,19 @@ Returns the hexadecimal wstring (Unicode) representation of a number ## {{fbdoc item="param"}} ##//number//## - A whole number or expression evaluating to a whole number. + Un nombre ou une expression numérique représentant un nombre. ##//digits//## - Optional number of digits to return. + Facultatif: nombre de chiffres à retourner. -{{fbdoc item="ret"}} - Returns a hexadecimal [[KeyPgString string]] representation of //number//. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[KeyPgString String]] hexadécimale représentation de //number//. {{fbdoc item="desc"}} - Hexadecimal digits range from 0-9, or A-F. + Chiffres hexadécimaux de 0 à 9, ou A à F. - If you specify ##//digits//## > 0, the resulting ##[[KeyPgWstring wstring]]## will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, la ##[[KeyPgWstring WString]]## résultat aura exactement cette longueur. Elle sera tronquée ou complétée avec des zéros sur la gauche, si nécessaire. - The length of the wstring will not go longer than the maximum number of digits required for the type of ##//expression//## (8 for an integer, 16 for floating point or longint) + La longueur de la **wstring** ne dépassera pas le nombre de bits maximum requis pour le type de ##//expression//## (8 pour un entier, 16 pour un nombre à virgule flottante ou un entier long) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/whex.bas"}}%%(freebasic) @@ -39,7 +39,7 @@ print Hex(54321) print Hex(54321, 2) print Hex(54321, 5) %% - will produce the output: + produira la sortie: %%D431 31 @@ -47,14 +47,14 @@ print Hex(54321, 5) %% {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of FreeBASIC. + - Les (w)strings Unicode ne sont pas supportées dans le portage DOS de FreeBASIC. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Whex""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Whex**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"". + - Nouveau pour FreeBASIC. {{fbdoc item="see"}} - ##[[KeyPgHex Hex]]## diff --git a/fbdocs/manual/cache/KeyPgWhile.wakka b/fbdocs/manual/cache/KeyPgWhile.wakka index 70f0e82c30..15685465ae 100644 --- a/fbdocs/manual/cache/KeyPgWhile.wakka +++ b/fbdocs/manual/cache/KeyPgWhile.wakka @@ -1,24 +1,24 @@ {{fbdoc item="title" value="WHILE"}}---- -Control flow statement. +Déclaration de contrôle de flux. {{fbdoc item="syntax"}}## Do **While** //condition// [//statement block//] Loop -//or// +//ou// Do [//statement block//] Loop **While** //condition// -//or// +//ou// **While** [//condition//] [//statement block//] **Wend** ## {{fbdoc item="desc"}} - While specifies that a loop block will continue if the ##//condition//## following it evaluates as true. This ##//condition//## is checked during each loop iteration. + **While** spécifie qu'un bloc de boucle continuera si la ##//condition//## qui suit est vraie (true). Cette ##//condition//## est vérifiée pour chaque itération de la boucle. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgDoloop Do...Loop]]## diff --git a/fbdocs/manual/cache/KeyPgWhilewend.wakka b/fbdocs/manual/cache/KeyPgWhilewend.wakka index b1fa02edde..ad2f466a9b 100644 --- a/fbdocs/manual/cache/KeyPgWhilewend.wakka +++ b/fbdocs/manual/cache/KeyPgWhilewend.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WHILE"}}---- -Control flow statement for looping +Déclaration de contrôle de flux pour une boucle. {{fbdoc item="syntax"}}## **While** [//condition//] @@ -7,18 +7,18 @@ Control flow statement for looping **Wend** ## {{fbdoc item="desc"}} - The ##**While**## statement will cause the following set of statements in the //statement block// to execute repeatedly if and while the expression //condition// evaluates to true. + La déclaration ##**While**## entraînera l'ensemble suivant des instructions de //statement block// à s'exécuter répétitivement tant que l'expression //condition// est vraie (true). - If //condition// evaluates to false when the WHILE statement is first executed, then the //statement block// is skipped and execution resumes immediately following the enclosing ##**Wend**## statement. + Si //condition// est évaluée à faux (false) quand l'instruction WHILE est exécutée la première fois, le //statement block// est sauté et l'exécution reprend immédiatement après le ##**Wend**## de fin de structure. - If an ##[[KeyPgExit Exit]]## ##**While**## statement is encountered inside the //statement block//, the loop is terminated, and execution resumes immediately following the enclosing ##**Wend**## statement. If a ##[[KeyPgContinue Continue]]## ##**While**## statement is encountered, the rest of the //statement block// is skipped and execution resumes at the ##**While**## statement. + Si une déclaration ##[[KeyPgExit Exit]]## ##**While**## est rencontrée dans le //statement block//, la boucle se termine et l'exécution reprend immédiatement après le ##**Wend**## de fin de structure. Si une déclaration ##[[KeyPgContinue Continue]]## ##**While**## est rencontrée, le reste du //statement block// est ignorée et l'exécution reprend à la déclaration ##**While**##. - Like all control flow statements, the ##**While**## statement can be nested, that is, it can be used in a statement block of another ##[[KeyPgWhile While]]## statement. + Comme toutes les déclaration de contrôle de flux, l'instruction ##**While**## peut être imbriquée, c'est à dire qu'elle peut être utilisée dans un bloc d'instructions d'une autre déclaration ##[[KeyPgWhile While]]##. - //**note**: the ##**While**## //keyword// is also used in the ##[[KeyPgDoloop Do...Loop]]## statement to indicate the type of comparison. Used in this way, the DO statement becomes functionally equivalent to the WHILE statement, so do not confuse their enclosing keywords ##Loop## and ##**Wend**##, respectively.// + //**Note**: le //mot-clef// ##**While**## est aussi utilisé dans la déclaration ##[[KeyPgDoloop Do...Loop]]## pour indiquer le type de comparaison. Utilisée de cette façon, la déclaration DO devient fonctionnellement équivalente à l'instruction WHILE, donc il ne faut pas confondre les mots-clés entourant ##**Loop**## et ##**Wend**##, respectivement.// {{fbdoc item="ex"}} - In this example, a ##**While**## loop is used to reverse a string by iterating through it backward. The loop stops if index is less than 0 //(0 being the first index in the string)//. + Dans cet exemple, une boucle ##**While**## est utilisée pour inverser une chaîne par itération à travers elle en arrière. La boucle s'arrête si l'indice est inférieur à 0 //(0 étant le premier indice de la chaîne)//. {{fbdoc item="filename" value="examples/manual/control/while-wend.bas"}}%%(freebasic) dim as string sentence '' string to reverse sentence = "The quick brown fox jumps over the lazy dog." @@ -38,11 +38,11 @@ end 0 %% {{fbdoc item="lang"}} - - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, variables declared inside a WHILE..WEND loop have a function-wide [[ProPgVariableScope scope]] as in QB - - In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects, variables declared inside a ##**While**##..##**Wend**## block are visible only inside the block, and can't be accessed outside it. + - Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les variables déclarées dans une boucle WHILE..WEND ont une [[ProPgVariableScope portée]] fonction comme dans QB. + - Dans les dialectes //[[CompilerOptlang -lang fb]]// et //[[CompilerOptlang -lang deprecated]]//, les variables déclarées dans une boucle ##**While**##..##**Wend**## ne sont visibles que dans ce bloc et inaccessibles en-dehors. {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgExit Exit]]## diff --git a/fbdocs/manual/cache/KeyPgWidth.wakka b/fbdocs/manual/cache/KeyPgWidth.wakka index 317025f7b3..2b433a8df4 100644 --- a/fbdocs/manual/cache/KeyPgWidth.wakka +++ b/fbdocs/manual/cache/KeyPgWidth.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WIDTH"}}---- -Sets or gets the number of rows and columns of the display +Fixe ou retourne le nombre de lignes et colonnes d'affichage de la console {{fbdoc item="syntax"}}## **Width** [//columns//] [, //rows//] @@ -9,29 +9,29 @@ Sets or gets the number of rows and columns of the display ## {{fbdoc item="param"}} ##//columns//## - columns (in characters) for output + colonnes (en caractères) pour l'affichage ##//rows//## - rows (in characters) for output + lignes (en caractères) pour l'affichage ##//filenum//## - file number to apply to + numéro du fichier sur lequel on opère ##//devicename//## - device name to apply to + nom du périphérique sur lequel on opère -{{fbdoc item="ret"}} - Returns a 32 bit ##[[KeyPgInteger Integer]]## where the [[KeyPgHiword high word]] is the number of rows and the [[KeyPgLoWord low word]] is the number of columns currently set. +{{fbdoc item="section" value="Valeur retournée + Retourne un ##[[KeyPgInteger Integer = entier]]## 32 bit où le [[KeyPgHiword High Word = Mot fort]] est le nombre de lignes et le [[KeyPgLoWord Low Word = Mot faible]] est le nombre de colonnes fixé actuellement. {{fbdoc item="desc"}} - Sets the maximum number of columns of characters of an output device (console, printer or text file). If text sent to the device reaches the width an automatic carriage return is generated. + Valide le nombre maximum de colonnes de caractères d'un périphérique de sortie (console, imprimante ou fichier texte). Si le texte envoyé au périphérique atteint la largeur prescrite un retour chariot sera automatiquement généré. - If the device is the console a second argument specifying maximum number of rows is allowed. On a Windows any values > 0 can be used in windowed mode. On DOS or Windows full-screen console, the valid dimensions depend on the capabilities of the hardware. Linux doesn't allow applications to change the console size. + Si le périphérique est la console un second argument spécifie le nombre maximum de lignes qui sont allouées. Dans Windows toute valeur > 0 peut être utilisée en mode fenêtré. Sous DOS ou Windows en mode console plein-écran, les dimensions valides dépendent des possibilités du "hardware". Linux ne permet pas aux applications de changer la taille de la console. - Using ##**Width**## as a function returns the current console width in the low word and the current height in the high word. + L'utilisation de ##**Width**## comme une fonction retourne la largeur courante de la console dans le mot de poids faible et la hauteur courante dans le mot de poids fort. - In graphics modes ##**Width**## is used to indirectly select the font size by setting one of the height * width pairs allowed (See ##[[KeyPgScreengraphics Screen (Graphics)]]##). If ##//rows//## * ##//cols//## is an invalid combination, no changes are made to the screen display. + Dans les modes graphiques, ##**Width**## est utilisé pour sélectionner indirectement la taille de la police de caractères en validant une des paires hauteur * largeur possibles (Voir ##[[KeyPgScreengraphics Screen (Graphics)]]##). Si ##//rows (lignes)//## * ##//cols (colonnes)//## est une combinaison invalide, il n'y aura aucun changement de l'affichage écran. - Valid font heights are 8 pixels, 14 pixels and 16 pixels. The fonts all have a fixed width of 8 pixels. + Les hauteurs valides de polices de caractères sont 8 pixels, 14 pixels et 16 pixels. Toutes les polices de caractères ayant une largeur fixe de 8 pixels. - Using the ##**Width**## command forces a screen clear (##[[KeyPgCls Cls]]##) + L'utilisation de la commande ##**Width**## force une initialisation de l'écran (##[[KeyPgCls Cls]]##) {{fbdoc item="ex"}} @@ -86,9 +86,14 @@ sleep %% {{fbdoc item="diff"}} - - ##//columns//## was limited to ##40## or ##80##, while ##//rows//## could be ##25##, ##30##, ##43##, ##50## or ##60##, depending on the graphics hardware and screen mode being used. + - ##//columns//## était limité à ##40## ou ##80##, alors que ##//rows//## pouvait être ##25##, ##30##, ##43##, ##50## ou ##60##, en fonction du "hardware" graphique et du mode écran utilisé. + {{fbdoc item="see"}} + - ##[[KeyPgLoWord LoWord]]## -{{fbdoc item="see"}} +- ##[[KeyPgHiword HiWord]]## + - ##[[KeyPgCsrlin CsrLin]]## + +- ##[[KeyPgPos Pos]]## - ##[[KeyPgLoWord Loword]]## - ##[[KeyPgHiword Hiword]]## - ##[[KeyPgCsrlin Csrlin]]## diff --git a/fbdocs/manual/cache/KeyPgWindow.wakka b/fbdocs/manual/cache/KeyPgWindow.wakka index f9244eaea4..4edcf261ed 100644 --- a/fbdocs/manual/cache/KeyPgWindow.wakka +++ b/fbdocs/manual/cache/KeyPgWindow.wakka @@ -1,73 +1,73 @@ {{fbdoc item="title" value="WINDOW"}}---- -Sets new view coordinates mapping for current viewport +Valide la nouvelle cartographie des coordonnées de la zone de visualisation graphique courante {{fbdoc item="syntax"}}## **Window** [ [**Screen**] ( //x1//, //y1// )-( //x2//, //y2// ) ] ## {{fbdoc item="param"}} ##**Screen**## - Optional argument specifying y coordinates increase from top to bottom. + Argument facultatif specifiant les coordonnées //y1// augmentant du haut vers le bas. ##( //x1//, //y1// )-( //x2//, //y2// )## - New floating point values corresponding to the opposite corners of the current viewport. If omitted, the ##**Window**## coordinate mapping is removed. + Les nouvelles valeurs (en virgule flottante) correspondent à des coins opposés de la fenêtre actuelle. S'il est omis, la cartographie des coordonnées de la fenêtre graphique est supprimée. {{fbdoc item="desc"}} - ##**Window**## is used to define a new coordinates system. ##(//x1//, //y1//)## and ##(//x2//, //y2//)## are the new coordinates to be mapped to the opposite corners of the current viewport; all future coordinates passed to graphics primitive statements will be affected by this new mapping. If ##**Screen**## is omitted, the new coordinates system will be Cartesian, that is, with y coordinates increasing from bottom to top. Call ##**Window**## with no argument to disable the coordinates transformation. + ##**Window**## est utilisé pour définir un nouveau système de coordonnées. ##(//x1//, //y1//)## et ##(//x2//, //y2//)## sont les nouvelles coordonnées, à cartographier, des deux coins opposés de la zone de visualisation graphique courante; toutes les futures utilisations de coordonnées passées aux fonctions graphiques seront affectées par cette nouvelle cartographie, à partir de ce moment-là. Si ##**Screen**## est omis, le nouveau système de coordonnées est Cartesien, c'est à dire, avec des coordonnées //y// augmentant du bas vers le haut. Appeler ##**Window**## sans argument pour annuler la transformation des coordonnées. - ""FreeBASIC's"" current behavior is to keep track of the corners of the ##**Window**##, rather than a specific coordinate mapping. This means that the coordinate mapping can change after calls to ##[[KeyPgViewgraphics View]]##. - The ##**Window**## corners are also currently taken into account when working on image buffers, so when a ##**Window**## is in effect, the cooridnate mapping will be different from image to image. + Le comportement actuel de FreeBasic est de préserver les coordonnées des coins de ##**Window**##, plutôt que celles spécifiques de la cartographie. Ceci signifie que la cartographie des coordonnées peut changer après des appels à ##[[KeyPgViewgraphics View]]##.Les coins de ##**Window**## sont actuellement pris en compte lorsque l'on travaille sur les tampons d'image, donc quand un ##**Window**## est vakide, la cartographie des coordonnées pourra être différente d'une image à une autre. + Quand il n'y a pas de ##**Window**## en cours, il n'y a pas de cartographie valide, ainsi le système de coordonnées effectif est, indépendent de la taille du tampon image ou des coordonnées ##[[KeyPgViewgraphics View]]## coordinates (s'il y en a). - When there is no ##**Window**## in effect, there is no coordinate mapping in effect, so the effective coordinate system is constant, independent of image buffer sizes or ##[[KeyPgViewgraphics View]]## coordinates (if any). + {{fbdoc item="ex"}} {{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/gfx/window.bas"}}%%(freebasic) -screen 13 +Screen 13 +'' definition zone clipping -'' define clipping area -view ( 10, 10 ) - ( 310, 150 ), 1, 15 +View ( 10, 10 ) - ( 310, 150 ), 1, 15 +'' coordonnées vue -'' set view coordinates -window ( -1, -1 ) - ( 1, 1 ) +Window ( -1, -1 ) - ( 1, 1 ) +'' Dessin axe X -'' Draw X axis -line (-1,0)-(1,0),7 -draw string ( 0.8, -0.1 ), "X" +Line (-1,0)-(1,0),7 +Draw String ( 0.8, -0.1 ), "X" +'' Dessin axe Y -'' Draw Y axis -line (0,-1)-(0,1),7 -draw string ( 0.1, 0.8 ), "Y" - -dim as single x, y, s +Line (0,-1)-(0,1),7 +Draw String ( 0.1, 0.8 ), "Y" +Dim As Single x, y, s '' compute step size -s = 2 / pmap( 1, 0 ) -'' plot the function -for x = -1 to 1 step s - y = x ^ 3 - pset( x, y ), 14 -next x +s = 2 / PMap( 1, 0 ) +'' graphique de la function -'' revert to screen coordinates -window +For x = -1 To 1 Step s +y = x ^ 3 + PSet( x, y ), 14 + Next x +'' retour aux coordonnées ecran -'' remove the clipping area -view screen +Window +'' annule zone clipping -'' draw title -draw string ( 120, 160 ), "Y = X ^ 3" +View Screen +'' dessin titre -sleep -%% +Draw String ( 120, 160 ), "Y = X ^ 3" +Sleep -{{image class="center" title="Window example output" url="/images/window.png"}} +%% +
    {{fbdoc item="diff"}} - - QBASIC preserves the coordinate mapping after subsequent calls to VIEW. - - ""FreeBASIC's"" current behavior is to preserve the WINDOW coordinates after calls to VIEW, or when working on images, meaning that the coordinate mapping may undergo scaling/translations. (If a WINDOW hasn't been set, there is no coordinate mapping, and so it doesn't change after calls to VIEW.) The behavior may change in future, but consistent behavior can be be assured over inconstent viewport coordinates by re-calling WINDOW when you change the VIEW. -{{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## +- QBASIC préserve la cartographie des coordonnées après des appels successifs à VIEW. + - Actuellement FreeBASIC préserve les coordonnées WINDOW après des appels successifs à VIEW, ou lors d'un travail sur des images, ce qui signifie que les coordonnées de cartographie peuvent faire l'objet de mise à échelle/translations. (Si un WINDOW n'a pas été validé, il n'existe pas de cartographie des coordonnées, et ainsi elle ne peut changer après des appels à VIEW.) Ce comportement peut changer à l'avenir, mais un comportement cohérent peut être assuré au cours de la visualisation de coordonnées inconsistantes de la zone de visualisation graphique par un rappel de ##WINDOW## lorsque vous changez ##VIEW##. + {{fbdoc item="see"}} + +- ##[[KeyPgScreengraphics Screen (Graphics)]]## - ##[[KeyPgViewgraphics View (Graphics)]]## - ##[[KeyPgPmap PMap]]## + - ##[[KeyPgPmap PMap]]## {{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgWindowtitle.wakka b/fbdocs/manual/cache/KeyPgWindowtitle.wakka index 52a712c7ae..319edd8f39 100644 --- a/fbdocs/manual/cache/KeyPgWindowtitle.wakka +++ b/fbdocs/manual/cache/KeyPgWindowtitle.wakka @@ -1,41 +1,41 @@ {{fbdoc item="title" value="WINDOWTITLE"}}---- -Sets the program window title +Place le titre programme de la fenêtre {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgSub sub]] **Windowtitle** ( [[KeyPgByref byref]] //title// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) ## {{fbdoc item="usage"}}## - **""WindowTitle""** //title// + **WindowTitle** //title// ## {{fbdoc item="param"}} ##//title//## - the string to be assigned as new window title. + la chaîne assignée comme nouveau titre de la fenêtre {{fbdoc item="desc"}} - This statement is useful to change the program window title. The new title set will become active immediately if the program already runs in windowed mode, otherwise will become the new title for any window produced by subsequent calls to the ##[[KeyPgScreengraphics Screen (Graphics)]]## statement. If this function is not called before setting a new windowed mode via ##[[KeyPgScreengraphics Screen (Graphics)]]##, the program window will use the executable file name (without the extension) as title by default. - This command has no effect for consoles. + Cette fonction est utile pour changer le titre programme de la fenêtre. Le nouveau titre devient actif immédiatement si le programme fonctionne toujours en mode fenêtré, sinon ce sera le titre n'importe quelle fenêtre produite ensuite par un appel à ##[[KeyPgScreengraphics Screen (Graphics)]]##. Si cette fonction n'est pas appelée avant de valider un nouveau mode fenêtré via ##[[KeyPgScreengraphics Screen (Graphics)]]##, par défaut, la fenêtre aura comme titre le nom du fichier exécutable du programme (sans son extension). + Cette commande est sans effet en mode console. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/windowtitle.bas"}}%%(freebasic) -'Set the window title +'Titre de la fenetre WINDOWTITLE "FreeBASIC example program" -'Set screen mode +'Mode ecran SCREEN 13 SLEEP %% {{fbdoc item="target"}} - - Not present in DOS version / target of FreeBASIC + - Non présent en version DOS / cible de FreeBASIC -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Windowtitle""**##. +{{fbdoc item="section" value="Différences de dilectes + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Windowtitle**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - - ##[[KeyPgScreengraphics Screen (Graphics)]]## + - ##[[KeyPgScreengraphics Screen (Graphiques)]]## {{fbdoc item="back" value="CatPgGfxScreen|Screen Functions"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/KeyPgWinput.wakka b/fbdocs/manual/cache/KeyPgWinput.wakka index ba2088e132..66eaa9247d 100644 --- a/fbdocs/manual/cache/KeyPgWinput.wakka +++ b/fbdocs/manual/cache/KeyPgWinput.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WINPUT()"}}---- -Reads a number of wide-characters from console or file +Lit un nombre de caractères larges depuis la console ou un fichier {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Winput**( [[KeyPgByval byval]] //num// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgString wstring]] @@ -10,21 +10,21 @@ Reads a number of wide-characters from console or file ## {{fbdoc item="param"}} ##//num//## - Number of characters to read. + Nombre de caractères à lire. ##//filenum//## - File number of bound file or device. + Numéro de dossier du fichier lié ou d'un périphérique. -{{fbdoc item="ret"}} - Returns a [[KeyPgWstring Wstring]] of the characters read. +{{fbdoc item="section" value="Valeur retournée + Retourne une [[KeyPgWstring WString]] des caractères lus. {{fbdoc item="desc"}} - Reads a number of wide-characters from the console, or a bound file/device specified by ##//filenum//##. + Lit un nombre de caractères larges depuis la console ou un fichier/périphérique lié spécifié par ##//filenum//##. - The first version waits for and reads ##//n//## wide characters from the keyboard buffer. Extended keys are not read. The characters are not echoed to the screen. + La première version attend et lit ##//n//## caractères larges de la mémoire tampon du clavier. Les touches étendues ne sont pas lues. Les caractères ne sont pas affichés à l'écran. - The second version waits for and reads ##//n//## wide characters from a file or device. The file position is updated. + La deuxième version attend et lit ##//n//## caractères larges à partir d'un fichier ou un périphérique. La position dans le fichier est mise à jour. -~&//Note: FreeBASIC does not currently support reading wide-characters from the console.// +//Note: FreeBASIC ne prend pas en charge la lecture de caractères larges depuis la console.// {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/console/winput.bas"}}%%(freebasic) @@ -76,10 +76,10 @@ end if %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - QB does not support Unicode + - QB ne supporte pas Unicode {{fbdoc item="see"}} - ##[[KeyPgInputnum Input()]]## diff --git a/fbdocs/manual/cache/KeyPgWith.wakka b/fbdocs/manual/cache/KeyPgWith.wakka index 40b0ba92ae..6f2dfeedee 100644 --- a/fbdocs/manual/cache/KeyPgWith.wakka +++ b/fbdocs/manual/cache/KeyPgWith.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WITH"}}---- -Statement block to allow implicit access to fields in a user defined type variable +Bloc d'instructions pour permettre un accès implicite à des champs dans une variable de type défini par l'utilisateur {{fbdoc item="syntax"}}## **With** //user_defined_var// @@ -7,13 +7,13 @@ Statement block to allow implicit access to fields in a user defined type variab **End With** ## {{fbdoc item="desc"}} - The ##**With...End With**## block allows the omission of the name of a variable of a user-defined ##[[KeyPgType Type]]## when referring to its fields. The fields may then be accessed with just a single period (##.##) before them, e.g. if the ##[[KeyPgType Type]]## contains an field element called "//##element##//", then it could be accessed within the ##**With**## block as "##//.element//##". + Le bloc ##**With...End With**## permet l'omission du nom d'une variable d'un ##[[KeyPgType Type]]## défini par l'utilisateur quand on se référe à ses champs. Les champs peuvent être accessibles avec seulement un point (##.##)placé devant, par exemple si le ##[[KeyPgType Type]]## contient un élément champ appelé "//##element##//", on peut y accéder dans le bloc ##**With**## par "##//.element//##". - It can be used as a shorthand to save typing and avoid cluttering the source. ##**With**## can also be used with dereferenced pointers, as the second example shows. + Il peut être utilisé comme un raccourci pour éviter de taper beaucoup de texte et ainsi ne pas encombrer le fichier source. ##**With**## peut également être utilisé avec des pointeurs déréférencés, comme le montre le second exemple. - ##**With**## blocks may be nested. In this case, only the innermost ##**With**## block is active, and any outer ones are ignored until the inner one is closed again. See the third example for an illustration of this. + Les blocs ##**With**##peuvent être imbriqués. Dans ce cas, seul le bloc ##**With**## le plus interne avec est actif, et tous les blocs externes sont ignorées jusqu'à ce que celui de l'intérieur soit de nouveau fermé. Voir le troisième exemple pour une illustration de cela. - Internally, a reference to the variable is taken at the start of the ##**With**## block, and then is used to calculate any element accesses within the block. Note that this means that ##[[KeyPgGoto Goto]]## should not be used to jump into a ##**With**## block, otherwise the reference will not have been set, and the results of trying to access it will be undefined. + En interne, une référence à la variable est prise au début du bloc ##**With**##, et est ensuite utilisée pour calculer tous les accès aux éléments dans le bloc. Notez que cela signifie que ##[[KeyPgGoto Goto]]## ne doit pas être utilisé pour entrer dans un bloc ##**With**##, sinon la référence n'aura pas été réglée, et les résultats pour essayer d'y accéder seront indéfinis. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/udt/with-1.bas"}}%%(freebasic) @@ -85,11 +85,11 @@ print rect1.x, rect1.y '' 1, 2 print rect2.x, rect2.y '' 3, 4 %% -{{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__With""**##. +{{fbdoc item="section" value="Différences dialecte + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__With**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgType Type]]## diff --git a/fbdocs/manual/cache/KeyPgWoct.wakka b/fbdocs/manual/cache/KeyPgWoct.wakka index 70eccea1f1..00d8e7d4be 100644 --- a/fbdocs/manual/cache/KeyPgWoct.wakka +++ b/fbdocs/manual/cache/KeyPgWoct.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="WOCT"}}---- -Converts a number to a Unicode octal representation +Conversion d'un nombre dans sa représentation octale Unicode {{fbdoc item="syntax"}}## - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgByte Byte]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgByte Byte]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgShort short]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgShort short]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgShort Short]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgShort Short]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgInteger Integer]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] - [[KeyPgDeclare declare]] [[KeyPgFunction function]] **""Woct""**( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]], [[KeyPgByval byval]] //digits// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgLongint LongInt]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] + [[KeyPgDeclare Declare]] [[KeyPgFunction Function]] **WOct**( [[KeyPgByval ByVal]] //number// [[KeyPgAs As]] [[KeyPgLongint LongInt]], [[KeyPgByval ByVal]] //digits// [[KeyPgAs As]] [[KeyPgInteger Integer]] ) [[KeyPgAs As]] [[KeyPgWstring WString]] ## {{fbdoc item="usage"}}## //result// = **Woct**( //number// [, //digits// ] ) ## {{fbdoc item="param"}} ##//number//## - Number to convert to octal representation. + Nombre à convertir dans sa représentation octale. ##//digits//## - Desired number of digits in the returned string. + Nombre de chiffres désirés dans la chaîne retournée. -{{fbdoc item="ret"}} - The Unicode octal representation of the number, truncated or padded with zeros ("0") to the specified number of digits, if specified. +{{fbdoc item="section" value="Valeur retournée + La représentation octale Unicode du nombre, tronquée ou complètée avec des zéros ("0") au nombre de chiffres, s'il a été spécifié. {{fbdoc item="desc"}} - Returns the octal [[KeyPgWstring Wstring]] (Unicode) representation of ##//number//##. Octal digits range from 0 to 7. + Retourne représentation [[KeyPgWstring WString]] (Unicode) octale de ##//number//##. Chiffres octals de 0 à 7. - If you specify ##//digits//## > 0, the result string will be exactly that length. It will be truncated or padded with zeros on the left, if necessary. + Si vous spécifiez ##//digits//## > 0, la chaîne résultat aura exactement cette longueur. Elle sera tronquée ou complétée avec des zéros sur la gauche, si nécessaire. - The length of the returned string will not be longer than the maximum number of digits required for the type of ##//number//## (3 characters for ##[[KeyPgByte byte]]##, 6 for ##[[KeyPgShort short]]##, 11 for ##[[KeyPgInteger integer]]##, and 22 for ##[[KeyPgLongint longint]]##) + La longueur de la chaîne ne dépassera pas le nombre de bits maximum requis pour le type de ##//number//## (3 caractères pour ##[[KeyPgByte Byte (octet)]]##, 6 pour ##[[KeyPgShort Short (entier court)]]##, 11 pour ##[[KeyPgInteger Integer (entier)]]##, et 22 pour ##[[KeyPgLongint LongInt (entier long)]]##) {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/woct.bas"}}%%(freebasic) @@ -40,7 +40,7 @@ print Woct(54321, 4) print Woct(54321, 8) %% - will produce the output: + produira la sortie: %%152061 2061 @@ -49,13 +49,13 @@ print Woct(54321, 8) {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Woct""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Woct**##. {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of FreeBASIC. + - Les (w)strings Unicode ne sont pas supportées dans le portage DOS de FreeBASIC. {{fbdoc item="diff"}} - - In QBASIC Unicode was not supported. + - Dans QBASIC Unicode n'est pas supporté. {{fbdoc item="see"}} - ##[[KeyPgWbin Wbin]]## diff --git a/fbdocs/manual/cache/KeyPgWrite.wakka b/fbdocs/manual/cache/KeyPgWrite.wakka index 0b6faafc2a..e2f8d3ea06 100644 --- a/fbdocs/manual/cache/KeyPgWrite.wakka +++ b/fbdocs/manual/cache/KeyPgWrite.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="WRITE"}}---- -Outputs a comma-separated list of values to the screen +Affiche à l'écran une liste de valeurs séparées par des virgules {{fbdoc item="syntax"}}## **Write** [ //expressionlist// ] ## {{fbdoc item="param"}} ##//expressionlist//## - Comma-separated list of items to print + Liste d'items séparés par des virgules à afficher àl'écran {{fbdoc item="desc"}} - Outputs the values in ##//expressionlist//## to the screen. The values are separated with commas, and strings are enclosed in double quotes. Numeric values greater than zero (0) and less than one (1) are prefixed with a zero (0) if none is given (e.g., a value of ##-.123## will be output as ##-0.123##). Extra zeroes are truncated. + Affiche à l'écran les valeurs dans ##//expressionlist//##. Les valeurs sont séparées par des virgules, et les chaînes sont entre guillemets. Les valeurs numériques supérieures à zéro (0) et inférieures à un (1) sont préfixées par un zéro (0) si aucun n'est donné (par exemple, une valeur de ##-.123## sera affichée ##-0.123##). Les zéros inutiles seront éliminés. - If no expression list is given, **Write** outputs a carriage return. + Si aucune liste d'expressions n'est donnée, **Write** affiche un retour chariot. {{fbdoc item="ex"}} @@ -25,7 +25,7 @@ write write i, d, s %% - will produce the output: + produira la sortie: %% 123,"text",-0.456 @@ -34,7 +34,7 @@ write i, d, s %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWritePp Write #]]## diff --git a/fbdocs/manual/cache/KeyPgWriteFile.wakka b/fbdocs/manual/cache/KeyPgWriteFile.wakka index b9abc57794..48f487c2db 100644 --- a/fbdocs/manual/cache/KeyPgWriteFile.wakka +++ b/fbdocs/manual/cache/KeyPgWriteFile.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="WRITE (File Access)"}}---- -File access specifier +Spécificateur d'accès fichier {{fbdoc item="syntax"}}## Open //filename// As String For Binary Access **Write** As #//filenum// As Integer ## {{fbdoc item="desc"}} - Specifier for the ##[[KeyPgAccess Access]]## clause in the ##[[KeyPgOpen Open]]## statement. ##**Write**## specifies that the file is accessible for output. + Spécificateur pour la clause d'##[[KeyPgAccess Access]]## de la déclaration ##[[KeyPgOpen Open]]##. ##**Write**## spécifie que le fichier est accessible en sortie. {{fbdoc item="ex"}} - See example at ##[[KeyPgAccess Access]]## + Voir exemple de ##[[KeyPgAccess Access]]## {{fbdoc item="diff"}} - - None known. + - Aucune de connue {{fbdoc item="see"}} - ##[[KeyPgAccess Access]]## diff --git a/fbdocs/manual/cache/KeyPgWritePp.wakka b/fbdocs/manual/cache/KeyPgWritePp.wakka index c1f242c261..11e297e852 100644 --- a/fbdocs/manual/cache/KeyPgWritePp.wakka +++ b/fbdocs/manual/cache/KeyPgWritePp.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="WRITE #"}}---- -Outputs a comma-separated list of values to a text file or device +Inscrit une liste de valeurs séparées par des virgules dans un fichier texte ou un périphérique {{fbdoc item="syntax"}}## **Write #** //filenum// **,** [ //expressionlist// ] ## {{fbdoc item="param"}} ##//filenum//## - File number of an open file or device opened for ##[[KeyPgOutput Output]]## or ##[[KeyPgAppend Append]]##. + Numéro de fichier ou périphérique ouvert pour ##[[KeyPgOutput Output]]## ou ##[[KeyPgAppend Append]]##. ##//expressionlist//## - Comma-separated list of items to print + Liste d'items à écrire, séparés par des virgules {{fbdoc item="desc"}} - Outputs the values in ##//expressionlist//## to the text file or device bound to ##//filenum//##. The values are separated with commas, and strings are enclosed in double quotes. Numeric values greater than zero (##0##) and less than one (##1##) are prefixed with a zero (##0##) if none is given (e.g., a value of ##-.123## will be output as ##-0.123##). Extra zeroes are truncated. + Sort les valeurs de ##//expressionlist//## vers un fichier texte ou un périphérique associé à ##//filenum//##. Les valeurs sont séparées par des virgules, et les chaînes sont entre guillemets doubles. Les valeurs numériques comprises entre zéro (##0##) et un (##1##) sont péfixées par un zéro (##0##) si aucun zéro n'est donné (par exemple, une valeur de ##-.123## sera sortie ##-0.123##). Les zéros supplémentaires sont éliminés. - If no expression list is given, ##**Write #**## outputs a carriage return (note that the comma after ##//filenum//## is still necessary, even if no expression list is given). - The purpose of ##**Write #**## is to create a file that can be read back by using [[KeyPgInputPp Input #]]. + Si aucune liste d'items n'est donnée, ##**Write #**## sort un retour chariot (notez que la virgule après ##//filenum//## est obligatoire, même s'il n'y a pas de liste après). + Le but de ##**Write #**## est de créer un fichier qui sera, à l'opposé, lisible par [[KeyPgInputPp Input #]]. {{fbdoc item="ex"}} @@ -35,7 +35,7 @@ write #filenum, 123, "text", -.45600 write #filenum, write #filenum, i, d, s %% - will produce the file: + produira le fichier: %% 123,"text",-0.456 @@ -44,7 +44,7 @@ write #filenum, i, d, s %% {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgWrite Write]]## diff --git a/fbdocs/manual/cache/KeyPgWspace.wakka b/fbdocs/manual/cache/KeyPgWspace.wakka index 5e5b50b5dd..3dc19e0b83 100644 --- a/fbdocs/manual/cache/KeyPgWspace.wakka +++ b/fbdocs/manual/cache/KeyPgWspace.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WSPACE"}}---- -Creates a ##[[KeyPgWstring Wstring]]## of a given length filled with spaces (##" "##) +Crée une ##[[KeyPgWstring WString]]## de longueur donnée remplie d'espaces (##" "##) {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Wspace**( [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -9,13 +9,13 @@ Creates a ##[[KeyPgWstring Wstring]]## of a given length filled with spaces (##" ## {{fbdoc item="param"}} ##//count//## - An integer type specifying the length of the string to be created. + Un entier spécifiant la longueur de la chaîne à créer. -{{fbdoc item="ret"}} - The created ##[[KeyPgWstring Wstring]]##. An empty string will be returned if ##//count//## <= 0. +{{fbdoc item="section" value="Valeur retournée + La ##[[KeyPgWstring WString]]## créée. Une chaîne vide est retournée si ##//count//## <= 0. {{fbdoc item="desc"}} - ##**Wspace**## creates a wstring (wide character string- Unicode) with the specified number of spaces. + ##**WSpace**## crée une wstring (une chaîne large-caractère - Unicode) avec le nombre spécifié d'espaces. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/wspace.bas"}}%%(freebasic) @@ -25,13 +25,13 @@ print a ' prints: x x %% {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of ""FreeBASIC"". +
  • (w)strings Unicode ne sont pas supportées dans le portage DOS de FreeBASIC. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wspace""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Wspace**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgSpace Space]]## diff --git a/fbdocs/manual/cache/KeyPgWstr.wakka b/fbdocs/manual/cache/KeyPgWstr.wakka index 3d6ca0fcf6..dfecc19c9e 100644 --- a/fbdocs/manual/cache/KeyPgWstr.wakka +++ b/fbdocs/manual/cache/KeyPgWstr.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WSTR"}}---- -Returns a wide-character string representation of a number or ASCII character string +Retourne une chaîne de larges caractères représentant un nombre ou une chaîne de caractères ASCII {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Wstr** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //n// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -17,22 +17,22 @@ Returns a wide-character string representation of a number or ASCII character st ## {{fbdoc item="usage"}}## //result// = **Wstr**( //number// ) - //or// + //ou// //result// = **Wstr**( //string// ) ## {{fbdoc item="param"}} ##//number//## - Numeric expression to convert to a wide-character string. + Expression numérique à convertir en une chaîne de larges caractères. ##//string//## - String expression to convert to a wide-character string. + Expression chaine à convertir en une chaîne de larges caractères. -{{fbdoc item="ret"}} - Returns the wide-character representation of the numeric or string expression. +{{fbdoc item="section" value="Valeur retournée + Retourne une chaîne de larges caractères représentation d'une expression numérique ou chaîne. {{fbdoc item="desc"}} - ##**Wstr**## converts numeric variables to their wide-character string representation. It is the wide-character equivalent to ##[[KeyPgStr Str]]##. + ##**WStr**## convertit des variables numériques en leur représentation sous forme chaîne de larges caractères. C'est l'équivalent larges caractères de ##[[KeyPgStr Str]]##. - ##**Wstr**## also converts ASCII character strings to Unicode character strings. If a wide-character string is given, that string is returned unmodified. + ##**WStr**## convertit aussi les chaînes de caractères ASCII en chaînes de caractères Unicode. Si une chaîne de larges caractères est donnée, celle-ci sera retournée inchangée. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/wstr.bas"}}%%(freebasic) @@ -59,14 +59,14 @@ print WStr("Unicode 'Hello World'") %% {{fbdoc item="target"}} - - DOS does not support ##**Wstr**##. + - DOS ne supporte pas ##**WStr**##. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wstr""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Wstr**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgStr Str]]## diff --git a/fbdocs/manual/cache/KeyPgWstring.wakka b/fbdocs/manual/cache/KeyPgWstring.wakka index 70cc257807..400ee33388 100644 --- a/fbdocs/manual/cache/KeyPgWstring.wakka +++ b/fbdocs/manual/cache/KeyPgWstring.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="WSTRING"}}---- -Standard data type: wide character string +Type de données standard : chaînes de caractères larges (2 octets) {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Wstring** * //size// [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Wstring** [[KeyPgPtr ptr]] ## {{fbdoc item="desc"}} - A ##**Wstring**## is a fixed-size array of wide-chars that never overflows if the size is known at compile-time. It has no descriptor, and does never resize unless it's a pointer and ##[[KeyPgAllocate Allocate]]##/##[[KeyPgReallocate Reallocate]]##/##[[KeyPgDeallocate Deallocate]]## are used directly. + Une ##**WString**## est un tableau à taille fixe de caractères larges qui ne déborde jamais si la taille est connue au moment de la compilation. Il n'y a pas de descripteur, et ne peut être redimensionné sauf si c'est un pointeur et que ##[[KeyPgAllocate Allocate]]##/##[[KeyPgReallocate Reallocate]]##/##[[KeyPgDeallocate Deallocate]]## sont utilisés directement. - The end of the string is marked by the character 0, so that character must never be part of a ##**Wstring**## or the content will be truncated. + La fin de la chaîne est marquée avec le caractère 0, donc ce caractère ne doit jamais faire partie du contenu de ##**WString**## ou ce contenu sera tronqué. - This type is provided for support non-Latin based alphabets. Any intrinsic string function like ##[[KeyPgLeft Left]]## will work with ##**Wstring**##s too, as will any string operator. + Ce type existe pour supporter les alphabets avec une base non-Latin. Toutes les fonctions intrinsèques de chaînes comme ##[[KeyPgLeft Left]]## , ainsi que tout opérateur de chaîne, fontionnent aussi avec ##**WString**##. - Besides ASCII files with Unicode escape sequences (\u), FreeBASIC can parse UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE source files. + En plus des fichiers ASCII avec des séquences d'échappement Unicode (\u), FreeBasic peut analyser les fichiers source UTF-8, UTF-16LE, UTF-16BE, UTF-32LE et UTF-32BE. - The FreeBASIC text file functions can read and write Unicode files in different encodings, provided the ##[[KeyPgEncoding encoding]]## is specified when the file is opened. The text is automatically converted to the internal encoding at read and converted back to the file encoding at write. + Les fonctions de fichier texte de FreeBasic peuvent lire et écrire des fichiers Unicode dans des codages différents, à condition que le codage = ##[[KeyPgEncoding Encoding]]## soit spécifié lorsque le fichier est ouvert. Le texte est automatiquement converti dans le codage interne à la lecture et reconverti dans le codage du fichier lors de l'écriture. - ##[[KeyPgSizeof sizeof]]##( ##**Wstring**## ) returns the number of bytes used by a ##**Wstring**## character in the current platform. + ##[[KeyPgSizeof SizeOf]]##( ##**WString**## ) retourne le nombre d'octets utilisés par ##**WString**## dans la plate-forme courante. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/wstring.bas"}}%%(freebasic) @@ -36,15 +36,15 @@ print len(*str2) 'returns 12, the length of the string it points to {{fbdoc item="target"}} Support for wstrings relies in the C runtime library available in the platform and the internal format may vary. - - Unicode is not supported in the DOS port of FreeBASIC. In this port a character takes up always 1 byte and ##[[KeyPgWstring Wstrings]]## will behave as standard ASCII ##[[KeyPgZstring Zstrings]]## - - On Win32 wstrings are encoded in UCS-2 (UTF-16 LE) and a character takes up 2 bytes. - - On Linux wstrings are encoded in UCS-4 and a character takes up 4 bytes. + - Unicode n'est pas supporté dans le portage DOS de FreeBASIC. Dans ce portage un caractère vaut toujours 1 octet et ##[[KeyPgWstring Wstrings]]## va se comporter en tant que norme ASCII ##[[KeyPgZstring Zstrings]]## + - Sous Win32 wstrings sont encodées en UCS-2 (UTF-16 LE) et un caractère vaut 2 octets. + - Sous Linux wstrings sont encodées en UCS-4 et un caractère vaut 4 octets. {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wstring""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Wstring**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgString String]]## (data type) diff --git a/fbdocs/manual/cache/KeyPgWstringFunction.wakka b/fbdocs/manual/cache/KeyPgWstringFunction.wakka index 459a588cd5..1bcf30d05f 100644 --- a/fbdocs/manual/cache/KeyPgWstringFunction.wakka +++ b/fbdocs/manual/cache/KeyPgWstringFunction.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="WSTRING (Function)"}}---- -Fills a wstring with a certain length of a certain wide character +Remplit une wstring d'une certaine longueur avec un certain large caractère {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Wstring** ( [[KeyPgByval byval]] //count// [[KeyPgAs as]] [[KeyPgInteger integer]], [[KeyPgByval byval]] //ch_code// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgWstring wstring]] @@ -7,22 +7,22 @@ Fills a wstring with a certain length of a certain wide character ## {{fbdoc item="usage"}}## //result// = **Wstring**( //count//, //ch_code// ) - //or// + //ou// //result// = **Wstring**( //count//, //ch// ) ## {{fbdoc item="param"}} ##//count//## - An integer specifying the length of the wstring to be created. + Un entier spécifiant la longueur de la wstring à créer. ##//ch_code//## - An integer specifying the Unicode char to be used to fill the wstring. + Un entier spécifiant le caractère Unicode à utiliser pour remplir la wstring. ##//ch//## - A wstring whose first character is to be used to fill the wstring. + Une wstring dont le premier caractère sera utilisé pour remplir la wstring. -{{fbdoc item="ret"}} - The created wstring. An empty wstring will be returned if either ##//ch//## is an empty string, or ##//count//## <= 0. +{{fbdoc item="section" value="Valeur retournée + La wstring créée. Une wstring vide sera retournée si ##//ch//## est une chaîne vide, ou si ##//count//## <= 0. {{fbdoc item="desc"}} - ##**Wstring**## generates a temporal wstring filled with ##//count//## copies of an [[Unicode Unicode]] character. This string can be printed or assigned to a previously ##[[KeyPgDim Dim]]##ed ##**Wstring**##. + ##**WString**## génère une wstring remplie de ##//count//## copies d'un caractère [[Unicode Unicode]]. Cette chaîne peut être affichée à l'écran (avec Print) ou assignée à une ##**WString**## dimensionnée précédemment avec ##[[KeyPgDim Dim]]##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/strings/wstring.bas"}}%%(freebasic) @@ -30,17 +30,17 @@ PRINT WSTRING( 4, 934 ) PRINT WSTRING( 5, Wstr("Indeed") ) end 0 %% - <<ΦΦΦΦ - IIIII<< - ::c:: + ##
    ΦΦΦΦ + IIIII;%% +
    {{fbdoc item="target"}} - - Unicode (w)strings are not supported in the DOS port of FreeBASIC + - Les (w)strings Unicode ne sont pas supportées dans le portage DOS de FreeBASIC {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Wstring""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Wstring**##. {{fbdoc item="diff"}} - - QBasic does not support [[Unicode Unicode]] + - QBasic ne supporte pas [[Unicode Unicode]] {{fbdoc item="see"}} - ##[[KeyPgString String]] (data type)## diff --git a/fbdocs/manual/cache/KeyPgXorGfx.wakka b/fbdocs/manual/cache/KeyPgXorGfx.wakka index e6b5c8410e..140a1f8933 100644 --- a/fbdocs/manual/cache/KeyPgXorGfx.wakka +++ b/fbdocs/manual/cache/KeyPgXorGfx.wakka @@ -1,43 +1,43 @@ {{fbdoc item="title" value="XOR"}}---- -Parameter to the ##[[KeyPgPutgraphics Put]]## graphics statement which uses a bit-wise ##[[KeyPgOpXor Xor]]## as the blitting method +Paramètre de la fonction graphique ##[[KeyPgPutgraphics Put]]## qui utilise le traitement bit-à-bit ##[[KeyPgOpXor Xor]]## comme méthode d'écriture écran {{fbdoc item="syntax"}}## **Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Xor** ## {{fbdoc item="param"}} ##**Xor**## - Required. + Requis. {{fbdoc item="desc"}} - The ##**Xor**## method combines each source pixel with the corresponding destination pixel, using the bit-wise ##[[KeyPgOpXor Xor]]## function. The result of this is output as the destination pixel. - This method works in all graphics modes. There is no mask color, although color values of ##0## (##[[KeyPgRgba RGBA]](0, 0, 0, 0)## in full-color modes) will have no effect, because of the behavior of ##[[KeyPgOpXor Xor]]##. + La méthode ##**Xor**## combine chaque pixel source avec le pixel correspondant de la destination, en utilisant la fonction de traitement bit-à-bit ##[[KeyPgOpXor Xor]]##. Le résultat de cette manipulation étant envoyé comme pixel destination. + Cette méthode fonctionne dans tous les modes graphiques. Il n'y a pas de masque de couleur, cependant les valeurs de couleur ##0## (##[[KeyPgRgba RGBA]](0, 0, 0, 0)## dans les modes pleine couleur) n'auront aucun effet, en raison du comportement de ##[[KeyPgOpXor Xor]]##. - In full-color modes, each component (red, green, blue and alpha) is kept in a discrete set of bits, so the operation can be made to only affect some of the channels, by making sure the all the values of the other channels are set to ##0##. + Dans les modes pleine couleur, chaque composante (rouge, vert, bleu et alpha) est conservé dans un ensemble discret de bits, donc l'opération peut ne concerner qu'une partie des canaux, en s'assurant que les valeurs de tous les autres canaux sont mis à ##0##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/gfx/put-xor.bas"}}%%(freebasic) -''open a graphics window +''ouvrir une fenetre graphique ScreenRes 320, 200, 16 -''create a sprite containing a circle +''cree un sprite contenant un cercle Const As Integer r = 32 Dim c As Any Ptr = ImageCreate(r * 2 + 1, r * 2 + 1, 0) Circle c, (r, r), r, RGBA(255, 255, 255, 0), , , 1, f -''put the three sprites, overlapping each other in the middle +''"Put" les trois sprites, se chevauchant au centre de l'ecran Put (146 - r, 108 - r), c, xor Put (174 - r, 108 - r), c, xor Put (160 - r, 84 - r), c, xor -''free the memory used by the sprite +''libere la memoire utilisee par le sprite ImageDestroy c -''pause the program before closing +''pause le programme avant cloture Sleep %% -{{image class="center" title="Put Xor example output" url="/images/put-xor.png"}} +
    {{fbdoc item="diff"}} - - None + - Aucune {{fbdoc item="see"}} - ##[[KeyPgOpXor Xor]]## diff --git a/fbdocs/manual/cache/KeyPgYear.wakka b/fbdocs/manual/cache/KeyPgYear.wakka index 78533244b6..95a817b343 100644 --- a/fbdocs/manual/cache/KeyPgYear.wakka +++ b/fbdocs/manual/cache/KeyPgYear.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="YEAR"}}---- -Gets the year from a [[ProPgDates Date Serial]] +Récupère l'année à partir d'une [[ProPgDates Date Serial]] {{fbdoc item="syntax"}}## [[KeyPgDeclare declare]] [[KeyPgFunction function]] **Year** ( [[KeyPgByval byval]] //date_serial// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgInteger integer]] @@ -10,14 +10,14 @@ Gets the year from a [[ProPgDates Date Serial]] ## {{fbdoc item="param"}} ##//date_serial//## - the date + la date -{{fbdoc item="ret"}} - Returns the year from a variable containing a date in [[ProPgDates Date Serial]] format. +{{fbdoc item="section" value="Valeur retournée + Retourne l'année à partir d'une variable contenant une date sous forme de [[ProPgDates Date Serial]]. {{fbdoc item="desc"}} - The compiler will not recognize this function unless ##vbcompat.bi## is included. + Le compilateur ne reconnaît cette fonction que si ##vbcompat.bi## est inclus. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/dates/year.bas"}}%%(freebasic) @@ -29,7 +29,7 @@ print format(a, "yyyy/mm/dd hh:mm:ss "); year(a) %% {{fbdoc item="diff"}} - - Did not exist in QB. This function appeared in PDS and VBDOS + - N'existe pas dans QB. Cette fonction est apparue dans PDS et VBDOS {{fbdoc item="see"}} - [[ProPgDates Date Serials]] diff --git a/fbdocs/manual/cache/KeyPgZstring.wakka b/fbdocs/manual/cache/KeyPgZstring.wakka index b35bf05b27..5a19345435 100644 --- a/fbdocs/manual/cache/KeyPgZstring.wakka +++ b/fbdocs/manual/cache/KeyPgZstring.wakka @@ -1,20 +1,20 @@ {{fbdoc item="title" value="ZSTRING"}}---- -Standard data type: 8 bit character string +Type de données standard : chaîne de caractères 8 bits {{fbdoc item="syntax"}}## [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Zstring** * //size// [[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Zstring** [[KeyPgPtr ptr]] ## {{fbdoc item="desc"}} - A ##**Zstring**## is a C-style fixed-size array of chars. It has no descriptor so it's faster to pass it as an argument to functions. FreeBASIC avoids any overflow that could occur, by truncating the contents. + Une ##**ZString**## est un tableau C-style à taille fixe de caractères qui n'a pas de descripteur donc plus rapide à passer comme argument d'une fonction. FreeBasic évite tout débordement qui pourrait se produire, en tronquant le contenu. - A ##**Zstring**## [[KeyPgPtr ptr]] can point to a standard ##**Zstring**##, also can be used to implement an "user-managed" ##**Zstring**##, in this case ##[[KeyPgAllocate Allocate]]##/##[[KeyPgReallocate Reallocate]]##/##[[KeyPgDeallocate Deallocate]]## must be used to size-resize-dispose it and is up to the user to avoid overflows . + Un [[KeyPgPtr Ptr]] ##**ZString**## peut pointer sur une ##**ZString**## standard , peut également être utilisé pour mettre en œuvre une ##**ZString**## "gérée par l'utilisateur", dans ce cas ##[[KeyPgAllocate Allocate]]##/##[[KeyPgReallocate Reallocate]]##/##[[KeyPgDeallocate Deallocate]]## doivent être utilisés pour la dimensionner/redimensionner/libérer et c'est à l'utilisateur de gérer les débordements. - The end of the string is marked by a character 0 ASCII, this is automatically managed by the FreeBASIC string handling functions. A character 0 ASCII must never enter in the text of a ##**Zstring**## or it will be truncated, as no descriptor exists . + La fin de la chaîne est marquée avec le caractère ASCII 0, ceci est géré automatiquement par les fonctions FreeBASIC de gestion des chaînes. Le caractère ASCII 0 ne doit jamais faire partie du texte de la ##**ZString**## sinon il sera tronqué, car il n'y a pas de descripteur. - In a ##**Zstring**##, ##[[KeyPgLen Len]]## returns the size of the contained string and ##[[KeyPgSizeof Sizeof]]## returns the space allocated to the ##**Zstring**##. + Pour une ##**ZString**##, ##[[KeyPgLen Len]]## retourne la taille du contenu de la chaîne et ##[[KeyPgSizeof SizeOf]]## retourne l'espace alloué à la ##**ZString**##. - This type is provided for easy interfacing with C libraries and to also replace the fixed-length strings, that can't be managed through pointers. Any intrinsic string functions like ##[[KeyPgLeft Left]]## will work with ##**Zstring**##'s too, plus any string operator. + Ce type existe pour un interfaçage plus aisé avec les bibliothèques du langage C et aussi pour remplacer les chaînes de longueur fixe, qui ne peuvent être gérées par des pointeurs. Toutes les fonctions intrinsèques de chaînes comme ##[[KeyPgLeft Left]]##, ainsi que tout opérateur de chaîne, fonctionnent aussi avec ##**ZString**##. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/datatype/zstring.bas"}}%%(freebasic) @@ -34,10 +34,10 @@ print sizeof(*str2) 'returns len(zstring), the size of the variable %% {{fbdoc item="lang"}} - - Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Zstring""**##. + - Non disponible dans le dialecte //[[CompilerOptlang -lang qb]]// sauf si référencé avec l'alias ##**__Zstring**##. {{fbdoc item="diff"}} - - New to ""FreeBASIC"" + - Nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgString String]]## diff --git a/fbdocs/manual/cache/LaananFisher.wakka b/fbdocs/manual/cache/LaananFisher.wakka index ea68982e77..c0dd24ca22 100644 --- a/fbdocs/manual/cache/LaananFisher.wakka +++ b/fbdocs/manual/cache/LaananFisher.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="Laanan Fisher"}}---- //(a.k.a. stylin)// -{{fbdoc item="section" value="FreeBASIC"}} - I regularly use and recommend ""FreeBASIC"" to anyone needing a language that provides ease-of-use, low development times, portability and support for a variety of programming paradigms. I log on occasionally at the official ""FreeBASIC"" site [[[www.freebasic.net]]] and read about what's new with ""FreeBASIC"" and its great community at the forums there [[[www.freebasic.net/forum]]]. +**FreeBASIC** + I regularly use and recommend FreeBASIC to anyone needing a language that provides ease-of-use, low development times, portability and support for a variety of programming paradigms. I log on occasionally at the official FreeBASIC site [www.freebasic.net] and read about what's new with FreeBASIC and its great community at the forums there [www.freebasic.net/forum]. -{{fbdoc item="section" value="contact"}} - Reach me via email at [[gmail.com]] with a username of "laananfisher". \ No newline at end of file +**contact** + Reach me via email at gmail.com with a username of "laananfisher". \ No newline at end of file diff --git a/fbdocs/manual/cache/LangQB.wakka b/fbdocs/manual/cache/LangQB.wakka index 348d1227b2..c3a4e2724a 100644 --- a/fbdocs/manual/cache/LangQB.wakka +++ b/fbdocs/manual/cache/LangQB.wakka @@ -1,50 +1,50 @@ {{fbdoc item="title" value="Differences from QB"}}---- -Since version 0.17, ""FreeBASIC"" introduced a -lang command-line option, that is used to change the language compatibility mode. Use the -lang qb option when compiling to select the most QB compatible parser. All differences listed below assume that -lang qb was used. +Depuis la version 0.17, FreeBASIC introduit une option -lang de ligne de commande, qui est utilisée pour changer le mode de compatibilité de langue. Utilisez l'option qb-lang lors de la compilation pour sélectionner l'analyseur plus compatible QB. Toutes les différences mentionnées ci-dessous supposent que qb-lang a été utilisé. -==Architecture/Platform incompatibilities== - - ""FreeBASIC"" is written for 32-bit operating systems and a 32 bit DOS extender, and cannot utilize code which depends on 16-bit DOS, 16 bit assembly or memory model (segment & offset, XMS/EMS, ...). - - DEF SEG is no longer necessary and will not work - any code which POKEs to video memory this way will no longer function, however, for DOS it can be easily rewritten using DPMI features. - - CALL INTERRUPT no longer functions, as it relies on 16-bit DOS. DOS interrupts can be called in the DOS32 version by using the DPMI library, but they might work slowly because of the 32bit-16bit-32bit mode changes the processor will have to perform. +**Incompatibilités architecture/plate-forme** + - FreeBasic est écrit pour les systèmes d'exploitation 32-bit et une extension DOS 32 bits, et ne peut pas utiliser le code qui dépend du DOS 16-bits, ou de l'assembleur 16 bits, ou du modèle de mémoire (segment & offset, XMS / EMS, ...). + - DEF SEG n'est plus nécessaire et ne fonctionnera pas - tout code qui POKE dans la mémoire vidéo de cette manière ne fonctionnera plus, cependant, pour DOS, il peut facilement être réécrit en utilisant les caractéristiques DPMI. + - CALL INTERRUPT ne fonctionne plus, car il repose sur DOS 16-bit. Les interruptions DOS peuvent être appelées dans la version Dos32 en utilisant la bibliothèque DPMI, mais elles pourraient travailler lentement en raison des changements de mode 32bit-16bit-32bit que le processeur aura à effectuer. -==Changed due to ambiguity== - - A scalar variable and an array with the same name and suffix can no longer share the same name. - - SHARED can't be used inside a SUB or FUNCTION as it resulted in shared variables not defined in the main program. A proper DIM SHARED in the main program must be used. - - COMMON declarations do not depend on the order they are made, variables are matched by name and for that reason named COMMON is no longer supported. All COMMON arrays are variable-length arrays in FB. - - If a single line [[KeyPgIfthen IF]] has an (unnecessary) colon directly after the THEN, it has to be terminated by an [[KeyPgEndif END IF]] in FB. If that unneeded colon is removed, FB will behave as QB. +**Changement en raison d'ambiguïtés** + - Une variable scalaire et un tableau avec le même nom et suffixe ne peuvent plus partager le même nom. + - SHARED ne peut pas être utilisé dans SUB ou FUNCTION car il en résultait des variables partagées non-définies dans le programme principal. Un DIM SHARED approprié dans le programme principal doit être utilisé. + - Les déclarations COMMON ne dépendent pas de l'ordre dans lequel elles sont faites, les variables sont reconnues par leur nom et pour cette raison utiliser COMMON n'est plus supporté. Tous les tableaux COMMON sont des tableaux de longueur variable dans FB. + - Si une ligne unique [[KeyPgIfthen If]] a un signe deux-points (:) inutile directement après THEN, il doit être terminé par un [[KeyPgEndif End If]] dans FB. Si ce signe deux-points (:) inutile est enlevé, FB se comportera comme QB. -==Design differences== - - Graphics support was internally redesigned, see [[GfxLib GfxLib overview]] - - CLEAR is no longer used to reset all variables and set the stack. Variables must be reset one by one, and stack size can be changed in the compiler command line. The keyword CLEAR is used to do memory fills in FB. - - String DATA items must be enclosed in quotes in FB, in QB this was optional - - All functions must have been declared, even with a CALL in ""FreeBASIC"". With CALL it was possible to invoke prototype-less functions in ""QuickBASIC"". (to be supported in future with -lang qb) - - In ""FreeBASIC"" all arrays must be explicitly declared. (Interpreted ""QuickBASIC"" arrays are automatically created with up to 10 indices.) - - Strings use a null (char 0) terminator to be compatible with C libraries and the Windows API, fixed-length strings can't contain chr$(0) chars for now. - - When INKEY[$] reads an extended key (Num Pad, Arrows...) it returns a two character string. In FB the first character is CHR[$](255), while in QB this first char is CHR$(0). - - With fixed length strings ""FreeBASIC"" gives the real length as [[KeyPgLen LEN]] plus one (null-char), even on [[KeyPgType TYPE]] fields. - - In ""FreeBASIC"", unused characters of fixed-length strings are set to 0, regardless of what "-lang" compiler option is used. In QB, unused characters are set to 32 (space, or " ", in ASCII). - - When a fixed-length string is declared, but still not initialized, all characters are set to 0, both in ""FreeBASIC"" and QB. - - The arrays are stored in row-major order in FB, they were stored in column-major order in QB by default. Row major order: data with the same last index are contiguous. Column-major order: data wih the same first index are contiguous. For example, if you have DIM A(1 TO 3, 1 TO 8), in row-major order the elements are stored such that A(3,5) is followed in memory by A(3,6); in column-major order A(3,5) is followed in memory by A(4,5). - - Programs don't stop anymore on runtime errors unless //[[CompilerOpte -e]]// or //[[CompilerOptex -ex]]// option is used in the command line. Using these options allow the use of QB style error handling (ON ERROR, RESUME...). - - Octal numbers are written "&o...", whereas in QB they could be written as "&o..." or "&...". - - PRINT requires the USING clause, if used, to be the first argument. QB allowed PRINT to have not-to be-formatted arguments before USING. - - In FB FOR loops in subs/functions do not accept arguments received byref as counters. A local variable must be used. - - FB's [[KeyPgLocate LOCATE]] does not respect the fourth and fifth arguments for cursor shape. - - FB's [[KeyPgScreenCons SCREEN]] does not allow switching the visible or the work-page. Use [[KeyPgScreenset SCREENSET]] instead. - - FB's [[KeyPgColor COLOR]] does not allow a third argument for border color. - - FB's [[KeyPgTimer TIMER]] returns the number of seconds since the computer started, while QB's TIMER returns the number of seconds since midnight. (""Win32"" and Linux only: No more wrapping at midnight! :)) - - In QB a chr$(13) inside a string did a CR+LF when PRINT'ed. In FB the CHR(13) prints just at what it is, a CR. - - EOF can no longer be used to detect an empty comms buffer. Empty buffer should be tested comparing LOC with 0 in FB. Also, for files opened in RANDOM or BINARY mode, EOF returns non-zero already after reading exactly the file size, see ##[[KeyPgEof Eof]]##. - - Integer variables do not signal overflow errors in FB, even with the //[[CompilerOptex -ex]]// option on. Any QB code relying in catching integer overflow errors will not work in FB. +**Différences de conception** + - Le support graphique a été remanié en interne, voir [[GfxLib Vue d'ensemble de GfxLib]] + - CLEAR n'est plus utilisé pour réinitialiser toutes les variables et définir la pile. Les variables doivent être remis à zéro, une par une et la taille de la pile peut être modifiée dans la ligne de commande du compilateur. Le mot-clé CLEAR est utilisé dans FB pour remplir la mémoire avec une valeur. + - Les éléments Chaîne DATA doivent être entre guillemets dans FB, dans QB c'était facultatif. + - Toutes les fonctions doivent avoir été déclarées, même avec un CALL sous FreeBASIC. Avec CALL il était possible d'invoquer des prototypes des fonctions sous QuickBASIC. (pourra être supporté dans qb-lang avec l'avenir) + - En FreeBasic tous les tableaux doivent être déclarés explicitement. (Les tableaux interprétés sous QuickBASIC sont automatiquement créés avec 10 indices.) + - Les chaînes utilisent terminateur nul (char 0) pour être compatibles avec les bibliothèques C et l'API Windows, chaînes de longueur fixe ne peuvent pas contenir de caractère chr$(0) pour l'instant. + - Lorsque INKEY[$] lit une touche étendue (du pavé numérique, flèches ...), il renvoie une chaîne de deux caractères. Dans FB le premier caractère est CHR[$](255), alors que dans QB ce premier caractère est CHR$(0). + - Avec les chaînes de longueur fixe FreeBasic donne la longueur réelle comme [[KeyPgLen Len]] plus un (caractère nul), même sur les champs de [[KeyPgType Type]]. + - Dans FreeBASIC,les caractères inutilisés des chaînes de longueur fixe sont mis à 0, indépendamment de l'option "-lang" du compilateur qui est utilisée. Dans QB, les caractères non utilisés sont mis à 32 (l'espace, ou "", en ASCII). +
  • Quand une chaîne de longueur fixe est déclarée, mais pas encore initialisée, tous les caractères sont mis à 0, tant en FreeBasic qu'en QB. + - Les tableaux sont stockés dans l'ordre majeur des lignes dans FB, ils étaient stockés dans l'ordre majeur des colonnes par défaut dans QB. Ordre majeur des lignes: les données avec le même dernier indice sont contiguës. Ordre majeur des colonnes: les données avec le même premier indice sont contiguës. Par exemple, si vous avez DIM A(1 TO 3, 1 TO 8), dans l'ordre majeur des lignes les éléments sont stockés de telle sorte que A(3,5) est suivie dans la mémoire par A(3,6); dans l'ordre majeur des colonnes A(3,5) est suivie dans la mémoire par A(4,5). + - Les programmes ne s'arrêtent plus sur les erreurs d'exécution sauf si l'option //[[CompilerOpte -e]]// ou //[[CompilerOptex -ex]]// est utilisée dans la ligne de commande. L'utilisation de ces options permet l'utilisation du traitement d'erreur style QB (ON ERROR, RESUME...). + - Les nombres octals sont écrits "&o...", alors que dans QB ils pouvaient être écrits "&o..." ou "&...". + - PRINT exige, si la clause USING est utilisée, qu'elle soit le premier argument. QB permet que PRINT ait des arguments USING. + - Dans FB les boucles FOR dans des subs/functions n'acceptent pas les arguments reçus byref (par référence) comme compteurs. Une variable locale doit être utilisée. + - Dans FB [[KeyPgLocate Locate]] ne respecte pas les quatrième et cinquième arguments pour la forme du curseur. + - Dans FB [[KeyPgScreenCons Screen]] ne permet pas de commutation entre page visible ou de travail. Utilisez [[KeyPgScreenset ScreenSet]] à la place. + - Dans FB [[KeyPgColor Color]] ne permet pas un troisième argument pour la couleur de bordure. + - Dans FB [[KeyPgTimer Timer]] renvoie le nombre de secondes depuis le démarrage de l'ordinateur, tandis que TIMER de QB retourne le nombre de secondes depuis minuit. (Win32 et Linux uniquement: Pas plus à minuit! :)) + - Dans QB un chr$(13) dans une chaîne faisait un CR+LF lors d'un PRINT. Dans FB un CHR(13) imprime juste à ce qu'il est, un CR. + - EOF ne peut plus être utilisé pour détecter un tampon vide. Les tampons vides doivent être testés en comparant LOC avec 0 dans FB. En outre, pour les fichiers ouverts en mode RANDOM ou BINARY, EOF retourne non-nul déjà après avoir lu exactement la taille du fichier, voir ##[[KeyPgEof EOF]]##. + - Les variables entières ne signalent pas les erreurs de débordement dans FB, meme si l'option //[[CompilerOptex -ex]]// est valide. Tout code QB s'appuyant sur l'interception des erreurs de débordement d'entier ne fonctionne pas dans FB. -==Archaic commands== - - BSAVE and BLOAD can be used in FB only to save and retrieve screens or graphic buffers. They will work only if gfxlib is linked, this is, if a graphics screen mode is requested somewhere in the program. The console can't be saved with BSAVE or retrieved with BLOAD. The other use of BSAVE-BLOAD, saving and loading full arrays, can be achieved easily with GET and PUT. - - FIELD statement (for record definition at runtime) has been left aside. The keyword FIELD is used in FB to specify field alignment in [[KeyPgType TYPE]] variables. - - PC Speaker commands no longer function: Any references to SOUND or PLAY statements will result in an error message. There is a third party library available to emulate this functionality, but it's not included with ""FreeBASIC"". - - Fake event-driven programming (ON KEY, ON PEN, ON STRIG, ON TIMER) no longer works. They could be emulated by a separate library. - - MKSMBF$ and all the ""MKxMBF$"" commands supporting the pre-QB4.0 Microsoft proprietary floating point format (MBF) are not implemented. - - The use of parenthesis in the arguments passed to a function to emulate by-value passing is not permitted. The CALL quirk resulting in all arguments being passed by value, no longer works. The proper [[KeyPgByval BYVAL]] and [[KeyPgByref BYREF]] keywords must be used. - - FILES is not implemented. Instead, PDS 7.1-compatible [[KeyPgDir DIR]][$] can be used. - - IOCTL, ERRDEV and ERRDEV$, low level functions to access hardware are not implemented as they were OS-dependent. - - CALL ABSOLUTE to run inline machine code is no longer supported. Instead you can use [[KeyPgAsm ASM]]...END ASM blocks to insert inline assembler commands. Or use the ASM... one line command. +**Commandes archaïques** + - BSAVE et BLOAD peuvent être utilisés dans FB seulement pour enregistrer et récupérer des écrans ou tampons graphiques. Cela ne fonctionnera que si gfxlib est liée, c'est à dire, si un mode d'écran graphique est validé quelque part dans le programme. La console ne peut pas être enregistrée avec BSAVE ou récupérée avec BLOAD. L'autre utilisation de BSAVE-BLOAD, la sauvegarde et le chargement complet de tableaux, ce qui peut être atteint facilement avec GET et PUT. + - La déclaration FIELD (pour la définition d'enregistrement lors de l'exécution) a été laissée de côté. Le mot-clé FIELD est utilisé dans FB pour spécifier l'alignement les variables [[KeyPgType Type]]. + - Les commandes haut-parleur PC ne fonctionnent plus: Toute référence à des déclarations ou SOUND PLAY se traduira par un message d'erreur. Il y a une bibliothèque tierce partie disponible pour émuler cette fonctionnalité, mais elle n'est pas incluse avec FreeBASIC. + - La fausse programmation événementielle (ON KEY, ON PEN, ON STRIG, ON TIMER) ne fonctionne plus. Ils pourraient être émulés par une bibliothèque séparée. + - MKSMBF$ and all the MKxMBF$ commands supporting the pre-QB4.0 Microsoft proprietary floating point format (MBF) are not implemented. + - L'utilisation de parenthèses dans les arguments passés à une fonction pour émuler un passage par valeur n'est pas autorisée. Le CALL bizarre résultant dans tous les arguments sont passés par valeur, ne fonctionne plus. Les mots clés corrects [[KeyPgByval ByVal]] et [[KeyPgByref ByRef]] doivent être utilisés. + - FILES n'est pas mis en œuvre. Au lieu de cela, [[KeyPgDir Dir]][$] PDS 7.1-compatible peut être utilisé. + - IOCTL, ERRDEV and ERRDEV$, fonctions de bas niveau pour accéder au matériel ne sont pas implémentées car elles dépendent de l'OS. + - CALL ABSOLUTE pour exécuter du code machine en ligne n'est plus supporté. Au lieu de cela vous pouvez utiliser des blocs [[KeyPgAsm Asm]]...END ASM pour insérer du code assembleur. Vous pouvez également utiliser la commande en ligne ASM ... . {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/LicenseGPL.wakka b/fbdocs/manual/cache/LicenseGPL.wakka index bb44c01d1b..3cb278996a 100644 --- a/fbdocs/manual/cache/LicenseGPL.wakka +++ b/fbdocs/manual/cache/LicenseGPL.wakka @@ -37,11 +37,11 @@ You may charge a fee for the physical act of transferring a copy, and you may at 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + - You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. - b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + - You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. - c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + - If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. @@ -51,11 +51,11 @@ In addition, mere aggregation of another work not based on the Program with the 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + - Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + - Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + - Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. diff --git a/fbdocs/manual/cache/ObsoletedKwds.wakka b/fbdocs/manual/cache/ObsoletedKwds.wakka index 01df30197b..50eb4ac17f 100644 --- a/fbdocs/manual/cache/ObsoletedKwds.wakka +++ b/fbdocs/manual/cache/ObsoletedKwds.wakka @@ -1,21 +1,21 @@ {{fbdoc item="title" value="Obsoleted Keywords"}}---- - Along the way FB has had a few keywords changed. Here is the list of those no longer supported. Old code must be updated if recompiled. + En cours de route, FB a eu quelques mots-clés de changés. Voici la liste de ceux qui ne sont plus pris en charge. L'ancien code doit être mis à jour si recompilé. OPEN "CON:" - Use [[KeyPgOpenCons OPEN CONS]] + Utilisez [[KeyPgOpenCons Open Cons]] OPEN "ERR:" - Use [[KeyPgOpenErr OPEN ERR]] + Utilisez [[KeyPgOpenErr Open Err]] OPEN "PIPE:" - Use [[KeyPgOpenPipe OPEN PIPE]] + Utilisez [[KeyPgOpenPipe Open Pipe]] POKEI - Use [[KeyPgPoke POKE (integer,address,n)]] + Utilisez [[KeyPgPoke Poke (Integer,Address,N)]] POKES - Use [[KeyPgPoke POKE (short,address,n)]] - SCREENINFO (Function returning a pointer to a structure) - Use [[KeyPgScreeninfo SCREENINFO, Sub returning values in its arguments]] + Utilisez [[KeyPgPoke Poke (Short,Address,N)]] + SCREENINFO (Fonction retournant un pointeur vers une structure) + Utilisez [[KeyPgScreeninfo Screeninfo]], Sub reournant des valeurs dans ses arguments VAL64 - Use [[KeyPgVallng VALLNG()]] + Utilisez [[KeyPgVallng Vallng()]] GOSUB - Do not use [[KeyPgGosub GOSUB]] in SUBs or FUNCTIONs anymore; allowed in ##-lang qb## mode. + Ne pas utiliser [[KeyPgGosub GoSub]] dans des SUB ou FONCTION; autorisé dans ##-lang qb## mode. {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/OpPrecedence.wakka b/fbdocs/manual/cache/OpPrecedence.wakka index d848dca6ba..d636df4261 100644 --- a/fbdocs/manual/cache/OpPrecedence.wakka +++ b/fbdocs/manual/cache/OpPrecedence.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="Operator Precedence"}}---- - When several operations occur in a single expression, each operation is evaluated and resolved in a predetermined order. This is called the order of operation or operator precedence. + Lorsque plusieurs opérations se produisent dans une expression unique, chaque opération est évaluée et résolue dans un ordre prédéterminé. C'est ce qu'on appelle l'ordre des opérations ou la priorité des opérateurs. - If an operator in an expression has a higher precedence, it is evaluated before an operator of lower precedence. + Si un opérateur dans une expression a une priorité plus élevée, il est évalué avant un opérateur de priorité inférieure. - If operators have equal precedence, they then are evaluated in the order in of their associativity. The associativity may be Left-to-Right or Right-to-Left order. + Si les opérateurs ont la même priorité, ils sont ensuite évalués dans l'ordre de leur associativité. L'associativité peut être l'ordre de gauche-à-droite ou de droite-à-gauche. - As a rule, binary operators (such as ##[[KeyPgOpAdd +]]##, ##[[KeyPgOpExponentiate ^]]##) and unary postfix operators (such as ##[[KeyPgOpArrayIndex ()]]##, ##[[KeyPgOpPtrMemberAccess ->]]##) are evaluated Left-to-Right, and unary prefix operators (such as ##[[KeyPgOpNot Not]]##, ##[[KeyPgOpAt @]]##) are evaluated Right-to-Left. + En règle générale, les opérateurs binaires (comme ##[[KeyPgOpAdd +]]##, ##[[KeyPgOpExponentiate ^]]##) et les opérateurs unaires postfix (comme ##[[KeyPgOpArrayIndex ()]]##, ##[[KeyPgOpPtrMemberAccess ->]]##) sont évalués de gauche à droite, et les opérateurs de préfixe unaire (comme ##[[KeyPgOpNot Not]]##, ##[[KeyPgOpAt @]]##) sont évalués de droite à gauche. - Operators that have an associativity of "N/A" indicate that there is no expression in which the operator can be used where its order of operation would need to be checked, either by precedence or by associativity. Function-like operators such as ##[[KeyPgCast Cast]]## are always the first to be evaluated due to the parentheses required in their syntax. And assignment operators are always the last to be evaluated. + Les opérateurs qui ont une associativité de "N/A" indiquent qu'il n'y a pas d'expression dans lequel l'opérateur peut être utilisé lorsque son ordonnance de fonctionnement devra être vérifiée, soit par priorité ou par associativité. Les opérateurs-fonction tels que ##[[KeyPgCast Cast]]## sont toujours les premiers à être évalués en raison des parenthèses nécessaires dans leur syntaxe. Et les opérateurs d'affectation sont toujours les derniers à être évalués. - Parentheses can be used to override operator precedence. Operations within parentheses are performed before other operations. Within the parentheses normal operator precedence is used. + Les parenthèses peuvent être utilisées pour outrepasser la priorité des opérateurs. Les opérations entre parenthèses sont effectuées avant les autres opérations. Dans les parenthèses la priorité normale des opérateurs est utilisée. - The following table lists operator precedence from highest to lowest. Breaks in the table mark the groups of operators having equal precedence. + Le tableau suivant liste en premier les opérateurs à priorité la plus haute en descendant vers ceux à priorité la plus basse. Les ruptures dans la table marquent les groupes d'opérateurs qui ont la même priorité. -==Highest Precedence== +**Priorité la plus élevée** - {{table columns="3" cellpadding="2" cells="Operator;Description;Associativity;###;###;###;CAST;Type Conversion;N/A;PROCPTR;Procedure pointer;N/A;STRPTR;String pointer;N/A;VARPTR;Variable pointer;N/A;###;###;###;[];String index;Left-to-Right;[];Pointer index;Left-to-Right;();Array index;Left-to-Right;();Function Call;Left-to-Right;.;Member access;Left-to-Right;->;Pointer to member access;Left-to-Right;###;###;###;@;Address of;Right-to-Left;*;Value of;Right-to-Left;New;Allocate Memory;Right-to-Left;Delete;Deallocate Memory;Right-to-Left;###;###;###;^;Exponentiate;Left-to-Right;###;###;###;-;Negate;Right-to-Left;###;###;###;*;Multiply;Left-to-Right;/;Divide;Left-to-Right;###;###;###;\;Integer divide;Left-to-Right;###;###;###;MOD;Modulus;Left-to-Right;###;###;###;SHL;Shift left;Left-to-Right;SHR;Shift right;Left-to-Right;###;###;###;+;Add;Left-to-Right;-;Subtract;Left-to-Right;###;###;###;&;String concatenation;Left-to-Right;###;###;###;=;Equal;Left-to-Right;<>;Not equal;Left-to-Right;<;Less than;Left-to-Right;<=;Less than or equal;Left-to-Right;>=;Greater than or equal;Left-to-Right;>;Greater than;Left-to-Right;###;###;###;NOT;Complement;Right-to-Left;###;###;###;AND;Conjunction;Left-to-Right;###;###;###;OR;Inclusive Disjunction;Left-to-Right;###;###;###;EQV;Equivalence;Left-to-Right;IMP;Implication;Left-to-Right;XOR;Exclusive Disjunction;Left-to-Right;###;###;###;ANDALSO;Short Circuit Conjunction;Left-to-Right;ORELSE;Short Circuit Inclusive Disjunction;Left-to-Right;###;###;###;=;Assignment;N/A;&=;Concatenate and Assign;N/A;+=;Add and Assign;N/A;-=;Subtract and Assign;N/A;*=;Multiply and Assign;N/A;/=;Divide and Assign;N/A;\=;Integer Divide and Assign;N/A;^=;Exponentiate and Assign;N/A;MOD=;Modulus and Assign;N/A;AND=;Conjunction and Assign;N/A;EQV=;Equivalence and Assign;N/A;IMP=;Implication and Assign;N/A;OR=;Inclusive Disjunction and Assign;N/A;XOR=;Exclusive Disjunction and Assign;N/A;SHL=;Shift Left and Assign;N/A;SHR=;Shift Right and Assign;N/A;LET;Assignment;N/A;###;###;###;LET();Assignment;N/A"}} + {{table columns="" cellpadding="2" cells="Opérateur;Description;Associativité CAST;Conversion de Type;N/A;PROCPTR;Pointeur de procédure;N/A;STRPTR;Pointeur de chaîne;N/A;VARPTR;Pointeur de variable;N/A; [];Indice de chaîne;De gauche à droite;[];Indice de pointeur;De gauche à droite;();Indice de tableau;De gauche à droite;();Appel de fonction;De gauche à droite;.;Accès membre;De gauche à droite;->Accès Pointeur vers accès de membre;De gauche à droite; @;Adresse de;De droite à gauche;*;Valeur de;De droite à gauche;New;Allocation mémoire;De droite à gauche;Delete;Libération mémoire;De droite à gauche; ^;Puissance;De gauche à droite; -;Négation;De droite à gauche; *;Multiplier;De gauche à droite;/;Diviser;De gauche à droite; \;Division entière;De gauche à droite; MOD;Modulo;De gauche à droite; SHL;Décalage à gauche;De gauche à droite;SHR;Décalage à droite;De gauche à droite; +;Addition;De gauche à droite;-;Soustraction;De gauche à droite; &Concaténation de chaîne;De gauche à droite; =;Egal;De gauche à droite;<>Non égal;De gauche à droite;Supérieur àDe gauche à droite; NOT;Complément;De droite à gauche; AND;Conjonction;De gauche à droite; OR;Disjonction Inclusive;De gauche à droite; EQV;Equivalence;De gauche à droite;IMP;Implication;De gauche à droite;XOR;Disjonction Exclusive;De gauche à droite; ANDALSO;Court-circuit Conjunction;De gauche à droite;ORELSE;Court-circuit Disjonction Inclusive;De gauche à droite; =;Affectation;N/A;&=;Concaténation et affectation;N/A;+=;Addition et affectation;N/A;-=;Soustraction et affectation;N/A;*=;Multiplication et affectation;N/A;/=;Division et affectation;N/A;\=;Division entière et affectation;N/A;^=;Puissance et affectation;N/A;MOD=;Modulo et affectation;N/A;AND=;Conjonction et affectation;N/A;EQV=;Equivalence et affectation;N/A;IMP=;Implication et affectation;N/A;OR=;Disjonction Inclusive et affectation;N/A;XOR=;Disjunction Exclusive et affectation;N/A;SHL=;Décalage à gauche et affectation;N/A;SHR=;Décalage à droite et affectation;N/A;LET;Affectation;N/A; LET();Affectation;N/A;
    -In some cases, the order of precedence can be confusing or counterintuitive. Here are some examples: +Dans certains cas, l'ordre de préséance peut être confus ou contraire à l'intuition. Voici quelques exemples: %%(freebasic) '' trying to raise a negated number to a power -2 ^ 2 @@ -33,9 +33,9 @@ Actual result: n AND (1 <> 0) a SHL n+1 Expected result: a SHL (n + 1) Actual result: (a SHL n) + 1%% -For expressions where the operator precedence may be ambiguous, it is recommended to wrap parts of the expression in parentheses, in order both to minimise the possibility of error and to aid comprehension for people reading the code. +Pour les expressions où la priorité des opérateurs peut être ambiguë, il est recommandé mettre les parties de l'expression entre parenthèses, à la fois pour minimiser les risques d'erreur et pour faciliter la compréhension pour les gens qui lisent le code. {{fbdoc item="see"}} - - [[CatPgOperators Operators]] + - [[CatPgOperators Opérateurs]] {{fbdoc item="back" value="DocToc|Table of Contents"}}{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/OpenGL.wakka b/fbdocs/manual/cache/OpenGL.wakka index ca08f4dbdf..cfe282657f 100644 --- a/fbdocs/manual/cache/OpenGL.wakka +++ b/fbdocs/manual/cache/OpenGL.wakka @@ -1 +1 @@ -OpenGL is one of the most well-recognised standard 3D graphics APIs in the world. FreeBASIC supports the use of OpenGL in conjunction with its own [[CatPgGfx graphics library]] or SDL. \ No newline at end of file +{{fbdoc item="title" value="OpenGL"}}---- \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgArrayIndex.wakka b/fbdocs/manual/cache/ProPgArrayIndex.wakka index 2407b0f854..1871fcfa72 100644 --- a/fbdocs/manual/cache/ProPgArrayIndex.wakka +++ b/fbdocs/manual/cache/ProPgArrayIndex.wakka @@ -1,12 +1,12 @@ {{fbdoc item="title" value="Array Index"}}---- -An array index is the number used to access an [[ProPgArrays Array]] of [[ProPgVariables Variables]] created using the ##[[KeyPgDim Dim]]## command. +Un indice de tableau est le numéro utilisé pour accéder à un [[ProPgArrays tableau]] de [[ProPgVariables variables]] créé en utilisant la commande ##[[KeyPgDim Dim]]##. {{fbdoc item="desc"}} - The following examples illustrate the use of array elements. + Les exemples suivants illustrent l'utilisation d'éléments d'un tableau. - If we have an array ##myArray## with elements of 1 to 10, filled with random data: + Si nous avons un tableau ##//myArray//## avec des éléments de 1 à 10, rempli avec des données aléatoires: %% -Index Data +Indice Données 1 5 2 2 3 6 @@ -19,87 +19,87 @@ Index Data 10 7 %% - One can access each piece of data separately by pointing to the Index of the array element: + On peut accéder à chaque élément de données séparément en pointant l'indice de l'élément de tableau: %%(freebasic) Print myArray(5) %% - Printing the data contained in the fifth element of ##myArray## results in an output of: + Afficher les données contenues dans le cinquième élément de ##//myArray//## se traduit par l'affichage de: %% 9 - %% - To change the contents of an array, use it like any other [[ProPgVariables Variable]]: + %%Pour modifier le contenu d'un tableau, utilisez-le comme n'importe quelle autre [[ProPgVariables variable]]: %%(freebasic) myArray(3) = 0 %% - To print the contents of ##myArray(3)##, use the command: + Pour afficher le contenu de ##//myArray(3)//##, utilisez la commande: %%(freebasic) Print myArray(3) %% - Which results in an output of: + ce qui affichera: %% 0 - %% - Array elements can be indexed using another [[ProPgVariables Variable]]. In this example we set all elements in our array to zero: + %%Les éléments du tableau peuvent être indexés à l'aide d'une autre [[ProPgVariables variable]]. Dans cet exemple, nous avons mis tous les les éléments de notre tableau à zéro: %%(freebasic) Dim a As Integer - for a = 1 to 10 - myArray(a) = 0 - next a - %% - To change a random array element to a random value: + For a = 1 To 10 + myArray(a) = 0 + Next a + %% + Pour modifier un élément de tableau aléatoire par une valeur aléatoire: %%(freebasic) Dim Index As Integer Dim Value As Integer - index = int(rnd(1) * 10) + 1 'This line will simply return a random value between 1 and 10 - Value = int(rnd(1) * 10) + 1 'This line will do the same + index = Int(Rnd(1) * 10) + 1 'This line will simply return a random value between 1 and 10 + Value = Int(Rnd(1) * 10) + 1 'This line will do the same myArray(index) = Value %% + {{fbdoc item="ex"}} + %%(freebasic) -{{fbdoc item="ex"}} -{{fbdoc item="filename" value="examples/manual/proguide/arrays/indexing.bas"}}%%(freebasic) -DECLARE SUB PrintArray() - -DIM Numbers(1 to 10) AS INTEGER -DIM SHARED OtherNumbers(1 to 10) as INTEGER -dim a as integer +Declare Sub PrintArray() +Dim Numbers(1 To 10) As Integer +Dim Shared OtherNumbers(1 To 10) As Integer +Dim a As Integer Numbers(1) = 1 Numbers(2) = 2 + OtherNumbers(1) = 3 OtherNumbers(2) = 4 - PrintArray () +For a = 1 To 10 -for a = 1 to 10 - print Numbers(a) -next a +Print Numbers(a) -print OtherNumbers(1) -print OtherNumbers(2) -print OtherNumbers(3) -print OtherNumbers(4) -print OtherNumbers(5) -print OtherNumbers(6) -print OtherNumbers(7) -print OtherNumbers(8) -print OtherNumbers(9) -print OtherNumbers(10) +Next a + Print OtherNumbers(1) +Print OtherNumbers(2) -SUB PrintArray () - dim a as integer - for a = 1 to 10 - print otherNumbers(a) - next a -END SUB -%% +Print OtherNumbers(3) +Print OtherNumbers(4) +Print OtherNumbers(5) +Print OtherNumbers(6) +Print OtherNumbers(7) +Print OtherNumbers(8) +Print OtherNumbers(9) +Print OtherNumbers(10) +Sub PrintArray () +Dim a As Integer +For a = 1 To 10 + Print otherNumbers(a) + Next a + End Sub + %% {{fbdoc item="see"}} - - [[ProPgArrays Arrays]] - - ##[[KeyPgDim Dim]]## +- [[ProPgArrays Les tableaux]] + +- ##[[KeyPgDim Dim]]## - ##[[KeyPgFunction Function]]## - ##[[KeyPgSub Sub]]## - [[ProPgVariables Variables]] + - [[ProPgVariableScope Portée des variables]] + - [[ProPgVariables Variables]] - [[ProPgVariableScope Variable Scope]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgArrays.wakka b/fbdocs/manual/cache/ProPgArrays.wakka index e497e44577..49e68b5420 100644 --- a/fbdocs/manual/cache/ProPgArrays.wakka +++ b/fbdocs/manual/cache/ProPgArrays.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Arrays"}}---- -Multi-dimensional container types. +Types de conteneurs multi-dimensionnels. -{{fbdoc item="section" value="Overview"}} - //Arrays// are special kinds of [[ProPgVariables variables]] which act as containers for a number of values, or //elements//. An array can store elements of any type, and all of its elements share the same type. For example, an array can store ##[[KeyPgInteger Integer]]## elements or ##[[KeyPgSingle Single]]## elements, but not both. These elements are accessed--read from or written to--through an ##[[KeyPgInteger Integer]]## value representing their //position// in the array. Arrays have lengths, or //sizes//, which are equal to the number of elements they are storing at any given time. //Fixed-length// arrays have constant sizes throughout their lifetimes, while the sizes of //variable-length// arrays can change dynamically. +{{fbdoc item="section" value="Vue d'ensemble + Les //tableaux (arrays)// sont des types particuliers de [[ProPgVariables variables]] qui agissent comme des conteneurs pour un certain nombre valeurs ou d'//éléments//. Un tableau peut stocker des éléments de tout type et tous ses éléments sont du même type. Par exemple, un tableau peut stocker des éléments ##[[KeyPgInteger Integer]]## ou ##[[KeyPgSingle Single]]##, mais pas les deux en même temps. Ces éléments sont accessibles -- en lecture ou en écriture -- par l'intermédiaire d'une valeur ##[[KeyPgInteger Integer]]## représentant leur //position// dans le tableau. Les tableaux ont des longueurs ou des //tailles// qui sont égales au nombre éléments qu'ils contiennent à un moment donné. Les tableaux de //longueur fixe (Fixed-length)// ont une taille constante tout au long de leur existence, alors que la taille des tableaux de //longueur variable (variable-length)// peut changer de façon dynamique. -{{fbdoc item="section" value="Elements and positions"}} - The values that an array stores are its elements. Each element of an array has a corresponding position, which is an ##[[KeyPgInteger Integer]]## value ranging from the array's //lower bound// to its //upper bound//, inclusive. These positions are used to access individual elements in the array using ##[[KeyPgOpArrayIndex operator ()]]##, which takes a position and returns a reference to the element at that position. A valid position in an array is greater than or equal to its lower bound, and less than or equal to its upper bound. +{{fbdoc item="section" value="Eléments et positions + Les valeurs qu'un tableau stocke sont ses éléments. Chaque élément d'un tableau a une position correspondante, qui est une valeur ##[[KeyPgInteger Integer]]## allant de sa //limite inférieure (lower bound)// à sa //limite supérieure (upper bound)//, incluses. Ces positions sont utilisées pour accéder aux éléments individuels du tableau à l'aide de l'##[[KeyPgOpArrayIndex Operator ()]]## qui acquiert une position et renvoie une référence sur l'élément à cette position. Une position valide dans un tableau est supérieure ou égale à sa borne inférieure et inférieure ou égale à sa limite supérieure. {{fbdoc item="filename" value="examples/manual/proguide/arrays/array1.bas"}}%%(freebasic) ' Create an array of 3 elements all having the value zero (0.0f). @@ -20,12 +20,12 @@ for position as integer = 1 to 3 next %% -{{fbdoc item="section" value="Sizes and bounds"}} - The size of an array is equal to the number of elements it stores at any given time. An array can have a size of zero (0), meaning it's not storing any values at the moment--it's //empty//. If an array's size is greater than zero, that many elements are being stored. An array's size is equal to one more than the difference between its upper and lower bounds, or ##[[KeyPgUbound ubound]](//array//) - [[KeyPgLbound lbound]](//array//) + 1##. +{{fbdoc item="section" value="Dimensions et limites + La taille d'un tableau est égale au nombre d'éléments qu'il stocke à un moment donné. Un tableau peut avoir une taille de zéro (0), ce qui signifie qu'il ne stocke pas de valeurs pour le moment -- il est //vide//. Si la taille d'un tableau est supérieure à zéro, c'est qu'il stocke des éléments. La taille d'un tableau est égale à la différence entre eux ses bornes supérieure et inférieure augmentée de 1, ou ##[[KeyPgUbound UBound]](//array//) - [[KeyPgLbound LBound]](//array//) + 1##. - The lower and upper bounds not only determine the size of an array, but also the valid positions of individual elements. For example, an array with lower and upper bounds of zero (0) and four (4) stores five (5) elements, the first element being at position 0, the last at position 5. These bounds may be specified when the array is declared, or, for some arrays, changed by resizing the array. An array's lower and upper bounds can be retrieved using ##[[KeyPgLbound Lbound]]## and ##[[KeyPgUbound Ubound]]##, respectively. + Les bornes inférieure et supérieure déterminent pas seulement la taille d'un tableau, mais aussi les positions de chacun de ses éléments valides. Par exemple, un tableau avec sa borne inférieure égale à zéro (0) et sa borne supérieure égale à quatre (4) stocke cinq (5) éléments, le premier élément à la position 0 et dernier à la position 5. Ces bornes ne peuvent être précisées lorsque le tableau est déclaré, ou, pour certains tableaux, modifié par le redimensionnement du tableau. Les limites inférieure et supérieure d'un tableau peuvent être récupérées à l'aide de ##[[KeyPgLbound LBound]]## et ##[[KeyPgUbound UBound]]##, respectivement. - When creating or resizing an array, if a lower bound is not specified it defaults to zero (0). + Lors de la création ou du redimensionnement d'un tableau, si sa limite inférieure n'est pas spécifiée sa valeur par défaut sera zéro (0). {{fbdoc item="filename" value="examples/manual/proguide/arrays/array2.bas"}}%%(freebasic) ' Declares and initializes an array of four integer elements. @@ -37,12 +37,12 @@ for position as integer = lbound(array) to ubound(array) next %% -{{fbdoc item="section" value="Fixed-length and variable-length"}} - There are two fundamental kinds of arrays: //[[ProPgFixLenArrays fixed-length]]// and //[[ProPgVarLenArrays variable-length]]//. The primary difference between the two is that the bounds of fixed-length arrays can never change, that is, they always store the same number of elements in the same positions. Variable-length array bounds can be changed, affecting the number of elements stored and/or the positions of the elements. +{{fbdoc item="section" value="Longueur fixe (Fixed-length) et longueur variable (variable-length) + Il existe deux types fondamentaux de tableaux: //[[ProPgFixLenArrays longueur fixe]]// et //[[ProPgVarLenArrays longueur variable]]//. Principale différence entre les deux: les limites des tableaux de longueur fixe ne peuvent jamais changer, c'est à dire qu'ils stockent toujours le même nombre d'éléments aux mêmes positions. Les limites des tableaux à longueur variable peuvent changer, affectant le nombre d'éléments stockés et/ou les positions des éléments. - Since fixed-length arrays never change size, the compiler chooses to make room for--or, //allocate//--the memory for the array elements either in static storage or on the program stack, depending on the array's [[ProPgStorageClasses storage class]]. This can be an advantage, since the cost of creating these kinds of arrays doesn't include any adverse run-time penalty. Fixed-length arrays are declared using ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]## and ##[[KeyPgDim Dim]]##. At least an upper bound must be specified, and all bounds must be compile-time constant values, such as numeric literals, ##[[KeyPgConst Const]]## variables or ##[[KeyPgEnum Enum]]## enumerators. + Puisque les tableaux de longueur fixe ne changent jamais la taille, le compilateur choisit pour faire de la place en--ou, //affecter//--la mémoire pour les éléments du tableau, soit en stockage statique ou sur la pile du programme, selon la [[ProPgStorageClasses classe de stockage]] des tableaux. Cela peut être un avantage, Cela peut être un avantage, puisque le coût de la création de ces sortes des tableaux ne comprend pas les pénalités néfastes d'exécution. Les tableaux de longueur fixe sont déclarés à l'aide de ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]## et ##[[KeyPgDim Dim]]##. Au minimum une limite supérieure doit être spécifiée et toutes les limites doivent être à la compilation des valeurs constantes, telles que les littéraux numériques, variables ##[[KeyPgConst Const]]## ou énumérateurs ##[[KeyPgEnum Enum]]##. - Variable-length arrays can change in size, so the compiler chooses to allocate the memory for the array elements at run-time, in the free store. The advantage here of course is being able to dynamically resize the arrays, however, run-time performance could vary when they are created, resized or destroyed. Variable-length arrays are declared using ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]##, ##[[KeyPgDim Dim]]## and ##[[KeyPgRedim Redim]]##. When using ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]## or ##[[KeyPgDim Dim]]##, the lower and upper bounds can be left unspecified--resulting in an empty array--or either one must have a variable value, such as an ##[[KeyPgInteger Integer]]## variable or ##[[KeyPgFunction Function]]## result. ##[[KeyPgRedim Redim]]## can be used to resize an existing variable-length array, by giving it different lower and/or upper bounds. + Les ableaux de longueur variable peuvent changer de taille, de sorte que le compilateur choisit d'allouer la mémoire pour les éléments du tableau lors de l'exécution, dans le stock libre. L'avantage ici, bien sûr, c'est d'être en mesure de redimensionner dynamiquement les tableaux, cependant, les performances d'exécution peuvent varier quand ils sont créés, redimensionnées ou détruits. Les tableaux de longueur variable sont sont déclarés à l'aide de ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]##, ##[[KeyPgDim Dim]]## et ##[[KeyPgRedim ReDim]]##. Lors de l'utilisation de ##[[KeyPgExtern Extern]]##, ##[[KeyPgStatic Static]]## ou ##[[KeyPgDim Dim]]##, les bornes inférieure et supérieure peuvent être laissées non spécifiées--en découlant un tableau vide--ou l'une doit avoir une valeur sous forme de variable, comme une variable ##[[KeyPgInteger Integer]]## ou un résultat de ##[[KeyPgFunction Function]]##. ##[[KeyPgRedim ReDim]]## peut être utilisé pour redimensionner un tableau de longueur variable existant, en lui donnant des limites inférieure et/ou supérieure différentes. {{fbdoc item="filename" value="examples/manual/proguide/arrays/array3.bas"}}%%(freebasic) ' Creates a fixed-length array that holds 5 single elements. @@ -56,8 +56,8 @@ dim vlarray() as integer redim vlarray(1 to 10) as integer %% -{{fbdoc item="section" value="Multi-dimensional arrays"}} - The arrays discussed so far have been one-dimensional, that is, the elements are accessed through a single position. One-dimensional arrays can be thought of as a simple row of elements. Arrays can also have more than one dimension; an individual element of the array is accessed using two or more positions. Two-dimensional arrays use two positions--a row and a column position--to refer to individual elements, like a grid or table. Three-dimensional arrays use three positions--a row, column and perhaps depth position--to refer to individual elements, like a cube. Four-dimensional arrays can be thought of as one or more three-dimensional arrays, and so on. Multi-dimensional arrays are declared just like one-dimensional arrays, except that more than one lower and upper bound range is specified. +{{fbdoc item="section" value="Les tableaux multi-dimensionnels + Les tableaux examinés jusqu'ici étaient uni-dimensionnels, c'est-à-dire que leurs éléments sont accessibles via une seule position. Les tableaux à une dimension peuvent être considérés comme une simple rangée d'éléments. Les tableaux peuvent aussi avoir plus d'une dimension; un élément individuel du tableau est accessible à l'aide de deux ou plusieurs positions. Les tableaux à deux dimensionnels utilisent deux positions--une position de ligne et une de colonne--pour se référer à des éléments individuels, comme une grille ou une table. Les tableaux tri-dimensionnels utilisent trois positions--une position de rangée, de colonne et peut-être de profondeur--pour se référer à des éléments individuels, comme dans un cube. Les tableaux à quatre dimensions peuvent être considérés comme un ou plusieurs tableaux tri-dimensionnels, et ainsi de suite. Les tableaux multi-dimensionnels sont déclarés comme les tableaux à une dimension, si ce n'est que plus d'une limite inférieure et une limite supérieure sont spécifiées. {{fbdoc item="filename" value="examples/manual/proguide/arrays/array4.bas"}}%%(freebasic) ' Take Care while initializing multi-dimensional array @@ -65,8 +65,8 @@ Dim as integer multidim(1 to 2,1 to 5) = {{0,0,0,0,0},{0,0,0,0,0}} %% {{fbdoc item="see"}} - - [[ProPgFixLenArrays Fixed-length Arrays]] - - [[ProPgVarLenArrays Variable-length Arrays]] - - [[ProPgVariableScope Variable Scope]] + - [[ProPgFixLenArrays Tableaux de longueur fixe]] + - [[ProPgVarLenArrays Tableaux de longueur variable]] + - [[ProPgVariableScope Portée des variables]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgCallingConventions.wakka b/fbdocs/manual/cache/ProPgCallingConventions.wakka index 5f2b5f4a47..91f4784c7e 100644 --- a/fbdocs/manual/cache/ProPgCallingConventions.wakka +++ b/fbdocs/manual/cache/ProPgCallingConventions.wakka @@ -1,36 +1,36 @@ {{fbdoc item="title" value="Calling Conventions"}}---- -Specifying how procedures are called. +Précise la façon dont les procédures sont appelées. -Calling conventions determine how calling code interacts with procedures when called. They specify rules about how parameters are pushed onto the call stack, how values are returned and when the call stack is cleaned up. This information is useful when interacting with code written in other languages, particularly assembly language. In some cases, calling conventions also apply some kind of name decoration to procedure names. +Les conventions d'appel déterminent comment le code appelant interagit avec les procédures quand elles sont appelées. Elles précisent les règles sur la façon dont les paramètres sont chargés sur la pile des appels, comment les valeurs sont retournées et quand la pile des appels est nettoyée. Cette information est utile lors de l'interaction avec du code écrit dans d'autres langages, en particulier le langage d'assemblage. Dans certains cas, les conventions d'appel appliquent également une sorte de "décoration" de nom pour les noms de procédure. -FreeBASIC supports 3 calling conventions: **stdcall**, **cdecl** and **pascal**, specified with ##[[KeyPgStdcall Stdcall]]##, ##[[KeyPgCdecl Cdecl]]## and ##[[KeyPgPascal Pascal]]##, respectively. Calling convention can be specified in either a procedure declaration or definition immediately following the procedure name. The declaration of a procedure must have the same calling convention as the definition. The default convention is **stdcall** when not specified, or within ##[[KeyPgExternBlock Extern "Windows"]]## and ##[[KeyPgExternBlock Extern "Windows-MS"]]## blocks. +FreeBasic supporte 3 conventions d'appel: **stdcall**, **cdecl** et **pascal**, spécifiées respectivement avec ##[[KeyPgStdcall stdcall]]##, ##[[KeyPgCdecl cdecl]]## et ##[[KeyPgPascal pascal]]##. La Convention d'appel peut être spécifiée soit dans une déclaration de procédure soit dans la définition qui suit immédiatement le nom de la procédure. La déclaration d'une procédure doit avoir la même convention de nommage que la définition. La convention par défaut est **stdcall** lorsqu'elle n'est pas spécifiée ou dans les blocs ##[[KeyPgExternBlock Extern "Windows"]]## et ##[[KeyPgExternBlock Extern "Windows-Ms"]]## blocks. -In all calling conventions, integral procedure return values are returned in the ##EAX##(, ##EDX##) register(s), and floating-point return values are stored in the ##ST(0)## register (the top of the floating-point stack). User-defined type (UDT) values are returned in the ##EAX##(, ##EDX##) register(s) if eight (8) bytes or less in size, otherwise they are returned in memory by having their address pushed onto the call stack after any parameters. +Dans tous les conventions d'appel, l'intégralité des valeurs de retour de procédure est retournée dans le(s) registre(s) ##EAX##(, ##EDX##) et les valeurs de retour à virgule flottante sont stockées dans le registre ##ST(0)## (le haut de la pile en virgule flottante). Les valeurs de types définis par l'utilisateur sont retournées dans le(s) registre(s) ##EAX##(, ##EDX##) si elles ont une taille de huit (8) octets ou moins, sinon, elles sont retournées en mémoire avec leur adresse poussée sur la pile des appels après les paramètres. -{{fbdoc item="section" value="stdcall"}} - In the **stdcall** convention, procedure parameters are pushed onto the call stack in the reverse order they are declared, that is, from right to left. The procedure is in charge of popping any parameters from the call stack. +{{fbdoc item="section" value="stdcall + Dans la convention **stdcall**, les paramètres de procédure sont chargés sur la pile des appels dans l'ordre opposé à celui de leur déclaration, c'est à dire, de la droite vers la gauche. La procédure est chargée d'extraire tous les paramètres de la pile des appels. - **stdcall** is the default calling convention for all FreeBASIC procedures, and those within ##[[KeyPgExternBlock Extern "Windows"]]## and ##[[KeyPgExternBlock Extern "Windows-MS"]]## blocks. It is also the default convention used in the Windows API. + **stdcall** est la convention d'appel par défaut pour toutes les procédures FreeBASIC et celles dans les blocs ##[[KeyPgExternBlock Extern "Windows"]]## et ##[[KeyPgExternBlock Extern "Windows-Ms"]]##. C'est également la convention par défaut utilisée dans l'API Windows. {{fbdoc item="target"}} - - In DOS and Windows platforms, the procedure name is decorated with an "##@//N//##" suffix, where ##//N//## is the total size, in bytes, of any parameters passed. + - Dans les plates-formes DOS et Windows, le nom de procédure est "décoré" d'un suffixe "##@//N//##", où ##//N//## est la taille totale, en octets, de tous les paramètres transmis. -{{fbdoc item="section" value="cdecl"}} - In the **cdecl** convention, procedure parameters are pushed onto the call stack in the reverse order they are declared, that is, from right to left. The calling code is in charge of popping parameters from the call stack. +{{fbdoc item="section" value="cdecl + Dans la convention **cdecl**, les paramètres de procédure sont chargés sur la pile des appels dans l'ordre opposé à celui de leur déclaration, c'est à dire, de la droite vers la gauche. Le code appelant est chargé d'extraire tous les paramètres de la pile des appels. - **cdecl** is the default calling convention for procedures within ##[[KeyPgExternBlock Extern "C"]]## and ##[[KeyPgExternBlock Extern "C++"]]## blocks. It is also the default convention used by most C and C""++"" compilers. + **cdecl** est la convention d'appel par défaut pour les procédures des blocs ##[[KeyPgExternBlock Extern "C"]]## et ##[[KeyPgExternBlock Extern "C++"]]##. C'est également la convention par défaut utilisée par la plupart des compilateurs C et C++. -{{fbdoc item="section" value="pascal"}} - In the **pascal** convention, procedure parameters are pushed onto the call stack in the order they are declared, that is, from left to right. The procedure is in charge of popping any parameters from the call stack. +{{fbdoc item="section" value="pascal + Dans la convention **pascal**, les paramètres de procédure sont chargés sur la pile des appels dans l'ordre de leur déclaration, c'est à dire, de la gauche vers la droite. La procédure est chargée d'extraire tous les paramètres de la pile des appels. - **pascal** is the default convention used by Pascal and the Microsoft QuickBASIC series of compilers. + **pascal** est la convention par défaut utilisée par Pascal et la série des compilateurs Microsoft QuickBASIC. -The following table summarizes the differences between the various calling conventions: +Le tableau suivant résume les différences entre les différentes conventions d'appel: - {{table columns="3" cellpadding="2" cells="Calling convention ; Parameters are pushed onto the call stack from ; Parameters are popped off the call stack by ; stdcall ; right to left ; the procedure ; cdecl ; right to left ; the calling code ; pascal ; left to right ; the procedure"}} + {{table columns="" cellpadding="2" cells="Convention d'appel ; Les paramètres de procédure sont chargés sur la pile des appels ; Les paramètres sont extraits de la pile des appels par ; stdcall ; de la droite vers la gauche ; la procédure ; cdecl ; de la droite vers la gauche ; le code appelant ; pascal ; de la gauche vers la droite ; la procédure;
    {{fbdoc item="target"}} - - In DOS and Windows platforms, all calling conventions decorate procedure names with an underscore ("_") prefix. + - Sous DOS et Windows, toutes les conventions d'appel décorent les noms de procédure avec le préfixe ("_") trait de soulignement. {{fbdoc item="see"}} - ##[[KeyPgDeclare Declare]]##, ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]## diff --git a/fbdocs/manual/cache/ProPgComments.wakka b/fbdocs/manual/cache/ProPgComments.wakka index 743716d41d..173772d1a9 100644 --- a/fbdocs/manual/cache/ProPgComments.wakka +++ b/fbdocs/manual/cache/ProPgComments.wakka @@ -1,56 +1,56 @@ {{fbdoc item="title" value="Comments"}}---- -Comments are regions of text that the compiler will ignore but may contain information that is useful to the programmer. One exception are metacommands which may appear in certain types of comments. +Les commentaires sont des régions de texte dont le compilateur ne tiendra pas compte, mais qui peuvent contenir des informations qui sont utiles pour le programmeur. Une exception sont les métacommandes qui peuvent apparaître dans certains types de commentaires. -{{fbdoc item="section" value="Single Line comments"}} - The single quote character (##**'**##) may be used to indicate a comment and may appear after other keywords on a source line. The rest of the statement will be treated as a comment. - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment1.bas"}}%%(freebasic) -' comment text +{{fbdoc item="section" value="Commentaires sur une seule ligne + Un caractère apostrophe (##**'**##) peut être utilisé pour indiquer un commentaire et peut apparaître après les mots-clés sur une ligne de source. Le reste de déclaration sera traitée comme un commentaire. + %%(freebasic) +'texte de commentaire %% -{{fbdoc item="section" value="The comment statement: Rem"}} - A source code statement beginning with ##[[KeyPgRem Rem]]## indicates that the rest of the line is comment and will not be compiled. ##[[KeyPgRem Rem]]## behavior is the same as above, except it must be the first keyword in the statement. - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment2.bas"}}%%(freebasic) -Rem comment +{{fbdoc item="section" value="L'instruction de commentaire: Rem + Une instruction de code source commençant avec ##[[KeyPgRem Rem]]## indique que le reste de la ligne est un commentaire et ne sera pas compilé. Le comportement de ##[[KeyPgRem Rem]]## est le même que ci-dessus, sauf qu'il doit être le premier mot de la la ligne d'instruction. + %%(freebasic) +Rem commentaire %% -{{fbdoc item="section" value="Multi-line comments"}} - Multi-line comments are marked with the tokens ##**/'**## and ##**'/**##. All text between the two markers is considered comment text and is not compiled. +{{fbdoc item="section" value="Commentaires sur plusieurs lignes + Les commentaires sur plusieurs lignes sont marquées avec ##**/'**## et ##**'/**##. Tout le texte entre les deux marqueurs est considéré comme le texte du commentaire et n'est pas compilé. - Multi-line comments can span several lines, and can also be used in the middle of statements. After the end of the comment, the statement will continue to be parsed as normal (even if the comment crosses line breaks). - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment3.bas"}}%%(freebasic) -/' Multi-line - comment '/ + Les commentaires sur plusieurs lignes peuvent s'étendre sur plusieurs lignes et peuvent également être utilisés au milieu de déclarations. Après la fin du commentaire, l'instruction sera analysée comme d'habitude (même si le commentaire rencontre des sauts de ligne). + %%(freebasic) +/'Commentaire + multi-line '/ -Print "Hello" /' embedded comment'/ " world" +Print "Hello" /' commentaire intercalé'/ " world" %% - Note: If ""FreeBASIC"" encounters a close-comment marker while it's not in a multi-line comment, it will treat it as a normal single-line comment due to the single quote. + Note: Si FreeBasic rencontre un marqueur de fin de commentaire alors qu'il n'est pas dans un commentaire multi-ligne, il sera traité comme un commentaire sur une ligne normale à cause de l'apostrophe. -{{fbdoc item="section" value="Nested Comments"}} - A multi-line comment can contain other multi-line comments inside it. Each inner comment has its own open- and close-comment markers. +{{fbdoc item="section" value="Commentaires imbriqués + Une commentaire multi-ligne peut contenir d'autres commentaires sur plusieurs lignes. Chaque commentaire interne aura ses propres marqueurs d'ouverture et fermeture de commentaire. - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment4.bas"}}%%(freebasic) + %%(freebasic) /' - This is a comment. + Ceci est un commentaire. /' - This is a comment inside a comment + Ceci est un commentaire dans un commentaire '/ This Is a comment. '/ %% - A multi-line comment can contain unlimited levels of nested comments. ""FreeBASIC"" will continue to parse the multi-line comment for more markers until the number of close-comment markers reaches the number of open-comment markers, i.e. when it has closed all the comments it has opened. + Une commentaire sur plusieurs lignes peut contenir des niveaux illimités de commentaires imbriqués. FreeBASIC continuera d'analyser les marqueurs de commentaires multi-ligne tant que le nombre de marqueurs d'ouverture sera identique à celui des marqueurs de fermeture, c'est à dire quand il aura fermé tous les commentaires qu'il a ouverts. -{{fbdoc item="section" value="Comments after line continuation"}} - A single-line comment may appear after the line continuation character ( ##**_**## ) in a multi-line statement. ""FreeBASIC"" does not parse the text after the line continuation character, though, so you can't open multi-line comments after them. +{{fbdoc item="section" value="Commentaires après continuation de ligne + Un commentaire sur une seule ligne peut apparaître après caractère de continuation de ligne ( ##**_**## ) dans une instruction sur plusieurs lignes. FreeBasic n'analysera pas le texte après le caractère de continuation de ligne, de sorte que vous ne pouvez pas ouvrir des commentaires sur plusieurs lignes après. - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment5.bas"}}%%(freebasic) + %%(freebasic) Print _ ' line - "This is part of the previous line's statement" + "Ceci fait partie de la ligne precedente" %% -{{fbdoc item="section" value="Metacommands"}} - Metacommands, such as ##[[KeyPgMetaStatic $static]]## and ##[[KeyPgMetaInclude $include]]##, can be placed in single-line comments. The ##**$**## sign and the keyword must be the first two things in the statement, not including white space. +{{fbdoc item="section" value="Métacommandes + Des métacommandes, telles que ##[[KeyPgMetaStatic $Static]]## et ##[[KeyPgMetaInclude $Include]]##, peuvent être placées sur une seule ligne de commentaires. Le signe ##**$**## et le mot-clé doivent être les deux premières choses dans l'instruction, ne comprenant pas d'espace blanc. - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment6.bas"}}%%(freebasic) + %%(freebasic) Rem compile With -lang fblite Or qb #lang "fblite" @@ -59,37 +59,37 @@ Rem $Static ' $include: 'vbcompat.bi' %% -{{fbdoc item="section" value="Single-line comment parsing"}} - When you make a single-line comment, ""FreeBASIC"" will parse the comment, to check for a metacommand. If it finds a multi-line comment, it will treat it as usual, and continue parsing the single-line comment after the close-comment marker. +{{fbdoc item="section" value="Analyse de commentaire sur une seule ligne + Lorsque vous faites un commentaire sur une seule ligne, FreeBasic va analyser le commentaire, pour rechercher une métacommande. S'il trouve un commentaire multi-ligne, il sera traité comme d'habitude, puis il poursuivra l'analyse du commentaire sur une seule ligne après le marqueur de fermeture. - If you want to prevent ""FreeBASIC"" parsing the single-line comment, put another single quote (##**'**##), at the start of the comment. ""FreeBASIC"" will treat the rest of the line, including multi-line comment markers and metacommands, as ordinary text, and will ignore it. Other words encountered in a comment will also stop the parsing. - ~&//Note: As of version 0.21.0, this will not longer apply in the //[[CompilerOptlang -lang fb]]// dialect, and multi-line comment markers will be completely ignored inside single-line comments// + Si vous voulez éviter que FreeBasic analyse les commentaires sur une seule ligne, mettez une autre l'apostrophe (##**'**##), au début du commentaire. FreeBASIC traitera le reste de la ligne, y compris les marqueurs de commentaires multi-ligne et les métacommandes, comme du texte ordinaire et donc l'ignorera. D'autres mots rencontrés dans un commentaire arrêteront également l'analyse syntaxique. +
  • //Note: Depuis la version 0.21.0, ce ne sera plus applicable dans le dialecte //[[CompilerOptlang -lang fb]]// et les marqueurs de commentaire multi-lignes seront complètement ignorés à l'intérieur de commentaires sur une ligne.// - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment7.bas"}}%%(freebasic) -'' $static <-- will not get parsed -'' this multiline comment marker ("/'") will be ignored -Print "This line is not a comment." + %%(freebasic) +'' $static <-- ne sera pas analyse +'' ce marqueur de commentaire multi-lignes ("/'") sera ignore +Print "Cette ligne nest pas un commentaire." %% {{fbdoc item="ex"}} - {{fbdoc item="filename" value="examples/manual/proguide/comments/comment8.bas"}}%%(freebasic) -/' this is a multi line -comment as a header of -this example '/ + %%(freebasic) +/' ceci est un commentaire +multi-lignes comme une en-tete +de cet exemple '/ Rem This Is a Single Line comment -'this is a single line comment +'ceci est un commentaire une ligne -Dim a As Integer 'comment following a statement +Dim a As Integer 'commentaire apres une instruction -Dim b As /' can comment in here also '/ Integer +Dim b As /' commentaire possible ici aussi '/ Integer #if 0 - before version 0.16, This was the - only way of commenting Out sections - With multiple lines of code. + Avant version 0.16, Ceci etait la + seule possibilite de commenter hors sections + avec multiple lignes de code. #endif %% @@ -97,5 +97,4 @@ Dim b As /' can comment in here also '/ Integer {{fbdoc item="see"}} - ##[[KeyPgRem Rem]]## -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} - +{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgConstants.wakka b/fbdocs/manual/cache/ProPgConstants.wakka index 8b8152a149..313b9adbb4 100644 --- a/fbdocs/manual/cache/ProPgConstants.wakka +++ b/fbdocs/manual/cache/ProPgConstants.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Constants"}}---- {{fbdoc item="desc"}} - Constants are numbers which cannot be changed after they are defined. For example, 5 will always mean the same number. + Les constantes sont des nombres qui ne peuvent pas être modifiés après avoir été définis. Par exemple, 5 désigne toujours de même nombre. - In FreeBASIC, a constant definition differs from a variable definition by usage of the ##[[KeyPgConst Const]]## command. + En FreeBasic, la définition d'une constante diffère de la définition d'une variable par l'utilisation de la commande ##[[KeyPgConst Const]]##. - Such constants are then available globally, meaning that once defined, you can use the word to refer to a constant anywhere in your program. + Ces constantes sont ensuite disponibles globalement, ce qui signifie que, une fois définies vous pouvez utiliser les mots pour désigner ces constantes partout dans votre programme. - After being defined with the ##[[KeyPgConst Const]]## command, constants cannot be altered. If code tries to alter a constant, an error message will result upon code compilation. + Après avoir été définies avec la commande ##[[KeyPgConst Const]]##, les constantes ne peuvent pas être modifiées. Si le code tente de modifier une constante, un message d'erreur se produit lors de la compilation du code. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/proguide/constants/constants.bas"}}%%(freebasic) diff --git a/fbdocs/manual/cache/ProPgControlFlow.wakka b/fbdocs/manual/cache/ProPgControlFlow.wakka index 3a0edd4f7d..d55bce7dad 100644 --- a/fbdocs/manual/cache/ProPgControlFlow.wakka +++ b/fbdocs/manual/cache/ProPgControlFlow.wakka @@ -1,45 +1,45 @@ {{fbdoc item="title" value="Control Flow Statements"}}---- -Statements that direct the flow of execution. +Des instructions qui dirigent le flux d'exécution. {{fbdoc item="desc"}} - Control flow statements control program execution from one statement to the next; they determine what statements get executed and when, based on some kind of condition. The condition is always some expression that evaluates to true or false. Most control flow statements check for some kind of condition, and direct code flow accordingly, that is, they do or do not execute a block of code (except for the transferring control flow statements and ##[[KeyPgDoloop DO..LOOP]]##, which has an optional condition). Additionally, all control flow statements can be nested, that is, they can have other control flow statements within the statement block. + Les instructions de contrôle de flux contrôlent l'exécution du programme d'une instruction à la suivante; elles déterminent quelles déclarations sont exécutées et quand, en se basant sur une certaine condition. La condition est toujours une expression qui renvoie vrai = true ou faux = false. La plupart des instructions de contrôle de flux vérifient un certain genre de condition et dirigent le flux du code en fonction, c'est à dire qu'elles exécutent ou non un bloc de code (à l'exception des instructions de transfert d'exécution de flux et ##[[KeyPgDoloop Do..Loop]]##, qui a une condition facultative). En outre, toutes les instructions de contrôle de flux peuvent être imbriquées, c'est à dire qu'elles peuvent avoir d'autres instructions de contrôle de flux à l'intérieur de leur propre bloc d'instructions. - Control flow statements come in three flavors: transferring, branching and looping. Transferring control flow statements transfer execution to different parts of code. Branching control flow statements execute certain statements blocks based on a condition, while looping control flow statements execute code repeatedly while or until a condition is met. + Les instructions de contrôle de flux se déclinent de trois manières: transfert, branchement et boucle. Les instructions de transfert de contrôle de flux transfèrent l'exécution à des parties du code différentes. Les instructions de contrôle de branchement du flux exécutent un certain bloc d'instructions en se basant sur une condition, alors que les instructions de contrôle de boucle exécuter du code à plusieurs reprises tant que/jusqu'à ce qu'une condition soit remplie. -{{fbdoc item="section" value="Transferring Statements"}} - These statements are used for either unconditional or conditional, temporary or permanent transfer of execution. The "ON" variants conditionally select a point of transfer from a list of text labels. Execution may be transferred between different scopes provided that the branching does not cross any local array, variable length string or object definition. +{{fbdoc item="section" value="Instructions de transfert d'exécution de flux + Ces instructions sont utilisées pour le transfert inconditionnel ou conditionnel, temporaire ou définitif de l'exécution. Les variantes avec "ON" sélectionnent conditionnellement un point de transfert dans une liste d'étiquettes texte. L'exécution peut être transférée entre différents champs d'application à condition que le branchement ne traverse aucune définition de tableau local, de chaîne de longueur variable ou d'objet. - =={{fbdoc item="keyword" value="KeyPgGoto|GOTO"}}== - Unconditionally transfers execution to another point in code defined by a text label. Execution resumes with the first statement after the label. + **[[KeyPgGoto Goto]]** + Transfère sans condition l'exécution à un autre point du code défini par un label texte. L'exécution reprend à la première instruction suivant cette étiquette. - =={{fbdoc item="keyword" value="KeyPgGosub|GOSUB"}}== - Unconditionally and temporarily transfers execution to another point in code, defined by a text label. Execution resumes with the first statement after the label. Execution is then brought back to its original location with the ##[[KeyPgReturn RETURN]]## keyword. Yes, ##[[KeyPgGosub GOSUB]]## statements can be nested, that is, multiple ##[[KeyPgGosub GOSUB]]## statements can be executed before the first corresponding ##[[KeyPgReturn RETURN]]##, but there must always be a corresponding ##[[KeyPgReturn RETURN]]## throughout the course of an application. + **[[KeyPgGosub GoSub]]** + Transfère sans condition et temporairement l'exécution à un autre point du code défini par un label texte. L'exécution reprend à la première déclaration après cette étiquette. L'exécution est alors ramenée à son emplacement d'origine avec le mot-clé ##[[KeyPgReturn Return]]##. Oui, des déclarations ##[[KeyPgGosub GoSub]]## peuvent être imbriquées, ce qui signifie que plusieurs déclarations ##[[KeyPgGosub GoSub]]## peuvent être exécutées le premier ##[[KeyPgReturn Return]]## correspondant, mais il doit toujours y avoir un ##[[KeyPgReturn Return]]## correspondant dans le déroulement de l'application. - =={{fbdoc item="keyword" value="KeyPgOngoto|ON GOTO"}}== - Transfers execution to one of a number of points in code defined by text labels, based on the value of an expression. + **[[KeyPgOngoto On Goto]]** + Transfère l'exécution vers un point d'une série de points du code définis par des labels texte, en se basant sur la valeur d'une expression. - =={{fbdoc item="keyword" value="KeyPgOngosub|ON GOSUB"}}== - Temporarily transfers execution to one of a number of points in code defined by text labels, based on the value of an expression. + **[[KeyPgOngosub On Gosub]]** + Transfère temporairement l'exécution vers un point d'une série de points du code définis par des labels texte, en se basant sur la valeur d'une expression. -{{fbdoc item="section" value="Branching Statements"}} - These statements are used for executing one of a number of statement blocks. +{{fbdoc item="section" value="Instructions de branchement + Ces instructions sont utilisées pour exécuter un bloc d'un certain nombre de blocs d'instructions. - =={{fbdoc item="keyword" value="KeyPgIfthen|IF..END IF"}}== - Executes a block of statements if an expression evaluates to true (the condition). If and only if the expression evaluates to false, another statement block can be executed if yet another expression evaluates to true using the ##[[KeyPgElseif ELSEIF]]## keyword. If and only if all of those expressions evaluate to false, a statement block can be execute using the ##[[KeyPgElse ELSE]]## keyword. + **[[KeyPgIfthen If..End If]]** + Exécute un bloc d'instructions si une expression est évaluée comme "true" = vrai (la condition). Si et seulement si l'expression est évaluée à "false" = faux, un autre bloc d'instructions peut être exécuté si une autre expression est évaluée à "true" = vrai en utilisant le mot-clé ##[[KeyPgElseif ElseIf]]##. Si et seulement si toutes ces expressions sont évaluées à faux, un bloc d'instructions peut être exécuté en utilisant le mot-clé ##[[KeyPgElse Else]]##. - =={{fbdoc item="keyword" value="KeyPgSelectcase|SELECT..END SELECT"}}== - Executes one of a number of statement blocks. This branching statement tries to meet a condition of an expression and one of a number of case expressions. The case expressions are checked in the order in which they are given, and the first case expression that is met has its associated statement block executed. Like ##[[KeyPgIfthen IF..END IF]]##, a default case can be defined when no other case expression meets the condition, and, as with the looping control flow statements, a case's statement block can be prematurely broken out of with the ##[[KeyPgExit EXIT]]## keyword. + **[[KeyPgSelectcase Select..End Select]]** + Exécute un bloc d'une série de blocs d'instructions. Cette instruction de branchement tente de répondre à une condition par rapport à une expression en choisissant un cas parmi un certain nombre de cas possibles relatifs à cette expression. Les différents cas sont vérifiés dans l'ordre dans lequel ils sont donnés et le premier cas qui correspondra (vrai) forcera l'exécution du bloc d'instructions correspondant. Comme pour ##[[KeyPgIfthen If..End If]]##, un cas par défaut peut être défini quand aucun des cas définis ne correspond à la condition, et, comme avec les instructions de contrôle de boucle, on peut sortir prématurément d'un bloc d'instructions de vérification de cas avec le mot-clé ##[[KeyPgExit Exit]]##. -{{fbdoc item="section" value="Looping Statements"}} - These statements are used for executing a block of statements repeatedly. Within a statement block, the loop can be prematurely re-executed using the ##[[KeyPgContinue CONTINUE]]## keyword, or broken out of using the ##[[KeyPgExit EXIT]]## keyword. Whether the loop is terminated by the condition or with the ##[[KeyPgExit EXIT]]## keyword, execution always begins at the first statement after the block. +{{fbdoc item="section" value="Instructions de bouclage + Ces déclarations sont utilisées pour l'exécution d'un bloc d'instructions à plusieurs reprises. Dans un bloc d'instructions, la boucle peut être prématurément réexécutée en utilisant le mot-clé ##[[KeyPgContinue Continue]]## ou abandonné en utilisant le mot-clé ##[[KeyPgExit Exit]]##. Que la boucle se termine par la condition ou avec le mot-clé ##[[KeyPgExit Exit]]##, l'exécution commence toujours à la première instruction après le bloc. - =={{fbdoc item="keyword" value="KeyPgWhilewend|WHILE..WEND"}}== - Executes a block of statements while some expression evaluates to true (the condition). The expression is evaluated and checked before the block of statements is executed. + **[[KeyPgWhilewend While..Wend]]** + Exécute un bloc d'instructions tant qu'une expression est évaluée à "true" = vrai (la condition). L'expression est évaluée et vérifiée avant que le bloc d'instructions ne soit exécuté. - =={{fbdoc item="keyword" value="KeyPgFornext|FOR..NEXT"}}== - Like ##[[KeyPgWhilewend WHILE..WEND]]##, but more suited to loop a certain number of times. This loop initializes a so-called iterator with an initial value that is checked against a test expression. If the iterator compares less than or equal to the test expression (the condition), the block of statements is executed and the iterator gets incremented. The loop can also be setup so that the iterator gets decremented after every loop, in which case it is compared greater than or equal to the test expression. Iterators can be numeric data types like ##[[KeyPgInteger INTEGER]]## or ##[[KeyPgSingle DOUBLE]]##, or user-defined types. User-defined types must implement ##[[KeyPgOpFor operator for]]##. + **[[KeyPgFornext For..Next]]** + Comme ##[[KeyPgWhilewend While..Wend]]##, mais plus adapté pour boucler un certain nombre fois. Cette boucle initialise un itérateur avec une valeur initiale qui est comparée à une expression de test. Si la comparaison de l'itérateur donne un résultat inférieur ou égal à l'expression de test (la condition), le bloc d'instructions est exécuté et l'itérateur est alors incrémenté. La boucle peut également être configurée de telle sorte que l'itérateur soit décrémenté après chaque boucle, auquel cas il est comparé si supérieur ou égal à l'expression de test. Les itérateurs peuvent être des types de données numériques comme ##[[KeyPgInteger Integer]]## ou ##[[KeyPgSingle Double]]##, ou des types définis par l'utilisateur. Types définis par l'utilisateur doivent mettre en oeuvre l'##[[KeyPgOpFor Opérateur For]]##. - =={{fbdoc item="keyword" value="KeyPgDoloop|DO..LOOP"}}== - The most versatile of the looping control flow statements, this loop can execute a block of statements while or until an expression evaluates to true (the condition). It can also delay the checking of the expression until after the block has executed the first time, useful when a block of statements needs to be executed //at least once//. Finally, this loop can have no condition at all, and merely loop indefinitely. + **[[KeyPgDoloop Do..Loop]]** + La plus polyvalente des instructions de bouclage, cette boucle peut exécuter un bloc d'instructions tant que/jusqu'à ce que l'expression soit évaluée à "true" = vrai (la condition). Elle peut aussi retarder le contrôle de l'expression jusqu'à ce que le bloc soit exécuté une première fois, utile quand un bloc d'instructions doit être exécuté //au moins une fois//. Enfin, cette boucle peut n'avoir aucune condition et simplement boucler indéfiniment. {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgCruntime.wakka b/fbdocs/manual/cache/ProPgCruntime.wakka index 8157dae1f1..8c6f42fdba 100644 --- a/fbdocs/manual/cache/ProPgCruntime.wakka +++ b/fbdocs/manual/cache/ProPgCruntime.wakka @@ -1,122 +1,122 @@ {{fbdoc item="title" value="C Standard Library Functions"}}---- -This is a list of function prototypes in the standard C library in alphabetical order and a list of prototypes grouped by functionality. - - **{{anchor name="ALPHA|Alphabetical List"}}** - **{{anchor name="BUFFER|Buffer Manipulation"}}** - **{{anchor name="CTYPE|Character Classification and Conversion"}}** - **{{anchor name="DATA|Data Conversion"}}** - **{{anchor name="DIRS|Directory Manipulation"}}** - **{{anchor name="FILES|File Manipulation"}}** - **{{anchor name="STREAM|Stream I/O"}}** - **{{anchor name="LOLEVIO|Low level I/O"}}** - **{{anchor name="MATH|Mathematics"}}** - **{{anchor name="MEMORY|Memory Allocation"}}** - **{{anchor name="PROCESS|Process Control"}}** - **{{anchor name="SORTING|Searching and Sorting"}}** - **{{anchor name="STRING|String Manipulation"}}** - **{{anchor name="TIME|Time"}}** +Ceci est une liste des prototypes de fonction dans la bibliothèque standard C dans l'ordre alphabétique et une liste des prototypes groupés par fonctionnalité. + + **[[#ALPHA">Liste alphabétique]]** + **[[#BUFFER">Manipulation de tampon]]** + **[[#CTYPE">Classification et conversion des caractères]]** + **[[#DATA">Conversion de données]]** + **[[#DIRS">Manipulation de répertoire]]** + **[[#FILES">Manipulation de fichiers]]** + **[[#STREAM">Flux E/S]]** + **[[#LOLEVIO">E/S bas niveau]]** + **[[#MATH">Mathématiques]]** + **[[#MEMORY">Allocation mémoire]]** + **[[#PROCESS">Contrôle de processus]]** + **[[#SORTING">Recherche et Tri]]** + **[[#STRING">Manipulation de chaînes]]** + **[[#TIME">Temps]]** {{fbdoc item="desc"}} - The Comments column contains a very brief description of the use of the function. The list is not complete, however it provides information on the major functions in the C Runtime Library. It should, at the very least, indicate what functions are available in the standard C library allow you to do more investigation on your own. Some of the C library functions documented elsewhere may not be available in FreeBASIC. Check the appropriate include file for more information. + La colonne Commentaires contient une brève description de l'utilisation de la fonction. La liste n'est pas complète, La liste n'est pas complète, mais elle fournit des informations sur les grandes fonctions de la bibliothèque d'exécution C. Il convient, à tout le moins, d'indiquer quelles fonctions sont disponibles dans la bibliothèque standard C vous permettant de faire une enquête plus approfondie sur celle en votre possession. Certaines des fonctions de la bibliothèque C documentées ailleurs peuvent ne pas être disponibles en FreeBasic. Vérifiez le fichier d'inclusion approprié pour plus d'informations. - **Note:** The following prototypes are not the official FreeBASIC prototypes (see the include files), however, they will give you enough information to properly use the functions. + **Note:** Les prototypes suivants ne sont pas des prototypes officiels FreeBASIC (voir les fichiers include), toutefois, ils vous donneront suffisamment d'informations pour utiliser correctement les fonctions. - The Include File column contains the name of the file which you must include, using the ##[[KeyPgInclude #include]]## directive at the beginning of your program. If you don't include the appropriate include file, the program either will not compile, or it will compile apparently correctly but give incorrect results when run. All of the C Runtime headers are located in the ##crt## directory; for example, if the specified header is ##math.bi##, use ##include "crt/math.bi"## or ##include "crt\math.bi"##, our just ##include "crt.bi"## including all the others. + La colonne Fichier à inclure contient le nom du fichier que vous devez inclure, en utilisant la directive ##[[KeyPgInclude #include]]## au début de votre programme. Si vous n'incluez pas le fichier d'inclusion approprié, soit le programme ne sera pas compilé, soit il sera apparemment compilé correctement, mais donnera des résultats incorrects lors de son exécution. Tous les en-têtes d'exécution C sont situés dans le répertoire ##crt##; Par exemple, si l'en-tête spécifiée est ##math.bi##, utilisez ##include "crt/math.bi"## ou ##include "crt\math.bi"##, juste ##include "crt.bi"## inclura tous les autres. - The Prototype column contains the following information: - - The name of the function; - - The parameters required for the function in parenthesis, together with the data-type of the parameters; - - The data-type of the value returned by the function. + La colonne prototype contient les informations suivantes: + - Le nom de la fonction; + - Les paramètres requis pour la fonction entre parenthèses, avec le type de données des paramètres; + - Le type de données de la valeur retournée par la fonction. - For example **##atoi(a as zstring ptr) as integer##** means that the function **##atoi##** returns a value of type **integer** and requires a character **zstring ptr** as its argument. + Par exemple **##atoi(a as zstring ptr) as integer##** signifie que la fonction **##atoi##** retourne une valeur de type **integer** et nécessite un caractère **zstring ptr** comme argument. -{{anchor name="ALPHA"}}{{fbdoc item="section" value="Alphabetical List"}} + - {{table columns="4" cellpadding="1" cells="Name;Prototype (with parameters);Include File;Comments;abs_;abs_(n as integer) as integer;stdlib.bi;Returns the absolute value (i.e. positive value);acos_;acos_(a as double) as double;math.bi;Returns the inverse cosine (angle in radians);asin_;asin_(a as double) as double;math.bi;Returns the inverse sine (angle in radians);atan_;atan_(a as double) as double;math.bi;Returns the inverse tan (angle in radians);atan2_;atan2_(y as double, x as double) as double;math.bi;Returns the inverse tan (pass the opposite as y and the adjacent as x);atoi;atoi(s as zstring ptr) as integer;stdlib.bi;Converts a character zstring of digits to a number of type integer.;atof;atof(s as zstring ptr) as double;stdlib.bi;Converts a character zstring of digits to a number of type double.;calloc;calloc(NumElts as integer, EltSiz as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for an array having NumElts elements, each of size EltSiz bytes.;ceil;ceil(d as double) as double;math.bi;Returns the nearest whole number above the value passed.;clearerr;clearerr(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write).;cos_;cos_(ar as double) as double;math.bi;Returns the cosine of an angle measured in radians.;cosh;cosh(x as double) as double;math.bi;Returns the hyperbolic cosine of an angle measured in radians.;div;div(num as integer, denom as integer) as div_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type div_t.;ecvt;ecvt(x as double) as zstring ptr;math.bi;Converts a number to a zstring.;exit_;exit_(status as integer);stdlib.bi;Exits a program. It will flush file buffers and closes all opened files, and run any functions called by atexit().;exp_;exp_(a as double) as double;math.bi;Returns the value of e raised to the power of the argument (Inverse to natural logarithm).;fabs;fabs(d as double) as double;math.bi;Returns the absolute value (i.e. positive value) of type double.;fclose;fclose(s as FILE ptr) as FILE ptr;stdio.bi;Closes a file. Returns 0 if successful otherwise EOF.;feof;feof(s as FILE ptr) as integer;stdio.bi;Returns value of end-of-file indicator . (0 if not eof). Indicator will clear itself but can be reset by clearerr().;ferror;ferror(s as FILE ptr) as integer;stdio.bi;Returns error indicator for a stream (0 if no error). Error indicator is reset by clearerr() or rewind().;fflush;fflush(s as FILE ptr) as integer;stdio.bi;Flushes (i.e. deletes) a stream (use stdin to flush the stream from the keyboard). Returns 0 if successful.;fgetc;fgetc(s as FILE ptr) as integer;stdio.bi;Single character input (in ASCII) from passed stream (stdin for keyboard).;fgetpos;fgetpos(s as FILE ptr, c as fpos_t ptr) as integer;stdio.bi;Saves the position of the file pointer on stream s at the location pointed to by c.;fgets;fgets(b as zstring ptr, n as integer, s as FILE ptr) as zstring ptr;stdio.bi;From the stream s reads up to n-1 characters to buffer b.;floor;floor(d as double) as double;math.bi;Returns the nearest whole number below the value passed.;fmod;fmod(x as double, y as double) as double;math.bi;Calculates the remainder of x divided by y.;fopen;fopen(file as zstring ptr, mode as zstring ptr) as FILE ptr;stdio.bi;Opens a file. Pass the DOS name of the file and a code to indicate whether for reading, writing, or appending. Codes are r for read, w for write, + for read and write, a for append and b to indicate binary.;fprintf;fprintf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on stream s as many items as there are single % signs in fmt that have matching arguments in the list.;fputc;fputc(c as integer, s as FILE ptr) as integer;stdio.bi;Outputs the single character c to the stream s.;fputs;fputs(b as zstring ptr, s as FILE ptr) as integer;stdio.bi;Sends the character stream in b to stream s, returns 0 if the operation fails.;fread;fread(buf as any ptr, b as size_t, c as size_t, s as FILE ptr) as integer;stdio.bi;Reads the number c items of data of size b bytes from file s to the buffer buf. Returns the number of data items actually read.;free;free(p as any ptr);stdlib.bi;Frees the memory allocation for a pointer p to enable this memory to be used.;freopen;freopen(file as zstring ptr, mode as zstring ptr, s as FILE ptr) as FILE ptr;stdio.bi;Opens a file for redirecting a stream. e.g. freopen("myfile", "w", stdout) will redirect the standard output to the opened "myfile".;frexp;frexp(x as double, p as integer ptr) as double;math.bi;Calculates a value m so that x equals m times 2 to some power. p is a pointer to m.;fscanf;fscanf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from stream s as many items as there are % signs in fmt with corresponding listed pointers.;fseek;fseek(s as FILE ptr, offset as integer, origin as integer) as integer;stdio.bi;Locates a file pointer. With origin 0, 1 or 2 for the beginning, offset bytes into and at the end of the stream.;fsetpos;fsetpos(s as FILE ptr, p as fpos_t ptr) as integer;stdio.bi;Sets the file pointer for the stream s to the value pointed to by p.;ftell;ftell(s as FILE ptr) as long;stdio.bi;Locates the position of the file pointer for the stream s.;fwrite;fwrite(buf as any ptr, b as integer, c as integer, s as FILE ptr) as integer;stdio.bi;Writes the number c items of data of size b bytes from the buffer buf to the file s. Returns the number of data items actually written.;getc;getc(s as FILE ptr) as integer;stdio.bi;Macro for single character input (in ASCII) from passed stream. (stdin for keyboard);getchar;getchar() as integer;stdio.bi;Single character input from the standard input;gets;gets(b as zstring ptr) as zstring ptr;stdio.bi;Reads a stream of characters from the standard input until it meets \n or EOF.;hypot;hypot(x as double, y as double) as double;math.bi;Calculates the hypotenuse from the sides x and y.;isalnum;isalnum(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic or a digit.;isalpha;isalpha(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;iscntrl;iscntrl(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a control character.;isdigit;isdigit(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a digit.;isgraph;isgraph(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;islower;islower(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a lower case character.;isprint;isprint(c as integer) as integer;ctype.bi;Returns a non zero value if character c is printable.;ispunct;ispunct(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a punctuation character.;isspace;isspace(c as integer) as integer;ctype.bi;Returns a non zero value if character c denotes a space.;isupper;isupper(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is an upper case character.;isxdigit;isxdigit(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a hex digit (0 to F or f).;ldexp;ldexp(x as double, n as integer) as double;math.bi;Returns the product of x and 2 to the power n.;ldiv;ldiv(num as long, denom as long) as ldiv_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type ldiv_t.;log_;log_(a as double) as double;math.bi;Returns the natural logarithm of the argument.;log10;log10(a as double) as double;math.bi;Returns the logarithm to the base 10 of the argument.;malloc;malloc(bytes as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer comprising storage for the specified size.;modf;modf(d as double, p as double ptr) as double;math.bi;Returns the fractional part of a floating point number d. p points to the integral part expressed as a float.;perror;perror(mess as zstring ptr);stdio.bi;Prints on the stream stderr a message passed as the argument.;pow;pow(x as double, y as double) as double;math.bi;Returns x to the power y.;pow10;pow10(x as double) as double;math.bi;Returns 10 to the power x (inverse function to log10()).;printf;printf(fmt as zstring ptr, ...) as integer;stdio.bi;Prints on standard output as many items as there are single % signs in fmt with matching arguments in the list.;putc;putc(c as integer, s as FILE ptr) as integer;stdio.bi;Macro to output the single character c to the stream s.;putchar;putchar(c as integer) as integer;stdio.bi;Macro to output the single character c to the standard output.;puts;puts(b as zstring ptr) as integer;stdio.bi;Sends the character stream in b to the standard output, returns 0 if operation fails.;rand;rand() as integer;stdlib.bi;Returns a pseudo random number. A seed is required. The seed is set with srand.;realloc;realloc(p as any ptr, newsize as size_t) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for a change in size of object pointed to by p.;rewind;rewind(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write). Necessary before reading an amended file.;scanf;scanf(fmt as zstring ptr, ) as integer;stdio.bi;Reads from standard input as many items as there are % signs in fmt with corresponding listed pointers.;sin_;sin_(ar as double) as double;math.bi;Returns the sine of an angle measured in radians.;sinh;sinh(x as double) as double;math.bi;Returns the hyperbolic sine of an angle measured in radians.;sprintf;sprintf(p as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on zstring p as many items as there are single % signs in fmt that have matching arguments in the list.;sqrt;sqrt(a as double) as double;math.bi;Returns the square root of the value passed. Domain error if value is negative.;srand;srand(seed as uinteger);stdlib.bi;Sets the seed for a random number. A possible seed is the current time.;sscanf;sscanf(b as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from buffer b as many items as there are % signs in fmt with corresponding listed pointers.;strcat;strcat(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Concatenates (appends) zstring s2 to s1.;strchr;strchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the first occurrence of c in s or NULL if it fails to find one.;strcmp;strcmp(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Compares zstring s2 to s1. Returns 0 or signed difference in ASCII values of first non matching character.;strcpy;strcpy(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Copies s2 into s1.;strcspn;strcspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting any of the characters in s2.;strerror;strerror(n as integer) as zstring ptr;string.bi;Returns a pointer to a system error message corresponding to the passed error number.;strlen;strlen(s as zstring ptr) as integer;string.bi;Returns the number of bytes in the null terminated zstring pointed to by s (does not count null).;strncat;strncat(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Concatenates (appends) n bytes from zstring s2 to s1.;strncmp;strncmp(s1 as zstring ptr, s2 as any ptr, n as integer) as integer;string.bi;Compares n bytes of zstring s2 to the same of s1. Returns 0 or signed difference in ASCII values of first non matching character.;strncpy;strncpy(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Copies n bytes from s2 into s1.;strpbrk;strpbrk(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns a pointer to the first character encountered in s1 that is also in s2.;strrchr;strrchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the last occurrence of c in s or NULL if it fails to find one.;strspn;strspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting a character which is not in s2.;strstr;strstr(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Finds the location of the zstring s2 in s1 and returns a pointer to its leading character.;strtod;strtod(s as zstring ptr, p as zstring ptr) as double;stdlib.bi;Converts a zstring to double, provided the zstring is written in the form of a number.;strtok;strtok(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns pointers to successive tokens utilizing the zstring s1. Tokens regarded as separators are listed in s2.;system;system(command as zstring ptr) as integer;stdlib.bi;Executes, from within a program, a command addressed to the operating system written as a zstring (e.g. DIR on Windows and DOS and LS on Linux).;tan_;tan_(ar as double) as double;math.bi;Returns the tangent of an angle measured in radians.;tanh;tanh(x as double) as double;math.bi;Returns the hyperbolic tangent of an angle measured in radians.;tolower;tolower(c as integer) as integer;ctype.bi;Converts a character from upper case to lower case (uses ASCII code).;toupper;toupper(c as integer) as integer;ctype.bi;Converts a character from lower case to upper case (uses ASCII code).;ungetc;ungetc(c as integer, s as FILE ptr) as integer;stdio.bi;Pushes a character c back into the stream s, returns EOF if unsuccessful. Do not push more than one character."}} + {{fbdoc item="section" value="Liste alphabétique -{{anchor name="BUFFER"}}{{fbdoc item="section" value="Buffer Manipulation"}} +{{table columns="" cellpadding="2" cells="Nom;Prototype (avec paramètres);Fichier Include;Commentaires;abs_;abs_(n as integer) as integer;stdlib.bi;Retourne la valeur absolue (c.a.d la valeur positive);acos_;acos_(a as double) as double;math.bi;Retourne le cosinus inverse (angle en radians);asin_;asin_(a as double) as double;math.bi;Retourne le sinus inverse (angle en radians);atan_;atan_(a as double) as double;math.bi;Retourne la tangente inverse (angle en radians);atan2_;atan2_(y as double, x as double) as double;math.bi;Retourne la tangente inverse (passe l'opposé en y et l'adjacent en x);atoi;atoi(s as zstring ptr) as integer;stdlib.bi;Convertit une chaîne zstring de chiffres en un nombre de type entier.;atof;atof(s as zstring ptr) as double;stdlib.bi;Convertit une chaîne zstring de chiffres en un nombre de type double.;calloc;calloc(NumElts as integer, EltSiz as integer) as any ptr;stdlib.bi;Alloue de la mémoire. Retourne un pointeur vers un tampon pour un tableau ayant NumElts éléments, chacun de EltSiz octets.;ceil;ceil(d as double) as double;math.bi;Retourne l'entier le plus proche au-dessus de la valeur passée.;clearerr;clearerr(s as FILE ptr);stdio.bi;Efface les indicateurs d'erreur sur un flux fichier (lecture ou écriture).;cos_;cos_(ar as double) as double;math.bi;Retourne le cosinus d'un angle mesuré en radians.;cosh;cosh(x as double) as double;math.bi;Retourne le cosinus hyperbolique d'un angle mesuré en radians.;div;div(num as integer, denom as integer) as div_t;stdlib.bi;Retourne le quotient et le reste d'une division dans une structure de type div_t.;ecvt;ecvt(x as double) as zstring ptr;math.bi;Convertit un numéro en une zstring.;exit_;exit_(status as integer);stdlib.bi;Quitte le programme. Vide les tampons des fichiers ouverts et ferme tous les fichiers ouverts, et exécuter toutes les fonctions appelées par atexit().;exp_;exp_(a as double) as double;math.bi;Retourne la valeur de e élevée à la puissance de l'argument (inverse du logarithme naturel).;fabs;fabs(d as double) as double;math.bi;Retourne la valeur absolue (c.a.d la valeur positive) d'un type double.;fclose;fclose(s as FILE ptr) as FILE ptr;stdio.bi;Ferme un fichier. Retourne 0 en cas de succès sinon EOF.;feof;feof(s as FILE ptr) as integer;stdio.bi;Retourne la valeur indicateur fin de fichier. (0 si pas EOF). L'indicateur s'effacera lui-même mais il peut être réinitialisée par clearerr ().;ferror;ferror(s as FILE ptr) as integer;stdio.bi;Retourne l'indicateur d'erreur pour un flux (0 si aucune erreur). L'indicateur d'erreur est réinitialisé par clearerr () ou rewind ().;fflush;fflush(s as FILE ptr) as integer;stdio.bi;Vide (c.a.d supprime) un flux (utilisez stdin pour vider le flux à partir du clavier). Retourne 0 en cas de succès.;fgetc;fgetc(s as FILE ptr) as integer;stdio.bi;Saisie d'un seul caractère (en ASCII) à partir d'un flux (stdin pour le clavier).;fgetpos;fgetpos(s as FILE ptr, c as fpos_t ptr) as integer;stdio.bi;Enregistre la position du pointeur de fichier sur flux s à l'endroit pointé par c.;fgets;fgets(b as zstring ptr, n as integer, s as FILE ptr) as zstring ptr;stdio.bi;A partir du flux s lit jusqu'à n-1 caractères dans le tampon b.;floor;floor(d as double) as double;math.bi;Retourne l'entier le plus proche en dessous de la valeur passée.;fmod;fmod(x as double, y as double) as double;math.bi;Calcule le reste de x divisé par y.;fopen;fopen(file as zstring ptr, mode as zstring ptr) as FILE ptr;stdio.bi;Ouvre un fichier. Passe le nom DOS du fichier et un code pour indiquer soit pour lire, écrire, ou ajouter. Les codes sont r pour lire, w pour écrire, + pour lire et écrire, a pour ajouter et b pour binaire.;fprintf;fprintf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Ecrit sur le flux s autant d'items qu'il y a des signes % simples dans fmt qui ont d'arguments correspondant dans la liste.;fputc;fputc(c as integer, s as FILE ptr) as integer;stdio.bi;Sortie d'un unique caractère c sur le flux s;fputs;fputs(b as zstring ptr, s as FILE ptr) as integer;stdio.bi;Envoie le flux de caractères dans b vers le flux s, retourne 0 si l'opération échoue.;fread;fread(buf as any ptr, b as size_t, c as size_t, s as FILE ptr) as integer;stdio.bi;Lit c items de données de b octets de taille à partir du fichier s vers le tampon buf. Retourne le nombre d'items réellement lus.;free;free(p as any ptr);stdlib.bi;Libère la mémoire allouée pour un pointeur p pour activer cette mémoire et la rendre utilisable.;freopen;freopen(file as zstring ptr, mode as zstring ptr, s as FILE ptr) as FILE ptr;stdio.bi;Ouvre un fichier pour rediriger un flux. par ex. freopen("myfile", "w", stdout) redirigera la sortie standard vers le fichier ouvert "myfile".;frexp;frexp(x as double, p as integer ptr) as double;math.bi;Calcule une valeur m de sorte que x est égal à m fois 2 à une certaine puissance. p est un pointeur sur m.;fscanf;fscanf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Lit à partir d'un flux s autant d'éléments qu'il y a de signes % dans fmt avec des pointeurs correspondants répertoriés.;fseek;fseek(s as FILE ptr, offset as integer, origin as integer) as integer;stdio.bi;Localise un pointeur de fichier. Avec l'origine 0, 1 ou 2 pour le début, de offset octets à la fin du flux.;fsetpos;fsetpos(s as FILE ptr, p as fpos_t ptr) as integer;stdio.bi;Définit le pointeur de fichier pour le flux s à la valeur pointée par p.;ftell;ftell(s as FILE ptr) as long;stdio.bi;Localise la position du pointeur de fichier pour le flux s;fwrite;fwrite(buf as any ptr, b as integer, c as integer, s as FILE ptr) as integer;stdio.bi;Ecrit c éléments de données de b octets de taille à partir du tampon buf dans le fichier s. Retourne le nombre d'éléments de données réellement écrits.;getc;getc(s as FILE ptr) as integer;stdio.bi;Macro pour la saisie d'un unique caractère (ASCII) à partir du flux transmis. (stdin pour le clavier);getchar;getchar() as integer;stdio.bi;Saisie d'un unique caractère à partir de l'entrée standard;gets;gets(b as zstring ptr) as zstring ptr;stdio.bi;Lit un flux de caractères sur l'entrée standard jusqu'à ce qu'il rencontre \n ou EOF.;hypot;hypot(x as double, y as double) as double;math.bi;Calcule l'hypoténuse à partir des côtés x et y.;isalnum;isalnum(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est alphabétique ou un chiffre.;isalpha;isalpha(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est alphabétique.;iscntrl;iscntrl(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un caractère de contrôle.;isdigit;isdigit(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un chiffre.;isgraph;isgraph(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est alphabétique.;islower;islower(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un caractère minuscule.;isprint;isprint(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est affichable.;ispunct;ispunct(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un caractère de ponctuation.;isspace;isspace(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un espace.;isupper;isupper(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un caractère majuscule.;isxdigit;isxdigit(c as integer) as integer;ctype.bi;Retourne une valeur différente de zéro si c est un chiffre hexadécimal (0 à F ou f).;ldexp;ldexp(x as double, n as integer) as double;math.bi;Retourne le produit de x et 2 à la puissance n.;ldiv;ldiv(num as long, denom as long) as ldiv_t;stdlib.bi;Retourne le quotient et le reste d'une division sous forme de structure de type ldiv_t.;log_;log_(a as double) as double;math.bi;Retourne le logarithme naturel de l'argument.;log10;log10(a as double) as double;math.bi;Retourne le logarithme à base 10 de l'argument.;malloc;malloc(bytes as integer) as any ptr;stdlib.bi;Alloue de la mémoire. Retourne un pointeur sur un tampon permettant le stockage pour la taille spécifiée.;modf;modf(d as double, p as double ptr) as double;math.bi;Retourne la partie décimale d'un nombre à virgule flottante d. p pointe vers la partie intégrale exprimée comme un nombre à virgule flottante.;perror;perror(mess as zstring ptr);stdio.bi;Affiche sur le flux stderr un message transmis comme argument.;pow;pow(x as double, y as double) as double;math.bi;Retourne x à la puissance y.;pow10;pow10(x as double) as double;math.bi;Retourne 10 à la puissance x (inverse de la fonction log10()).;printf;printf(fmt as zstring ptr, ...) as integer;stdio.bi;Affiche sur la sortie standard autant d'éléments que il y a de signes simples % dans fmt correspondant avec des arguments de la liste.;putc;putc(c as integer, s as FILE ptr) as integer;stdio.bi;Macro pour la sortie du caractère unique c sur le flux s.;putchar;putchar(c as integer) as integer;stdio.bi;Macro pour la sortie du caractère unique c sur la sortie standard.;puts;puts(b as zstring ptr) as integer;stdio.bi;Envoie le flux de caractères dans b sur la sortie standard, renvoie 0 si l'opération échoue.;rand;rand() as integer;stdlib.bi;Retourne un nombre pseudo-aléatoire. Une semence est nécessaire. Elle est fixée avec srand.;realloc;realloc(p as any ptr, newsize as size_t) as any ptr;stdlib.bi;Alloue de la mémoire. Retourne un pointeur vers un tampon pour un changement de taille de l'objet pointé par p.;rewind;rewind(s as FILE ptr);stdio.bi;Efface les indicateurs d'erreur sur un flux fichier (lecture ou écriture). Nécessaire avant de lire un fichier modifié.;scanf;scanf(fmt as zstring ptr,...) as integer;stdio.bi;Lit sur l'entrée standard autant d'éléments qu'il y a de signes % dans fmt correspondants avec les pointeurs répertoriés.;sin_;sin_(ar as double) as double;math.bi;Retourne le sinus d'un angle mesuré en radians.;sinh;sinh(x as double) as double;math.bi;Retourne le sinus hyperbolique d'un angle mesuré en radians.;sprintf;sprintf(p as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Affiche sur la zstring p autant d'éléments qu'il y a de signes % unique dans fmt correspondant aux arguments dans la liste.;sqrt;sqrt(a as double) as double;math.bi;Retourne la racine carrée de la valeur passée. Erreur de domaine si la valeur est négative.;srand;srand(seed as uinteger);stdlib.bi;Définit la semence pour un nombre aléatoire. Une semence possible est l'heure courante.;sscanf;sscanf(b as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Lit à partir du tampon b autant d'éléments qu'il y a de signes % dans fmt correspondants aux pointeurs répertoriés.;strcat;strcat(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Concatènation (ajoute à la fin) de la zstring s2 à s1.;strchr;strchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Retourne un pointeur sur la première occurrence de c dans s ou NULL si elle échoue à en trouver une.;strcmp;strcmp(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Compare la zstring s2 à s1. Retourne 0 ou la différence signée dans les valeurs ASCII du premier caractère qui ne correspond pas.;strcpy;strcpy(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Copie s2 dans s1.;strcspn;strcspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Retourne le nombre de caractères rencontrés dans s1 avant de rencontrer l'un des caractères de s2.;strerror;strerror(n as integer) as zstring ptr;string.bi;Retourne un pointeur vers un message d'erreur système correspondant au numéro de l'erreur passée.;strlen;strlen(s as zstring ptr) as integer;string.bi;Retourne le nombre d'octets dans la chaîne terminée par "nul" (zstring) pointée par s (ne compte pas terminateur nul).;strncat;strncat(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Concaténation (ajoute à la fin) de n octets de la zstring s2 à s1.;strncmp;strncmp(s1 as zstring ptr, s2 as any ptr, n as integer) as integer;string.bi;Compare n octets de la zstring s2 aux octets correspondants de s1. Retourne 0 ou la différence signée dans les valeurs ASCII du premier caractère qui ne correspond pas.;strncpy;strncpy(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Copie n octets de s2 dans s1.;strpbrk;strpbrk(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Retourne un pointeur vers le premier caractère rencontré dans S1 qui est aussi dans S2.;strrchr;strrchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Retourne un pointeur sur la dernière occurrence de c dans s ou NULL si elle échoue à en trouver un.;strspn;strspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Retourne le nombre de caractères dans s1 rencontrés avant de rencontrer un caractère qui n'est pas dans S2.;strstr;strstr(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Trouve l'emplacement de la zstring s2 dans s1 et renvoie un pointeur vers son premier caractère.;strtod;strtod(s as zstring ptr, p as zstring ptr) as double;stdlib.bi;Convertit une zstring en double, à condition que la zstring soit écrite sous la forme d'un nombre.;strtok;strtok(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Retourne des pointeurs vers des symboles (tokens) successifs en utilisant la zstring s1. Les symboles considérés comme des séparateurs sont énumérés dans S2.;system;system(command as zstring ptr) as integer;stdlib.bi;Exécute, à partir d'un programme, une commande adressée au système d'exploitation écrit dans une zstring (par exemple DIR sur Windows et DOS et LS sous Linux).;tan_;tan_(ar as double) as double;math.bi;Retourne la tangente d'un angle mesuré en radians.;tanh;tanh(x as double) as double;math.bi;Retourne la tangente hyperbolique d'un angle mesuré en radians.;tolower;tolower(c as integer) as integer;ctype.bi;Convertit un caractère majuscule en une écriture minuscule (utilise le code ASCII).;toupper;toupper(c as integer) as integer;ctype.bi;Convertit un caractère minuscule en une écriture majnuscule (utilise le code ASCII).;ungetc;ungetc(c as integer, s as FILE ptr) as integer;stdio.bi;Envoie à nouveau un caractère c dans le flux s, retourne EOF en cas d'échec. Ne renoie pas plus d'un caractère.;
    - ##**#include "crt/string.bi"**## + {{table columns="" cellpadding="2" cells="
    - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;memchr(s as any ptr, c as integer, n as size_t) as any ptr;Search for a character in a buffer.;memcmp(s1 as any ptr, s2 as any ptr, n as size_t) as integer;Compare two buffers.;memcpy(dest as any ptr, src as any ptr, n as size_t) as any ptr;Copy one buffer into another .;memmove(dest as any ptr, src as any ptr, n as size_t) as any ptr;Move a number of bytes from one buffer lo another.;memset(s as any ptr, c as integer, n as size_t) as any ptr;Set all bytes of a buffer to a given character."}} + -{{anchor name="CTYPE"}}{{fbdoc item="section" value="Character Classification and Conversion"}} +{{fbdoc item="section" value="Manipulation de tampon - ##**#include "crt/ctype.bi"**## + ##**#include "crt/string.bi"**## - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;isalnum(c as integer) as integer;True if c is alphanumeric.;isalpha(c as integer) as integer;True if c is a letter.;isascii(c as integer) as integer;True if c is ASCII .;iscntrl(c as integer) as integer;True if c is a control character.;isdigit(c as integer) as integer;True if c is a decimal digit.;isgraph(c as integer) as integer;True if c is a graphical character.;islower(c as integer) as integer;True if c is a lowercase letter.;isprint(c as integer) as integer;True if c is a printable character.;ispunct(c as integer) as integer;True if c is a punctuation character.;isspace(c as integer) as integer;True if c is a space character.;isupper(c as integer) as integer;True if c is an uppercase letter.;isxdigit(c as integer) as integer;True if c is a hexadecimal digit.;toascii(c as integer) as integer;Convert c to ASCII .;tolower(c as integer) as integer;Convert c to lowercase.;toupper(c as integer) as integer;Convert c to uppercase."}} + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;memchr(s as any ptr, c as integer, n as size_t) as any ptr;Recherche d'un caractère dans un tampon.;memcmp(s1 as any ptr, s2 as any ptr, n as size_t) as integer;Comparer deux tampons.;memcpy(dest as any ptr, src as any ptr, n as size_t) as any ptr;Copier un tampon dans un autre.;memmove(dest as any ptr, src as any ptr, n as size_t) as any ptr;Déplacer un certain nombre d'octets d'un tampon à un autre.;memset(s as any ptr, c as integer, n as size_t) as any ptr;Définir tous les octets d'un tampon à un caractère donné.;
    -{{anchor name="DATA"}}{{fbdoc item="section" value="Data Conversion"}} + - ##**#include "crt/stdlib.bi"**## + {{fbdoc item="section" value="Classification et conversion des caractères - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;atof(string1 as zstring ptr) as double;Convert zstring to floating point value.;atoi(string1 as zstring ptr) as integer;Convert zstring to an integer value.;atol(string1 as zstring ptr) as integer;Convert zstring to a long integer value.;itoa(value as integer, zstring as zstring ptr, radix as integer) as zstring ptr;Convert an integer value to a zstring using given radix.;ltoa(value as long, zstring as zstring ptr, radix as integer) as zstring ptr;Convert long integer to zstring in a given radix.;strtod(string1 as zstring ptr, endptr as zstring ptr) as double;Convert zstring to a floating point value.;strtol(string1 as zstring ptr, endptr as zstring ptr, radix as integer) as long;Convert zstring to a long integer using a given radix.;strtoul(string1 as zstring ptr, endptr as zstring ptr, radix as integer) as ulong;Convert zstring to unsigned long."}} + ##**#include "crt/ctype.bi"**## -{{anchor name="DIRS"}}{{fbdoc item="section" value="Directory Manipulation"}} +{{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;isalnum(c as integer) as integer;Vrai si c est alphanumérique.;isalpha(c as integer) as integer;Vrai si c est une lettre.;isascii(c as integer) as integer;Vrai si c est ASCII .;iscntrl(c as integer) as integer;Vrai si c est un caractère de contrôle.;isdigit(c as integer) as integer;Vrai si c est un chiffre décimal.;isgraph(c as integer) as integer;Vrai si c est un caractère graphique.;islower(c as integer) as integer;Vrai si c est une lettre minuscule.;isprint(c as integer) as integer;Vrai si c est un caractère imprimable.;ispunct(c as integer) as integer;Vrai si c est un caractère de ponctuation.;isspace(c as integer) as integer;Vrai si c est un caractère d'espace.;isupper(c as integer) as integer;Vrai si c est une lettre majuscule.;isxdigit(c as integer) as integer;Vrai si c est un chiffre hexadécimal.;toascii(c as integer) as integer;Convertir c en ASCII.;tolower(c as integer) as integer;Convertir c en minuscules.;toupper(c as integer) as integer;Convertir c en majuscules.;
    - ##**#include "crt/io.bi"**## + - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;_chdir(path as zstring ptr) as integer;Change current directory to given path.;_getcwd(path as zstring ptr, numchars as integer) as zstring ptr;Returns name of current working directory.;_mkdir(path as zstring ptr) as integer;Create a directory using given path name.;_rmdir(path as zstring ptr) as integer;Delete a specified directory."}} + {{fbdoc item="section" value="Conversion de données -{{anchor name="FILES"}}{{fbdoc item="section" value="File Manipulation"}} +##**#include "crt/stdlib.bi"**## - ##**#include "crt/sys/stat.bi"**## - ##**#include "crt/io.bi"**## + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;atof(string1 as zstring ptr) as double;Convertir zstring en valeur à virgule flottante.;atoi(string1 as zstring ptr) as integer;Convertir zstring en entier.;atol(string1 as zstring ptr) as integer;Convertir zstring en entier long.;itoa(value as integer, zstring as zstring ptr, radix as integer) as zstring ptr;Convertir un entier en zstring en utilisant la base (radix).;ltoa(value as long, zstring as zstring ptr, radix as integer) as zstring ptr;Convertir entier long en zstring dans la base (radix).;strtod(string1 as zstring ptr, endptr as zstring ptr) as double;Convertir zstring en valeur à virgule flottante.;strtol(string1 as zstring ptr, endptr as zstring ptr, radix as integer) as long;Convertir zstring en entier long en utilisant la base (radix).;strtoul(string1 as zstring ptr, endptr as zstring ptr, radix as integer) as ulong;Convertir zstring en long non-signé.;
    + - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;chmod(path as zstring ptr, pmode as integer) as integer;Change permission settings of a file.;fstat(handle as integer, buffer as type stat ptr) as integer;Get file status information.;remove(path as zstring ptr) as integer;Delete a named file.;rename_(oldname as zstring ptr, newname as zstring ptr) as integer;rename a file.;stat(path as zstring ptr, buffer as type stat ptr) as integer;Get file status information of named file.;umask(pmode as uinteger) as uinteger;Set file permission mask."}} + {{fbdoc item="section" value="Manipulation de répertoire -{{anchor name="STREAM"}}{{fbdoc item="section" value="Stream I/O"}} +##**#include "crt/io.bi"**## - ##**#include "crt/stdio.bi"**## + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;_chdir(path as zstring ptr) as integer;Changer le répertoire courant vers chemin donné.;_getcwd(path as zstring ptr, numchars as integer) as zstring ptr;Retourne le nom du répertoire de travail courant.;_mkdir(path as zstring ptr) as integer;Créer un répertoire en utilisant le nom de chemin d'accès donné.;_rmdir(path as zstring ptr) as integer;Supprimer un répertoire spécifié.;
    - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;clearerr(file_pointer as FILE ptr);Clear error indicator of stream,;fclose(file_pointer as FILE ptr) as integer;Close a file,;feof(file_pointer as FILE ptr) as integer;Check if end of file occurred on a stream.;ferror(file_pointer as FILE ptr) as integer;Check if any error occurred during file I/0.;fflush(file_pointer as FILE ptr) as integer;Write out (flush) buffer to file.;fgetc(file_pointer as FILE ptr) as integer;Get a character from a stream.;fgetpos(file_pointer as FILE ptr, fpos_t current_pos) as integer;Get the current position in a stream.;fgets(string1 as zstring ptr, maxchar as integer, file_pointer as FILE ptr) as zstring ptr;Read a zstring from a file.;fopen(filename as zstring ptr, access_mode as zstring ptr) as FILE ptr;Open a file for buffered I/0.;fprintf(file_pointer as FILE ptr, format_string as zstring ptr, args) as integer;Write formatted output to a file,;fputc(c as integer, file_pointer as FILE ptr) as integer;Write a character to a stream.;fputchar(c as integer) as integer;Write a character to stdout.;fputs(string1 as zstring ptr, file_pointer as FILE ptr) as integer;Write a zstring to a stream.;fread(buffer as zstring ptr, size as size_t count as size_t, file_pointer as FILE ptr) as size_t;Read unformatted data from a stream into a buffer.;freopen(filename as zstring ptr, access as zstring ptr mode, file_pointer as FILE ptr) as FILE ptr;Reassign a file pointer to a different file.;fscanf(file_pointer as FILE ptr, format as zstring ptr zstring, args) as integer;Read formatted input from a stream.;fseek(file_pointer as FILE ptr, offset as long, origin as integer) as integer;Set current position in file to a new location.;fsetpos(file_pointer as FILE ptr, current_pos as fpos_t) as integer;Set current position in file to a new location.;ftell(file_pointer as FILE ptr) as long;Get current location in file.;fwrite(buffer as zstring ptr, size as size_t, count as size_t file_pointer as FILE ptr) as size_t;Write unformatted data from a buffer to a stream.;getc(file_pointer as FILE ptr) as integer;Read a character from a stream.;getchar() as integer;Read a character from stdin.;gets(buffer as zstring ptr) as zstring ptr;Read a line from stdin into a buffer.;printf(format as zstring ptr _string, args) as integer;Write formatted output to stdout.;putc(c as integer, file_pointer as FILE ptr) as integer;Write a character to a stream.;putchar(c as integer) as integer;Write a character to stdout.;puts(string1 as zstring ptr) as integer;Write a zstring to stdout.;rewind(file_pointer as FILE ptr);Rewind a file.;scanf(format_string as zstring ptr, args) as integer;Read formatted input from stdin.;setbuf(file_pointer as FILE ptr, buffer as zstring ptr);Set up a new buffer for the stream.;setvbuf(file_pointer as FILE ptr, buffer as zstring ptr, buf_type as integer, buf as size_t size) as integer;Set up new buffer and control the level of buffering on a stream.;sprintf(string1 as zstring ptr, format_string as zstring ptr, args) as integer;Write formatted output to a zstring.;sscanf(buffer as zstring ptr, format_string as zstring ptr, args) as integer;Read formatted input from a zstring.;tmpfile() as FILE ptr;Open a temporary file.;tmpnam(file_name as zstring ptr) as zstring ptr;Get temporary file name.;ungetc(c as integer, file_pointer as FILE ptr) as integer;Push back character into stream' s buffer"}} + -{{anchor name="LOLEVIO"}}{{fbdoc item="section" value="Low level I/O"}} +{{fbdoc item="section" value="Manipulation de fichiers + + ##**#include "crt/sys/stat.bi"**## ##**#include "crt/io.bi"**## - So far Win32 only, connects to MSVCRT.DLL (headers missing for other platforms) + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;chmod(path as zstring ptr, pmode as integer) as integer;Modifie les paramètres de permissions d'un fichier.;fstat(handle as integer, buffer as type stat ptr) as integer;Obtient des informations d'état du fichier.;remove(path as zstring ptr) as integer;Supprimer un fichier nommé.;rename_(oldname as zstring ptr, newname as zstring ptr) as integer;Renommer un fichier.;stat(path as zstring ptr, buffer as type stat ptr) as integer;Obtenir des informations d'état du fichier nommé.;umask(pmode as uinteger) as uinteger;Définir le masque de permissions du fichier.;
    - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;_close(handle as integer) as integer;Close a file opened for unbuffered I/O.;_creat(filename as zstring ptr, pmode as integer) as integer;Create a new file with specified permission setting.;_eof(handle as integer) as integer;Check for end of file.;_lseek(handle as integer, offset as long, origin as integer) as long;Go to a specific position in a file.;_open(filename as zstring ptr, oflag as integer, pmode as uinteger) as integer;Open a file for low-level I/O.;_read(handle as integer, buffer as zstring ptr, length as uinteger) as integer;Read binary data from a file into a buffer.;_write(handle as integer, buffer as zstring ptr, count as uinteger) as integer;Write binary data from a buffer to a file."}} + -{{anchor name="MATH"}}{{fbdoc item="section" value="Mathematics"}} + {{fbdoc item="section" value="Flux E/S - ##**#include "crt/math.bi"**## + ##**#include "crt/stdio.bi"**## - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;abs_(n as integer) as integer;Get absolute value of an integer.;acos_(x as double) as double;Compute arc cosine of x.;asin_(x as double) as double;Compute arc sine of x.;atan_(x as double) as double;Compute arc tangent of x.;atan2_(y as double, x as double) as double;Compute arc tangent of y/x.;ceil(x as double) as double;Get smallest integral value that exceeds x.;cos_(x as double) as double;Compute cosine of angle in radians.;cosh(x as double) as double;Compute the hyperbolic cosine of x.;div(number as integer, denom as integer) as div_t;Divide one integer by another.;exp_(x as double) as double;Compute exponential of x.;fabs(x as double) as double;Compute absolute value of x.;floor(x as double) as double;Get largest integral value less than x.;fmod(x as double, y as double) as double;Divide x by y with integral quotient and return remainder.;frexp(x as double, expptr as integer ptr) as double;Breaks down x into mantissa and exponent of no.;labs(n as long) as long;Find absolute value of long integer n.;ldexp(x as double, exp as integer) as double;Reconstructs x out of mantissa and exponent of two.;ldiv(number as long, denom as long) as ldiv_t;Divide one long integer by another.;log_(x as double) as double;Compute log(x).;log10(x as double) as double;Compute log to the base 10 of x.;modf(x as double, intptr as double ptr) as double;Breaks x into fractional and integer parts.;pow(x as double, y as double) as double;Compute x raised to the power y.;rand() as integer;Get a random integer between 0 and 32.;random(max_num as integer) as integer;Get a random integer between 0 and max_num.;randomize();Set a random seed for the random number generator.;sin_(x as double) as double;Compute sine of angle in radians.;sinh(x as double) as double;Compute the hyperbolic sine of x.;sqrt(x as double) as double;Compute the square root of x.;srand(seed as uinteger);Set a new seed for the random number generator (rand).;tan_(x as double) as double;Compute tangent of angle in radians.;tanh(x as double) as double;Compute the hyperbolic tangent of x."}} +{{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;clearerr(file_pointer as FILE ptr);Efface l'indicateur d'erreur de flux,;fclose(file_pointer as FILE ptr) as integer;Fermer un fichier.;feof(file_pointer as FILE ptr) as integer;Check if end of file occurred on a stream.;ferror(file_pointer as FILE ptr) as integer;Vérifier si une erreur s'est produite lors d'une E/S fichier.;fflush(file_pointer as FILE ptr) as integer;Écrire (vider) un tampon vers le fichier.;fgetc(file_pointer as FILE ptr) as integer;Obtenir un caractère à partir d'un flux.;fgetpos(file_pointer as FILE ptr, fpos_t current_pos) as integer;Obtenir la position courante dans un flux.;fgets(string1 as zstring ptr, maxchar as integer, file_pointer as FILE ptr) as zstring ptr;Lire une zstring à partir d'un fichier.;fopen(filename as zstring ptr, access_mode as zstring ptr) as FILE ptr;Ouvrir un fichier pour tampon E/S.;fprintf(file_pointer as FILE ptr, format_string as zstring ptr, args) as integer;Écrire la sortie formatée dans un fichier.;fputc(c as integer, file_pointer as FILE ptr) as integer;Écrire un caractère vers un flux.;fputchar(c as integer) as integer;Écrire un caractère vers stdout.;fputs(string1 as zstring ptr, file_pointer as FILE ptr) as integer;Ecrire une zstring vers un flux.;fread(buffer as zstring ptr, size as size_t count as size_t, file_pointer as FILE ptr) as size_t;Lire des données non formatées d'un flux dans un un tampon.;freopen(filename as zstring ptr, access as zstring ptr mode, file_pointer as FILE ptr) as FILE ptr;Réaffecter un pointeur fichier vers un autre fichier.;fscanf(file_pointer as FILE ptr, format as zstring ptr zstring, args) as integer;Lire une entrée formatée à partir d'un flux.;fseek(file_pointer as FILE ptr, offset as long, origin as integer) as integer;Définir la position courante dans fichier vers un nouvel emplacement.;fsetpos(file_pointer as FILE ptr, current_pos as fpos_t) as integer;Définir la position courante dans le fichier vers un nouvel emplacement.;ftell(file_pointer as FILE ptr) as long;Obtenir l'emplacement courant dans le dossier.;fwrite(buffer as zstring ptr, size as size_t, count as size_t file_pointer as FILE ptr) as size_t;Écrire des données non formatées à partir d'un tampon vers un flux.;getc(file_pointer as FILE ptr) as integer;Lire un caractère à partir d'un flux.;getchar() as integer;Lire un caractère à partir de stdin.;gets(buffer as zstring ptr) as zstring ptr;Lire une ligne depuis stdin vers un tampon.;printf(format as zstring ptr _string, args) as integer;Écrire une sortie formatée vers stdout.;putc(c as integer, file_pointer as FILE ptr) as integer;Écrire un caractère vers un flux.;putchar(c as integer) as integer;Écrire un caractère vers stdout.;puts(string1 as zstring ptr) as integer;Ecrire une zstring vers stdout.;rewind(file_pointer as FILE ptr);Rembobiner un fichier.;scanf(format_string as zstring ptr, args) as integer;Lire une entrée formatée de stdin.;setbuf(file_pointer as FILE ptr, buffer as zstring ptr);Mettre en place un nouveau tampon pour le flux.;setvbuf(file_pointer as FILE ptr, buffer as zstring ptr, buf_type as integer, buf as size_t size) as integer;Mettre en place un nouveau tampon et contrôler le niveau de mise en mémoire tampon sur un flux.;sprintf(string1 as zstring ptr, format_string as zstring ptr, args) as integer;Écrire une sortie formatée vers une zstring.;sscanf(buffer as zstring ptr, format_string as zstring ptr, args) as integer;Lire une zstring à partir d'une entrée formatée.;tmpfile() as FILE ptr;Ouvrir un fichier temporaire.;tmpnam(file_name as zstring ptr) as zstring ptr;Obtenir le nom d'un fichier temporaire.;ungetc(c as integer, file_pointer as FILE ptr) as integer;Repousser un caractère dans un tampon de flux;
    -{{anchor name="MEMORY"}}{{fbdoc item="section" value="Memory Allocation"}} + - ##**#include "crt/stdlib.bi"**## + {{fbdoc item="section" value="E/S bas niveau - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;calloc(num as size_t elems, elem_size as size_t) as any ptr;Allocate an array and initialise all elements to zero .;free(mem_address as any ptr);Free a block of memory.;malloc(num as size_t bytes) as any ptr;Allocate a block of memory.;realloc(mem_address as any ptr, newsize as size_t) as any ptr;Reallocate (adjust size) a block of memory."}} +##**#include "crt/io.bi"**## -{{anchor name="PROCESS"}}{{fbdoc item="section" value="Process Control"}} + Jusqu'à présent, Win32 seulement, se connecte à MSVCRT.DLL (en-têtes manquantes pour d'autres plates-formes) - ##**#include "crt/stdlib.bi"**## + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;_close(handle as integer) as integer;Fermer un fichier ouvert pour E/S non-tamponnée.;_creat(filename as zstring ptr, pmode as integer) as integer;Créer un nouveau fichier avec la permission spécifiée.;_eof(handle as integer) as integer;Vérifier la fin du fichier.;_lseek(handle as integer, offset as long, origin as integer) as long;Aller à une position spécifique dans un fichier.;_open(filename as zstring ptr, oflag as integer, pmode as uinteger) as integer;Ouvrir un fichier à faible niveau E/S.;_read(handle as integer, buffer as zstring ptr, length as uinteger) as integer;Lire des données binaires à partir d'un fichier dans un tampon.;_write(handle as integer, buffer as zstring ptr, count as uinteger) as integer;Écrire des données binaires à partir d'un tampon dans un fichier.;
    - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;abort();Abort a process.;execl(path as zstring ptr, arg0 as zstring ptr, arg1 as zstring ptr,..., NULL) as integer;Launch a child process (pass command line).;execlp(path as zstring ptr, arg0 as zstring ptr, arg1 as zstring ptr,..., NULL) as integer;Launch child (use PATH, pass command line).;execv(path as zstring ptr, argv as zstring ptr) as integer;Launch child (pass argument vector).;execvp(path as zstring ptr, argv as zstring ptr) as integer;Launch child (use PATH, pass argument vector).;exit_(status as integer);Terminate process after flushing all buffers.;getenv(varname as zstring ptr) as zstring ptr;Get definition of environment variable,;perror(string1 as zstring ptr);Print error message corresponding to last system error.;putenv(envstring as zstring ptr) as integer;Insert new definition into environment table.;raise(signum as integer) as integer;Generate a C signal (exception).;system_(string1 as zstring ptr) as integer; Execute a resident operating system command."}} + -{{anchor name="SORTING"}}{{fbdoc item="section" value="Searching and Sorting"}} - - ##**#include "crt/stdlib.bi"**## - **Note:** The //compare// callback function required by ##bsearch## and ##qsort## must be declared as ##[[KeyPgCdecl cdecl]]##. It must return a value <0 if its first argument should be located before the second one in the sorted array, >0 if the first argument should be located after the second one, and zero if their relative positions are indifferent (equal values). + {{fbdoc item="section" value="Mathématiques + ##**#include "crt/math.bi"**## - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;bsearch(key as any ptr, base as any ptr, num as size_t, width as size_t, compare as function(elem1 as any ptr, elem2 as any ptr) as integer) as any ptr;Perform binary search.;qsort(base as any ptr, num as size_t, width as size_t, compare as function(elem1 as any ptr, elem2 as any ptr) as integer);Use the quicksort algorithm to sort an array."}} + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;abs_(n as integer) as integer;Récupère la valeur absolue d'un entier.;acos_(x as double) as double;Calcule arc cosinus de x.;asin_(x as double) as double;Calcule arc sinus de x.;atan_(x as double) as double;Calcule arc tangente de x.;atan2_(y as double, x as double) as double;Calcule arc tangente de y/x.;ceil(x as double) as double;Obtient plus petite valeur entière qui dépasse x.;cos_(x as double) as double;Calcule cosinus de l'angle en radians.;cosh(x as double) as double;Calcule le cosinus hyperbolique de x.;div(number as integer, denom as integer) as div_t;Diviser un entier par un autre.;exp_(x as double) as double;Calcule exponentielle de x.;fabs(x as double) as double;Calcule la valeur absolue de x.;floor(x as double) as double;Obtient plus grande valeur entière inférieure à x.;fmod(x as double, y as double) as double;Diviser x par y avec un quotient entier et retourne le reste.;frexp(x as double, expptr as integer ptr) as double;Décompose x en mantisse et exposant.;labs(n as long) as long;Trouver valeur absolue d'un nombre entier long n.;ldexp(x as double, exp as integer) as double;Reconstruit x à partir de la mantisse et d'un exposant de deux.;ldiv(number as long, denom as long) as ldiv_t;Diviser un entier long par un autre.;log_(x as double) as double;Calcule log(x).;log10(x as double) as double;Calcule log base 10 de x.;modf(x as double, intptr as double ptr) as double;Décompose x en partie entière et partie décimale.;pow(x as double, y as double) as double;Calcule x élevé à la puissance y.;rand() as integer;Obtient un entier aléatoire compris entre 0 et 32.;random(max_num as integer) as integer;Obtenir un entier aléatoire compris entre 0 et max_num.;randomize();Définir une "graine" aléatoire pour le générateur de nombres aléatoires.;sin_(x as double) as double;Calcule le sinus de l'angle en radians.;sinh(x as double) as double;Calcule le sinus hyperbolique de x.;sqrt(x as double) as double;Calcule la racine carrée de x.;srand(seed as uinteger);Définir une nouvelle graine pour le générateur de nombre aléatoire (rand).;tan_(x as double) as double;Calcule la tangente de l'angle en radians.;tanh(x as double) as double;Calcule la tangente hyperbolique de x.;
    -{{anchor name="STRING"}}{{fbdoc item="section" value="String Manipulation"}} + - ##**#include "crt/string.bi"**## + {{fbdoc item="section" value="Allocation mémoire - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;stpcpy(dest as zstring ptr, src as zstring ptr) as zstring ptr;Copy one zstring into another.;strcmp(string1 as zstring ptr, string2 as zstring ptr) as integer;Compare string1 and string2 to determine alphabetic order.;strcpy(string1 as zstring ptr, string2 as zstring ptr) as zstring ptr;Copy string2 to string1.;strerror(errnum as integer) as zstring ptr;Get error message corresponding to specified error number.;strlen(string1 as zstring ptr) as integer;Determine the length of a zstring.;strncat(string1 as zstring ptr, string2 as zstring ptr, n as size_t) as zstring ptr;Append n characters from string2 to string1.;strncmp(string1 as zstring ptr, string2 as zstring ptr, n as size_t) as integer;Compare first n characters of two strings.;strncpy(string1 as zstring ptr, string2 as zstring ptr, n as size_t) as zstring ptr;Copy first n characters of string2 to string1.;strnset(string1 as zstring ptr, c as integer, size _t n) as zstring ptr;Set first n characters of zstring to c.;strrchr(string1 as zstring ptr, c as integer) as zstring ptr;Find last occurrence of character c in zstring."}} + ##**#include "crt/stdlib.bi"**## -{{anchor name="TIME"}}{{fbdoc item="section" value="Time"}} +{{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;calloc(num as size_t elems, elem_size as size_t) as any ptr;Allouer un tableau et initialiser tous ses éléments à zéro.;free(mem_address as any ptr);Libérer un bloc de mémoire.;malloc(num as size_t bytes) as any ptr;Allouer un bloc de mémoire.;realloc(mem_address as any ptr, newsize as size_t) as any ptr;Réaffecter (ajuster la taille) un bloc de mémoire.;
    - ##**#include "crt/time.bi"**## + - {{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;asctime(time as type tm ptr) as zstring ptr;Convert time from type tm to zstring.;clock() as clock_t;Get elapsed processor time in clock ticks.;ctime(time as time_t ptr) as zstring ptr;Convert binary time to zstring.;difftime(time_t time2, time_t time1) as double;Compute the difference between two times in seconds.;gmtime(time as time_t ptr) as type tm ptr;Get Greenwich Mean Time (GMT) in a tm structure.;localtime(time as time_t ptr) as type tm ptr;Get the local time in a tm structure.;time_(timeptr as time_t ptr) as time_t;Get current time as seconds elapsed since 0 hours GMT 1/1/70."}} + {{fbdoc item="section" value="Contrôle de processus -{{fbdoc item="see"}} - - ##[[KeyPgInclude #include]]## +##**#include "crt/stdlib.bi"**## + {{table columns="" cellpadding="2" cells="Prototype (avec paramètres);Commentaires;abort();Abandonner un processus.;execl(path as zstring ptr, arg0 as zstring ptr, arg1 as zstring ptr,..., NULL) as integer;Lancer un processus fils (passe la ligne de commande).;execlp(path as zstring ptr, arg0 as zstring ptr, arg1 as zstring ptr,..., NULL) as integer;Lancer enfant (utilisation de PATH, passer la ligne de commande).;execv(path as zstring ptr, argv as zstring ptr) as integer;Lancer enfant (passe vecteur argument).;execvp(path as zstring ptr, argv as zstring ptr) as integer;Lancement enfant (utiliser PATH, passer vecteur d'argument).;exit_(status as integer);Terminer un processus après nettoyage de tous les tampons.;getenv(varname as zstring ptr) as zstring ptr;Récupère la définition de la variable d'environnement,;perror(string1 as zstring ptr);Affiche un message d'erreur correspondant à la dernière erreur système.;putenv(envstring as zstring ptr) as integer;Insérer une nouvelle définition dans la table d' environnement.;raise(signum as integer) as integer;Générer un signal C (exception).;system_(string1 as zstring ptr) as integer; Exécuter une commande du système d'exploitation résident.;
    -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}}{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file + \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgCtorsDtors.wakka b/fbdocs/manual/cache/ProPgCtorsDtors.wakka index 1e62cf8a16..7a1b393a6e 100644 --- a/fbdocs/manual/cache/ProPgCtorsDtors.wakka +++ b/fbdocs/manual/cache/ProPgCtorsDtors.wakka @@ -1,99 +1,99 @@ {{fbdoc item="title" value="Constructors and Destructors"}}---- -In charge of the creation and destruction of objects. +En charge de la création et la destruction d'objets. -**{{anchor name="OVERVIEW|Overview"}}** -**{{anchor name="DECLARATION|Declaration"}}** -**{{anchor name="DEFCTOR|Default constructors"}}** -**{{anchor name="COPYCTOR|Copy constructors"}}** -**{{anchor name="CALLCTOR|Calling constructors"}}** +**[[#OVERVIEW">Vue d'ensemble]]** +**[[#DECLARATION">Déclaration]]** +**[[#DEFCTOR">Les constructeurs par défaut]]** +**[[#COPYCTOR">Constructeurs de copie]]** +**[[#CALLCTOR">Appel des constructeurs]]** -{{anchor name="OVERVIEW"}}{{fbdoc item="section" value="Overview"}} - Constructors and destructors are responsible for creating and destroying objects, respectively. In general, constructors give objects their initial state, that is, they give meaningful values to their objects' member data. Destructors perform the opposite function; they make sure any resources owned by their objects are properly freed. +**[[#COMPCTORDTOR">Constructeurs et destructeurs fournis par le compilateur]]** + {{fbdoc item="section" value="Vue d'ensemble - Simply, constructors are special member procedures that are called when an object is created, and destructors are special member procedures called when an object is destroyed. Both constructors and destructors are called automatically by the compiler whenever an object is created or destroyed, whether explicitly with the use of the ##[[KeyPgDim Dim]]## or ##[[KeyPgOpNew New]]## keywords, or implicitly by passing an object to a procedure by value or through an object going out of scope. + Les constructeurs et les destructeurs sont responsables, respectivement, de la création et de la destruction d'objets. En général, les constructeurs donnent aux objets leur état initial, c'est à dire qu'ils donnent des valeurs significatives aux données membres de leurs objets. Les destructeurs accomplissent la fonction inverse; ils s'assurent que les ressources qui appartiennent aux objets sont correctement libérées. -{{anchor name="DECLARATION"}}{{fbdoc item="section" value="Declaration"}} - Constructors and destructors are declared like member procedures but with the ##[[KeyPgConstructor Constructor]]## keyword instead of ##[[KeyPgMemberSub Sub]]## or ##[[KeyPgMemberFunction Function]]##, and without a name. Similarly, they are defined with only the name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they are declared in. +Simplement, les constructeurs sont des membres spéciaux des procédures qui sont appelés lorsqu'un objet est créé et les destructeurs sont des membres spéciaux des procédures qui sont appelés lorsqu'un objet est détruit. Les constructeurs et destructeurs sont appelés automatiquement par le compilateur chaque fois qu'un objet est créé ou détruit, ou détruit explicitement lors de l'utilisation des mots-clés ##[[KeyPgDim Dim]]## ou ##[[KeyPgOpNew New]]## ou ou implicitement par le passage d'un objet par valeur à une procédure ou via un objet sortant du champ d'application. + - A ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## can have multiple constructors, but only one destructor. + {{fbdoc item="section" value="Déclaration -{{anchor name="DEFCTOR"}}{{fbdoc item="section" value="Default constructors"}} - Default constructors are constructors that either have no parameters, or all of their parameters have a default value. They are called when an object is defined but not initialized, or is created as part of an array, with the ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]## or ##[[KeyPgOpNew New]]##[] keywords. The first constructor declared in the example below is a default constructor. +Les constructeurs et les destructeurs sont déclarés comme membres de procédures, mais avec les mots-clefs ##[[KeyPgConstructor Constructor]]## ou ##[[KeyPgDestructor Destructor]]## à la place de ##[[KeyPgMemberSub Sub]]## ou ##[[KeyPgMemberFunction Function]]## et sans nom. De même, ils sont définis avec seulement le nom du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## dans le(la)quel(le) ils sont déclarés. + Un ##[[KeyPgType Type]]## ou une ##[[KeyPgClass Class]]## peuvent avoir plusieurs constructeurs, mais seulement un destructeur. -{{anchor name="COPYCTOR"}}{{fbdoc item="section" value="Copy constructors"}} - Copy constructors are constructors called when an object is created, or cloned, from another object of the same type (or an object that can be converted to that type). This happens explicitly when initializing an object with another object, or implicitly by passing an object to a procedure by value. Copy constructors are declared having one parameter: an object of the same type passed by reference. + + {{fbdoc item="section" value="Les constructeurs par défaut - Copy constructors are only called when creating and initializing object instances. Assignment to objects is handled by the ##[[KeyPgOperator member operator let]]##. + Les constructeurs par défaut sont des constructeurs qui soit n'ont pas de paramètres, soit la totalité de leurs paramètres ont une valeur par défaut. Ils sont appelés quand un objet est défini, mais pas initialisé, ou créés dans le cadre d'un tableau, avec les mots-clefs ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim ReDim]]## ou ##[[KeyPgOpNew New]]##[]. Le premier constructeur déclaré dans l'exemple ci-dessous est un constructeur par défaut. -{{anchor name="CALLCTOR"}}{{fbdoc item="section" value="Calling constructors"}} - Unlike other member procedures, constructors cannot be called directly from an object instance. Instead, a constructor is specified in a ##[[KeyPgDim Dim]]## statement either with an initializer or without one, or in a ##[[KeyPgOpNew New]]## statement with or without arguments. + + {{fbdoc item="section" value="Constructeurs de copie - When specifying an initializer for an object, the name of the type followed by any arguments it requires is used. + Les constructeurs de copie sont des constructeurs appelés quand un objet est créé, ou cloné, à partir d'un autre objet du même type (ou d'un objet qui peut être converti dans ce type). Cela se produit explicitement lors de l'initialisation d'un objet avec un autre objet ou implicitement en passant par valeur un objet à une procédure. Les constructeurs de copie sont déclarés comme ayant un paramètre: un objet du même type passé par référence. -{{fbdoc item="filename" value="examples/manual/proguide/udt/ctordtor.bas"}}%%(freebasic) -type foo +Les constructeurs de copie ne sont appelés que lors de la création et l'initialisation d'instances d'objets. L'affectation à des objets est assurée par ##[[KeyPgOperator Member Operator Let]]##. + + {{fbdoc item="section" value="Appel des constructeurs + Contrairement aux autres membres des procédures, les constructeurs ne peuvent pas être appelés directement à partir d'une instance d'objet. Au lieu de cela, un constructeur est précisé dans une instruction ##[[KeyPgDim Dim]]## avec un initialiseur ou sans ou dans une instruction ##[[KeyPgOpNew New]]## avec ou sans arguments. + Lorsque vous spécifiez un initialiseur pour un objet, le nom du type suivi par tous les arguments qu'il exige est utilisé. + %%(freebasic) + + Type foo '' Declare a default ctor, copy ctor and normal ctor - declare constructor - declare constructor (byref as foo) - declare constructor (as integer) - '' Declare a destructor - declare destructor + Declare Constructor + Declare Constructor (ByRef As foo) +Declare Constructor (As Integer) - ints as integer ptr - numints as integer -end type +'' Declare a destructor +Declare Destructor + ints As Integer Ptr + numints As Integer +End Type '' Define a constructor that creates 100 integers -constructor foo - ints = new integer(100) +Constructor foo + ints = New Integer(100) numints = 100 end constructor '' Define a constructor that copies the integers from another object -constructor foo (byref x as foo) - ints = new integer(x.numints) +Constructor foo (ByRef x As foo) + ints = New Integer(x.numints) numints = x.numints end constructor '' Define a constructor that creates some integers based on a parameter -constructor foo (n as integer) - ints = new integer(n) - numints = n -end constructor +Constructor foo (n As Integer) + ints = New Integer(n) +numints = n -'' Define a destructor that destroys those integers -destructor foo - delete[] ints -end destructor +End Constructor + '' Define a destructor that destroys those integers + Destructor foo + Delete[] ints -scope + End Destructor + Scope '' calls foo's default ctor - dim a as foo - dim x as foo ptr = new foo + Dim a As foo + Dim x As foo Ptr = New foo '' calls foo's copy ctor - dim b as foo = a - dim y as foo ptr = new foo(*x) + Dim b As foo = a + Dim y As foo Ptr = New foo(*x) '' calls foo's normal ctor - dim c as foo = foo(20) - dim z as foo ptr = new foo(20) - - '' calls foo's dtor - delete x - delete y - delete z -end scope '' <- a, b and c are destroyed here as well -%% + Dim c As foo = foo(20) +Dim z As foo Ptr = New foo(20) +'' calls foo's dtor -{{anchor name="COMPCTORDTOR"}}{{fbdoc item="section" value="Compiler-provided constructors and destructors"}} - If no copy constructor is declared for a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##, the compiler provides one. If no constructor has been declared, the compiler also provides a default constructor. +Delete x + Delete y - The compiler-provided default constructor initializes member data to default values, that is, numeric and pointer members are set to zero (0), and object members are default-constructed. The copy constructor that the compiler declares shallow-copies all member data from one type to another: numeric and pointer types are initialized with the corresponding data members in the object that is copied, and object members are copy-constructed from their corresponding object members. This means that dynamic resources, such as memory pointed to by a pointer data member, is not copied; only the address is copied. So if an object owns a resource, meaning it is responsible for it's creation and destruction, then the compiler-generated copy constructor will not be sufficient. + Delete z - If a destructor is not declared, the compiler generates one. This destructor calls object members' destructors and does nothing for numeric and pointer types. Again, if an object owns a dynamic resource, then the compiler-generated destructor will not be sufficient, as the resource will not be freed when the object is destroyed. + End Scope '' <- a, b and c are destroyed here as well - This is commonly referred to as the "Rule of 3": If an object needs a custom copy constructor, assignment operator or destructor, chances are it needs all three. + %% -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file + \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgDataConversion.wakka b/fbdocs/manual/cache/ProPgDataConversion.wakka index cda97dc605..9bd990f9a1 100644 --- a/fbdocs/manual/cache/ProPgDataConversion.wakka +++ b/fbdocs/manual/cache/ProPgDataConversion.wakka @@ -1,37 +1,37 @@ {{fbdoc item="title" value="Coercion and Conversion"}}---- -Coercion of Numeric Data Types in Expressions. +Promotion de types de données numériques dans des expressions. -When two different data types are used in a binary operation, like ##//+//## (Addition) or ##//=//## (Assignment), the smaller data type is automatically promoted to the larger data type regardless of the order in which the arguments are given. +Lorsque deux types de données différents sont utilisés dans une opération binaire, comme ##//+//## (Addition) ou ##//=//## (Affectation), le type de données le plus faible est automatiquement promu vers le type de données le plus fort quel que soit l'ordre dans lequel arguments sont donnés. -Promotions are as follows: - - where both arguments are each one of byte, ubyte, short, ushort, or integer: the smaller sized argument is promoted to have the same size as the larger sized argument. - - where one of the arguments is longint or ulongint, and the other argument is of any integer type, the smaller sized argument is promoted to have the same size as the larger sized argument. - - where one of the arguments is a single or a double, both arguments are converted and/or promoted to double +Les promotions sont comme suit: + - si les deux arguments sont de type byte, ubyte, short, ushort ou integer: plus petit argument (en type de taille) est promu pour avoir la même taille (en type de taille) que le plus grand argument (en type de taille). + - si un des arguments est de type longint ou ulongint, et l'autre argument est d'un type entier (integer), plus petit argument (en type de taille) est promu pour avoir la même taille (en type de taille) que le plus grand argument (en type de taille). + - si un des arguments est de type single ou double, les deux arguments sont convertis et/ou promus vers double -All unsigned integer types are handling like signed integer types for the purpose of promotion, and the most significant bit is extended (sign extension). +Tous les types entiers non signés sont manipulés comme des types entiers signés aux fins de promotion et bit le plus significatif est étendu (extension de signe). -==Conversion of Numeric Data Types== +**Conversion de types de données numériques** -A type conversion will occur implicitly when an expression or variable is assigned, passed as a parameter to a procedure, or returned as a result from a procedure. Conversions may also be explicit when using CAST or one of the built-in conversion functions. +Une conversion de type se produit implicitement lorsqu'une expression ou une variable est affectée, passée comme paramètre d'une procédure ou returnée comme résultat d'une procédure. Les conversions peuvent aussi être explicites lorsque vous utilisez CAST ou l'une des fonctions intégrées de conversion. -__Integer To Integer, any combination of Signed and Unsigned__ - - Any integer type to a smaller integer type: least significant bits are retained - - Any integer type to a larger integer type: sign extended to fill most significant bits +Integer (entier) vers Integer (entier), n'importe quelle combinaison de nombres signés et non-signés + - Tout type d'entier vers un type d'entier plus faible: les bits les moins significatifs sont conservés + - Tout type d'entier vers un type d'entier plus fort: extension de signe pour remplir bits les plus significatifs -__Integer to Single or Double__ - - Possible loss of precision +Integer vers Single ou Double + - Perte possible de précision -__Double to Single__ - - Possible loss of precision - - If the value of the Double exceeds the range of a Single result is +/- INF +Double vers Single + - Perte possible de précision + - Si la valeur du Double dépasse le champ d'un Single le résultat est +/- INF -__Double or Single to Integer__ - - Possible loss of precision - - If the value of the floating point number exceeds the range of the target type are results are undefined. A run-time error is not raised. +Double ou Single vers Integer + - Perte possible de précision + - Si la valeur du nombre à virgule flottante dépasse la plage du type de la cible les résultats sont indéfinis. Pas d'erreur d'exécution d'affichée. {{fbdoc item="see"}} - - [[CatPgStdDataTypes Standard Data Types]] - - [[TblVarTypes Variable Types]] - - [[CatPgCasting Casting and Conversion Functions]] + - [[CatPgStdDataTypes Types de données standard]] + - [[TblVarTypes Types de variables]] + - [[CatPgCasting Conversion entre types de données]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgDates.wakka b/fbdocs/manual/cache/ProPgDates.wakka index c93d351dca..9841ba331a 100644 --- a/fbdocs/manual/cache/ProPgDates.wakka +++ b/fbdocs/manual/cache/ProPgDates.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Date Serials"}}---- {{fbdoc item="desc"}} - A date serial is a number that holds a date and time value in the same format used by PDS or VBDOS. The value is a count of the days from 0:00 AM of December 30,1899; it's mainly used for easy counting of the time between two dates. + Une "date serial" est un nombre qui détient une valeur de date et heure dans le même format que PDS ou VBDOS. Cette valeur est un nombre de jours depuis le 30 décembre 1899 à 0:00 AM; ceci est principalement utile pour évaluer facilement le temps entre deux dates. - The date serial unit is one day and the fractional part represents the time of the day. If a date serial is written into an integer, the time is lost. FreeBASIC date serials are not limited to dates between 1753 and 2078 as in VBDOS. FreeBASIC date serial handling functions use ##[[KeyPgDouble Double]]## arguments. + L'unité de "date serial" est un jour et la partie fractionnaire représente l'heure du jour. Si une "date serial" est transcrite dans un nombre entier, l'heure est perdue. Les "date serials" de FreeBASIC ne sont pas limitées aux dates entre 1753 et 2078 comme dans VBDOS. Les fonctions de manipulation des "date serial" de FreeBASIC utilisent des arguments ##[[KeyPgDouble Double]]## précision. - FreeBASIC date serial handling functions require the inclusion of ##vbcompat.bi## or ##datetime.bi## in the source. + Les fonctions de manipulation des "date serial" de FreeBASIC nécessitent l'inclusion de ##vbcompat.bi## ou ##datetime.bi## dans le fichier source. - A date serial can be created by the functions ##[[KeyPgNow Now]]##, ##[[KeyPgTimeserial TimeSerial]]##+##[[KeyPgDateSerial DateSerial]]##, or ##[[KeyPgDateValue DateValue]]##+##[[KeyPgTimeValue TimeValue]]##. + Une "date serial" peut être créée par les fonctions ##[[KeyPgNow Now]]##, ##[[KeyPgTimeserial TimeSerial]]##+##[[KeyPgDateSerial DateSerial]]##, ou ##[[KeyPgDateValue DateValue]]##+##[[KeyPgTimeValue TimeValue]]##. - The functions ##[[KeyPgYear Year]]##, ##[[KeyPgMonth Month]]##, ##[[KeyPgWeekday Weekday]]##, ##[[KeyPgDay Day]]##, ##[[KeyPgHour Hour]]##, ##[[KeyPgMinute Minute]]##, ##[[KeyPgSecond Second]]## allow to recover the different components of a date serial. + Les fonctions ##[[KeyPgYear Year]]##, ##[[KeyPgMonth Month]]##, ##[[KeyPgWeekday Weekday]]##, ##[[KeyPgDay Day]]##, ##[[KeyPgHour Hour]]##, ##[[KeyPgMinute Minute]]##, ##[[KeyPgSecond Second]]## permettent de récupérer les différents composants d'une "date serial". - The ##[[KeyPgFormat Format]]## function has formatting expressions to print date serials in a human readable way. + La fonction ##[[KeyPgFormat Format]]## a des expressions de formatage pour afficher une "date serial" d'une manière lisible par l'homme. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/proguide/dates.bas"}}%%(freebasic) diff --git a/fbdocs/manual/cache/ProPgErrorHandling.wakka b/fbdocs/manual/cache/ProPgErrorHandling.wakka index 1c544b9f12..821a6702f0 100644 --- a/fbdocs/manual/cache/ProPgErrorHandling.wakka +++ b/fbdocs/manual/cache/ProPgErrorHandling.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="Error Handling"}}---- -Handling runtime errors. +Gestion des erreurs d'exécution. - ""FreeBASIC"" can handle the errors in the following ways: - - By default the program does nothing with the errors - they are silently ignored and code continues. In this case code should process possible errors in the next line by using the ##[[KeyPgErr Err]]## function. - - If compiled with //[[CompilerOpte -e]]// or //[[CompilerOptex -ex]]// options, ""FreeBASIC"" uses QB-like error handling. - - **Future** OOP versions of ""FreeBASIC"" may have a java-like TRY..CATCH...FINALLY exception handler implemented. + FreeBasic peut gérer les erreurs de la manière suivante: + - Par défaut, le programme ne fait rien avec les erreurs - elles sont ignorées et le code continue. Dans ce cas, le code devrait traiter les erreurs possibles dans la ligne suivante en utilisant la fonction ##[[KeyPgErr Err]]##. + - S'il est compilé avec les options //[[CompilerOpte -e]]// ou //[[CompilerOptex -ex]]//, FreeBASIC utilise la gestion des erreurs comme dans QB. + - Les **futures** versions POO de FreeBASIC auront un gestionnaire d'exception comme dans Java: TRY..CATCH...FINALLY. - **NOTE:** The following information is valid unless the error produces an OS General Protection Fault (for example if the program writes outside the process memory area). In these cases the OS will immediately stop the program and issue an error: nothing can avoid it from inside ""FreeBASIC"". + **NOTE:** Les informations suivantes sont valables sauf si l'erreur produit un: "OS General Protection Fault" = "système d'exploitation erreur de protection générale" (par exemple, si le programme écrit en dehors de la zone mémoire du processus). Dans ces cas, le système d'exploitation va immédiatement arrêter le programme et émettre une erreur: rien ne peut l'éviter à l'intérieur de FreeBASIC. -{{fbdoc item="section" value="Default error handling"}} +{{fbdoc item="section" value="La gestion des erreurs, par défaut - The default ""FreeBASIC"" behavior is to set the ERR variable and continue. + Le comportement par défaut FreeBasic est de définir la variable ERR et de continuer. {{fbdoc item="filename" value="examples/manual/proguide/errors/err.bas"}}%%(freebasic) Dim as integer e @@ -20,20 +20,20 @@ Print e Sleep %% - (The example program supposes there is no ##xzxwz.zwz## file). The program does not stop; it sets the ERR variable and continues. The error can be processed in the next line. + (Le programme d'exemple suppose il n'y a pas de fichier ##xzxwz.zwz##). Le programme ne s'arrête pas; il définit la variable ERR et continue. L'erreur peut être traitée sur la ligne suivante. - Some IO functions such as ##[[KeyPgOpen Open]]## and ##[[KeyPgPutfileio Put #]]##... can be used in function form, returning an error number or zero if successful. + Certaines fonctions d'entrée/sortie telles que ##[[KeyPgOpen Open]]## et ##[[KeyPgPutfileio Put #]]##... peuvent être utilisées sous forme de fonction qui retourne un numéro d'erreur ou zéro en cas de succès. {{fbdoc item="filename" value="examples/manual/proguide/errors/result.bas"}}%%(freebasic) Print Open ("xzxwz.zwz" For Input As #1) Sleep %% -{{fbdoc item="section" value="QuickBASIC-like error handling"}} +{{fbdoc item="section" value="La gestion des erreurs comme dans QuickBasic - If the //[[CompilerOpte -e]]// or //[[CompilerOptex -ex]]// switch is used at compile time, the program is expected to have a QB-like error handler enabled. If no handler processes the error, the program stops with an error. + Si l'option //[[CompilerOpte -e]]// ou //[[CompilerOptex -ex]]// est utilisée lors de la compilation, le programme est supposé avoir un gestionnaire d'erreurs comme dans QB. Si aucun gestionnaire ne gère l'erreur, le programme s'arrête avec une erreur. - Notice: if QB-Like error handling is used, the programmer should be prepared to handle all error conditions. + Note: si une gestion des erreurs comme dans QB est utilisée, le programmeur doit être préparé à gérer toutes les conditions d'erreur. {{fbdoc item="filename" value="examples/manual/proguide/errors/on-error.bas"}}%%(freebasic) '' Compile with QB (-lang qb) dialect @@ -53,54 +53,54 @@ Sleep End %% - ##[[KeyPgOnerror On Error]]## sets an error handling routine which the program will jump to when an error is found. ##[[KeyPgOnerror On Error]] [[KeyPgGoto Goto]] 0## disables the error handling. + ##[[KeyPgOnerror On Error]]## définit une routine de gestion d'erreur dans laquelle le programme va sauter au moment où une erreur est trouvée. ##[[KeyPgOnerror On Error]] [[KeyPgGoto Goto]] 0## désactive la gestion des erreurs. - If an error handling routine is not set when an error occurs, the program will stop and send the console an error message. + Si une routine de gestion d'erreur n'est pas définie quand une erreur survient, le programme s'arrête et envoie sur la console un message d'erreur. %% Aborting program due to runtime error 2 (file not found) -%% -::c:: - The error handler routine can be at the end of the program, as in QB. The ##[[KeyPgLocal On Local Error]]## statement allows the setting of a local error handler routine at the end of the same ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## in which the error occurs. +%%
    +La routine de gestionnaire d'erreurs peut être à la fin du programme, comme dans QB. L'instruction ##[[KeyPgLocal On Local Error]]## permet la création d'une routine de gestion locale de l'erreur à la fin de la même ##[[KeyPgSub Sub]]## ou ##[[KeyPgFunction Function]]## dans laquelle l'erreur se produit. + %%(freebasic) -{{fbdoc item="filename" value="examples/manual/proguide/errors/on-local.bas"}}%%(freebasic) '' Compile with -e '' The -e command line option is needed to enable error handling. - Declare Sub foo - foo -Sleep +foo + Sleep Sub foo + +Dim filename As String - Dim filename As String Dim errmsg As String filename = "" On Local Error Goto fail - Open filename For Input Access Read As #1 - Print "No error" + Open filename For Input Access Read As #1 + Print "No error" On Local Error Goto 0 Exit Sub + fail: - fail: errmsg = "Error " & Err & _ - " in function " & *Erfn & _ + " in function " & *Erfn & _ " on line " & Erl - Print errmsg + Print errmsg + End Sub -End Sub %% +Si l'option //[[CompilerOpte -e]]// est utilisée, le gestionnaire d'erreurs doit terminer le programme. - If the //[[CompilerOpte -e]]// switch is used the error handler must terminate the program. - With //[[CompilerOptex -ex]]// the error routine can end by using ##[[KeyPgResume Resume]]## (retries the statement that caused the error) or ##[[KeyPgResumenext Resume Next]]## (continues at the next instruction) . + Avec //[[CompilerOptex -ex]]// la routine d'erreur peut se terminer en utilisant ##[[KeyPgResume Resume]]## (réessaie la déclaration qui a provoqué l'erreur) ou ##[[KeyPgResumenext Resume Next]]## (se poursuit à l'instruction suivante) . + {{fbdoc item="section" value="Les codes d'erreur -{{fbdoc item="section" value="Error codes"}} +Voir [[TblRuntimeErrors Codes d'erreurs de fonctionnement]] pour une liste des numéros d'erreur d'exécution et leur signification associée. - See [[TblRuntimeErrors Runtime Error Codes]] for a listing of runtime error numbers and their associated meaning. + Aucune gamme de code d'erreurs utilisateur n'est définie. Si ##[[KeyPgError Error]]## est utilisée pour définir un code d'erreur, il est sage d'utiliser des valeurs élevées pour éviter les collisions avec la liste des codes d'erreurs intégrée. (Cette liste intégrée pouvant être étendue ultérieurement.) - No user error code range is defined. If ##[[KeyPgError Error]]## is used to set an error code it is wise to use high values to avoid collisions with the list of built-in error codes. (This built-in list may be expanded later.) + {{fbdoc item="see"}} -{{fbdoc item="see"}} - - [[CatPgError Error Handling Functions]] +- [[CatPgError Fonctions de gestion des erreurs]] + - [[TblRuntimeErrors Codes d'erreurs de fonctionnement]] - [[TblRuntimeErrors Runtime Error Codes]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}}{{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgFileIO.wakka b/fbdocs/manual/cache/ProPgFileIO.wakka index dbf77bda80..3cc3a7e010 100644 --- a/fbdocs/manual/cache/ProPgFileIO.wakka +++ b/fbdocs/manual/cache/ProPgFileIO.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="File I/O with FreeBASIC"}}---- -In ""FreeBASIC"", there are 4 possible ways to perform file I/O: +Sous FreeBASIC, il y a 4 façons possibles d'exécuter une Entrée/Sortie fichier: -1. Using the built-in BASIC commands like ##[[KeyPgOpen Open]]## , ##[[KeyPgGetfileio Get]]##, ##[[KeyPgPutfileio Put]]##, and ##[[KeyPgClose Close]]##. This way is mostly portable across all platforms supported by ""FreeBASIC"". Open files are identified by "file numbers", that are specific to ""FreeBASIC"" and can't be passed into functions from below. +1. En utilisant les commandes BASIC intégrées comme ##[[KeyPgOpen Open]]## , ##[[KeyPgGetfileio Get]]##, ##[[KeyPgPutfileio Put]]## et ##[[KeyPgClose Close]]##. Cette voie est la plupart du temps portable sur toutes les plates-formes supportées par FreeBASIC. Les fichiers ouverts sont identifiés par des "file numbers" (numéros de fichier), qui sont spécifiques à FreeBASIC et ne peuvent être transmis aux fonctions ci-dessous. -2. Using the C stream I/O functions like fopen, fread, ftell, fclose (see Stream I/O in [[ProPgCruntime C Standard Library Functions]]) of the C library ""FreeBASIC"" relies on. This is slightly faster than and adds a few features beyond method above, and still well portable. Open files are identified by file pointers, as in the C language, again unique to this access method. The ##[[KeyPgFileattr FileAttr]]## function can be used to return a stream I/O pointer from a file number as in 1. above. +2. En utilisant les fonctions C d'E/S de flux comme fopen, fread, ftell, fclose (voir Flux E/S dans [[ProPgCruntime Fonctions bibliothèque C standard]]) de la bibliothèque C sur lesquelles FreeBASIC s'appuie. Ce qui est légèrement plus rapide et ajoute quelques fonctionnalités à la méthode ci-dessus et reste bien portable. Les fichiers ouverts sont identifiés par des pointeurs de fichiers, comme dans le langage C, ce qui est à nouveau propre à cette méthode d'accès. La fonction ##[[KeyPgFileattr FileAttr]]## peut être utilisée pour retourner un pointeur flux E/S à partir d'un numéro de fichier comme dans le 1. ci-dessus. -3. Using the C low-level I/O functions like _open, _read, _write, _close (see Low Level I/O in [[ProPgCruntime C Standard Library Functions]]). Those functions should be portable, but so far headers are available for ""Win32"" only, so code using them will not compile to any other platform by now. +3. En utilisant les fonctions E/S, de bas niveau, du langage C comme _open, _read, _write, _close (voir E/S bas niveau dans [[ProPgCruntime Fonctions bibliothèque C standard]]). Ces fonctions doivent être portables, mais jusqu'à présent, les en-têtes ne sont disponibles que pour Win32 seulement, donc le code qu'elles utilisent ne sera pas compilé sur d'autres plates-formes, pour le moment. -4. Talk directly to the OS kernel (DOS: use DOS and DPMI INT's , ""Win32"": use API calls like ""CreateFile"", ""WriteFile""). This is no longer portable. Files are identified by handles generated by and specific to the OS kernel. +4. En parlant directement au noyau OS (DOS: utilisez DOS et DPMI INT's , Win32: utilisez les appels API comme CreateFile, WriteFile). Ce n'est pas portable. Les fichiers sont identifiés par des "handles" (identificateurs) générés en propre par le noyau de l'OS. -This example shows and compares methods 1. and 2. described above, and reports the values returned by the functions used. It expects 2 commandline arguments, providing names of 2 **different** files with same size allows to compare the reading performance (make sure the file cache is empty before starting test) : +Cet exemple montre et compare les méthodes 1. et 2. décrites ci-dessus et rapporte les valeurs retournées par les fonctions utilisées. On attend 2 arguments de ligne de commande, fournissant les noms de 2 fichiers **différents** de la même taille ce qui permet de comparer le rendement en lecture (Assurez-vous que le cache des fichiers est vide avant de commencer le test) : {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/fileio/basicvsc.bas"}}%%(freebasic) @@ -98,11 +98,11 @@ ENDIF DEALLOCATE(BUF): SLEEP 1000 '' Crucial END -%% +%% {{fbdoc item="see"}} - - [[CatPgFile File I/O Functions]] - - [[ProPgCruntime C Standard Library Functions]] - - [[KeyPgGetfileio Get (File I/O command)]] + - [[CatPgFile Fonctions d'E/S fichiers]] + - [[ProPgCruntime Fonctions de la bibliothèque C standard]] + - [[KeyPgGetfileio Get (Commande E/S fichiers)]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgFixLenArrays.wakka b/fbdocs/manual/cache/ProPgFixLenArrays.wakka index a64e6a8770..7f1a9b6e83 100644 --- a/fbdocs/manual/cache/ProPgFixLenArrays.wakka +++ b/fbdocs/manual/cache/ProPgFixLenArrays.wakka @@ -1,13 +1,13 @@ {{fbdoc item="title" value="Fixed-length Arrays"}}---- -Fixed-size homogeneous data structures. +Structures de taille fixe de données homogènes. -{{fbdoc item="section" value="Overview"}} - Fixed-length arrays are [[ProPgArrays arrays]] that have a fixed constant size throughout the execution of a program. The memory used by a fixed-length array to store its elements is allocated at compile-time, either on the stack or in the ##.BSS## or ##.DATA## sections of the executable, depending on whether ##[[KeyPgStatic Static]]## was used to define it. This may allow for quicker program execution since the memory for the array is already allocated, unlike [[ProPgVarLenArrays variable-length arrays]], whose element memory isn't allocated until runtime. +{{fbdoc item="section" value="Vue d'ensemble + Les tableaux de longueur fixe sont des [[ProPgArrays tableaux]] qui ont une taille fixée constante tout au long de l'exécution d'un programme. La mémoire utilisée par un tableau de longueur fixe pour stocker ses éléments est allouée au moment de la compilation, soit sur la pile ou dans les sections ##.BSS## ou ##.DATA## de l'exécutable, selon que ##[[KeyPgStatic Static]]## a été utilisé pour le définir. Cela peut permettre l'exécution rapide du programme depuis la mémoire pour le tableau s'il est déjà alloué, contrairement aux [[ProPgVarLenArrays tableaux de longueur variable]], dont les éléments ne sont pas alloués en mémoire avant l'exécution. - Fixed-length arrays with //[[ProPgStorageClasses automatic storage]]//, have their elements allocated on the program stack, and pointers to these elements remain valid only while the array is in scope. The elements of fixed-length arrays with //[[ProPgStorageClasses static storage]]// are allocated in the ##.DATA## or ##.BSS## sections of the executable, depending on whether or not they are initialized when defined, so pointers to these elements remain valid for the entire execution of the program. Fixed-length arrays of any storage class cannot be resized during program execution, only [[ProPgVarLenArrays variable-length arrays]] can. + Les tableaux de longueur fixe avec //[[ProPgStorageClasses stockage automatique]]//, ont leurs éléments alloués sur la pile du programme et les pointeurs vers ces éléments restent valide seulement quand le tableau est dans la portée. Les éléments des tableaux de longueur fixe avec //[[ProPgStorageClasses stockage statique]]// ont allouées dans les sections ##.DATA## ou ##.BSS## de l'exécutable, en fonction de leur initialisation ou non lors de leur définition, de sorte que les pointeurs vers ces éléments restent valables pour toute l'exécution du programme. Les tableaux de longueur fixe de toute classe de stockage ne peuvent pas être redimensionnés lors de l'exécution du programme, seuls [[ProPgVarLenArrays les tableaux de longueur variable]] le peuvent. -{{fbdoc item="section" value="Declaration and definition"}} - A fixed-length array is declared with the ##[[KeyPgExtern Extern]]## keyword, followed by a variable identifier, a parenthesized list of one (1) or more subscript ranges and an element [[CatPgStdDataTypes datatype]]. For an array to be declared fixed-length, either numerical literals, ##[[KeyPgConst Const]]## variables or ##[[KeyPgEnum Enum]]## enumerators can be used as subscript range values. +{{fbdoc item="section" value="Déclaration et définition + Un tableau de longueur fixe est déclarée avec le mot-clé ##[[KeyPgExtern Extern]]##, suivi par un identifiant de variable, une liste entre parenthèses d'un (1) (ou plus) intervalle(s) d'indices et un élément d'un certain [[CatPgStdDataTypes type de données]]. Pour un tableau qui doit être déclaré de longueur fixe, soit des variables littérales numériques ##[[KeyPgConst Const]]## ou des énumérateurs ##[[KeyPgEnum Enum]]## peuvent être utilisés comme valeurs de la plage d'indices. {{fbdoc item="filename" value="examples/manual/proguide/arrays/fixedlen_1.bas"}}%%(freebasic) const maxLowerBound as integer = -5 @@ -20,7 +20,7 @@ extern arrayOfStrings(maxLowerBound to maxUpperBound, 20) as string '' big enough to hold an INTEGER.. extern arrayOfBytes(sizeof(integer)) as byte %% - A fixed-length array is defined with either the ##[[KeyPgStatic Static]]## or ##[[KeyPgDim Dim]]## keywords, following the same form as declaration. + Un tableau de longueur fixe est défini avec l'un ou l'autre des mots-clefs ##[[KeyPgStatic Static]]## ou ##[[KeyPgDim Dim]]##, en suivant la même forme que la définition. {{fbdoc item="filename" value="examples/manual/proguide/arrays/fixedlen_2.bas"}}%%(freebasic) '' Defines a one-dimensional fixed-length array of type SHORT having static storage. diff --git a/fbdocs/manual/cache/ProPgHeaderFiles.wakka b/fbdocs/manual/cache/ProPgHeaderFiles.wakka index 80b6a4079c..04893b5289 100644 --- a/fbdocs/manual/cache/ProPgHeaderFiles.wakka +++ b/fbdocs/manual/cache/ProPgHeaderFiles.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Header Files (.bi)"}}---- -Provides an interface for a module. +Fournit une interface pour un module. -A header file is a special kind of source file that typically only contains preprocessor statements, defines, declarations, prototypes, constants, enumerations, or similar types of statements, however, a header file can contain any valid source code if the purpose suits. What makes them different from other module (.bas) source files, is instead of being compiled directly, they are included by another source file (module or header) using the ##[[KeyPgInclude #include]]## preprocessor directive. All compiled libraries typically have one or more header files that can be included in another source file and will introduce to the compiler all the names of the procedures usable in a particular library. +Un fichier d'en-tête est un type spécial de fichier source qui généralement ne contient que des déclarations pré-processeur, des définitions, des déclarations, des prototypes, des constantes, des énumérations ou des types similaires de déclarations; cependant, un fichier d'en-tête peut contenir n'importe quel code source valable si cela est nécessaire. Ce qui les rend différents des des fichiers source (. bas) , c'est d'être compilés directement, ils sont inclus par un autre fichier source (module ou en-tête) en utilisant la directive ##[[KeyPgInclude #include]]## du préprocesseur. Toutes les bibliothèques compilées ont généralement un (ou plusieurs) fichier(s) en-tête qui peut être inclus dans un autre fichier source et fera découvrir au compilateur tous les noms des procédures utilisables dans une bibliothèque particulière. -{{fbdoc item="section" value="FreeBASIC Header Files"}} - Some of the keywords, constants, and procedures documented in this manual are not normally available when compiling a source code unless a specific header file is included in the source first. +{{fbdoc item="section" value="Fichiers d'en-tête FreeBasic + Quelques-uns des mots-clés, des constantes et des procédures documentées dans ce manuel ne sont normalement pas disponibles lors de la compilation d'un code source, sauf si un fichier en-tête spécifique est inclus dans la première source. - ##datetime.bi## - ##dir.bi## - ##fbgfx.bi## @@ -12,20 +12,20 @@ A header file is a special kind of source file that typically only contains prep - ##string.bi## - ##vbcompat.bi## -{{fbdoc item="section" value="Case Sensitivity"}} - Although the FreeBASIC language itself is not case-sensitive, the file system on which it is running might be. If a header file can not be found, check that FreeBASIC is searching for it the correct location and ensure that name of both the directory and filename of the header file specified in the ##[[KeyPgInclude #include]]## statement is using the correct upper and lower case letters. +{{fbdoc item="section" value="Sensibilité à la casse + Bien que la langage FreeBasic lui-même, ne soit pas sensible à la casse, le système de fichiers sur lequel il est exécuté peut l'être. Si un fichier d'en-tête ne peut pas être trouvé, vérifiez que FreeBasic le recherche au bon endroit et vérifiez que les noms du répertoire et du fichier en-tête spécifiés dans la déclaration ##[[KeyPgInclude #include]]## utilise correctement les lettres majuscules et minuscules. -{{fbdoc item="section" value="Path Separators"}} - FreeBASIC will automatically switch backslash ( \ ) and forward slash ( / ) characters as needed for a given platform. This allows source code to be easily cross compatible. +{{fbdoc item="section" value="Séparateurs de chemin + FreeBasic passera automatiquement aux caractères barre oblique inverse (\) et barre oblique (/) en fonction de la plate-forme utilisée. Cela permet aux codes source d'être facilement compatibles entre eux. -{{fbdoc item="section" value="Including a header only once"}} - It is common that header files need to ##[[KeyPgInclude #include]]## other header files to compile correctly. FreeBASIC offers three methods for guarding against including a header file more than once. - - ##[[KeyPgPpifndef #ifndef]]## guards in the header file - - ##[[KeyPgInclude #include]] **once**## where the file is included - - ##[[KeyPgPragma #pragma]] **once**## in the header file itself +{{fbdoc item="section" value="Inclure une seule fois un fichier en-tête + Il est fréquent que des fichiers d'en-tête doivent ##[[KeyPgInclude #include]]## d'autres fichiers d'en-tête pour être compilés correctement. FreeBasic propose trois méthodes pour se prémunir contre l'inclusion multiple d'un fichier d'en-tête. + - ##[[KeyPgPpifndef #ifndef]]##: vérifie et limite l'inclusion du fichier d'entête + - ##[[KeyPgInclude #include]]##: le fichier est inclus **une fois** dans le fichier où on se trouve + - ##[[KeyPgPragma #pragma]]##: le fichier est inclus **une fois** dans le fichier d'en-tête lui-même -{{fbdoc item="section" value="#ifndef guards in the header file"}} - The use of ##[[KeyPgPpifndef #ifndef]]## and ##[[KeyPgPpdefine #define]]## is a common practice in nearly any language that supports preprocessing. The first time a file is included, a unique symbol is defined. The next time the same header file is included, the definition of the symbol is checked, and if it is already defined, the contents of the header file are skipped. +{{fbdoc item="section" value="#ifndef surveille l'inclusion du fichier d'entête + L'utilisation de ##[[KeyPgPpifndef #ifndef]]## et ##[[KeyPgPpdefine #define]]## est une pratique courante dans tout langage supportant le traîtement du préprocesseur. La première fois qu'un fichier est inclus, un symbole unique est défini. Lorsque le même fichier d'en-tête est inclus à nouveau, la définition du symbole est vérifiée et si elle est déjà définie, le contenu du fichier d'en-tête est ignoré. %%(freebasic) '' header.bi #ifndef __HEADER_BI__ @@ -38,8 +38,8 @@ A header file is a special kind of source file that typically only contains prep #endif %% -{{fbdoc item="section" value="#include once"}} - At the point in the source code where the header file is included, the optional ##"once"## specifier of the ##[[KeyPgInclude #include]]## directive can tell the compiler to only include the source file one time. +{{fbdoc item="section" value="#include une seule fois + Dans le code source, à l'endroit où le fichier d'en-tête est inclus, le spécificateur facultatif ##"once"## de la directive ##[[KeyPgInclude #include]]## peut indiquer au compilateur de n'inclure qu'une seule fois le fichier source. %%(freebasic) '' header.bi #include once "fbgfx.bi" @@ -50,8 +50,8 @@ A header file is a special kind of source file that typically only contains prep #include once "header.bi" %% -{{fbdoc item="section" value="#pragma once"}} - ##[[KeyPgPragma #pragma]] **once**## can be used in a header file to indicate that the header file should only be included once. +{{fbdoc item="section" value="#pragma une seule fois + ##[[KeyPgPragma #pragma]] **once**## peut être utilisé pour indiquer que le fichier d'en-tête ne doit être inclus qu'une seule fois. %%(freebasic) '' header.bi #pragma once @@ -59,7 +59,7 @@ A header file is a special kind of source file that typically only contains prep %% {{fbdoc item="see"}} - - [[ProPgSourceFiles Source Files (.bas)]] - - [[ExtLibTOC Header Files Index]] + - [[ProPgSourceFiles Les fichiers sources (.bas)]] + - [[ExtLibTOC Index des fichiers d'en-tête]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgHelloWorld.wakka b/fbdocs/manual/cache/ProPgHelloWorld.wakka index 2fc14d3d53..1838a05a3d 100644 --- a/fbdocs/manual/cache/ProPgHelloWorld.wakka +++ b/fbdocs/manual/cache/ProPgHelloWorld.wakka @@ -1,30 +1,30 @@ {{fbdoc item="title" value="Hello World"}}---- -This example is a classic in any programming language. +Cet exemple est un classique dans n'importe quel langage de programmation. -More as a sanity check than anything else, a good place to start with any programming language is to try a very simple program to test that the compiler is installed correctly and that a valid executable can be made. +Plus comme un test de cohérence qu'autre chose, une bonne façon de commencer avec n'importe quel langage de programmation est d'essayer un programme très simple pour vérifier que le compilateur est correctement installé et qu'un exécutable valide peut être produit. -Open up any editor capable of saving text files and type in the following source code: +Ouvrez n'importe quel éditeur capable d'enregistrer des fichiers texte et tapez le code source suivant: {{fbdoc item="filename" value="examples/manual/proguide/helloworld.bas"}}%%(freebasic) print "Hello World" %% -Save the file with a '##.bas##' extension. For example '##hello.bas##' +Enregistrez le fichier avec une extension '##.bas##'. Par exemple '##hello.bas##' -From a command prompt or shell in the directory where '##hello.bas##' was saved, type the following command: +A partir de l'invite de commande shell ou dans le répertoire où '##hello.bas##' a été enregistré, tapez la commande suivante: %% fbc hello.bas -%% -Depending on the operating system, this should create an executable file in the same directory as '##hello.bas##'. It might be named '##hello.exe##' or '##./hello##', for example. +%%Selon le système d'exploitation, cela devrait créer un fichier exécutable dans le même répertoire que '##hello.bas##'. Il pourrait être nommé '##hello.exe##' ou '##./hello##', par exemple. +Exécutez le fichier exécutable et vous devriez avoir le résultat suivant: -Run the executable, and we should have the following output: %% Hello World %% - {{fbdoc item="see"}} - - [[CompilerFAQ Freebasic FAQ]] - - [[CompilerFeatures Main Features]] - - [[CompilerRequirements Requirements]] - - [[CompilerInstalling Installing]] + +- [[CompilerFAQ FAQ Freebasic]] + - [[CompilerFeatures Principales caractéristiques]] + - [[CompilerRequirements Exigences]] + - [[CompilerInstalling Installation]] + - [[CompilerRunning Fonctionnement]] - [[CompilerRunning Running]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgIdentifierRules.wakka b/fbdocs/manual/cache/ProPgIdentifierRules.wakka index 64fc233d6a..5b70e27392 100644 --- a/fbdocs/manual/cache/ProPgIdentifierRules.wakka +++ b/fbdocs/manual/cache/ProPgIdentifierRules.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Identifier Rules"}}---- -Naming conventions for FreeBASIC symbols. +Conventions de nommage pour les symboles FreeBasic. {{fbdoc item="desc"}} - An identifier is a symbolic name which uniquely identifies a [[ProPgVariables variable]], ##[[KeyPgType Type]]##, ##[[KeyPgUnion Union]]##, ##[[KeyPgEnum Enum]]##, ##[[KeyPgFunction Function]]##, ##[[KeyPgSub Sub]]##, or ##[[KeyPgProperty Property]]##, within its [[ProPgVariableScope scope]] or ##[[KeyPgNamespace Namespace]]##. + Un identificateur est un nom symbolique qui identifie de manière unique une [[ProPgVariables variable]], un ##[[KeyPgType Type]]##, une ##[[KeyPgUnion Union]]##, une ##[[KeyPgEnum Enum]]##, une ##[[KeyPgFunction Function]]##, une ##[[KeyPgSub Sub]]## ou ##[[KeyPgProperty Property]]##, dans sa [[ProPgVariableScope portée]] ou son ##[[KeyPgNamespace espace de noms]]##. - Identifiers may contain only uppercase and lowercase Latin characters ##a##-##z## and ##A##-##Z##), digits (##0##-##9##), and the underscore character (##_##). The first character of an identifier must be a letter or underscore, not a digit. + Les identificateurs ne peuvent contenir que des lettres majuscules et minuscules en caractères Latin (##a##-##z## et ##A##-##Z##), les chiffres (##0##-##9##) et le caractère de soulignement (##_##). Le premier caractère d'un identificateur doit être une lettre ou un trait de soulignement, pas un chiffre. - Identifiers are case-insensitive: ##FOO## and ##foo## (and all other permutations of uppercase and lowercase) refer to the same symbol. + Les identifiants ne sont pas sensibles à la casse: ##FOO## et ##foo## (et toutes les autres permutations de lettres majuscules et minuscules) se réfèrent à un même symbole. - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, identifiers may have a type suffix at the end indicating one of the standard data types: + Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les identificateurs peuvent avoir un suffixe de type indiquant l'un des types de données standard: - ##%## for ##[[KeyPgInteger Integer]]## - ##&## for ##[[KeyPgLong Long]]## @@ -16,17 +16,17 @@ Naming conventions for FreeBASIC symbols. - ##### for ##[[KeyPgDouble Double]]## - ##$## for ##[[KeyPgString String]]## - The use of these symbols is generally discouraged in and is not allowed in the //[[CompilerOptlang -lang fb]]// dialect (the default). + L'utilisation de ces symboles est généralement déconseillée et n'est pas autorisée dans le dialecte //[[CompilerOptlang -lang fb]]// (par défaut). - The alternative is to be explicit - for example, ##Dim As Integer foo## or ##Dim foo As Integer## instead of ##Dim foo%##. + L'alternative est d'être explicite - par exemple, ##Dim As Integer foo## ou ##Dim foo As Integer## au lieu de ##Dim foo%##. - In the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects, identifiers may contain one or more periods (##.##). + Dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//, les identificateurs peuvent contenir un ou plusieurs points (##.##). {{fbdoc item="lang"}} - - Periods in symbol names are only supported in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects. + - Les points dans les noms des symboles sont pris en charge uniquement dans les dialectes //[[CompilerOptlang -lang qb]]// et //[[CompilerOptlang -lang fblite]]//. {{fbdoc item="diff"}} - - Support for the underscore character (##_##) in symbol names is new to ""FreeBASIC"". + - Le support du caractère de soulignement (##_##) dans les noms de symboles est nouveau pour FreeBasic. {{fbdoc item="see"}} - [[ProPgVariables Variables]] diff --git a/fbdocs/manual/cache/ProPgImplicitdeclarations.wakka b/fbdocs/manual/cache/ProPgImplicitdeclarations.wakka index ac05ee74a9..0ad3dbb85c 100644 --- a/fbdocs/manual/cache/ProPgImplicitdeclarations.wakka +++ b/fbdocs/manual/cache/ProPgImplicitdeclarations.wakka @@ -1,34 +1,34 @@ {{fbdoc item="title" value="Implicit Declarations"}}---- -Lazy declaration of variables. +Déclarations "rapides" de variables. - The //[[CompilerOptlang qb]]// and //[[CompilerOptlang fblite]]// ""FreeBASIC"" language dialects allow variable names to be used without declaring them first. This is called implicit or lazy declaration since the actual declaration is inferred from how the name is first used. + Les dialectes //[[CompilerOptlang qb]]// et //[[CompilerOptlang fblite]]// du langage FreeBASIC permettent aux noms des variables d'être utilisés sans les déclarer au préalable. C'est ce qu'on appelle une déclaration implicite ou "lazy" puisque la déclaration réelle est déduite de la façon dont le nom est d'abord utilisé. -{{fbdoc item="section" value="Variable Type"}} +{{fbdoc item="section" value="Type de variable - When a variable is implicitly declared, its type depends on one of two things: the most recent default implicit type directive, if any, or the variable type suffix symbol used, if any. + Quand une variable est implicitement déclarée, son type dépend de deux choses: la directive de type implicite par défaut, s'il y en a une, ou le suffixe de type de variable utilisé, s'il existe. - {{fbdoc item="subsect" value="Default type"}} + {{fbdoc item="section" value="Type par défaut - In the //[[CompilerOptlang qb]]// dialect, implicitly declared variables default to ##[[KeyPgSingle Single]]## type, while in the //[[CompilerOptlang fblite]]// dialect they default to ##[[KeyPgInteger Integer]]## type. + Dans le dialecte //[[CompilerOptlang qb]]//, les variables déclarées implicitement sont par défaut de type ##[[KeyPgSingle Single]]##, alors que dans le dialecte //[[CompilerOptlang fblite]]// elles prennent par défaut le type ##[[KeyPgInteger Integer]]##. - {{fbdoc item="subsect" value="Default implicit type directives"}} + {{fbdoc item="section" value="Directives implicites de type par défaut - "##DEFxxx##" directives dictate the new default type for any following implicit variable declarations. These directives are: ##[[KeyPgDefbyte DefByte]]##, ##[[KeyPgDefubyte DefUByte]]##, ##[[KeyPgDefshort DefShort]]##, ##[[KeyPgDefushort DefUShort]]##, ##[[KeyPgDefint DefInt]]##, ##[[KeyPgDefuint DefUInt]]##, ##[[KeyPgDeflng DefLng]]##, ##[[KeyPgDefsng DefSng]]##, ##[[KeyPgDefdbl DefDbl]]## and ##[[KeyPgDefstr DefStr]]##. + Les directives "##DEFxxx##" dictent le nouveau type par défaut pour toutes les déclarations implicites de variables qui les suivent. Ces directives sont: ##[[KeyPgDefbyte DefByte]]##, ##[[KeyPgDefubyte DefUByte]]##, ##[[KeyPgDefshort DefShort]]##, ##[[KeyPgDefushort DefUShort]]##, ##[[KeyPgDefint DefInt]]##, ##[[KeyPgDefuint DefUInt]]##, ##[[KeyPgDeflng DefLng]]##, ##[[KeyPgDefsng DefSng]]##, ##[[KeyPgDefdbl DefDbl]]## et ##[[KeyPgDefstr DefStr]]##. - {{fbdoc item="subsect" value="Variable type suffix symbols"}} + {{fbdoc item="section" value="Suffixes symboles de types de variables - Variable names suffixed with one of a certain set of symbols will be implicitly declared of a certain type. These symbols are: ##'%'## for ##[[KeyPgInteger Integer]]##, ##'&'## for ##[[KeyPgLong Long]]##, ##'!'## for ##[[KeyPgSingle Single]]##, ##'#'## for ##[[KeyPgDouble Double]]## and ##'$'## for ##[[KeyPgString String]]##. These symbols override previous "##DEFxxx##" directives, if any. + Les variables dont le nom a un suffixe (d'un certain ensemble de symboles) seront implicitement déclarées d'un certain type. Ces symboles sont: ##'%'## pour ##[[KeyPgInteger Integer]]##, ##'&'## pour ##[[KeyPgLong Long]]##, ##'!'## pour ##[[KeyPgSingle Single]]##, ##'#'## pour ##[[KeyPgDouble Double]]## et ##'$'## pour ##[[KeyPgString String]]##. Ces de symboles remplacent les directives "##DEFxxx##" précédentes, s'il y en avait. -{{fbdoc item="section" value="Implicit Array Declaration"}} +{{fbdoc item="section" value="Déclaration implicite de tableau - Currently, ""FreeBASIC"" does not support implicit declaration of arrays. + Actuellement, FreeBasic ne supporte pas les déclarations implicites de tableaux. -{{fbdoc item="section" value="Debugging"}} +{{fbdoc item="section" value="Débogage - For full debugging support, all variables must be explicitly declared and suffixes should not be used. The use of ##[[KeyPgOptionexplicit Option Explicit]]## is recommended to turn of support for implicit declarations, so that mistyped variable names are caught at compile time by the compiler. + Pour le support complet du débogage, toutes les variables doivent être explicitement déclarées et les suffixes ne doivent pas être utilisés. L'utilisation de ##[[KeyPgOptionexplicit Option Explicit]]## est recommandée pour désactiver le support des déclarations implicites, de sorte que les noms de variables mal écrits sont pris au moment de la compilation. {{fbdoc item="see"}} - ##[[KeyPgOptionexplicit Option Explicit]]## - - [[CompilerOptlang FreeBASIC Language Dialects]] + - [[CompilerOptlang Les dialectes du langage FreeBasic]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgInitialization.wakka b/fbdocs/manual/cache/ProPgInitialization.wakka index 8f1be6ec0e..a30398eb31 100644 --- a/fbdocs/manual/cache/ProPgInitialization.wakka +++ b/fbdocs/manual/cache/ProPgInitialization.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Variable Initializers"}}---- -Variable initializers are supported for initializing Arrays, variables and UDTs. +Les initialiseurs de variables sont servent à initialiser des tableaux, des variables et des types définis par l'utilisateur. {{fbdoc item="syntax"}}## [[KeyPgDim Dim]] //scalar_symbol// [AS [[DataType DataType]]] = //expression// @@ -7,16 +7,16 @@ Variable initializers are supported for initializing Arrays, variables and UDTs. [[KeyPgDim Dim]] //udt_symbol// AS [[DataType DataType]] = ( //expression// [, ...] ) ## {{fbdoc item="desc"}} - Arrays, variables and UDTs may be given a value at the time of their declaration using ##[[KeyPgDim Dim]]##, with the syntax shown above. Please note the important differences between initializing different types. Scalar variables are initialized as they would in a normal assignment, using an equals sign. UDTs and arrays are assigned with an equal sign followed by a greater than symbol (=>). Array values are given in comma delimited values enclosed by curly brackets, and UDT values are given in comma delimited values enclosed by parenthesis. + Les tableaux, les variables et les types définis par l'utilisateur peuvent recevoir une valeur lors de leur déclaration en utilisant ##[[KeyPgDim Dim]]##, avec la syntaxe ci-dessus. S'il vous plaît, notez les différences importantes entre les différents types d'initialisation. Les variables scalaires sont initialisées comme dans une affectation normale, en utilisant un signe égal. Les types définis par l'utilisateur et les tableaux sont assignés à l'aide d'un signe égal suivi d'un signe plus grand que (=>). Les valeurs d'un tableau sont données par des valeurs séparées par des virgules délimitées par des accolades, et les valeurs des types définis par l'utilisateur sont indiquées par des valeurs séparées par des virgules délimitées par des parenthèses. - These methods of initializing variables can be nested within one another for complex assignments. For instance, to initialize a multidimensional array: + Ces méthodes d'initialisation des variables peuvent être imbriquées les unes dans les autres pour les tâches complexes. Par exemple, pour initialiser un tableau multi-dimensionnel: {{fbdoc item="filename" value="examples/manual/proguide/init/array.bas"}}%%(freebasic) DIM array(1 to 2, 1 to 5) as Integer => {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}} %% - In this declaration, the values for the left-most dimension are given as 5-index arrays. Nesting allows for arrays of any dimension to be initialized. + Dans cette déclaration, les valeurs pour la dimension la plus à gauche sont données sous forme de tableaux d'index 5. L'imbrication permet d'initialiser les tableaux de n'importe quelles dimensions. - UDTs and arrays can be nested within each other as well. For instance, the following code declares and initializes an array of UDTs. + Les types définis par l'utilisateur et les tableaux peuvent aussi être imbriqués les uns dans les autres. Par exemple, le code suivant déclare et initialise un tableau de types définis par l'utilisateur. {{fbdoc item="filename" value="examples/manual/proguide/init/udtarray.bas"}}%%(freebasic) Type mytype @@ -31,10 +31,10 @@ Dim MyVar(2) As mytype => _ (2.0, 2, @"GoodBye") _ } %% - For module-level, static, or global variables, initialized values must be constant expressions. FreeBASIC will report a compile-time error if otherwise. + Pour les variables statiques ou globales, au niveau module , les valeurs d'initialisation doivent être des expressions constantes. Autrement, FreeBasic signale une erreur de compilation. {{fbdoc item="diff"}} - - Variable Initializers are new to ""FreeBASIC"" + - Les initialiseurs de variables sont nouveau pour FreeBASIC {{fbdoc item="see"}} - ##[[KeyPgDim Dim]]## diff --git a/fbdocs/manual/cache/ProPgLabels.wakka b/fbdocs/manual/cache/ProPgLabels.wakka index ca8ff07598..a4b474d88c 100644 --- a/fbdocs/manual/cache/ProPgLabels.wakka +++ b/fbdocs/manual/cache/ProPgLabels.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Labels"}}---- -Defines a location in a program. +Définit un emplacement dans un programme. {{fbdoc item="syntax"}}## //symbolname// **:** - //or// + //ou// //literalnumber// ## {{fbdoc item="desc"}} - Defines a place in a program where ##[[KeyPgGoto Goto]]## or ##[[KeyPgGosub Gosub]]## can jump to. + Définit une place dans un programme où ##[[KeyPgGoto Goto]]## ou ##[[KeyPgGosub GoSub]]## peut sauter directement. - A label can be a positive integer line number or a ##//symbolname//##. In both cases, the label must start at the first column of line. A ##//symbolname//## label must end with a colon (:) character. + Une étiquette peut être un numéro entier positif de ligne ou un ##//symbolname//##. Dans les deux cas, l'étiquette doit commencer à la première colonne de la ligne. Un ##//symbolname//## doit se terminer par un caractère "deux-points" (:). {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/proguide/labels/labels_1.bas"}}%%(freebasic) @@ -37,16 +37,16 @@ Data 1,2,3,4,5 here: Data 6,7,8 %% -Output: +Affichage: %% 1,2,3,6,7 %% {{fbdoc item="lang"}} - - Line numbers with decimals is available only in the //[[CompilerOptlang -lang qb]]// dialect. + - Les numéros de ligne avec des décimaux sont disponibles uniquement avec le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="diff"}} - - None if compiled in the //[[CompilerOptlang -lang qb]]// dialect. + - Aucune si compilé dans le dialecte //[[CompilerOptlang -lang qb]]//. {{fbdoc item="see"}} - ##[[KeyPgGosub Gosub]]## diff --git a/fbdocs/manual/cache/ProPgLiterals.wakka b/fbdocs/manual/cache/ProPgLiterals.wakka index 78dc110eb4..57416ad513 100644 --- a/fbdocs/manual/cache/ProPgLiterals.wakka +++ b/fbdocs/manual/cache/ProPgLiterals.wakka @@ -1,55 +1,55 @@ {{fbdoc item="title" value="Literals"}}---- -Non-variable compile-time string and numeric values. +Chaîne non-variable non-compilable et valeurs numériques. -Literals are numbers or strings of characters specified directly in the source code. Literal values may be used by assigning them to a variable or constant, passing them to a procedure, or using them in an expression. +Les littéraux sont des nombres ou des chaînes de caractères spécifiés directement dans le code source. Les valeurs littérales peuvent être utilisées en les assignant à une variable ou une constante, en les passant à une procédure ou en les utilisant dans une expression. -Numeric literals come in two forms - integer and floating-point. +Les littéraux numériques existent sous deux formes - nombres entiers et à virgule flottante. -{{fbdoc item="section" value="Integer Literals"}} +{{fbdoc item="section" value="Littéraux entiers - __Decimal__ - Decimal digits ( ##0 1 2 3 4 5 6 7 8 9## ). - //Note: to get negative values, a "##-##" sign (##[[KeyPgOpNegate Operator - (Negate)]]##) can be placed before a numeric literal// + Décimal + Les chiffres de décimaux ( ##0 1 2 3 4 5 6 7 8 9## ). + //Note: pour obtenir des valeurs négatives, un signe "##-##" (##[[KeyPgOpNegate Opérateur - (Négation)]]##) peut être placé devant un littéral numérique// {{fbdoc item="filename" value="examples/manual/proguide/literals/dec.bas"}}%%(freebasic) Dim x as integer = 123456 Dim b as byte = -128 %% - __Hexadecimal__ - "##&H##", followed by hexadecimal digits ( ##0 1 2 3 4 5 6 7 8 9 A B C D E F## ). + Hexadécimal + "##&H##", suivi de chiffres hexadécimaux ( ##0 1 2 3 4 5 6 7 8 9 A B C D E F## ). {{fbdoc item="filename" value="examples/manual/proguide/literals/hex.bas"}}%%(freebasic) Dim x As Integer = &h1E240 Dim b As Byte = &H80 %% - __Octal__ - "##&O##" ( O as in "Octal" ), followed by octal digits ( ##0 1 2 3 4 5 6 7## ) + Octal + "##&O##" ( O comme dans "Octal" ), suivi de chiffres octals ( ##0 1 2 3 4 5 6 7## ) {{fbdoc item="filename" value="examples/manual/proguide/literals/oct.bas"}}%%(freebasic) Dim x as integer = &O361100 Dim b as byte = &O400 %% - __Binary__ - "##&B##", followed by binary digits ( ##0 1## ) + Binaire + "##&B##", suivi de chiffres binaires ( ##0 1## ) {{fbdoc item="filename" value="examples/manual/proguide/literals/bin.bas"}}%%(freebasic) Dim x as integer = &B11110001001000000 Dim b as byte = &B10000000 %% -{{fbdoc item="section" value="Integer size suffixes"}} - If an integer literal suffix is not given, the number field size required to hold the literal is automatically calculated. Specifying a size suffix guarantees that the compiler will consider a number as a specific integer size. +{{fbdoc item="section" value="Suffixes de taille d'un entier + Si aucun suffixe littéral d'entier n'est donné, la dimension du champ du nombre requis pour contenir le littéral est automatiquement calculée. La spécification d'un suffixe de taille garantit que le compilateur examinera le nombre comme un entier de taille spécifique. - Integer literals ending with: - - "##L##", "##%##", are considered as signed 32 bit integers. (##[[KeyPgInteger Integer]]##) - - "##&##", are considered as signed 32 bit long integers. (##[[KeyPgLong Long]]##) - - "##U##", "##UL##", are considered as unsigned 32 bit integers. (##[[KeyPgUinteger Uinteger]]##) - - "##LL##", are considered as signed 64 bit integers. (##[[KeyPgLongint Longint]]##) - - "##ULL##", are considered as unsigned 64 bit integers. (##[[KeyPgUlongint Ulongint]]##) + Les entiers littéraux se terminant par: + - "##L##", "##%##", sont considérés comme des entiers 32 bits signés. (##[[KeyPgInteger Integer]]##) + - "##&##", sont considérés comme des entiers longs 32 bits signés. (##[[KeyPgLong Long]]##) + - "##U##", "##UL##", sont considérés comme des entiers 32 bits non signés. (##[[KeyPgUinteger UInteger]]##) + - "##LL##", sont considérés comme des entiers 64 bits signés. (##[[KeyPgLongint LongInt]]##) + - "##ULL##", sont considérés comme des entiers 64 bits non signés. (##[[KeyPgUlongint ULongInt]]##) - The prefixes, suffixes, and hexadecimal letter digits are all case-insensitive. + Les préfixes, les suffixes et les lettres des chiffres hexadécimaux sont tous insensibles à la casse. {{fbdoc item="filename" value="examples/manual/proguide/literals/intsuff.bas"}}%%(freebasic) Dim a as integer = 123L @@ -58,21 +58,21 @@ Dim c as longint = 76543LL Dim d as ulongint = &b1010101ULL %% -{{fbdoc item="section" value="Floating Point Literals"}} - Floating point numbers are specified in decimal digits, may be positive or negative, have a fractional portion, and optionally an exponent. The format of a floating point literal is as follows: +{{fbdoc item="section" value="Littéraux à virgule flottante + Les nombres à virgule flottante sont exprimés avec des chiffres décimaux, ils peuvent être positifs ou négatifs, ont une partie décimale et éventuellement un exposant. Le format d'un littéral à virgule flottante est: - ##""number[.[fraction]][[D|E][[+|-]exponent]][suffix]""## - //or// - ##"".fraction[[D|E][[+|-]exponent]][suffix]""## + ##nombre[.[partie décimale]][[D|E][[+|-]exposant]][suffixe]## + //ou// + ##.partie décimale[[D|E][[+|-]exposant]][suffixe]## - By default, floating point numbers that do not have either an exponent or a suffix are considered as a double precision floating point value, except in the //[[CompilerOptlang -lang qb]]// dialect, where numbers of 7 digits or fewer are considered to be single precision. + Par défaut, les nombres à virgule flottante qui n'ont pas soit un exposant ou un suffixe sont considérés comme ayant une valeur double précision en virgule flottante, sauf dans le dialecte //[[CompilerOptlang -lang qb]]//, où les nombres de 7 chiffres (ou moins) sont considérés comme en simple précision. {{fbdoc item="filename" value="examples/manual/proguide/literals/floats.bas"}}%%(freebasic) Dim a as double = 123.456 Dim b as double = -123.0 %% - The letter "##D##" or "##E##", placed after the number/fraction part, allows the number to be given an exponent. The exponent may be specified as either positive or negative with a plus ("##+##") or minus ("##-##") sign. Exponents that do not have a sign are positive. - An exponent is not required after the letter, so the letter can be used on its own just to specify the type. "##D##" specifies a double-precision floating-point number. "##E##" specifies a floating-point number using the default precision. + La lettre "##D##" ou "##E##", placée après le partie entière/décimale du nombre, permet l'expression du nombre avec un exposant. L'exposant peut être spécifié comme positif ou négatif à l'aide du signe plus ("##+##") ou moins ("##-##"). Les exposants qui n'ont pas un signe sont positifs. + Un exposant n'est pas nécessaire après la lettre si elle est utilisée seule juste pour préciser le type. "##D##" indique un nombre à virgule flottante en double précision. "##E##" spécifie un nombre à virgule flottante utilisant la précision par défaut. {{fbdoc item="filename" value="examples/manual/proguide/literals/dblsuff.bas"}}%%(freebasic) Dim a as double = -123.0d @@ -82,8 +82,8 @@ Dim d as double = 743.1D-13 Dim e as double = 743.1E13 %% - A suffix of "##!##" or "##F##" on a number specifies a single precision (32 bit total) floating point value. A suffix of "##""#""##" specifies a double precision float. - Note that the letter suffixes and exponent specifiers are all case-insensitive. + Un suffixe "##!##" ou "##F##" sur un nombre spécifie une valeur en simple précision (32 bits au total) en virgule flottante. Un suffixe "#####" spécifie une valeur en double précision en virgule flottante. + Notez que les lettres suffixes et les prescripteurs d'exposant sont insensibles à la casse. {{fbdoc item="filename" value="examples/manual/proguide/literals/singsuff.bas"}}%%(freebasic) Dim a as single = 3.1! @@ -92,34 +92,34 @@ Dim c as double = 0# Dim d as double = 3.141592653589e3# %% -{{fbdoc item="section" value="String Literals"}} - String literals are a sequence of characters contained between two double quotes. The sequence of characters escaped or non-escaped. +{{fbdoc item="section" value="Les chaînes littérales + Une chaîne littérale est une séquence de caractères comprise entre deux guillemets doubles. Une séquence de caractères d'échappement ou non. - Double quotes can be specified in the string literal by using two double quotes together. + Les guillemets doubles peuvent être spécifiés dans la chaîne littérale en utilisant deux guillemets doubles ensemble. {{fbdoc item="filename" value="examples/manual/proguide/literals/string.bas"}}%%(freebasic) print "Hello World!" print "That's right!" print "See the ""word"" contained in double quotes." %% - String literals can contain escape sequences if the string literal is prefixed by the ##[[KeyPgOpPpEscape ! operator]]## (Escaped String Literal). See [[TblEscapeSequences Escape Sequences]] for a list of accepted escape sequences. + Une chaîne littérale peut contenir des séquences d'échappement si elle est préfixée par ##[[KeyPgOpPpEscape ! Operator]]## (Echappement chaîne littérale). Voir [[TblEscapeSequences Séquences d'échappement]] pour une liste des séquences d'échappement acceptées. {{fbdoc item="filename" value="examples/manual/proguide/literals/escape.bas"}}%%(freebasic) print !"Hello\nWorld!" %% - By default, string literals are non-escaped unless ##[[KeyPgOptionescape Option Escape]]## was used in the source in which case all string literals following are by default escaped. + Par défaut, les chaînes littérales ne supportent pas les séquences d'échappement sauf si ##[[KeyPgOptionescape Option Escape]]## a été utilisée dans le source; dans ce cas, toutes les chaînes littérales suivantes supporteront les séquences d'échappement. - A string may be explicitly specified as non-escaped when prefixed by the ##[[KeyPgOpPpEscape $ operator]]## (Non-Escaped String Literal). + Une chaîne peut être spécifiée explicitement comme ne supportant pas les séquences d'échappement lorsqu'elle est préfixée par ##[[KeyPgOpPpNoescape $ Operator]]## (Non Echappement chaîne littérale). {{fbdoc item="filename" value="examples/manual/proguide/literals/noescape.bas"}}%%(freebasic) print $"C:\temp" %% - Besides ASCII files with Unicode escape sequences (##\u##), ""FreeBASIC"" can parse UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE source files allowing unicode characters directly in the string literal. + En plus des fichiers ASCII avec des séquences d'échappement Unicode (##\u##), FreeBasic peut analyser les fichiers source UTF-8, UTF-16LE, UTF-16BE, UTF-32LE et UTF-32BE FreeBasic peut analyser source eee fichiers permettant des caractères unicode directement dans la chaîne littérale. {{fbdoc item="see"}} - ##[[KeyPgPpdefine #define]]## - ##[[KeyPgConst Const]]## - - [[CatPgStdDataTypes Standard Data Types]] - - [[TblVarTypes]] Table with variable types overview, limits and suffixes + - [[CatPgStdDataTypes Types de données standard]] + - [[TblVarTypes Tableau des types de variables, leurs limites et leurs suffixes]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgMemberAccessRights.wakka b/fbdocs/manual/cache/ProPgMemberAccessRights.wakka index ae452a58ca..456a42ea6c 100644 --- a/fbdocs/manual/cache/ProPgMemberAccessRights.wakka +++ b/fbdocs/manual/cache/ProPgMemberAccessRights.wakka @@ -1,33 +1,33 @@ {{fbdoc item="title" value="Member Access Rights"}}---- -Restricting member access to certain parts of code. +Restreindre l'accès des membres à certaines parties du code. -{{anchor name="OVERVIEW|Overview"}} -{{anchor name="PUBLIC|Public members"}} -{{anchor name="PROTECTED|Protected members"}} -{{anchor name="PRIVATE|Private members"}} -{{anchor name="CTORDTOR|Constructors and destructors"}} -{{anchor name="INHERITED|Inherited members"}} +[[#OVERVIEW">Vue d'ensemble]] +[[#PUBLIC">Membres publics (Public)]] +[[#PROTECTED">Membres protégés (Protected)]] +[[#PRIVATE">Membres privés (Private)]] +[[#CTORDTOR">Constructeurs et destructeurs]] +[[#INHERITED">Les membres hérités]] -{{anchor name="OVERVIEW"}}{{fbdoc item="section" value="Overview"}} - All members of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## - including member data, procedures, constants, etc. - belong in one of three different classifications, each with its own rules dictating where in code they may be accessed, or referred to. These rules are called access rights. There are public, protected and private members, and they are declared in a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition following a ##[[KeyPgVisPublic Public]]##, ##[[KeyPgVisProtected Protected]]## or ##[[KeyPgVisPrivate Private]]## label, respectively. +{{fbdoc item="section" value="Vue d'ensemble + Tous les membres d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## - inclus les données des membres, les procédures, les constantes, etc. - appartiennent à l'une de trois catégories différentes, chacune avec ses propres règles dictant où dans le code ils pourront être consultés ou référencés. Ces règles sont appelées des droits d'accès. Il y a des membres publics, protégés et privés, et ils sont déclarés dans la définition d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## suivant, respectivement, un label ##[[KeyPgVisPublic Public]]##, ##[[KeyPgVisProtected Protected]]## ou ##[[KeyPgVisPrivate Private]]##. - By default, that is, without an access classification label, members of a ##[[KeyPgType Type]]## are public, and members of a ##[[KeyPgClass Class]]## are private. + Par défaut, sans label de classification d'accès, les membres d'un ##[[KeyPgType Type]]## sont publics, et les membres d'une ##[[KeyPgClass Class]]## sont privés. -~&//Note: As of 02.26.07, inheritance has not been implemented yet. Thus, protected members are supported as a place-holder of sorts. When talking about member access rights, protected members are identical to private members for the time being.// +//Note: Au 02.26.07, l'héritage n'a pas été encore mis en œuvre. Ainsi, les membres protégés sont pris en charge comme un espace réservé de toutes sortes. Quand on parle des droits d'accès sur les membre de procédure, les membres protégés sont identiques aux membres privés pour l'instant.// -{{anchor name="PUBLIC"}}{{fbdoc item="section" value="Public members"}} - Public members can be referred to from anywhere; they are accessible from, for example, member procedures or module-level code or procedures. + + {{fbdoc item="section" value="Membres publics (Public) -{{anchor name="PROTECTED"}}{{fbdoc item="section" value="Protected members"}} - Protected members can only be accessed from member procedures of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they are declared in, or member procedures of a derived ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. They are not accessible to outside code. +On peut faire référence à des membres publics de n'importe quel endroit; ils sont accessibles, par exemple, à partir de membres de procédures, ou de code ou procédures au niveau module. + -{{anchor name="PRIVATE"}}{{fbdoc item="section" value="Private members"}} - Private members can only be accessed from member procedures of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they are declared in. They are not accessible to outside code or member procedures from a derived ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. +{{fbdoc item="section" value="Membres protégés (Protected) + Les membres protégés ne sont accessibles qu'à partir de membres de procédures ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## où ils ont été déclarés, ou des membres de procédures d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]## dérivé(e). Ils ne sont pas accessibles à l'extérieur du code. -{{anchor name="CTORDTOR"}}{{fbdoc item="section" value="Constructors and destructors"}} - Constructors and destructors follow the same rules as any other member. When public, objects can be instantiated and destroyed from anywhere in code. When protected, objects can be instantiated and destroyed only from member procedures of their ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## or a derived ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. Private constructors and destructors restrict object instantiation solely to member procedures of their ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. + + {{fbdoc item="section" value="Membres privés (Private) -{{anchor name="INHERITED"}}{{fbdoc item="section" value="Inherited members"}} - ... +Les membres privés ne sont accessibles qu'à partir de membre de procédures ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## où ils ont été déclarés. Ils ne sont pas accessibles à l'extérieur du code ou de membre de procédures de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]## dérivé(e). + -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file +{{fbdoc item="section" value="Constructeurs et destructeurs \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgMemberProcedures.wakka b/fbdocs/manual/cache/ProPgMemberProcedures.wakka index 48db3ab611..7af1ba9917 100644 --- a/fbdocs/manual/cache/ProPgMemberProcedures.wakka +++ b/fbdocs/manual/cache/ProPgMemberProcedures.wakka @@ -1,29 +1,29 @@ {{fbdoc item="title" value="Member Procedures"}}---- -Procedures with full access to members of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. +Procédures avec un accès complet aux membres d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##. -**{{anchor name="DECL|Declaration and definition"}}** - Declaring and defining member procedures. -**{{anchor name="USAGE|Usage"}}** - Calling member procedures. -**{{anchor name="THIS|The hidden parameter, This"}}** - Implicit access to the instance with which non-static member procedures are called. -**{{anchor name="ACCESS|Access rights"}}** - Referring to other members in member procedures. -**{{anchor name="OVERLOAD|Overloading"}}** - Declaring two or more member procedures with the same name. -**{{anchor name="STATIC|Static member procedures"}}** - Differences from non-static member procedures. +**[[#DECL">Déclaration et définition]]** + Déclarer et définir des membres de procédures. +**[[#USAGE">Usage]]** + Appel de membre de procédure. +**[[#THIS">Le paramètre caché, This]]** + Accès implicite à l'instance avec laquelle un membre de procédure non statique est appelé. +**[[#ACCESS">Les droits d'accès]]** + Faire référence à d'autres membres dans les membres de procédures. +**[[#OVERLOAD">Surcharge]]** + Déclarer deux ou plusieurs membres de procédures portant le même nom. +**[[#STATIC">Membres statiques de procédures]]** + Les différences avec les membres non-statiques de procédures. -~&//The term 'member procedure' refers to both static and non-static member procedures, unless otherwise noted.// +//Le terme 'membre de procédure' fait référence aussi bien aux membres statiques que non-statiques des procédures, sauf indication contraire.// -{{anchor name="DECL"}}{{fbdoc item="section" value="Declaration and definition"}} - Member procedures are declared much like normal module-level procedures except that they are declared within, and defined outside, a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition *. +{{fbdoc item="section" value="Déclaration et définition + Les membres de procédures sont déclarés tout comme les procédures au niveau normal du module sauf qu'ils sont déclarés à l'intérieur, et définis à l'extérieur, d'une définition de ##[[KeyPgType Type]]## ou de ##[[KeyPgClass Class]]## //(voir note *)//. - When defining member procedures, the procedure name is prefixed with the name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## and the member access operator (##[[KeyPgOpMemberAccess Operator . (Member access)]]##). It is an error to define a member procedure without a matching declaration in the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition. + Lors de la définition d'un membre de procédure, the procedure name is prefixed with the name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## and the member access operator (##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##). It is an error to define a member procedure without a matching declaration in the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition. - The following example declares and defines a ##[[KeyPgSub Sub]]## and ##[[KeyPgFunction Function]]## member procedure: + L'exemple suivant déclare et définit une procédure avec des membres ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]##: - {{fbdoc item="filename" value="examples/manual/proguide/members/foo1.bi"}}%%(freebasic) + %%(freebasic) '' foo1.bi Type foo @@ -42,66 +42,72 @@ Function foo.g As Integer End Function %% - * //In the future, member procedures may be able to be defined within the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition.// + * //À l'avenir, les membres de procédures pourraient être en mesure d'être définis dans la définition de ##[[KeyPgType Type]]## ou ##[[KeyPgClass Class]]##.// -{{anchor name="USAGE"}}{{fbdoc item="section" value="Usage"}} - Member procedures are referred to just like member data, that is, their name is prefixed with the name of an object instance and the member access operator (##[[KeyPgOpMemberAccess Operator . (Member access)]]##) *. + + {{fbdoc item="usage"}} - The following example, using the code from the last example, calls ##[[KeyPgSub Sub]]## and ##[[KeyPgFunction Function]]## member procedures: + Les membres de procédures sont mentionnées à l'instar des données membres, c'est-à-dire que leur nom est préfixé par le nom d'une instance de l'objet et l'opérateur d'accès membre (##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##) //(voir note *)//. - {{fbdoc item="filename" value="examples/manual/proguide/members/usage1.bas"}}%%(freebasic) + L'exemple suivant, utilisant le code de l'exemple précédent, appelle des membres de procédure ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]##: +'' ... foo with non-static members as before ... '' ... foo with non-static members as before ... -#include once "foo1.bi" +#include once "foo1.bi" Dim bar As foo bar.f(bar.g()) -%% - * //Static member procedures do not require an object instance in order to be called.// + %% -{{anchor name="THIS"}}{{fbdoc item="section" value="The hidden parameter, This"}} - Member procedures actually have an additional parameter than what they are declared with *. When they are called, using the name of an instance and ##[[KeyPgOpMemberAccess Operator . (Member access)]]##, a reference to that instance is passed along with any other arguments in the call, allowing the member procedure direct access to the instance. +* //Les membres statiques de procédures ne nécessitent pas une instance d'objet afin d'être appelés.// + - The additional parameter added by the compiler is called ##[[KeyPgThis This]]##, and since it's a reference, any modifications to ##[[KeyPgThis This]]## are actually modifications to the instance that was passed to the member procedure when it was called. You can use ##[[KeyPgThis This]]## just like any other variable, ie., pass it to procedures taking a object of the same type, call other member procedures and access member data using ##[[KeyPgOpMemberAccess Operator . (Member access)]]##, etc. + {{fbdoc item="section" value="Le paramètre caché, This - Most of the time, however, using ##[[KeyPgThis This]]## explicitly is unnecessary; member procedures can refer to other members of the instance which they are passed directly by name, without having to qualify it with ##[[KeyPgThis This]]## and ##[[KeyPgOpMemberAccess Operator . (Member access)]]##. The only times when you need to qualify member names with ##[[KeyPgThis This]]## is when the member name is hidden, for example, by a parameter or local variable. In these situations, qualifying the member name is the only way to refer to these hidden member names. + Les membres de procédures ont effectivement un paramètre supplémentaire ceux qui sont déclarés avec *. Quand ils sont appelés, en utilisant le nom d'une instance et ##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##, une référence de cette instance est passée avec d'autres arguments dans l'appel, permettant aux membres de la procédure un accès direct à l'instance. - The following example uses the ##[[KeyPgThis This]]## keyword to refer to member data whose name is hidden by a parameter and local variable: + Le paramètre supplémentaire ajouté par le compilateur est appelé ##[[KeyPgThis This]]##, et puisque c'est une référence, toutes modifications apportées à ##[[KeyPgThis This]]## sont effectivement des modifications de l'instance qui a été passée au membre de la procédure quand il a été appelé. Vous pouvez utiliser ##[[KeyPgThis This]]## exactement comme une autre variable, à savoir, le passer à des procédures d'un objet du même type, appeler d'autres membres de procédures et accéder à un membre données en utilisant ##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##, etc. - {{fbdoc item="filename" value="examples/manual/proguide/members/this.bas"}}%%(freebasic) -Type foo - Declare Sub f (i As Integer) - Declare Sub g () + La plupart du temps, toutefois, utiliser ##[[KeyPgThis This]]## explicitement, est inutile; un membre de procédure peut se référer à d'autres membres de l'instance à laquelle il est passé directement par nom, sans avoir à le qualifier avec ##[[KeyPgThis This]]## et ##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##. Les seuls moments où vous devez qualifier le nom des membres avec ##[[KeyPgThis This]]## est lorsque le nom du membre est caché, par exemple, par un paramètre ou une variable locale. Dans ces situations, qualifier le nom du membre est le seul moyen de se référer à ces noms de membres cachés. +L'exemple suivant utilise le mot-clé ##[[KeyPgThis This]]## pour se référer à un membre de données dont le nom est caché par par un paramètre et une variable locale: + %%(freebasic) + Type foo - i As Integer = 420 -End Type + Declare Sub f (i As Integer) +Declare Sub g () -Sub foo.f (i As Integer) - '' A parameter hides T.i, so it needs to be qualified to be used: - Print this.i -End Sub +i As Integer = 420 + End Type + Sub foo.f (i As Integer) +'' A parameter hides T.i, so it needs to be qualified to be used: -Sub foo.g () +Print this.i + End Sub + Sub foo.g () '' A local variable hides T.i, so it needs to be qualified to be used: - Dim i As Integer - Print this.i -End Sub -%% +Dim i As Integer +Print this.i - * //Static member procedures do not have this extra parameter added by the compiler, and so cannot access the object instance from which it was called with.// + End Sub -{{anchor name="ACCESS"}}{{fbdoc item="section" value="Access rights"}} - Unlike normal module-level procedures, member procedures have full access rights to the members of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they are declared in; they can refer to the public, protected and private members of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. +%% + * //Les membres statiques de procédures n'ont pas ce paramètre supplémentaire ajouté par le compilateur et ne peuvent donc pas accéder à l'instance objet à partir de laquelle ils ont été appelés.// -{{anchor name="OVERLOAD"}}{{fbdoc item="section" value="Overloading"}} - A member procedure can be declared to have the same name as another member procedure, provided the parameters are different, either in number or in type. This is referred to as overloading. + + {{fbdoc item="section" value="Les droits d'accès - Only the parameters are used to determine if a procedure declaration is a valid overload. For example, a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## could have static and non-static member procedures with the same name, or ##[[KeyPgSub Sub]]## and ##[[KeyPgFunction Function]]## member procedures with the same name + Contrairement aux procédures normales de niveau module, les membres de procédures ont des droits d'accès complets aux membres du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## où ils ont été déclarés; ils peuvent se référer aux membres publics, protégés et privés d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##. - Unlike a module-level procedure, which needs to specify the ##[[KeyPgOverload Overload]]## clause in the declaration to allow overloading it, a member procedure is overloadable by default, and does not need the ##[[KeyPgOverload Overload]]## clause. + - {{fbdoc item="filename" value="examples/manual/proguide/members/overload.bas"}}%%(freebasic) -Type T + {{fbdoc item="section" value="Surcharge +Un membre de procédure peut être déclaré en ayant le même nom qu'un autre membre d'une procédure, à condition que les paramètres soient différents, que ce soit en nombre ou en type. C'est ce qu'on appelle la surcharge. + Seuls les paramètres sont utilisés pour déterminer si une déclaration de procédure est une surcharge valide. Par exemple, un ##[[KeyPgType Type]]## ou une ##[[KeyPgClass Class]]## pourraient comporter des membres statiques et non-statiques de procédures ayant le même nom, ou des membres ##[[KeyPgSub Sub]]## et ##[[KeyPgFunction Function]]## de procédures avec le même nom. + + Contrairement à une procédure de niveau module, qui a besoin de spécifier la clause ##[[KeyPgOverload Overload]]## dans sa déclaration pour lui permettre d'être surchargée, un membre de procédure est surchargeable par défaut et n'a pas besoin de la clause ##[[KeyPgOverload Overload]]##. + %%(freebasic) + + Type T Declare Sub f '' Different number of parameters: @@ -109,83 +115,77 @@ Type T '' Different type of parameters: Declare Sub f (ByRef As String) - + '' Again, parameters are different: Declare Function f (As UByte) As Integer - '' following three members would cause an error, - '' number of parameters and/or types do not differ: + '' number of parameters and/or types do not differ: '' Declare Function f As Integer - '' Declare Function f (As UByte) As String - '' Declare Static Function f (As UByte) As Integer +'' Declare Function f (As UByte) As String +'' Declare Static Function f (As UByte) As Integer - '' ... - somedata as any ptr -End Type -%% - -{{anchor name="STATIC"}}{{fbdoc item="section" value="Static member procedures"}} - Static member procedures are declared and defined much in the same way as non-static member procedures, with the ##[[KeyPgStatic Static]]## keyword preceding the declaration and definition. +'' ... + somedata As Any Ptr - Member procedures defined using the ##[[KeyPgStatic Static]]## keyword must be declared with the ##[[KeyPgStatic Static]]## keyword in the [[KeyPgType Type]] or [[KeyPgClass Class]] definition, or a compiler error will occur. Like non-static member procedures, it is an error to define a static member procedure without a matching declaration in the [[KeyPgType Type]] or [[KeyPgClass Class]] definition. + End Type - Do not confuse this with procedure definitions that specify static storage for their variables and objects by appending the ##[[KeyPgStatic Static]]## keyword to the procedure header. The ##[[KeyPgStatic Static]]## keyword can be used in both contexts, however; static member procedures can be defined with static variable and object storage. + %% - The following example declares two static member procedures, the first of which also has static variable and object storage. Note that the ##[[KeyPgStatic Static]]## keyword is optional in the member procedure definition: + - {{fbdoc item="filename" value="examples/manual/proguide/members/foo2.bi"}}%%(freebasic) + {{fbdoc item="section" value="Membres statiques de procédures +Les membres statiques de procédures sont déclarés et définis de la même manière que les membres de procédures non-statiques, avec avec le mot-clé ##[[KeyPgStatic Static]]## précédant la déclaration et la définition. + +Les membres de procédures définis en utilisant le mot-clef ##[[KeyPgStatic Static]]## doivent être déclarés avec le mot-clef ##[[KeyPgStatic Static]]## dans la définition d'un [[KeyPgType Type]] ou d'une [[KeyPgClass Class]] ou le compilateur émettra un message d'erreur. Comme les membres non-statiques de procédures, c'est une erreur de définir un membre statique de procédure sans une déclaration correspondant à la définition de [[KeyPgType Type]] ou [[KeyPgClass Class]]. + Ne pas confondre ceci avec les définitions de procédure qui précisent le stockage statique pour leurs variables et des objets en ajoutant le mot-clé ##[[KeyPgStatic Static]]## à l'en-tete de la procédure. Le mot-clé ##[[KeyPgStatic Static]]## peut, néanmoins, être utilisé dans les deux contextes; les membres de procedures statiques peuvent être définis avec un stockage statique de variable et d'objet. + L'exemple suivant déclare deux membres de procédure statiques, dont le premier a également un stockage statique de variable et d'objet. Notez que le mot-clé ##[[KeyPgStatic Static]]## est facultatif dans la définition du membre de la procédure: + + %%(freebasic) '' foo2.bi Type foo Declare Static Sub f (As Integer) - Declare Static Function g As Integer - - i As Integer -End Type - -Static Sub foo.f (n As Integer) Static - Print n -End Sub +Declare Static Function g As Integer -Function foo.g As Integer - Return 420 -End Function -%% +i As Integer + End Type +Static Sub foo.f (n As Integer) Static +Print n - Static member procedures can be called like non-static member procedures, qualifying the name of the procedure with the name of an instance and the member access operator (##[[KeyPgOpMemberAccess Operator . (Member access)]]##). + End Sub - They can also be called by qualifying the procedure name with the name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## they were declared in and the member access operator (##[[KeyPgOpMemberAccess Operator . (Member access)]]##). In other words, an instance is not required in order to call static-member procedures. + Function foo.g As Integer - The following example, using the code from the last example, uses both ways to call static member procedures: + Return 420 - {{fbdoc item="filename" value="examples/manual/proguide/members/usage2.bas"}}%%(freebasic) -'' ... foo with static members as before ... -#include once "foo2.bi" + End Function +%% +Les membres de procédure statiques peuvent être appelés comme des membres de procédure non-statiques, en qualifiant le nom de la procédure avec le nom d'une instance et l'opérateur d'accès aux membres de procédures (##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##). -Dim bar As foo -bar.f(foo.g()) +Ils peuvent aussi être appelés en qualifiant le nom de la procédure avec le nom du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## où ils ont été déclarés et l'opérateur d'accès aux membres de procédures (##[[KeyPgOpMemberAccess Operator . (Accès Membre)]]##). En d'autres mots, une instance n'est pas nécessaire pour appeler des membres de procédures statiques. +L'exemple suivant, utilise le code de l'exemple précédent et aussi les deux moyens d'appeler un membre de procédure statique: %% - Unlike non-static member procedures, which are declared with an extra ##[[KeyPgThis This]]## parameter, static member procedures do not get passed an instance when called. Because of this, static member procedures can only refer to constants, enumerations, other static members (data or procedures), etc., without qualifying their names. Static member procedures can still refer to non-static members when qualified with an instance, for example: a parameter or local variable. + '' ... foo with static members as before ... - The following example refers to a non-static member from a static procedure: + #include once "foo2.bi" - {{fbdoc item="filename" value="examples/manual/proguide/members/static.bas"}}%%(freebasic) -Type foo - Declare Static Sub f (ByRef As foo) + Dim bar As foo +bar.f(foo.g()) + %% - i As Integer -End Type + Contrairement aux membres de procédures non-statiques qui sont déclarés avec un paramètre supplémentaire ##[[KeyPgThis This]]##, les membres de procédure statiques n'ont pas besoin du passage d'une instance pour être appelés. Pour cette raison, les membres de procédures statiques peuvent seulement faire référence à des constantes, des énumérations d'autres membres statiques (données ou procédures), etc., sans qualifier leurs noms. Les membres de procédures statiques peuvent toujours se référer à des membres de procédures non-statiques quand ils sont qualifiés avec une instance, par exemple: un paramètre ou une variable locale. +L'exemple suivant fait référence à un membre de procédure non-statique à partir d'une procédure statique: Sub foo.f (ByRef self As foo) - '' Ok, self is an instance of foo: - Print self.i + Type foo + Declare Static Sub f (ByRef As foo) - '' would cause error - '' cannot access non-static members, no foo instance: - '' Print i -End Sub -%% + i As Integer + End Type + Sub foo.f (ByRef self As foo) +'' Ok, self is an instance of foo: +Print self.i -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file +'' would cause error \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgOperatorOverloading.wakka b/fbdocs/manual/cache/ProPgOperatorOverloading.wakka index 93c4d8f3ac..d7958e4ce9 100644 --- a/fbdocs/manual/cache/ProPgOperatorOverloading.wakka +++ b/fbdocs/manual/cache/ProPgOperatorOverloading.wakka @@ -1,14 +1,14 @@ -{{fbdoc item="title" value="Operator Overloading"}}---- -Changing the way user defined types work with built-in operators. +{{fbdoc item="title" value="Opérateur Overloading"}}---- +Changer la manière dont les types définis par l'utilisateur travaillent avec les opérateurs internes. -{{anchor name="OVERVIEW|Overview"}} -{{anchor name="GLOBAL|Global Operators"}} -{{anchor name="MEMBER|Member Operators"}} +[[#OVERVIEW">Vue d'ensemble]] +[[#GLOBAL">Opérateurs globaux]] +[[#MEMBER">Opérateurs membres de déclaration]] -{{anchor name="OVERVIEW"}}{{fbdoc item="section" value="Overview"}} - Simply, operators are procedures, and their arguments are called //operands//. Operators that take one operand (##[[KeyPgOpNot Operator Not]]##) are called //unary operators//, operators that take two operands (##[[KeyPgOpAdd Operator +]]##) are called //binary operators// and operators taking three operands (##[[KeyPgIif Operator Iif]]##) are called //ternary operators//. +{{fbdoc item="section" value="Vue d'ensemble + Simplement, les opérateurs sont des procédures et leurs arguments sont appelés //opérandes//. Les opérateurs qui prennent un seul opérande (##[[KeyPgOpNot Opérateur Not]]##) sont appelés //opérateurs unaires//, les opérateurs qui prennent deux opérandes (##[[KeyPgOpAdd Opérateur +]]##) sont appelés //opérateurs binaires// et les opérateurs qui prennent trois opérandes (##[[KeyPgIif Opérateur Iif]]##) sont appelés //opérateurs ternaires//. - Most operators are not called like procedures. Instead, their operator symbol is placed next to their operands. For unary operators, their sole operand is placed to the right of the symbol. For binary operators, their operands - referred to as the left and right-hand side operands - are placed to the left and right of the operator symbol. FreeBASIC has one ternary operator, ##[[KeyPgIif Operator Iif]]##, and it is called like a procedure, with its operands comma-separated surrounded by parenthesis. For example, the following code calls ##[[KeyPgIif Operator Iif]]## to determine if a pointer is valid. If it is, ##[[KeyPgOpValueOf Operator * (Value of)]]## is called to dereference the pointer, and if not, ##[[KeyPgOpDivide Operator / (Divide)]]## is called to find the value of twenty divided by four. + La plupart des opérateurs ne sont pas appelés, comme les procédures. Au lieu de cela, leur symbole d'opérateur est placé à côté de leurs opérandes. Pour les opérateurs unaires, leur opérande unique est placé à la droite du symbole. Pour les opérateurs binaires, leurs opérandes - dénommés opérande de gauche et opérande de droite - sont placés à gauche et à droite du symbole d'opérateur. FreeBasic a un opérateur ternaire, ##[[KeyPgIif Opérateur Iif]]##, et il est appelé comme une procédure, avec ses opérandes séparés par des virgules et entouré de parenthèses. Par exemple, le code suivant appelle ##[[KeyPgIif Opérateur Iif]]## pour déterminer si un pointeur est valide. S'il l'est, ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]## est appelé pour déréférencer le pointeur, et s'il ne l'est pas, ##[[KeyPgOpDivide Opérateur / (Division)]]## est appelé pour trouver la valeur de vingt divisé par quatre. {{fbdoc item="filename" value="examples/manual/proguide/opovld/iif.bas"}}%%(freebasic) Dim i As Integer = 420 @@ -16,71 +16,71 @@ Dim p As Integer Ptr = @i Dim result As Integer = IIf( p, *p, cint( 20 / 4 ) ) %% - Notice the call to ##[[KeyPgIif Operator Iif]]## is similar to a procedure call, while the calls to ##[[KeyPgOpValueOf Operator * (Value of)]]## and ##[[KeyPgOpDivide Operator / (Divide)]]## are not. In the example, ##//p//## is the operand to ##[[KeyPgOpValueOf Operator * (Value of)]]##, and ##//20//## and ##//4//## are the left and right-hand side operands of ##[[KeyPgOpDivide Operator / (Divide)]]##, respectively. + Notez que l'appel de ##[[KeyPgIif Opérateur Iif]]## est similaire à un appel de procédure, tandis que les appels à ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]## et ##[[KeyPgOpDivide Opérateur / (Division)]]## ne le sont pas. Dans l'exemple, ##//p//## est l'opérande de ##[[KeyPgOpValueOf Opérateur * (Valeur de)]]##, et ##//20//## et ##//4//## sont, respectivement, les opérandes de gauche et de droite de ##[[KeyPgOpDivide Opérateur / (Division)]]##. - All operators in FreeBASIC are predefined to take operands of standard data types, like ##[[KeyPgInteger Integer]]## and ##[[KeyPgSingle Single]]##, but they may also be overloaded for user-defined types; that is, they can be defined to accept operands that are objects as well. There are two types of operators that can be overloaded, //global operators// and //member operators//. + Tous les opérateurs, en FreeBasic, sont prédéfinis pour prendre des opérandes de types de données standard, comme ##[[KeyPgInteger Integer]]## et ##[[KeyPgSingle Single]]##, mais ils peuvent également être surchargés pour des types définis par l'utilisateur; c'est à dire qu'ils peuvent être définis pour accepter, aussi, des opérandes qui sont des objets. Il existe deux types d'opérateurs peuvent être surchargés, les //opérateurs globaux// et les //opérateurs membres//. -{{anchor name="GLOBAL"}}{{fbdoc item="section" value="Global Operators"}} - Global operators are those that are declared in module-level scope (globally). These are the operators ##[[KeyPgOpNegate - (Negate)]]##, ##[[KeyPgOpNot Not (Bitwise not)]]##, ##[[KeyPgOpPtrMemberAccess -> (Pointer to member access)]]##, ##[[KeyPgOpValueOf * (Value of)]]##, ##[[KeyPgOpAdd + (Add)]]##, ##[[KeyPgOpSubtract - (Subtract)]]##, ##[[KeyPgOpMultiply * (Multiply)]]##, ##[[KeyPgOpDivide / (Divide)]]##, ##[[KeyPgOpIntegerDivide \ (Integer divide)]]##, ##[[KeyPgOpConcatConvert & (Concatenate)]]##, ##[[KeyPgOpModulus Mod (Modulus)]]##, ##[[KeyPgOpShiftLeft Shl (Shift left)]]##, ##[[KeyPgOpShiftRight Shr (Shift right)]]##, ##[[KeyPgOpAnd And (Bitwise and)]]##, ##[[KeyPgOpOr Or (Bitwise or)]]##, ##[[KeyPgOpXor Xor (Bitwise xor)]]##, ##[[KeyPgOpImp Imp (Bitwise imp)]]##, ##[[KeyPgOpEqv Eqv (Bitwise eqv)]]##, ##[[KeyPgOpExponentiate ^ (Exponentiate)]]##, ##[[KeyPgOpEqual = (Equal)]]##, ##[[KeyPgOpNotEqual <> (Not equal)]]##, ##[[KeyPgOpLessThan < (Less than)]]##, ##[[KeyPgOpGreaterThan > (Greater than)]]##, ##[[KeyPgOpLessThanOrEqual <= (Less than or equal)]]## and ##[[KeyPgOpGreaterThanOrEqual >= (Greater than or equal)]]##. + + {{fbdoc item="section" value="Les Opérateurs globaux - Declaring a custom global operator is similar to declaring a procedure. The ##[[KeyPgDeclare Declare]]## keyword is used with the ##[[KeyPgOperator Operator]]## keyword. The operator symbol is placed next followed by the comma-separated list of parameters surrounded in parenthesis that will represent the operands passed to the operator. Unlike procedures, operators can be overloaded by default, so the ##[[KeyPgOverload Overload]]## keyword is not necessary when declaring custom operators. At least one of the operator's parameters must be of user-defined type (after all, operators with built-in type parameters are already defined). + Les Opérateurs globaux sont ceux qui sont déclarés dans la portée au niveau du module (globalement). Ce sont les opérateurs ##[[KeyPgOpNegate - (Négation)]]##, ##[[KeyPgOpNot Not (Complément de bits)]]##, ##[[KeyPgOpPtrMemberAccess -> (Accès membre par pointeur)]]##, ##[[KeyPgOpValueOf * (Valeur de)]]##, ##[[KeyPgOpAdd + (Addition)]]##, ##[[KeyPgOpSubtract - (Soustraction)]]##, ##[[KeyPgOpMultiply * (Multiplication)]]##, ##[[KeyPgOpDivide / (Division)]]##, ##[[KeyPgOpIntegerDivide \ (Division entière)]]##, ##[[KeyPgOpConcatConvert & (Concaténation)]]##, ##[[KeyPgOpModulus Mod (Modulo)]]##, ##[[KeyPgOpShiftLeft Shl (Décalage à gauche)]]##, ##[[KeyPgOpShiftRight Shr (Décalage à droite)]]##, ##[[KeyPgOpAnd And (And de bits)]]##, ##[[KeyPgOpOr Or (Or de bits)]]##, ##[[KeyPgOpXor Xor (Xor de bits)]]##, ##[[KeyPgOpImp Imp (Imp de bits)]]##, ##[[KeyPgOpEqv Eqv (Eqv de bits)]]##, ##[[KeyPgOpExponentiate ^ (Puissance)]]##, ##[[KeyPgOpEqual = (Egal)]]##, ##[[KeyPgOpNotEqual <> (Différent)]]##, ##[[KeyPgOpLessThan < (Inférieur)]]##, ##[[KeyPgOpGreaterThan > (Supérieur)]]##, ##[[KeyPgOpLessThanOrEqual <= (Inférieur ou égal)]]## et ##[[KeyPgOpGreaterThanOrEqual >= (Supérieur ou égal)]]##. - The following example declares the global operators ##[[KeyPgOpNegate - (Negate)]]## and ##[[KeyPgOpMultiply + (Multiply)]]## to accept operands of a user-defined type. + Déclarer un opérateur global personnalisé est similaire à déclarer une procédure. Le mot-clef ##[[KeyPgDeclare Declare]]## est utilisé avec le mot-clef ##[[KeyPgOperator Operator]]##. Le symbole de l'opérateur est placé à côté, suivi de la liste, entre parenthèses, des paramètres séparés par des virgules qui représentent les opérandes transmis à l'opérateur. Contrairement aux procédures, les opérateurs peuvent être surchargés par défaut, de sorte que le mot-clé ##[[KeyPgOverload Overload]]## n'est pas nécessaire lors de la déclaration des opérateurs personnalisés. Au moins un des paramètres de l'opérateur doit être de type défini par l'utilisateur (après tout, les opérateurs avec des paramètres de types intégrés sont déjà définis). -{{fbdoc item="filename" value="examples/manual/proguide/opovld/global-ops.bas"}}%%(freebasic) +L'exemple suivant déclare les opérateurs globaux ##[[KeyPgOpNegate - (Négation)]]## et ##[[KeyPgOpMultiply * (Multiplication)]]## à accepter des opérandes d'un type défini par l'utilisateur. type Rational - as integer numerator, denominator -end type + Type Rational +As Integer numerator, denominator -operator - (byref rhs as Rational) as Rational - return type(-rhs.numerator, rhs.denominator) -end operator +End Type + Opérateur - (ByRef rhs As Rational) As Rational +Return Type(-rhs.numerator, rhs.denominator) -operator * (byref lhs as Rational, byref rhs as Rational) as Rational - return type(lhs.numerator * rhs.numerator, _ - lhs.denominator * rhs.denominator) -end operator +End Opérateur + Opérateur * (ByRef lhs As Rational, ByRef rhs As Rational) As Rational + Return Type(lhs.numerator * rhs.numerator, _ +lhs.denominator * rhs.denominator) -dim as Rational r1 = (2, 3), r2 = (3, 4) -dim as Rational r3 = -(r1 * r2) -print r3.numerator & "/" & r3.denominator -%% - Here the global operators are defined for type ##//Rational//##, and are used in the initialization expression for ##//r3//##. The output is ##//-6/12//##. +End Opérateur +Dim As Rational r1 = (2, 3), r2 = (3, 4) +Dim As Rational r3 = -(r1 * r2) +Print r3.numerator & "/" & r3.denominator + %% -{{anchor name="MEMBER"}}{{fbdoc item="section" value="Member Operators"}} - Member operators are declared inside a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition, like member procedures, and they are the cast and assignment operators ##[[KeyPgOpAssignment Let (Assign)]]##, ##[[KeyPgCast Cast (Cast)]]##, ##[[KeyPgOpCombineAdd += (Add and assign)]]##, ##[[KeyPgOpCombineSub -= (Subtract and assign)]]##, ##[[KeyPgOpCombineMultiply *= (Multiply and assign)]]##, ##[[KeyPgOpCombineDivide /= (Divide and assign)]]##, ##[[KeyPgOpCombineIntegerDivide \= (Integer divide and assign)]]##, ##[[KeyPgOpCombineExponentiate ^= (Exponentiate and assign)]]##, ##[[KeyPgOpCombineConcat &= (Concat and assign)]]##, ##[[KeyPgOpCombineModulus Mod= (Modulus and assign)]]##, ##[[KeyPgOpCombineShiftLeft Shl= (Shift left and assign)]]##, ##[[KeyPgOpCombineShiftRight Shr= (Shift right and assign)]]##, ##[[KeyPgOpCombineAnd And= (Conjunction and assign)]]##, ##[[KeyPgOpCombineOr Or= (Inclusive disjunction and assign)]]##, ##[[KeyPgOpCombineXor Xor= (Exclusive disjunction and assign)]]##, ##[[KeyPgOpCombineImp Imp= (Implication and assign)]]## and ##[[KeyPgOpCombineEqv Eqv= (Equivalence and assign)]]##. +Ici les opérateurs globaux sont définis pour le type ##//Rational//##, et sont utilisés dans l'expression d'initialisation pour ##//r3//##. L'affichage est ##//-6/12//##. + - When declaring member operators, the ##[[KeyPgDeclare Declare]]## and ##[[KeyPgOperator Operator]]## keywords are used followed by the operator symbol and its parameter list. Like member procedures, member operators are defined outside the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## definition, and the symbol name is prefixed with the name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## name. + {{fbdoc item="section" value="Opérateurs membres de déclarations - The following example overloads the member operators ##[[KeyPgCast Cast (Cast)]]## and ##[[KeyPgOpCombineMultiply *= (Multiply and assign)]]## for objects of a user-defined type. + Les opérateurs membres sont déclarés dans la définition d'un ##[[KeyPgType Type]]## ou d'une ##[[KeyPgClass Class]]##, comme les membres de procédures et ils sont les opérateurs de conversion et d' assignation ##[[KeyPgOpAssignment Let (Assign)]]##, ##[[KeyPgCast Cast (Cast)]]##, ##[[KeyPgOpCombineAdd += (Add And Assign)]]##, ##[[KeyPgOpCombineSub -= (Subtract And Assign)]]##, ##[[KeyPgOpCombineMultiply *= (Multiply And Assign)]]##, ##[[KeyPgOpCombineDivide /= (Divide And Assign)]]##, ##[[KeyPgOpCombineIntegerDivide \= (Integer Divide And Assign)]]##, ##[[KeyPgOpCombineExponentiate ^= (Exponentiate And Assign)]]##, ##[[KeyPgOpCombineConcat &= (Concat And Assign)]]##, ##[[KeyPgOpCombineModulus Mod= (Modulus And Assign)]]##, ##[[KeyPgOpCombineShiftLeft Shl= (Shift Left And Assign)]]##, ##[[KeyPgOpCombineShiftRight Shr= (Shift Right And Assign)]]##, ##[[KeyPgOpCombineAnd And= (Conjunction And Assign)]]##, ##[[KeyPgOpCombineOr Or= (Inclusive Disjunction And Assign)]]##, ##[[KeyPgOpCombineXor Xor= (Exclusive Disjunction And Assign)]]##, ##[[KeyPgOpCombineImp Imp= (Implication And Assign)]]## et ##[[KeyPgOpCombineEqv Eqv= (Equivalence And Assign)]]##. -{{fbdoc item="filename" value="examples/manual/proguide/opovld/member-ops.bas"}}%%(freebasic) -type Rational - as integer numerator, denominator +Lors de la déclaration des opérateurs membres, les mots-clefs ##[[KeyPgDeclare Declare]]## et ##[[KeyPgOpérateur Opérateur]]## sont utilisés suivis par le symbole de l'opérateur et de sa liste de paramètres. Comme les membres de procédures, les opérateurs membres sont définis en dehors de la définition du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]## et le nom du symbole est préfixé par le nom du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]##. +L'exemple suivant surcharge les opérateurs membres ##[[KeyPgCast Cast (Conversion)]]## et ##[[KeyPgOpCombineMultiply *= (Multiplication et affectation)]]## pour des objets d'un type défini par l'utilisateur. + %%(freebasic) - declare operator cast () as double - declare operator cast () as string - declare operator *= (byref rhs as Rational) -end type - -operator Rational.cast () as double - return numerator / denominator -end operator - -operator Rational.cast () as string - return numerator & "/" & denominator -end operator - -operator Rational.*= (byref rhs as Rational) - numerator *= rhs.numerator - denominator *= rhs.denominator -end operator - -dim as Rational r1 = (2, 3), r2 = (3, 4) + Type Rational + As Integer numerator, denominator + Declare Opérateur Cast () As Double +Declare Opérateur Cast () As String + +Declare Opérateur *= (ByRef rhs As Rational) + End Type +Opérateur Rational.cast () As Double + +Return numerator / denominator + End Opérateur +Opérateur Rational.cast () As String + +Return numerator & "/" & denominator + End Opérateur + Opérateur Rational.*= (ByRef rhs As Rational) +numerator *= rhs.numerator + +denominator *= rhs.denominator +End Opérateur +Dim As Rational r1 = (2, 3), r2 = (3, 4) r1 *= r2 -dim as double d = r1 -print r1, d -%% - Notice that the member operator ##[[KeyPgCast Cast (Cast)]]## is declared twice, once for the conversion to ##[[KeyPgDouble Double]]## and once for the conversion to ##[[KeyPgString String]]##. This is the only operator (or procedure) that can be declared multiple times when only the return type differs. The compiler decides which cast overload to call based on how the object is used (in the initialization of the ##[[KeyPgDouble Double]]## ##//d//##, ##//Rational.Cast as double//## is called, and in the ##[[KeyPgPrint Print]]## statement, ##//Rational.Cast as string//## is used instead). +Dim As Double d = r1 + Print r1, d -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file +%% \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgPassingArguments.wakka b/fbdocs/manual/cache/ProPgPassingArguments.wakka index ee86e106e1..a6d47f0799 100644 --- a/fbdocs/manual/cache/ProPgPassingArguments.wakka +++ b/fbdocs/manual/cache/ProPgPassingArguments.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Passing Arguments to Procedures"}}---- -Passing information to procedures. +Transmettre des informations à des procédures. -{{fbdoc item="section" value="Declaring parameters"}} - Procedures can get passed information in the form of variables and objects when they are called. In the context of a procedure call, these variables and objects are called arguments. These arguments are then represented as so-called parameters inside the procedure body. Parameters can be used just like any other variable or object. +{{fbdoc item="section" value="Déclarer des paramètres + On peut passer des informations sous forme de variables et d'objets, aux procédures lorsqu'elles sont appelées. Dans le cadre d'un appel de procédure, ces variables et d'objets sont appelées arguments. Ces arguments sont alors représentés en tant que paramètres à l'intérieur du corps de procédure. Les paramètres peuvent être utilisée comme n'importe quelle autre variable ou objet. - To specify that a procedure should get passed arguments when called, declare the procedure with a parameter list. A parameter list is a list of one or more names and types that the procedure will use when referring to the arguments that are passed to it. Parameter lists are surrounded by parenthesis. + Pour spécifier qu'une procédure devrait passer des arguments lorsqu'on l'appelle, il faut déclarer la procédure avec une liste de paramètres. Une liste de paramètres est une liste d'un ou plusieurs noms et types que la procédure utilisera lorsqu'elle se réfèrera aux arguments qui lui sont passés. Les listes de paramètres sont entourées de parenthèses. {{fbdoc item="filename" value="examples/manual/proguide/procs/passargs.bas"}}%%(freebasic) sub Procedure (s as string, n as integer) @@ -13,70 +13,70 @@ end sub Procedure "abc", 123 %% - will produce the following output: + produira le résultat suivant: -%% -The parameters have the values: abc and 123 -%% - There are two ways to pass arguments to procedures: by value and by reference. By default, arguments are passed by value unless otherwise specified. - -{{fbdoc item="section" value="Passing arguments by value"}} - Arguments that are passed by value are not actually passed to procedures; a copy of the argument is made and passed instead. This allows the procedure to modify the copy, and the original variable or object remains unchanged. +%%The parameters have the values: abc and 123%%Il y a deux façons de passer des arguments aux procédures: par valeur et par référence. Par défaut, les arguments sont passés par valeur, sauf indication contraire. +{{fbdoc item="section" value="Passage d'arguments par valeur +Les arguments qui sont passés par valeur ne sont pas réellement passés aux procédures; au lieu de cela une copie de l'argument est faite et passée. Cela permet à la procédure de modifier la copie et la variable ou l'objet d'origine restent inchangés. + Lors du passage d'objets aux procédures par valeur, la copie est faite en appelant le constructeur de copie du ##[[KeyPgType Type]]## ou de la ##[[KeyPgClass Class]]##. - When passing objects to procedures by value, the copy is made by calling the copy constructor of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##. +Pour spécifier qu'un argument doit être passé par valeur, faire précéder le nom du paramètre de la déclaration de procédure du mot-clé ##[[KeyPgByval ByVal]]##: + %%(freebasic) - To specify that an argument should be passed by value, precede the parameter name in the procedure declaration with the ##[[KeyPgByval Byval]]## keyword: + Sub Procedure (ByVal param As Integer) -{{fbdoc item="filename" value="examples/manual/proguide/procs/passbyval.bas"}}%%(freebasic) -sub Procedure (byval param as integer) param *= 2 - print "The parameter 'param' = " & param -end sub -dim arg as integer = 10 -print "The variable 'arg' before the call = " & arg +Print "The parameter 'param' = " & param +End Sub + Dim arg As Integer = 10 + Print "The variable 'arg' before the call = " & arg Procedure(arg) -print "The variable 'arg' after the call = " & arg -%% - will produce the following output: +Print "The variable 'arg' after the call = " & arg +%% +produira le résultat suivant: %% The variable 'arg' before the call = 10 -The parameter 'param' = 20 + The parameter 'param' = 20 + The variable 'arg' after the call = 10 -%% - Notice how parenthesis surround the arguments - in this case only one, ##//arg//## - in the procedure call. These parenthesis are optional, but are a common convention to signify a procedure call. +%%Remarquez comment les parenthèses entourent les arguments - dans ce cas, un seul, ##//arg//## - dans l'appel de procédure. Ces parenthèses sont facultatives, mais sont une convention commune pour signifier un appel de procédure. +{{fbdoc item="section" value="Passage d'arguments par référence +Contrairement aux arguments qui sont passés par valeur, les arguments qui sont passés aux procédures par référence sont vraiment passés; aucune copie n'est faite. Cela permet à la procédure de modifier la variable ou objet d'origine qui lui a été passé. +Une référence est comme un alias pour une variable ou un objet. Chaque fois que vous faites appel à une référence, vous faites allusion à la variable ou à l'objet réel(le) dont elle est l'alias. En d'autres termes, vous pouvez imaginer une référence à un paramètre d'une procédure comme étant l'argument qui lui est passé; les modifications apportées à la référence du paramètre sont en fait des changements à l'argument qu'il représente. + Pour spécifier qu'un argument doit être passé par référence, faire précéder le nom du paramètre dans la déclaration de procédure avec le mot-clé ##[[KeyPgByref ByRef]]##: {{fbdoc item="section" value="Passing arguments by reference"}} - Unlike arguments that are passed by value, arguments that are passed to procedures by reference really do get passed; no copy is made. This allows the procedure to modify the original variable or object that was passed to it. + Sub Procedure (ByRef param As Integer) - A reference is like an alias for a variable or object. Whenever you refer to a reference, you're referring to the actual variable or object that it aliases. In other words, you can think of a reference parameter of a procedure as the argument that is passed to it; any changes made to the reference parameter are actually changes to the argument it represents. + param *= 2 - To specify that an argument should be passed by reference, precede the parameter name in the procedure declaration with the ##[[KeyPgByref Byref]]## keyword: + Print "The parameter 'param' = " & param -{{fbdoc item="filename" value="examples/manual/proguide/procs/passbyref.bas"}}%%(freebasic) -sub Procedure (byref param as integer) - param *= 2 - print "The parameter 'param' = " & param -end sub +End Sub +Dim arg As Integer = 10 + Print "The variable 'arg' before the call = " & arg + Procedure(arg) +Print "The variable 'arg' after the call = " & arg -dim arg as integer = 10 -print "The variable 'arg' before the call = " & arg -Procedure(arg) -print "The variable 'arg' after the call = " & arg %% - will produce the following output: - +produira le résultat suivant:: %% The variable 'arg' before the call = 10 The parameter 'param' = 20 -The variable 'arg' after the call = 20 -%% + The variable 'arg' after the call = 20 +%% {{fbdoc item="see"}} - - [[ProPgProcedures Procedures Overview]] - - [[ProPgReturnValue Returning a Value]] - - ##[[KeyPgDeclare Declare]]## +- [[ProPgProcedures Vue d'ensemble des procédures]] +- [[ProPgReturnValue Retourner une valeur]] +- ##[[KeyPgDeclare Declare]]## + +- ##[[KeyPgSub Sub]]## + - ##[[KeyPgFunction Function]]## + - ##[[KeyPgByval ByVal]]## + - ##[[KeyPgByref ByRef]]## - ##[[KeyPgSub Sub]]## - ##[[KeyPgFunction Function]]## - ##[[KeyPgByval Byval]]## diff --git a/fbdocs/manual/cache/ProPgPointers.wakka b/fbdocs/manual/cache/ProPgPointers.wakka index 01c8005c7c..9d653b5987 100644 --- a/fbdocs/manual/cache/ProPgPointers.wakka +++ b/fbdocs/manual/cache/ProPgPointers.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Pointers"}}---- -Data types whose values are addresses in memory. +Des types de données dont les valeurs sont des adresses en mémoire. -{{fbdoc item="section" value="Declaration"}} - Pointers are [[ProPgVariables Variables]] whose values are addresses in memory, and they are said to 'point' to this memory. The type of data that is pointed to depends on the type of pointer (an ##[[KeyPgInteger Integer]] [[KeyPgPointer Pointer]]## points to ##[[KeyPgInteger Integer]]## data). Pointers are declared like any other variable, with the suffix "##pointer##" or "##ptr##" following the type name. +{{fbdoc item="section" value="Déclaration + Les pointeurs sont des [[ProPgVariables variables]] dont les valeurs sont des adresses en mémoire et on dit qu'ils "pointent" vers cette mémoire. Le type de donnée qui est pointé dépend du type de pointeur (un ##[[KeyPgInteger Integer]] [[KeyPgPointer Pointer]]## pointe vers une donnée ##[[KeyPgInteger Integer]]##). Les pointeurs sont déclarés comme toute autre variable, avec le suffixe "##pointer##" ou "##ptr##" suivant le nom du type. -{{fbdoc item="section" value="Accessing pointed to data"}} - The data pointed to by a pointer can be accessed with ##[[KeyPgOpValueOf Operator *]]## (Value of). This operator returns a reference to the data that its operand points to. The following, +{{fbdoc item="section" value="Accès aux données pointées + Les données pointées par un pointeur peuvent être consultées avec ##[[KeyPgOpValueOf Operator *]]## (Valeur de). Cet opérateur renvoie une référence aux données que pointe son opérande. Ce qui suit, {{fbdoc item="filename" value="examples/manual/proguide/pointers/builtin.bas"}}%%(freebasic) Dim myInteger As Integer = 10 @@ -13,10 +13,10 @@ Dim myPointer As Integer Pointer = @myInteger *myPointer = 20 Print myInteger %% - defines an ##[[KeyPgInteger Integer]]## variable called ##myInteger## and an ##[[KeyPgInteger Integer]]## pointer called ##myPointer## that points to the location in memory where ##myInteger## is stored. ##[[KeyPgOpAt Operator @]]## (Address of) is used to retrieve the address of ##myInteger##. The value of ##20## is assigned to the location at which ##myPointer## points - the address of ##myInteger##, or ##@myInteger##. Changes to ##*myPointer## directly affect the value of ##myInteger## (the expression "##*myPointer##" is the same thing as "##myInteger##"). + définit une variable ##[[KeyPgInteger Integer]]## appelée ##//myInteger//## et un pointeur d'##[[KeyPgInteger Integer]]## appelé ##//myPointer//## qui pointe vers l'emplacement de la mémoire où est stocké ##//myInteger//##. L'##[[KeyPgOpAt Operator @]]## (Adresse de) est utilisé pour récupérer l'adresse de ##//myInteger//##. La valeur de ##//20//## est attribuée à l'emplacement vers laquel pointe ##//myPointer//## - l'adresse de ##//myInteger//##, ou ##//@myInteger//##. Les modifications apportées à ##//*myPointer//## affectent directement la valeur de ##//myInteger//## (l'expression "##//*myPointer//##" est équivalente à "##//myInteger//##"). -{{fbdoc item="section" value="Pointers to user-defined types"}} - Pointers to user-defined types are defined and used like all other pointers. Accessing a member of a [[KeyPgType Type]] or [[KeyPgClass Class]] requires one of the following two methods: +{{fbdoc item="section" value="Pointeurs vers des types définis par l'utilisateur + Les pointeurs vers des types définis par l'utilisateur sont définis et utilisés comme tous les autres pointeurs. L'accès à un membre d'un [[KeyPgType Type]] ou d'une [[KeyPgClass Class]] requiert l'une des deux méthodes suivantes: {{fbdoc item="filename" value="examples/manual/proguide/pointers/udt.bas"}}%%(freebasic) Type myType @@ -35,15 +35,15 @@ Dim p As myType Pointer = @x Print p->a Print p->b %% - The first method uses ##[[KeyPgOpMemberAccess Operator . (Member access)]]##. This operator accesses members from references, so the pointer is dereferenced first. The member access operator has higher priority over the dereference operator, so parenthesis are needed to dereference the pointer before using it with the member access operator. + La première méthode utilise ##[[KeyPgOpMemberAccess Operator . (Accès membre)]]##. Cet opérateur accède aux membres à partir de références, par conséquent, en premier, le pointeur est déréférencé. L'opérateur d'accès membre a une plus grande priorité que l'opérateur de déréférencement, donc des parenthèses sont nécessaires pour déréférencer le pointeur avant de l'utiliser avec l'opérateur d'accès membre. - The second method uses ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]##. This operator accesses members from pointers, which are automatically dereferenced. This can make code a little clearer, although both forms produce identical results. + La deuxième méthode utilise ##[[KeyPgOpPtrMemberAccess Operator -> (Accès membre par pointeur)]]##. Cet opérateur accède aux membres à partir de pointeurs qui sont automatiquement déréférencés. Cela peut rendre le code un peu plus clair, bien que les deux formes produisent des résultats identiques. {{fbdoc item="see"}} - - ##[[KeyPgOpAt Operator @ (Address of)]]## - - ##[[KeyPgOpValueOf Operator * (Value of)]]## - - ##[[KeyPgOpMemberAccess Operator . (Member access)]]## - - ##[[KeyPgOpPtrMemberAccess Operator -> (Pointer to member access)]]## + - ##[[KeyPgOpAt Operator @ (Adresse de)]]## + - ##[[KeyPgOpValueOf Operator * (Valeur de)]]## + - ##[[KeyPgOpMemberAccess Operator . (Accès membre)]]## + - ##[[KeyPgOpPtrMemberAccess Operator -> (Accès membre par pointeur)]]## - ##[[KeyPgOpVarptr Varptr]]## - ##[[KeyPgOpStrptr Strptr]]## - ##[[KeyPgOpProcptr Procptr]]## diff --git a/fbdocs/manual/cache/ProPgPrebuiltLibraries.wakka b/fbdocs/manual/cache/ProPgPrebuiltLibraries.wakka index 28d9d6b7b5..17cb351cee 100644 --- a/fbdocs/manual/cache/ProPgPrebuiltLibraries.wakka +++ b/fbdocs/manual/cache/ProPgPrebuiltLibraries.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="Using Prebuilt Libraries"}}---- -FreeBASIC is distributed with many headers for common or popular libraries. The headers allow a programmer to use functions available in these existing static or shared libraries (DLLs). +FreeBasic est distribué avec de nombreuses en-têtes pour des bibliothèques communes ou populaires. Les en-têtes permettent à un programmeur d'utiliser les fonctions disponibles dans ces bibliothèques existantes statiques ou partagées (DLL). -The libraries themselves are not distributed with FreeBASIC, but most can be downloaded from the web and readily installed. Some other libraries may need to be first compiled from sources to be used. Please see the documentation for the specific library on how to configure, install, and use them. +Les bibliothèques elles-mêmes ne sont pas distribuées avec FreeBasic, mais la plupart peuvent être téléchargées à partir du web et installées facilement. D'autres bibliothèques peuvent avoir besoin, en premier, d'être compilées à partir de sources avant d'être utilisées. S'il vous plaît, consultez la documentation des bibliothèques spécifiques sur la façon de les configurer, de les installer et les utiliser. -Some static or shared libraries (DLLs) may be already present on the system since they might be part of FreeBASIC itself or the operating system. +Certaines bibliothèques statiques ou partagées (DLL) peuvent être déjà présentes sur le système car elles peuvent faire partie de FreeBasic lui-même ou du système d'exploitation. -Although many headers can be used on any of the platforms supported by FreeBASIC, some headers are platform specific and will not be usable on other platforms. +Bien que de nombreuses en-têtes peuvent être utilisées sur n'importe quelle plate-forme supportée par FreeBasic, certaines sont spécifiques à certaines plate-formes et non-utilisables sur d'autres. -{{fbdoc item="section" value="FreeBASIC headers"}} - There are a few headers that are specific to FreeBASIC and expose some functions that are otherwise not available: - - ##datetime.bi## - Declarations for ##[[KeyPgDateSerial DateSerial]]##, ##[[KeyPgDateValue DateValue]]##, ##[[KeyPgIsDate IsDate]]##, ##[[KeyPgYear Year]]##, ##[[KeyPgMonth Month]]##, ##[[KeyPgDay Day]]##, ##[[KeyPgWeekday Weekday]]##, ##[[KeyPgTimeserial TimeSerial]]##, ##[[KeyPgTimeValue TimeValue]]##, ##[[KeyPgHour Hour]]##, ##[[KeyPgMinute Minute]]##, ##[[KeyPgSecond Second]]##, ##[[KeyPgNow Now]]##, ##[[KeyPgDateAdd DateAdd]]##, ##[[KeyPgDatePart DatePart]]##, ##[[KeyPgDateDiff DateDiff]]##, ##[[KeyPgMonthname MonthName]]##, ##[[KeyPgWeekdayname WeekdayName]]## - - ##dir.bi## - Constants to be used with ##[[KeyPgDir Dir]]## - - ##fbgfx.bi## - Additional constants and structures to be used with graphics commands such as ##[[KeyPgMultikey Multikey]]##, ##[[KeyPgScreencontrol Screencontrol]]##, and ##[[KeyPgScreenevent Screenevent]]##, ##[[KeyPgImagecreate Imagecreate]]##. - - ##file.bi## - Declarations for ##[[KeyPgFilecopy FileCopy]]##, ##[[KeyPgFileattr FileAttr]]##, ##[[KeyPgFilelen FileLen]]##, ##[[KeyPgFileexists Fileexists]]##, ##[[KeyPgFiledatetime FileDateTime]]## - - ##string.bi## - Declarations for ##[[KeyPgFormat format]]## - - ##vbcompat.bi## - Includes datetime.bi, dir.bi, file.bi, and string.bi plus additional constants compatible with Microsoft Visual Basic. +{{fbdoc item="section" value="En-têtes FreeBASIC + Il y a quelques en-têtes qui sont spécifiques à FreeBasic et proposent certaines fonctions qui, autrement, ne sont pas disponibles: + - ##datetime.bi## - Déclarations pour ##[[KeyPgDateSerial DateSerial]]##, ##[[KeyPgDateValue DateValue]]##, ##[[KeyPgIsDate IsDate]]##, ##[[KeyPgYear Year]]##, ##[[KeyPgMonth Month]]##, ##[[KeyPgDay Day]]##, ##[[KeyPgWeekday Weekday]]##, ##[[KeyPgTimeserial TimeSerial]]##, ##[[KeyPgTimeValue TimeValue]]##, ##[[KeyPgHour Hour]]##, ##[[KeyPgMinute Minute]]##, ##[[KeyPgSecond Second]]##, ##[[KeyPgNow Now]]##, ##[[KeyPgDateAdd DateAdd]]##, ##[[KeyPgDatePart DatePart]]##, ##[[KeyPgDateDiff DateDiff]]##, ##[[KeyPgMonthname MonthName]]##, ##[[KeyPgWeekdayname WeekdayName]]## + - ##dir.bi## - Constantes à utiliser avec ##[[KeyPgDir Dir]]## + - ##fbgfx.bi## - Constantes et structures supplémentaires à utiliser avec les commandes graphiques telles que ##[[KeyPgMultikey MultiKey]]##, ##[[KeyPgScreencontrol ScreenControl]]##, et ##[[KeyPgScreenevent ScreenEvent]]##, ##[[KeyPgImagecreate ImageCreate]]##. + - ##file.bi## - Déclarations pour ##[[KeyPgFilecopy FileCopy]]##, ##[[KeyPgFileattr FileAttr]]##, ##[[KeyPgFilelen FileLen]]##, ##[[KeyPgFileexists FileExists]]##, ##[[KeyPgFiledatetime FileDateTime]]## + - ##string.bi## - Déclarations pour ##[[KeyPgFormat Format]]## + - ##vbcompat.bi## - Inclut datetime.bi, dir.bi, file.bi, et string.bi plus des constantes supplémentaires compatibles avec Microsoft Visual Basic. -{{fbdoc item="section" value="C Runtime (CRT)"}} - Where possible cross-platform compatible headers have been provided for the C runtime (CRT). For example, +{{fbdoc item="section" value="C Runtime (CRT) + Lorsque cela est possible des en-têtes compatibles multiplateformes ont été fournies pour C run-time (CRT). Par exemple, {{fbdoc item="filename" value="examples/manual/proguide/libs/libs1.bas"}}%%(freebasic) #include once "crt.bi" printf( !"Hello World\n" ) %% - To include a specific CRT header, prefix the name of the header file with ##"crt/"##. For example: + Pour inclure un fichier d'en-tête CRT spécifique, préfixer le nom du fichier d'en-tête avec ##"crt/"##. Par exemple: {{fbdoc item="filename" value="examples/manual/proguide/libs/libs2.bas"}}%%(freebasic) #include once "crt/stdio.bi" Dim f As FILE Ptr @@ -31,20 +31,20 @@ fprintf( f, "Hello File\n") fclose( f ) %% -{{fbdoc item="section" value="Windows API"}} - Many (many) headers for the Windows API are available for inclusion in FreeBASIC source code. In most cases the only include file needed is "windows.bi". For example, +{{fbdoc item="section" value="Windows API + Beaucoup (de nombreuses) en-têtes pour les API Windows sont disponibles pour inclusion dans le code source FreeBasic. Dans la plupart des cas le seul fichier nécessaire à inclure est "windows.bi". Par exemple, {{fbdoc item="filename" value="examples/manual/proguide/libs/libs3.bas"}}%%(freebasic) #include once "windows.bi" MessageBox( null, "Hello World", "FreeBASIC", MB_OK ) %% - To include a specific Windows API header, prefix the name of the header with "win/" for example: + Pour inclure une l'en-tête spécifique de l'API Windows, préfixer nom de l'en-tête avec "win/" par exemple: {{fbdoc item="filename" value="examples/manual/proguide/libs/libs4.bas"}}%%(freebasic) #include once "win/ddraw.bi" %% - Browse the "./inc/win/" directory where FreeBASIC was installed to see all of the available Windows API headers. + Examinez le répertoire "./inc/win/" où FreeBASIC a été installé pour voir tous les en-têtes disponibles pour les API Windows. -{{fbdoc item="section" value="Other Headers Provided"}} - Browse the "./inc/" directory located where FreeBASIC was installed to find other headers. It is possible that headers might be available for a library you need to use. Some headers are located in "./inc/" and others might be located in a sub-directory. To include headers located in a subdirectory of "./inc/", prefix the name of the header with the name of the directory where it is located. For example: +{{fbdoc item="section" value="Autres en-têtes fournis + Examinez le répertoire "./inc/" où FreeBASIC a été installé pour voir tous les autres en-têtes disponibles. Il est possible que des en-têtes soient disponibles pour une bibliothèque, vous devez utiliser. Certaines en-têtes sont situées dans "./inc/" et les autres peuvent se trouver un sous-répertoire. Pour inclure les en-têtes situées dans un sous-répertoire "./inc/", préfixez le nom de l'en-tête avec le nom du répertoire où il se trouve. Par exemple: {{fbdoc item="filename" value="examples/manual/proguide/libs/libs5.bas"}}%%(freebasic) '' located in ./inc/ #include once "curl.bi" @@ -53,12 +53,12 @@ MessageBox( null, "Hello World", "FreeBASIC", MB_OK ) #include once "GL/gl.bi" %% -{{fbdoc item="section" value="Requirements for Using Prebuilt Static Libraries"}} - - The source code must include the appropriate headers using ##[[KeyPgInclude #include]]##. - - The static library must be linked at compile time by using either ##[[KeyPgInclib #inclib]]## in the source code or by using the //-l// option on the command line to specify the name of the library. +{{fbdoc item="section" value="Exigences pour l'utilisation de bibliothèques statiques prédéfinies + - Le code source doit inclure les en-têtes appropriées à l'aide de ##[[KeyPgInclude #include]]##. + - Une bibliothèque statique doit être liée à la compilation en utilisant ##[[KeyPgInclib #inclib]]## dans le code source ou en utilisant l'option //-l// sur ligne de commande pour spécifier le nom de la bibliothèque. -{{fbdoc item="section" value="Requirements for Using Prebuilt Shared Libraries"}} - - The source code must include the appropriate headers using ##[[KeyPgInclude #include]]##. - - The shared library (.DLL) must be present on the host computer where the compiled program will run. +{{fbdoc item="section" value="Exigences pour l'utilisation de bibliothèques partagées prédéfinies + - Le code source doit inclure les en-têtes appropriées à l'aide de ##[[KeyPgInclude #include]]##. + - La bibliothèque partagée (.DLL) doit être présente sur l'ordinateur hôte sur lequel programme compilé s'exécute. {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgPrimer1.wakka b/fbdocs/manual/cache/ProPgPrimer1.wakka index c23f48e62d..0f02f21c63 100644 --- a/fbdocs/manual/cache/ProPgPrimer1.wakka +++ b/fbdocs/manual/cache/ProPgPrimer1.wakka @@ -1,8 +1,8 @@ {{fbdoc item="title" value="FreeBASIC Primer #1"}}---- -This primer is intended for beginning beginners, for those who are just starting to learn how to program and using FreeBASIC do to it. +Ce livre élémentaire est destiné aux "débutants débutants", pour ceux qui commencent tout juste à apprendre à programmer et à utiliser FreeBASIC dans ce but. -{{fbdoc item="section" value="Learning the language"}} - Learning a programming language means learning the words to write it and knowing what they mean when they are written. We don't need to learn them all at once. But learning a few important words that do something will help us get started. Here we are just going to concentrate on these keywords: +{{fbdoc item="section" value="L'apprentissage du langage + Apprendre un langage de programmation, c'est apprendre à écrire des mots et savoir ce qu'ils veulent dire quand ils sont écrits. Nous n'avons pas besoin de les apprendre tous à la fois. Mais apprendre quelques mots importants qui font quelque chose va nous aider à démarrer. Ici nous allons nous contenter de se concentrer sur ces mots clés: - ##[[KeyPgDim Dim]]## - ##[[KeyPgPrint Print]]## @@ -12,51 +12,51 @@ This primer is intended for beginning beginners, for those who are just starting - ##[[KeyPgDoloop Do...Loop]]## -{{fbdoc item="section" value="Hello World!"}} - No beginners reference is complete without this example. +{{fbdoc item="section" value="Bonjour le monde! (Hello World!) + Aucune référence débutants n'est complet sans cet exemple. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer1.bas"}}%%(freebasic) + %%(freebasic) Print "Hello World!" %% - The text between the pair of double quotes is a literal string. The ##[[KeyPgPrint Print]]## statement is used to output text to the display. If you can edit, compile, and execute this example, you are on your way. + Le texte entre la paire de guillemets est une chaîne littérale. La déclaration ##[[KeyPgPrint Print]]## est utilisée pour la sortie du texte à l'écran. Si vous pouvez éditer, compiler et exécuter cet exemple, vous êtes sur la bonne voie. -{{fbdoc item="section" value="Using a Variable to Store Data"}} - Sometimes in a program we will want to store some information somewhere, in memory, and then use it later. To store something in memory we use a variable. All variables in FreeBASIC are of some specific type, like a number or a string. We use the ##[[KeyPgDim Dim]]## statement to declare a variable name and specify what type of information we want to store in it. +{{fbdoc item="section" value="Utilisation d'une variable pour stocker des données + Parfois, dans un programme, nous voulons stocker des informations quelque part, dans la mémoire, puis l'utiliser plus tard. Pour stocker quelque chose dans la mémoire, nous utilisons une variable. Toutes les variables dans FreeBasic sont d'un type spécifique, comme un nombre ou une chaîne. Nous utilisons l'instruction ##[[KeyPgDim Dim]]## pour déclarer un nom de variable et préciser quel type d'information nous voulons y entreposer. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer2.bas"}}%%(freebasic) + %%(freebasic) Dim text As String text = "Hello World!" Print text %% - We are using ##[[KeyPgDim Dim]]## to let the compiler know that we want to use a variable named ##//text//## in our program and that we will be putting ##[[KeyPgString String]]## data in it. We then assign (copy) ##"Hello World!"## in to the variable. Finally, we use ##[[KeyPgPrint Print]]## to output it to the display. + Nous utilisons ##[[KeyPgDim Dim]]## pour faire savoir au compilateur que nous voulons utiliser une variable appelée ##//text//## dans notre programme et que nous allons déposer dedans des données de type ##[[KeyPgString String (Chaîne)]]##. Ensuite nous attribuons (copie) ##"Hello World!"## dans la variable. Enfin, nous utilisons ##[[KeyPgPrint Print]]## pour l'afficher à l'écran. -{{fbdoc item="section" value="Using a Variable in an Expression"}} - An //expression// is a generic term for describing a part of the source code that can be evaluated. After an expression is evaluated, we can then do something with it, like assign (copy) it to a variable. +{{fbdoc item="section" value="Utilisation d'une variable dans une expression + Une //expression// est un terme générique pour décrire une partie du code source qui peut être évaluée. Après qu'une expression ait été évaluée, nous pouvons alors faire quelque chose avec elle, comme l'assigner (copier) à une variable. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer3.bas"}}%%(freebasic) + %%(freebasic) Dim a As String, b As String, text As String a = "Hello" b = "World" text = a + " " + b + "!" Print text %% - We are assigning the variables ##//a//## and ##//b//## with some data. We are then using the variables ##//a//## and ##//b//## in an expression which is then assigned to ##//text//##. Finally, we output the result to the display. + Nous affectons certaines données aux variables ##//a//## et ##//b//##. Puis nous utilisons les variables ##//a//## et ##//b//## dans une qui est affectée à ##//text//##. Enfin, nous affichons le résultat à l'écran. -{{fbdoc item="section" value="Getting Input from the User"}} - Often, we have no idea what data is needed for a program unless the user gives it to us. We can't put it in our source code since we won't know what it is until the user runs the program and tells us what it is. +{{fbdoc item="section" value="Saisir des données de la part de l'utilisateur + Souvent, nous n'avons aucune idée des données nécessaires pour le programme car c'est l'utilisateur qui doit les fournir. Nous ne pouvons les mettre dans notre code source du programme puisque nous ne les connaîtrons que lorsque l'utilisateur utilisera le programme et nous dira ce qu'il en est. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer4.bas"}}%%(freebasic) + %%(freebasic) Dim answer As String -Input "Type something and press enter:", answer -Print "You typed: '"; answer; "'" +Input "Tapez quelque chose et appuyez enter:", answer +Print "Vous avez tape: '"; answer; "'" %% - Here the ##[[KeyPgInput Input]]## statement will first, output some information to the display, and then wait for the user to give the program some data. In this example, we just output back to the display, exactly what the user typed in. + Tout d'abord, l'instruction ##[[KeyPgInput Input]]## affichera certaines informations à l'écran, puis attendra que l'utilisateur fournisse certaines données au programme. Dans cet exemple, nous afficherons à l'écran exactement ce que l'utilisateur aura tapé. -{{fbdoc item="section" value="Doing Some Math"}} - Variables and expressions are not just limited to strings. Most early languages didn't handle strings very well if at all. Writing mathematical expressions is similar to how they might be written with pencil and paper. +{{fbdoc item="section" value="Faire des maths + Variables et expressions ne sont pas seulement limités à des chaînes. La plupart des premiers langages ne géraient pas très bien les chaînes. L'écriture d'expressions mathématiques est semblable à la façon dont elles peuvent être écrites avec un crayon et du papier. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer5.bas"}}%%(freebasic) + %%(freebasic) Dim a As Integer, b As Integer, c As Integer a = 5 @@ -67,53 +67,53 @@ Print "a = "; a Print "a = "; b Print "a + b = "; c %% - We are assigning values to the variables ##//a//##, ##//b//## and ##//c//##. We are using ##[[KeyPgInteger Integer]]## for the variables' data type. An integer can be positive or negative, but not have any fractions. + Nous attribuons des valeurs aux variables ##//a//##, ##//b//## et ##//c//##. Nous utilisons le type ##[[KeyPgInteger Integer (Entier)]]## pour les variables. Un entier ne peut être positif ou négatif, mais il n'y a pas de fractions. -{{fbdoc item="section" value="Doing Some Math with Input"}} - This is similar to the previous example, except we will let the user choose the numbers we are going to add together. +{{fbdoc item="section" value="Faire des maths avec saisie de données + Ceci est similaire à l'exemple précédent, Ceci est similaire à l'exemple précédent, sauf que nous laissons l'utilisateur choisir les nombres que nous allons additionner. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer6.bas"}}%%(freebasic) + %%(freebasic) Dim a As Integer, b As Integer, r As Integer -Input "Enter a number:", a -Input "Enter another number:", b +Input "Entrez un nombre:", a +Input "Entrez un autre nombre:", b r = a + b -Print "The sum of the numbers is "; r +Print "La somme des nombres est "; r %% - ##[[KeyPgDim Dim]]## lets the compiler know which variable names we want to use and that they are going to hold ##[[KeyPgInteger Integer]]## data. We are using ##[[KeyPgInput Input]]## to get the numbers from the user, and ##[[KeyPgPrint Print]]## to display the results. + ##[[KeyPgDim Dim]]## permet au compilateur de savoir quels noms de variables nous voulons utiliser et qu'elles vont contenir des données de type ##[[KeyPgInteger Integer]]##. Nous utilisons ##[[KeyPgInput Input]]## pour que l'utilisateur donne les valeurs des nombres et ##[[KeyPgPrint Print]]## pour afficher le résultat. -{{fbdoc item="section" value="Doing More Math with Input"}} - Numeric variables are not limited to just integers. We can also use ##[[KeyPgSingle Single]]## or ##[[KeyPgDouble Double]]## precision data types which can represent fractions. In this example we will take some input from the user to convert a weight in pounds to kilograms. +{{fbdoc item="section" value="Faire plus de maths avec saisie de données + Les variables numériques ne sont pas limitées seulement à des nombres entiers. Nous pouvons également utiliser des types de données ##[[KeyPgSingle Single]]## ou ##[[KeyPgDouble Double]]## précision qui peuvent représenter des fractions. Dans cet exemple nous saisirons des entrées de l'utilisateur correspondant à un poids en livres pour une conversion en kilogrammes. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer7.bas"}}%%(freebasic) + %%(freebasic) Dim lb As Single, kg As Single -Input "Enter a weight in pounds:", lb +Input "Entrez un poids en pounds:", lb kg = lb * 0.454 -Print lb; " lb. is equal to "; kg; " kg" +Print lb; " lb. est egal a "; kg; " kg" %% -{{fbdoc item="section" value="Repeating Statements"}} - Using ##[[KeyPgFornext For...Next]]## statement we can tell the program to do something repeatedly a set number of times. For example lets say we wanted to add up all the numbers from 1 to 100. +{{fbdoc item="section" value="Instructions de répétition + En utilisant l'instruction ##[[KeyPgFornext For...Next]]## nous pouvons dire au programme de faire quelque chose en le répétant un certain nombre de fois. Par exemple, disons que nous voulons ajouter tous les nombres de 1 à 100. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer8.bas"}}%%(freebasic) + %%(freebasic) Dim total As Integer Dim number As Integer total = 0 For number = 1 To 100 total = total + number Next -Print "The sum of number from 1 to 100 is "; total +Print "La somme des nombres de 1 a 100 est "; total %% -{{fbdoc item="section" value="Making a Decision"}} - A program can choose which statements to execute using a conditional statement like ##[[KeyPgIfthen If...Then]]##. We can use the value of a variable or the result of an expression to decide if we should, or should not, execute one or more statements. +{{fbdoc item="section" value="Prendre une décision + Un programme peut choisir les instructions à exécuter en utilisant une instruction conditionnelle comme ##[[KeyPgIfthen If...Then]]##. Nous pouvons utiliser les valeurs d'une variable ou les résultats d'une expression pour décider si nous devrions ou ne devrions pas, exécuter une ou plusieurs instructions. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer9.bas"}}%%(freebasic) + %%(freebasic) Dim number As Integer -Input "Enter a number : ", number -Print "Your number is "; +Input "Entrez un nombre : ", number +Print "Votre nombre est "; If number < 0 Then Print "negative" ElseIf number > 0 Then @@ -123,21 +123,21 @@ Else End If %% - After getting a number from the user, we are going to output a word ( positive, negative, or zero ) based on which condition matches the statement. + Après la saisie d'un nombre par l'utilisateur, nous allons afficher un mot (positive, négative ou zéro) en se basant sur l'instruction qui correspond à la condition. -{{fbdoc item="section" value="Repeating Statements (Again)"}} - Here we will use another looping structure ##[[KeyPgDoloop Do...Loop]]## to repeat some statements. How will the program know to stop repeating the statements? We will use ##[[KeyPgIfthen If...Then]]## to make the decision when to get out of the loop. +{{fbdoc item="section" value="Instructions de répétition (encore) + Ici, nous allons utiliser une autre structure de boucle ##[[KeyPgDoloop Do...Loop]]## pour répéter certaines instructions. Comment le programme sait-il qu'il doit cesser de répéter les instructions? Nous utiliserons ##[[KeyPgIfthen If...Then]]## pour prendre la décision de sortir de la boucle. - {{fbdoc item="filename" value="examples/manual/proguide/primer/primer10.bas"}}%%(freebasic) + %%(freebasic) Dim total As Single, count As Single, number As Single Dim text As String -Print "This program will calculate the sum and average for a" -Print "list of numbers. Enter an empty value to end." +Print "Ce programme calculera calculate la somme et la moyenne pour une" +Print "liste de nombres. Entrez une valeur vide pour finir." Print Do - Input "Enter a number : ", text + Input "Entrez un nombre : ", text If text = "" Then Exit Do End If @@ -148,10 +148,10 @@ Do Loop Print -Print "You entered "; count; " numbers" -Print "The sum is "; total +Print "Vous avez entre "; count; " numbers" +Print "La somme est "; total If count <> 0 Then - Print "The average is "; total / count + Print "La moyenne est "; total / count End If %% diff --git a/fbdocs/manual/cache/ProPgProcedurePointers.wakka b/fbdocs/manual/cache/ProPgProcedurePointers.wakka index 621f331215..1a4cab7f13 100644 --- a/fbdocs/manual/cache/ProPgProcedurePointers.wakka +++ b/fbdocs/manual/cache/ProPgProcedurePointers.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="Pointers to Procedures"}}---- -Pointers that point to procedures +Pointeurs qui pointent vers des procédures - Just as pointers can be made to point to an ##[[KeyPgInteger Integer]]## or ##[[KeyPgSingle Single]]## type, pointers can also point to procedures, that is, they can store the address of a procedure. + Tout comme les pointeurs peuvent être faits pour pointer vers un type ##[[KeyPgInteger Integer]]## ou ##[[KeyPgSingle Single]]##, les pointeurs peuvent aussi pointer vers des procédures, c'est à dire qu'ils peuvent stocker l'adresse d'une procédure. -{{fbdoc item="section" value="Declaration"}} - To declare a pointer to procedure, use the ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## keywords, followed by any parameters and return value type: +{{fbdoc item="section" value="Déclaration + Pour déclarer un pointeur vers une procédure, utilisez les mots-clefs ##[[KeyPgSub Sub]]## ou ##[[KeyPgFunction Function]]##, suivi de paramètres et du type de la valeur de retour: {{fbdoc item="filename" value="examples/manual/proguide/procptrs/dimptr.bas"}}%%(freebasic) -' declares a pointer to sub procedure that takes no arguments +' déclare un pointeur vers une procédure Sub qui n'a aucun argument dim pointerToProcedure as sub %% - Procedure pointers store procedure addresses, which are retrieved using ##[[KeyPgOpAt Operator @]]## (Address of) or the ##[[KeyPgOpProcptr ProcPtr operator]]##: + Les pointeurs de procédure stockent l'adresse de la procédure, qui est récupérée à l'aide de ##[[KeyPgOpAt Operator @]]## (Adresse de) ou de ##[[KeyPgOpProcptr Procptr Operator]]##: {{fbdoc item="filename" value="examples/manual/proguide/procptrs/pfunc.bi"}}%%(freebasic) function Add (a as integer, b as integer) as integer @@ -20,21 +20,21 @@ end function dim pFunc as function (as integer, as integer) as integer = @Add %% -{{fbdoc item="section" value="Calling a procedure pointer"}} - The interesting thing about procedure pointers is that they can be called just like a procedure: +{{fbdoc item="section" value="Appel d'un pointeur de procédure + La chose intéressante à propos des pointeurs procédure est qu'ils peuvent être appelés tout comme une procédure: {{fbdoc item="filename" value="examples/manual/proguide/procptrs/calling.bas"}}%%(freebasic) -'' .. Add and pFunc as before .. +'' .. Add et pFunc comme avant .. #include once "pfunc.bi" print "3 + 4 = " & pFunc(3, 4) %% -{{fbdoc item="section" value="Passing procedure pointers to procedures"}} - Passing procedure pointers to other procedures is similar as well: +{{fbdoc item="section" value="Passage de pointeur de procédure à d'autres procédures + Passage de pointeurs de procédure à d'autres procédures est similaires à: {{fbdoc item="filename" value="examples/manual/proguide/procptrs/passing.bas"}}%%(freebasic) -'' .. Add and pFunc as before .. +'' .. Add et pFunc comme avant .. #include once "pfunc.bi" function DoOperation (a as integer, b as integer, operation as function (as integer, as integer) as integer) as integer @@ -43,10 +43,10 @@ end function print "3 + 4 = " & DoOperation(3, 4, @Add) %% - Because procedure pointer declarations can be lengthy, it often helps to create a type alias for the procedure pointer, in an effort to make clearer code: + Parce que les déclarations de pointeur de procédure peuvent être longues, il est souvent utile de créer un alias de type pour le pointeur de procédure, dans un effort de clarification du code: {{fbdoc item="filename" value="examples/manual/proguide/procptrs/alias.bas"}}%%(freebasic) -'' .. Add and pFunc as before .. +'' .. Add et pFunc comme avant .. #include once "pfunc.bi" type operation as function (as integer, as integer) as integer @@ -58,8 +58,8 @@ end function print "3 + 4 = " & DoOperation(3, 4, @Add) %% -{{fbdoc item="section" value="Pointers to procedure pointers"}} - Because the syntax of a procedure pointer does not allow declaration of a pointer to procedure pointer, a type alias is used. Notice how it is necessary to surround a dereferenced pointer to procedure pointer by parenthesis when calling the procedure. This is because the function-call operator '()' has higher precedence than ##[[KeyPgOpValueOf Operator *]]## (Value of): +{{fbdoc item="section" value="Pointeurs de pointeurs de procédure + Parce que la syntaxe d'un pointeur de procédure ne permet pas de déclaration d'un pointeur vers un pointeur de procédure, un alias de type est utilisé. Notez comment il est nécessaire d'entourer un pointeur déréférencé vers un pointeur de procédure par des parenthèses lors de l'appel de la procédure. C'est parce que l'opérateur d'appel de fonction "()" a une priorité supérieure à ##[[KeyPgOpValueOf Operator *]]## (Valeur de): {{fbdoc item="filename" value="examples/manual/proguide/procptrs/procptrs.bas"}}%%(freebasic) sub Halve (byref i as integer) @@ -91,6 +91,40 @@ wend print "Value of 'i' after all operations performed: " & i %% +{{fbdoc item="see"}} + - ##[[KeyPgSub Sub]]## + +- ##[[KeyPgFunction Function]]## +- ##[[KeyPgPointer Pointer]]## + - ##[[KeyPgOpAt Opérateur * (Adresse de)]]## + - ##[[KeyPgOpProcptr Procptr Operator]]## + ' + ' When this is supported, you will only need to remove the static wrapper + ' function presented here, to maintain compatibility. + '/ + +type T + declare function test(byval number as integer) as integer + declare static function test(byref this as T, byval number as integer) as integer + dim as integer i = 420 +end type + +function T.test(byval number as integer) as integer + return i + number +end function + +function T.test(byref this as T, byval number as integer) as integer + return this.test(number) +end function + +dim p as function(byref as T, byval as integer) as integer +p = @T.test + +dim as T obj + +print p(obj, 69) '' prints 489 +%% + {{fbdoc item="see"}} - ##[[KeyPgSub Sub]]## - ##[[KeyPgFunction Function]]## diff --git a/fbdocs/manual/cache/ProPgProcedures.wakka b/fbdocs/manual/cache/ProPgProcedures.wakka index 64a383a3cf..79919e3198 100644 --- a/fbdocs/manual/cache/ProPgProcedures.wakka +++ b/fbdocs/manual/cache/ProPgProcedures.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Procedures Overview"}}---- -Overview of the different FB procedure types. +Vue d'ensemble des différents types de procédures FB. - Procedures are blocks of code that can be executed, or called, from anywhere in a program, any number of times. The code that is executed is called the procedure body. There are two types of procedures in FreeBASIC: procedures that don't return a value and procedures that do. + Les procédures sont des blocs de code qui peuvent être exécutés ou appelés, un certain nombre de fois, depuis n'importe quel endroit d'un programme. Le code qui est exécuté est appelé le corps de la procédure. Il existe deux types de procédures sous FreeBASIC: des procédures qui ne retournent pas de valeur et des procédures qui en retournent une. -{{fbdoc item="section" value="Subs"}} - //Subs// are procedures that don't return values. They are declared using the ##[[KeyPgDeclare Declare]]## keyword, and defined using the ##[[KeyPgSub Sub]]## keyword. Declaring a procedure introduces its name so that it can be called, and a procedure definition lists the statements of code that will be executed when called. A //sub// is called simply by using its name somewhere in the program. +{{fbdoc item="section" value="Les procédures Sub + Les //Sub// sont des procedures qui ne retournent aucune valeur. Eles sont déclarées en utilisant le mot-clef ##[[KeyPgDeclare Declare]]## et définies en utilisant le mot-clef ##[[KeyPgSub Sub]]##. Déclarer une de procédures introduit son nom afin qu'elle puisse être appelée et la définition de la procédure liste les instructions de code qui seront exécutées lorsqu'elle sera appelée. Une //sub// est appelée simplement en utilisant son nom queque part dans le programme. {{fbdoc item="filename" value="examples/manual/proguide/procs/subs.bas"}}%%(freebasic) ' introduces the sub 'MyProcedure' @@ -18,16 +18,16 @@ sub MyProcedure print "the body of MyProcedure" end sub %% - will produce the output: + produira l'affichage: %% the body of MyProcedure %% - Notice that only the declaration is needed to call the procedure. The procedure can be defined later in code, or even in a different source file altogether. + Notez que seule la déclaration est nécessaire pour appeler la procédure. La procédure peut être définie ultérieurement dans le code ou même dans un fichier source tout à fait différent. -{{fbdoc item="section" value="Functions"}} - //Functions// are procedures that return a value back to the point in code in which they are called. You can think of a //function// call as evaluating to some expression, just like a variable or object. They are declared using the ##[[KeyPgDeclare Declare]]## keyword, and defined using the ##[[KeyPgFunction Function]]## keyword. The type of value that //functions// return is specified at the end of the declaration. +{{fbdoc item="section" value="Les fonctions + Les //fonctions// sont des procédures qui retournent une valeur au point du code depuis lequel elles ont été appelées. Vous pouvez penser qu'un appel de //fonction// est comme l'évaluation d'une expression, tout comme une variable ou un objet. Elles sont déclarées en utilisant le mot-clef ##[[KeyPgDeclare Declare]]## et définies en utilisant le mot-clef ##[[KeyPgFunction Function]]##. Le type de valeur que la //fonction// retourne est spécifié à la fin de la déclaration. {{fbdoc item="filename" value="examples/manual/proguide/procs/functions.bas"}}%%(freebasic) ' introduces and defines a procedure that returns an integer value @@ -39,18 +39,18 @@ end function dim i as integer = MyProcedure print i %% - will produce the output: + produira l'affichage: -%% -10 -%% - Since a definition is a declaration, a procedure can be called after it has been defined, as well. +%%10%%Comme la définition est une déclaration, ainsi la procédure peut être appelée après qu'elle a été définie. +Il s'agit d'une convention commune, lors de l'appel d'une procédure de placer des parenthèses ##'()'## après le nom de la procédure, pour signifier un appel de procédure. Cependant, FreeBASIC ne l'exige pas. +{{fbdoc item="see"}} + - [[ProPgPassingArguments Passage d'arguments aux procédures]] - It is a common convention when calling a procedure to place parenthesis ##'()'## after the procedure name, to signify a procedure call. ""FreeBASIC"" does not require this, however. + - [[ProPgReturnValue Retourner une valeur]] -{{fbdoc item="see"}} - - [[ProPgPassingArguments Passing Arguments to Procedures]] - - [[ProPgReturnValue Returning a Value]] +- ##[[KeyPgDeclare Declare]]## + - ##[[KeyPgSub Sub]]## + - ##[[KeyPgFunction Function]]## - ##[[KeyPgDeclare Declare]]## - ##[[KeyPgSub Sub]]## - ##[[KeyPgFunction Function]]## diff --git a/fbdocs/manual/cache/ProPgProfiling.wakka b/fbdocs/manual/cache/ProPgProfiling.wakka index b355b95e3c..51c665e86c 100644 --- a/fbdocs/manual/cache/ProPgProfiling.wakka +++ b/fbdocs/manual/cache/ProPgProfiling.wakka @@ -1,67 +1,67 @@ {{fbdoc item="title" value="Profiling"}}---- -Profiling can be used to analyze the performance of an application. +Le profilage peut être utilisé pour analyser les performances d'une application. -The performance of an application might be measured by how many times functions are called, how much time is spent executing those functions, and which functions are calling other functions. This can help to identify functions that might be taking too long to execute or executed too many times and that might be worth reviewing for optimization. +Les performances d'une application peuvent être mesurées par le nombre de fois que les fonctions sont appelées, combien de temps est consacré à l'exécution de ces fonctions et quelles sont les fonctions qui appellent d'autres fonctions. Cela peut aider à identifier les fonctions susceptibles de prendre trop de temps à l'exécution ou exécutées trop de fois et qui pourraient mériter d'être examinées pour une optimisation. -FreeBASIC uses GPROF for analyzing the execution of an application. The profiler information is collected while the program is running, and GPROF is used to report on the collected data afterward. +FreeBASIC utilise GPROF pour analyser l'exécution d'une application. Les informations de profilage sont collectées pendant que le programme est en cours d'exécution et GPROF est utilisé par la suite pour le rapport sur les données recueillies. -The three basic steps to profiling a program are: - - 1) Prepare the program for profiling by compiling source with the //[[CompilerOptprofile -profile]]// option. - - 2) Run the program to collection information ( stored in ##gmon.out## ). - - 3) Analyze the information collected using GPROF. +Les trois étapes de base pour le profilage d'un programme sont: + - 1) Préparer le programme pour le profilage en compilant le source avec l'option //[[CompilerOptprofile -profile]]//. + - 2) Exécuter le programme de collecte d'informations (stockées dans ##gmon.out##). + - 3) Analyser les informations recueillies à l'aide de GPROF. -Full documentation on GPROF is available here: [[http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html]]. If the documentation has moved from that location, simply search the web for "GNU GPROF" and a relevant link should be returned. +Une documentation complète sur GPROF est disponible ici: [[http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html]]. Si la documentation s'est déplacée de cet endroit, il suffit de rechercher sur le web pour "GNU GPROF" et un lien pertinent devrait être retourné. -FreeBASIC supports function profiling; not basic-block or line-by-line profiling. +FreeBASIC prend en charge le profilage des fonctions; pas de profilage bloc-de-base et ligne-par-ligne. -{{fbdoc item="section" value="Preparing a Program for Profiling"}} - Only code that is compiled with the //[[CompilerOptprofile -profile]]// command line option can be profiled. Pass the //[[CompilerOptprofile -profile]]// option to the FreeBASIC compiler to prepare the program to be profiled. This will tell the compiler to insert special startup code at the beginning of the application as well as at the beginning of each function. +{{fbdoc item="section" value="Préparer un programme pour le profilage + Seul le code qui est compilé avec l'option de ligne de commande //[[CompilerOptprofile -profile]]// peut être profilé. Passer l'option //[[CompilerOptprofile -profile]]// pour le compilateur FreeBASIC pour préparer le programme au profilage. Ceci indique au compilateur d'insérer du code de démarrage spécial au début de l'application ainsi qu'au début de chaque fonction. %% fbc program.bas -profile %% -{{fbdoc item="section" value="Profiling the Program"}} - The information needed to analyze execution of the program is gathered while the program is running. Run the program to begin collecting the function call information. This information is automatically stored in a file named ##gmon.out## in the same directory as the program. +{{fbdoc item="section" value="Le profilage du programme + Les informations nécessaires pour analyser l'exécution du programme sont recueillies lorsque le programme est en cours d'exécution. Exécutez le programme pour commencer à collecter les informations d'appel de fonctions. Ces informations sont automatiquement stockées dans un fichier nommé ##gmon.out## dans le même répertoire que le programme. -{{fbdoc item="section" value="Analyzing the Program's Output"}} - Use GPROF to analyze the output. The default report for GPROF includes descriptions on what each of the columns of values mean. If you are new to using GPROF, you may want to first run the default report and read through the descriptions. The output from GPROF can be saved to a file by redirection. +{{fbdoc item="section" value="Analyse des résultats du programme + Utiliser GPROF pour analyser les résultats. Le rapport par défaut de GPROF inclut des descriptions de ce que signifie chacune des colonnes de valeurs. Si vous êtes nouvel utilisateur de GPROF, vous pouvez d'abord exécuter le rapport par défaut et lire les descriptions. La sortie de GPROF peut être sauvegardée dans un fichier de redirection. - Save output from GPROF to ##profile.txt##: + Enregistrer la sortie de GPROF dans ##profile.txt##: %% gprof program[.exe] > profile.txt %% - Show just the flat report with no descriptions: + Afficher uniquement le rapport simple sans les descriptions: %% gprof program[.exe] --brief --flat-profile > profile.txt %% -{{fbdoc item="section" value="Combining the Results of More than One Session"}} - GPROF also has a '--sum' option for conveniently combining results from multiple execution sessions. Here is an example of usable: - - Run your program once. This will create ##gmon.out##. - - Use the command : +{{fbdoc item="section" value="Combiner les résultats de plusieurs sessions + GPROF a aussi une option '--sum' pour combiner commodément les résultats de plusieurs sessions d'exécutions. Voici un exemple utilisable: + - Exécutez votre programme une fois. Cela créera ##gmon.out##. + - Utilisez la commande: ##mv gmon.out gmon.sum## - or + ou ##rename gmon.out gmon.sum##. - - Run your program again. This will create new data in ##gmon.out##. - - Merge the new data in ##gmon.out## into ##gmon.sum## using the command: + - Exécutez à nouveau votre programme. Cela créera de nouvelles données dans ##gmon.out##. + - Fusionnez les nouvelles données dans ##gmon.out## dans ##gmon.sum## en utilisant la commande: ##gprof --sum program[.exe] gmon.out gmon.sum## - - Repeat the last two steps as often as needed. - - Analyze the summary data using the command: + - Répétez les deux dernières étapes autant de fois que nécessaire. + - Analysez les données de synthèse à l'aide de la commande: ##gprof program[.exe] gmon.sum > profile.txt## -{{fbdoc item="section" value="FreeBASIC Profiling Internals"}} - When the '-profile' option is enabled, one or more bits of code are added to the program. - - Call to ##"_monstartup()"## at the beginning of the implicit main to initialize the profiling library. - - Call to ##"mcount()"## at the beginning of each procedure. This is how the profiling library keeps track of what function is being and by which other function. - - Linking of additional program startup object code. (e.g. ##gcrt?.o## ) +{{fbdoc item="section" value="Fonctionnement interne du profilage FreeBASIC + Quand l'option '-profile' est validée, un ou plusieurs morceaux de code sont ajoutés au programme. + - L'appel à ##"_monstartup()"## au début du code principal implicite initialise la bibliothèque de profilage. + - Un appel à ##"mcount()"## au début de chaque procédure. C'est ainsi que la bibliothèque de profilage garde la trace de ce que fait la fonction en cours et aussi les autres fonctions. + - Lier du code de programmation supplémentaire de démarrage. (par exemple, ##gcrt?.o## ) - The profiling library itself may be in a separate library or part of the C runtime library. - - mingw will require ##gcrt2.o## and ##libgmon.a ## - - cygwin will require gcrt0.o and ##libgmon.a## - - dos will require ##gcrt0.o## (profiler code is in ##libc.a##) - - linux will require ##gcrt1.o## (profiler code is in ##libc.a##) + La bibliothèque de profilage peut être elle-même dans une bibliothèque séparée ou être une partie de la bibliothèque d'exécution C. + - mingw nécessitera ##gcrt2.o## et ##libgmon.a ## + - cygwin nécessitera gcrt0.o et ##libgmon.a## + - dos nécessitera ##gcrt0.o## (le code de profilage est dans ##libc.a##) + - linux nécessitera ##gcrt1.o## (le code de profilage est dans ##libc.a##) - The details may vary from one port of FreeBASIC to the next, but source code built for profiling with FreeBASIC should be compatible with other languages also supporting GPROF. + Les détails peuvent varier d'un portage de FreeBasic à l'autre, mais le code source construit pour le profilage avec FreeBasic devrait être compatible avec d'autres langages qui supportent GPROF. {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgProperties.wakka b/fbdocs/manual/cache/ProPgProperties.wakka new file mode 100644 index 0000000000..b417f3c40e --- /dev/null +++ b/fbdocs/manual/cache/ProPgProperties.wakka @@ -0,0 +1,352 @@ +{{fbdoc item="title" value="Properties"}}---- + +Properties are a special mix of member variable and member procedure. They provide a way to set or retrieve values of an object, through normal looking assignments or member accesses, but also let the object perform actions if it needs to update itself. + +**{{anchor name="BASIC|Basic properties"}}** + Declaring and using setter and getter properties. +**{{anchor name="INDEXED|Indexed properties"}}** + Properties with an additional parameter. + +{{anchor name="BASIC"}}{{fbdoc item="section" value="Basic properties"}} + + A property is declared similar to a [[ProPgMemberProcedures member procedure]], except that the [[KeyPgProperty Property]] keyword is used instead of ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]##. For example, let's consider a window class for a windowing system or GUI library. + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties1.bas"}}%%(freebasic) +type Window +private: + as string title_ +end type + +dim as Window w +%% + + In order to set the window's title, a //setter// property can be added: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties2.bas"}}%%(freebasic) +type Window + declare property title(byref s as string) +private: + as string title_ +end type + +property Window.title(byref s as string) + this.title_ = s +end property + +dim as Window w +w.title = "My Window" +%% + + It is very similar to a member [[KeyPgSub Sub]], as it takes a parameter and updates the object to the new state based on the parameter. However, the syntax for sending this parameter is a basic assignment, not a function call. By assigning the new value to the ##title## property, the property procedure will automatically be called with the given new value, and can update the window to reflect the change. It is up to the object how to represent the property state internally. + + By design, properties can only be assigned one value at a time, and as a result the property procedure can not have more than one parameter. + + After setting the window title, it should also be possible to retrieve it. Here is how to add a //getter// property: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties3.bas"}}%%(freebasic) +type Window + '' setter + declare property title(byref s as string) + '' getter + declare property title() as string +private: + as string title_ +end type + +'' setter +property Window.title(byref s as string) + this.title_ = s +end property + +'' getter +property Window.title() as string + return this.title_ +end property + +dim as Window w +w.title = "My Window" +print w.title +%% + + The getter is very similar to a [[KeyPgFunction Function]]. It is supposed to return the current value of the property, and it allows the current value to be calculated from other internal values, if needed. Note that both //setter// and //getter// use the same identifier, indicating they handle the same property. + + Just like [[ProPgMemberProcedures method overloading]], it is possible to specify multiple setters, provided they have different parameter types: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties4.bas"}}%%(freebasic) +type Window + declare property title(byref s as string) + declare property title(byval i as integer) + declare property title() as string +private: + as string title_ +end type + +property Window.title(byref s as string) + this.title_ = s +end property + +property Window.title(byval i as integer) + this.title_ = "Number: " & i +end property + +property Window.title() as string + return this.title_ +end property + +dim as Window w +w.title = "My Window" +print w.title +w.title = 5 +print w.title +%% + + In comparison to this example of properties, here is similar code that does not use properties: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties5-counter-example.bas"}}%%(freebasic) +type Window + declare sub set_title(byref s as string) + declare sub set_title(byval i as integer) + declare function get_title() as string +private: + as string title +end type + +sub Window.set_title(byref s as string) + this.title = s +end sub + +sub Window.set_title(byval i as integer) + this.title = "Number: " & i +end sub + +function Window.get_title() as string + return this.title +end function + +dim as Window w +w.set_title("My Window") +print w.get_title() +w.set_title(5) +print w.get_title() +%% + + The code is basically the same, only the syntax is different. Properties are specifically designed to combine the setter/getter concept and the language's normal way of literally [[CatPgOpAssignment assigning]] and [[CatPgOpTypeclass accessing]] values to a class' member variables. It is up to the programmers to decide which way they prefer. + + Here is an example demonstrating a text user interface window class allowing to set position and title using properties: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties-tui.bas"}}%%(freebasic) +namespace tui + type point + dim as integer x, y + end type + + type char + dim as ubyte value + dim as ubyte color + end type + + type window + '' public + declare constructor _ + ( _ + x as integer = 1, y as integer = 1, _ + w as integer = 20, h as integer = 5, _ + title as zstring ptr = 0 _ + ) + + declare destructor + + declare sub show + + '' title property + declare property title as string + declare property title( new_title as string ) + + '' position properties + declare property x as integer + declare property x( new_x as integer ) + + declare property y as integer + declare property y( new_y as integer ) + + private: + declare sub redraw + declare sub remove + declare sub drawtitle + + dim as string p_title + dim as point pos + dim as point siz + end type + + constructor window _ + ( _ + x_ as integer, y_ as integer, _ + w_ as integer, h_ as integer, _ + title_ as zstring ptr _ + ) + + pos.x = x_ + pos.y = y_ + siz.x = w_ + siz.y = h_ + + if( title_ = 0 ) then + title_ = @"untitled" + end if + + p_title = *title_ + end constructor + + destructor window + color 7, 0 + cls + end destructor + + property window.title as string + title = p_title + end property + + property window.title( new_title as string ) + p_title = new_title + drawtitle + end property + + property window.x as integer + return pos.x + end property + + property window.x( new_x as integer ) + remove + pos.x = new_x + redraw + end property + + property window.y as integer + property = pos.y + end property + + property window.y( new_y as integer ) + remove + pos.y = new_y + redraw + end property + + sub window.show + redraw + end sub + + sub window.drawtitle + locate pos.y, pos.x + color 15, 1 + print space( siz.x ); + locate pos.y, pos.x + (siz.x \ 2) - (len( p_title ) \ 2) + print p_title; + end sub + + sub window.remove + color 0, 0 + var sp = space( siz.x ) + for i as integer = pos.y to pos.y + siz.y - 1 + locate i, pos.x + print sp; + next + end sub + + sub window.redraw + drawtitle + color 8, 7 + var sp = space( siz.x ) + for i as integer = pos.y + 1 to pos.y + siz.y - 1 + locate i, pos.x + print sp; + next + end sub +end namespace + +dim win as tui.window = tui.window( 3, 5, 50, 15 ) + +win.show +sleep 500 + +win.title = "Window 1" +sleep 250 +win.x = win.x + 10 +sleep 250 + +win.title = "Window 2" +sleep 250 +win.y = win.y - 2 +sleep 250 + +locate 25, 1 +color 7, 0 +print "Press any key..."; + +sleep +%% + + Note how updating the window's position or title automatically causes the window to be redrawn. + +{{anchor name="INDEXED"}}{{fbdoc item="section" value="Indexed properties"}} + + Properties can have an additional parameter that is called an ##index## (currently only one additional parameter is allowed). The index is specified in parentheses behind the property's name, as if the property was an array (with only one dimension). For example: + + {{fbdoc item="filename" value="examples/manual/proguide/udt/properties-indexed.bas"}}%%(freebasic) +type IntArray + '' setters + declare property value(index as integer, value as integer) + declare property value(index as string, value as integer) + declare property value(index as integer, value as string) + declare property value(index as string, value as string) + + '' getters + declare property value(index as integer) as integer + declare property value(index as string) as integer + +private: + dim as integer data_(0 to 9) +end type + +property IntArray.value(index as integer) as integer + return this.data_(index) +end property + +property IntArray.value(index as string) as integer + return this.data_(cint(index)) +end property + +property IntArray.value(index as integer, value as integer) + this.data_(index) = value +end property + +property IntArray.value(index as string, value as integer) + this.data_(cint(index)) = value +end property + +property IntArray.value(index as integer, value as string) + this.data_(index) = cint(value) +end property + +property IntArray.value(index as string, value as string) + this.data_(cint(index)) = cint(value) +end property + +dim a as IntArray + +a.value(0) = 1234 +a.value("1") = 5678 +a.value(2) = "-1234" +a.value("3") = "-5678" + +print a.value(0) +print a.value("1") +print a.value(2) +print a.value("3") + +sleep +%% + + This simulates an integer array that can be assigned strings, and even be indexed with strings. See KeyPgProperty for another example. + +{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgPtrArithmetic.wakka b/fbdocs/manual/cache/ProPgPtrArithmetic.wakka index 9e8ff98a6b..983a82642a 100644 --- a/fbdocs/manual/cache/ProPgPtrArithmetic.wakka +++ b/fbdocs/manual/cache/ProPgPtrArithmetic.wakka @@ -1,73 +1,73 @@ {{fbdoc item="title" value="Pointer Arithmetic"}}---- -Manipulating address values mathematically. +Manipulation des valeurs d'adresse mathématiquement. -**{{anchor name="OVERVIEW|Overview"}}** -**{{anchor name="ADDSUB|Adding and subtracting from pointers"}}** -**{{anchor name="INCDEC|Incrementing and decrementing pointers"}}** -**{{anchor name="DISTANCE|Distance between two pointers"}}** +**[[#OVERVIEW">Vue d'ensemble]]** +**[[#ADDSUB">Addition et soustraction de pointeurs]]** +**[[#INCDEC">Incrémentation et de décrémentation des pointeurs]]** +**[[#DISTANCE">Distance entre deux pointeurs]]** -{{anchor name="OVERVIEW"}}{{fbdoc item="section" value="Overview"}} +{{fbdoc item="section" value="Vue d'ensemble - It is often useful to iterate through memory, from one address to another. Pointers are used to accomplish this. While the type of a pointer determines the type of variable or object retrieved when the pointer is dereferenced (using ##[[KeyPgOpValueOf Operator * (Value of)]]##), it also determines the //distance//, in bytes, its particular type takes up in memory. For example, a ##[[KeyPgShort Short]]## takes up two (2) bytes in memory, while a ##[[KeyPgSingle Single]]## needs four (4) bytes. + Il est souvent utile de parcourir la mémoire, d'une adresse à une autre. Les pointeurs sont utilisés pour y parvenir. Bien que le type d'un pointeur détermine le type de variable ou d'objet récupéré lorsque le pointeur est déréférencé (en utilisant ##[[KeyPgOpValueOf Operator * (Valeur de)]]##), il détermine également la //longueur//, en octets, que son type particulier occupe en mémoire. Par exemple, un ##[[KeyPgShort Short]]## occupe deux (2) octets en mémoire, tandis qu'un ##[[KeyPgSingle Single]]## nécessite quatre (4) octets. -{{anchor name="ADDSUB"}}{{fbdoc item="section" value="Adding and subtracting from pointers"}} + - Pointers can be added to and subtracted from just like a numeric type. The result of this addition or subtraction is an address, and the type of pointer determines the distance from the original pointer. + {{fbdoc item="section" value="Addition et soustraction de pointeurs - For example, the following, + Les pointeurs peuvent être ajoutés et soustraits tout comme des types numériques. Le résultat de cette addition ou soustraction est une adresse et le type de le pointeur détermine la distance à partir du pointeur d'origine. -{{fbdoc item="filename" value="examples/manual/proguide/pointers/addsub.bas"}}%%(freebasic) +Par exemple, le texte suivant, dim p as integer ptr = new integer[2] +Dim p As Integer Ptr = New Integer[2] *p = 1 *(p + 1) = 2 -%% - will assign the values "##1##" and "##2##" to each integer in the array pointer to by ##//p//##. Since ##//p//## is an ##[[KeyPgInteger Integer]] [[KeyPgPointer Pointer]]##, the expression "##*(p + 1)##" is saying to dereference an ##[[KeyPgInteger Integer]]## four (4) bytes from ##//p//##; the "##1##" indicates a distance of "##1 * the size of an [[KeyPgInteger Integer]]##", or four (4) bytes. + %% - Subtraction follows the exact same principle. Remember, //a// - //b// = //a// + -//b//. + attribuera les valeurs "##1##" et "##2##" à chaque entier dans le tableau pointé par ##//p//##. Comme ##//p//## est un ##[[KeyPgInteger Integer]] [[KeyPgPointer Pointer]]##, l'expression "##*(p + 1)##" dit de déréférencer un ##[[KeyPgInteger Integer]]## de quatre (4) octets à partir de ##//p//##; le "##1##" indique une distance de "##1 * taille d'un [[KeyPgInteger Integer]]##", ou quatre (4) octets. -{{anchor name="INCDEC"}}{{fbdoc item="section" value="Incrementing and decrementing pointers"}} +La soustraction suit exactement le même principe. Remember, //a// - //b// = //a// + -//b//. - Sometimes it is more convenient to modify the pointer itself, in which case the combination addition and subtraction operators will work just like above. For example, the following, + -{{fbdoc item="filename" value="examples/manual/proguide/pointers/incdec.bas"}}%%(freebasic) -dim array(5) as short = { 32, 43, 66, 348, 112, 0 } +{{fbdoc item="section" value="Incrémentation et de décrémentation des pointeurs +Parfois il est plus commode de modifier le pointeur lui-même, dans ce cas, la combinaison de l'addition et de la soustraction des opérateurs fonctionne exactement comme ci-dessus. Par exemple, le texte suivant, dim p as short ptr = @array(0) -while (*p <> 0) - if (*p = 66) then print "found 66" - p += 1 -wend -%% - iterates through an array until it finds an element with the value of "##0##". If it finds an element with the value "##66##" it displays a nice message. +Dim array(5) As Short = { 32, 43, 66, 348, 112, 0 } + Dim p As Short Ptr = @array(0) + While (*p <> 0) +If (*p = 66) Then Print "found 66" +p += 1 + Wend -{{anchor name="DISTANCE"}}{{fbdoc item="section" value="Distance between two pointers"}} +%% - The distance between two pointers is retrieved with ##[[KeyPgOpSubtract Operator - (Subtract)]]##, and is measured in values, not bytes. For example, the following, + parcourt un tableau qu'il ne trouve pas l'élément avec la valeur "0". S'il trouve un élément avec la valeur "##66##" il affiche un message. -{{fbdoc item="filename" value="examples/manual/proguide/pointers/distance.bas"}}%%(freebasic) -type T as single + +{{fbdoc item="section" value="Distance entre deux des pointeurs -dim array(5) as T = { 32, 43, 66, 348, 112, 0 } +La distance entre deux des pointeurs est récupérée avec ##[[KeyPgOpSubtract Operator - (Subtract)]]## et est mesurée en valeur, pas en octets. Par exemple, le texte suivant, dim p as T ptr = @array(0) -while (*p <> 0) - p += 1 -wend -print p - @array(0) +Type T As Single + Dim array(5) As T = { 32, 43, 66, 348, 112, 0 } +Dim p As T Ptr = @array(0) +While (*p <> 0) +p += 1 + Wend + + Print p - @array(0) %% - will output "##5##" regardless of what type ##//T//## is. This is because there is a five (5) element difference between the first element of //array// (##32##) and the element pointed to by ##//p//## (##0##). + affichera "##5##" indépendamment du type de ##//T//##. C'est parce qu'il y a une différence de cinq éléments (5) entre le premier élément de //array// (##32##) et l'élément pointé par ##//p//## (##0##). +Plus précisément, si //a// et //b// sont deux pointeurs de type //T//, la distance entre eux est le nombre d'octets entre eux, divisé par la taille, en octets, de //T//, ou - Specifically, if //a// and //b// are both pointers of type //T//, the distance between them is the number of bytes between them, divided by the size, in bytes, of //T//, or -## - [[KeyPgAbs Abs]](cast(byte ptr, a) - cast(byte ptr, b)) / [[KeyPgSizeof Sizeof]](T) ## + [[KeyPgAbs Abs]](cast(byte ptr, a) - cast(byte ptr, b)) / [[KeyPgSizeof SizeOf]](T) + ## + {{fbdoc item="see"}} + - ##[[KeyPgOpAdd Opérateur + (Add)]]## + - ##[[KeyPgOpSubtract Opérateur - (Subtract)]]## -{{fbdoc item="see"}} - - ##[[KeyPgOpAdd Operator + (Add)]]## - - ##[[KeyPgOpSubtract Operator - (Subtract)]]## - - ##[[KeyPgOpAt Operator @ (Address of)]]## - - ##[[KeyPgOpValueOf Operator * (Value of)]]## - - [[CatPgOpPoint Pointer Operators]] - -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file +- ##[[KeyPgOpAt Opérateur @ (Address Of)]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgRadians.wakka b/fbdocs/manual/cache/ProPgRadians.wakka index c3ea5a7459..dd81cbedde 100644 --- a/fbdocs/manual/cache/ProPgRadians.wakka +++ b/fbdocs/manual/cache/ProPgRadians.wakka @@ -1,12 +1,12 @@ {{fbdoc item="title" value="Radian system of measuring angles"}}---- -All of the built-in trigonometric functions in FreeBASIC express angles in radians. +Toutes les applications intégrées des fonctions trigonométriques dans FreeBasic expriment les angles en radians. -A full circle is divided into 2 * pi radians or 360 degrees, which leads to the following conversions: +Un cercle complet est divisé en 2 * pi radians ou 360 degrés, ce qui entraîne les conversions suivantes: -%%radians = degrees * pi / 180 -degrees = radians * 180 / pi%% +%%radians = degrés * pi / 180 +degrés = radians * 180 / pi%% -Pi is a constant equal to the ratio of the circumference of a circle to its diameter. It can be calculated programmatically by multiplying the arctangent of 1 radian by 4: +Pi est une constante égale au rapport entre la circonférence d'un cercle son diamètre. Il peut être calculé par programmation en multipliant l'arc-tangente de 1 radian par 4: %%pi = atn(1) * 4%% diff --git a/fbdocs/manual/cache/ProPgReturnValue.wakka b/fbdocs/manual/cache/ProPgReturnValue.wakka index 1a29136a45..6efdb2ac3f 100644 --- a/fbdocs/manual/cache/ProPgReturnValue.wakka +++ b/fbdocs/manual/cache/ProPgReturnValue.wakka @@ -1,36 +1,36 @@ {{fbdoc item="title" value="Returning Values"}}---- -**Returning Values** refers to the ability of a ##[[KeyPgFunction Function]]## procedure to have a value when the function finishes such that the value can be used in an expression or assigned to a variable. +**Retourner une valeur** se réfère à la capacité d'une ##[[KeyPgFunction Function]]## d'avoir une valeur lorsqu'elle se termine de telle sorte que cette valeur peut être utilisée dans une expression ou affectée à une variable. -The value of a function can be returned in three ways: +La valeur d'une fonction peut être retournée de trois façons: {{fbdoc item="filename" value="examples/manual/proguide/procs/return-methods.bas"}}%%(freebasic) -'' Using the name of the function to set the return value and continue executing the function: +'' En utilisant le nom de la fonction pour définir la valeur de retour et poursuivre l'exécution de la fonction: Function myfunc1() As Integer myfunc1 = 1 End Function -'' Using the keyword 'Function' to set the return value and continue executing the function: +'' Utiliser le mot-clef 'Function' pour définir la valeur de retour et poursuivre l'exécution de la fonction: Function myfunc2() As Integer Function = 2 End Function -'' Using the keyword 'Return' to set the return value and immediately exit the function: +'' Utiliser le mot-clef 'Return' pour définir la valeur de retour et quitter immédiatement la fonction: Function myfunc3() As Integer Return 3 End Function %% {{fbdoc item="filename" value="examples/manual/proguide/procs/returnval.bas"}}%%(freebasic) -'' This program demonstrates a function returning a value. +'' Ce programme illustre une fonction retournant une valeur. Declare Function myFunction () As Integer Dim a As Integer -'Here we take what myFunction returns and add 10. +'Ici on prend ce que retourne myFunction et on ajoute 10. a = myFunction() + 10 -'knowing that myFunction returns 10, we get 10+10=20 and will print 20. +'sachant que myFunction retourne 10, nous obtenons 10+10=20 et afficherons 20. Print a Function myFunction () As Integer diff --git a/fbdocs/manual/cache/ProPgSharedLibraries.wakka b/fbdocs/manual/cache/ProPgSharedLibraries.wakka index 9e362e83d2..63635579e1 100644 --- a/fbdocs/manual/cache/ProPgSharedLibraries.wakka +++ b/fbdocs/manual/cache/ProPgSharedLibraries.wakka @@ -1,101 +1,178 @@ {{fbdoc item="title" value="Shared Libraries"}}---- -A shared library is compiled code that can loaded and used later used when running an executable. +Une bibliothèque partagée c'est du code compilé qui pourra être chargé et utilisé plus tard lors de l'exécution d'un exécutable. -When the compiler makes an executable, the basic source files are first turned in to object files. The object files are then linked together to make an executable. A shared library is much like a static library in that it contains object files. But a shared library is also like an executable in that it only gets loaded when the executable is running. +Lorsque le compilateur génère un exécutable, les fichiers sources de base sont d'abord transformés en fichiers objets. Les fichiers objets sont ensuite liés ensemble pour créer un exécutable. Une bibliothèque partagée c'est un peu comme une bibliothèque statique en ce qu'elle contient des fichiers objet. Mais une bibliothèque partagée est aussi comme un fichier exécutable en ce qu'elle est chargée uniquement lorsque l'exécutable est en cours d'exécution. -The library is referred to as shared, because the code in the library is loaded by an executable at runtime and can be loaded by more than one executable, even though there might only be one copy of the shared library. +La bibliothèque est dénommée partagée, parce que le code dans la bibliothèque est chargé par un fichier exécutable à l'exécution et peut être chargé par plus d'un exécutable, même s'il peut n'y avoir qu'une seule copie de la bibliothèque partagée. -Once the library is made, we can then use the code that it contains just as if we were compiling the source directly with our program. +Une fois que la bibliothèque est générée, on peut alors utiliser le code qu'elle contient comme si nous avions compilé les sources directement avec notre programme. -{{fbdoc item="section" value="Shared Library Example"}} - Following is a simple example of creating a shared library using these three files: - - ##mylib.bas## - the source for the library - - ##mylib.bi## - the header for the library - - ##mytest.bas## - a test program +{{fbdoc item="section" value="Exemple de bibliothèque partagée +Voici un exemple simple de création d'une bibliothèque partagée en utilisant ces trois fichiers: +- ##mylib.bas## - le source de la bibliothèque +- ##mylib.bi## - l'en-tête de la bibliothèque +- ##mytest.bas## - un programme de test - Our library will be a single module providing a single function: +Notre bibliothèque aura un module unique assurant une fonction unique: - {{fbdoc item="filename" value="examples/manual/proguide/shared-lib/mylib.bas"}}%%(freebasic) -'' mylib.bas -'' compile with: fbc -dll mylib.bas + %%(freebasic) -'' Add two numbers together and return the result -Public Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer Export - Return( x + y ) + '' mylib.bas + '' compiler avec: fbc -dll mylib.bas + '' Additionne deux nombres ensemble et retourne le résultat + + Public Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer Export + + Return( x + y ) End Function %% - Compile the library with: - ##fbc -dll mylib.bas## - - The ##-dll## option tells the compiler to take the source code, ##mylib.bas##, and turn it in to an object file ##mylib.o##, then store the object file in to a shared library. The name of the shared library will have a ##.so## extension or ##.dll## extension depending on if the platform is the linux or windows version. A library might contain many modules (source files) each with many functions, but for this simple example, it is just one each. - - Making a shared library is almost identical to making a static library except for the addition of ##[[KeyPgExport Export]]## declaration specifier. ##**Export**## tells the compiler to make the function visible to other executables loading the shared library. - To make use of the library in some other source code, we need some way of telling the compiler what exactly is in the library. A good way to do this is to put the declarations ( also called an interface, or API ) for the library in to a header file. - - {{fbdoc item="filename" value="examples/manual/proguide/shared-lib/mylib.bi"}}%%(freebasic) -'' mylib.bi +Compiler la bibliothèque avec: +##fbc -dll mylib.bas## + L'option ##-dll## indique au compilateur de prendre le code source, ##mylib.bas##, et de le transformer en un fichier objet ##mylib.o##, puis stocker le fichier objet dans une bibliothèque partagée. Le nom de la bibliothèque partagée aura l' extension ##.so## ou ##.dll## selon que la plate-forme est la version Linux ou Windows. Une bibliothèque peut contenir de nombreux modules (fichiers source), chacun avec de nombreuses fonctions, mais pour cet exemple simple, il n'y en a simplement qu'un seul. +Créer une bibliothèque partagée est presque identique à créer une bibliothèque statique à l'exception de l'ajout de spécificateur de déclaration ##[[KeyPgExport Export]]##. ##**Export**## indique au compilateur de rendre la fonction visible aux autres exécutables chargeant la bibliothèque partagée. +Pour faire usage de la bibliothèque dans un autre code source, nous avons besoin d'une certaine façon de dire au compilateur ce qui est exactement dans la bibliothèque. Une bonne façon pour y parvenir est de mettre les déclarations (également appelée une interface ou API) de la bibliothèque dans un fichier d'en-tête. + + %%(freebasic) + '' mylib.bi + + #inclib "mylib" + + Declare Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer + + %% + + Il n'est pas nécessaire de compiler le fichier d'en-tête. Nous le souhaitons sous sa forme de source pour qu'il puisse être inclus avec les autres fichiers source. L' instruction ##[[KeyPgInclib #inclib]]## donnera au compilateur le nom de la bibliothèque partagée que nous devons lier à l'exécution d'un exécutable qui en a besoin. +Grâce à notre bibliothèque (fichier .dll / .so) et un fichier en-tête (.bi file) nous pouvons les essayer dans un programme de test: #inclib "mylib" -Declare Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer -%% - There is no need to compile the header. We want this in its source form so it can be included with other source files. The ##[[KeyPgInclib #inclib]]## statement will tell the compiler the name of a shared library that we need to link with at runtime running an executable that needs it. - - With our library (.dll / .so file) and a header (.bi file) we can try them out in a test program: - - {{fbdoc item="filename" value="examples/manual/proguide/shared-lib/mytest.bas"}}%%(freebasic) '' mytest.bas -'' compile with: fbc mytest.bas -#include once "mylib.bi" -Print Add2(1,2) -%% - The ##[[KeyPgInclude #include]]## statement tells the compiler to include the source code from ##mylib.bi## just as if we had typed it in to the original source. With the way we have written our include file, it tells the compiler everything it needs to know about the library. - - We compile this with: - ##fbc mytest.bas## +'' compiler avec: fbc mytest.bas + + #include once "mylib.bi" + + Print Add2(1,2) + + %% +L'instruction ##[[KeyPgInclude #include]]## indique au compilateur d'inclure le code de source à partir de ##mylib.bi## comme si nous l'avions tapé dans le source original. De la manière dont nous avons écrit notre fichier d'inclusion, il indique au compilateurtout ce qu'il doit savoir sur la bibliothèque. +Nous compilons ceci avec: +##fbc mytest.bas## +Puis, quand nous lançons l'exécutable ##mytest##, nous devrions obtenir le résultat: +##3## + + Plus d'un module source peut être utilisé lors de la compilation de la bibliothèque. Et les programmes de base peuvent utiliser plus d'une bibliothèque en incluant les fichiers en-tête nécessaires. Certaines bibliothèques sont si importantes qu'elles peuvent utiliser plusieurs en-têtes. Pour de très grands projets, la création de bibliothèques partagées avec certains modules de code qui ne changent que rarement peut améliorer considérablement les temps de compilation. + + Les bibliothèques partagées peut éventuellement contenir des informations de débogage spécifiées avec l'option de ligne de commande //[[CompilerOptg -g]]//. + Les fichiers objets, et donc les bibliothèques partagées, sont spécifique à la plate-forme et dans certains cas spécifiques à une version particulière du compilateur et de la bibliothèque d'exécution FreeBASIC. + + {{fbdoc item="section" value="Utilisation des bibliothèques partagées sous Windows + Sous Windows, la bibliothèque partagée doit être stockée dans un endroit où elle peut être trouvée par l'exécutable qui en a besoin à l'exécution. + + Le système d'exploitation peut rechercher dans les répertoires suivants: + + - Le répertoire à partir duquel l'exécutable a été chargé. + + - Le répertoire courant. + +- Le répertoire Windows et le dossier système de Windows. + + - La liste des répertoires dans la variable d'environnement ##PATH##. + + L'ordre dans lequel les répertoires sont parcourus peut dépendre de la version Windows en cours d'utilisation et avec quels paramètres le système d'exploitation est configuré. + + {{fbdoc item="section" value="Utilisation des bibliothèques partagées sous Linux + Par défaut, Linux normalement ne cherchera pas dans le répertoire courant ou dans le répertoire à partir duquel l'exécutable a été chargé. Vous devrez soit: + - copier le fichier .so copier le fichier dans un répertoire qui contient les bibliothèques partagées (par exemple, ##/usr/lib##) et lancer ##ldconfig## pour configurer la bibliothèque. + - modifier la variable d'environnement LD_LIBRARY_PATH pour rechercher le répertoire courant ou dans un répertoire spécifique pour la bibliothèque partagée nouvellement créée. + + Pour lancer l'exécutable ##./mytest/## et dire à Linux de rechercher temporairement dans le répertoire courant, utilisez la commande suivante: - Then when we run the ##mytest## executable, we should get the result of: - ##3## +%% - More than one source module can be used when making a library. And basic programs can use more than one library by including each needed header. Some libraries are so large that they might use several headers. On very large projects, making shared libraries out of some code modules that seldom change can improve compile times and link times dramatically. + LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./mytest - Shared libraries can optionally contain debugging information specified with the //[[CompilerOptg -g]]// command line option. + %% + {{fbdoc item="section" value="Executables that export symbols - Object files, and therefore shared libraries, are platform specific and in some cases specific to a particular version of the compiler and FreeBASIC runtime library. + Si un fichier exécutable contient des symboles qui doivent être disponibles pour d'autres bibliothèques partagées lorsque ces bibliothèques partagées sont chargés, utilisez le spécificateur de déclaration de procédure ##[[KeyPgExport Export]]## et l'option //[[CompilerOptexport -export]]// de la ligne de commande lors de la compilation (linkage) de l'exécutable. + L'option //[[CompilerOptexport -export]]// n'a aucun effet supplémentaire lorsqu'elle est utilisée avec les options de ligne de commande //[[CompilerOptdylib -dylib]]// ou //[[CompilerOptdll -dll]]//. -{{fbdoc item="section" value="Using Shared Libraries on Windows"}} - On windows, the shared library must be stored in a location where it can be found by the executable that needs it a run-time. +{{fbdoc item="section" value="Chargement dynamique des bibliothèques partagées - The operating system may search the following directories: - - The directory from which the executable was loaded. - - The current directory. - - The windows and windows system folder. - - Directories list in the ##PATH## environment variable. + Les bibliothèques partagées peuvent être chargées et utilisées lors de l'exécution par chargement dynamique de la bibliothèque et de ses symboles, à l'exécution. + + - ##[[KeyPgDylibload DyLibLoad]]## peut être utilisé pour charger et obtenir un "handle" (identifiant numérique) à une bibliothèque partagée. - The order in which directories are searched may depend on the Windows version in use, and on what settings that the operating system is configured with. +- ##[[KeyPgDylibsymbol DyLibSymbol]]## est utilisé pour obtenir l'adresse d'un symbole dans une bibliothèque partagée qui a été chargée. -{{fbdoc item="section" value="Using Shared Libraries on Linux"}} + - ##[[KeyPgDylibfree DyLibFree]]## est utilisé pour décharger une bibliothèque partagée quand elle n'est plus nécessaire. - By default, linux will not normally search the current directory or the directory from which the executable was loaded. You will need to either: - - copy the .so file to a directory that has shared libraries (e.g. ##/usr/lib##) and run ##ldconfig## to configure the library. - - modify the environment variable LD_LIBRARY_PATH to search the current directory or a specific directory for the newly created shared library. + Les procédures dans une bibliothèque partagée doivent utiliser le spécificateur ##[[KeyPgExport Export]]## afin de s'assurer que le nom des symboles est placé dans le tableau des exportations de la librairie partagée. + {{fbdoc item="see"}} + - [[ProPgStaticLibraries Bibliothèques statiques]] - To run the executable ##./mytest/## and temporarily tell linux to search the current directory, use the following shell command: - %% -LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./mytest + - ##[[KeyPgInclib #inclib]]## + + - ##[[KeyPgInclude #include]]## +- [[CompilerOptdll Option du compilateur: -dll]] +- [[CompilerOptexport Option du compilateur: -export]] +- [[CompilerOptdylib Option du compilateur: -dylib]] +'' and libmydll.so on Linux. +'' +'' Note: libmydll.dll.a is an import library, it's only needed when creating +'' an executable that calls any of mydll's functions, only distribute +'' the DLL files with your apps, do not include the import libraries, +'' they are useless to end-users. + +'' Simple exported function; the disables FB's default +'' all-upper-case name mangling, so the DLL will export AddNumbers() instead of +'' ADDNUMBERS(). +function AddNumbers alias "AddNumbers"( byval a as integer, byval b as integer ) as integer export + function = a + b +end function +%% + + {{fbdoc item="filename" value="examples/manual/proguide/shared-lib/mydll.bas"}}%%(freebasic) +'' load.bas: Loads mydll.dll (or libmydll.so) at runtime, calls one of mydll's +'' functions and prints the result. mydll is not needed at compile time. +'' compile as: fbc test.bas +'' +'' Note: The compiled mydll.dll (or libmydll.so) dynamic library is expected +'' to be available in the current directory. + +'' Note we specify just "mydll" as library file name; this is to ensure +'' compatibility between Windows and Linux, where a dynamic library +'' has different file name and extension. +dim as any ptr library = dylibload( "mydll" ) +if( library = 0 ) then + print "Failed to load the mydll dynamic library, aborting program..." + end 1 +end if + +'' This function pointer will be used to call the function from mydll, after +'' the address has been found. Note: It must have the same calling +'' convention and parameters. +dim AddNumbers as function( byval as integer, byval as integer ) as integer +AddNumbers = dylibsymbol( library, "AddNumbers" ) +if( AddNumbers = 0 ) then + print "Could not retrieve the AddNumbers() function's address from the mydll library, aborting program..." + end 1 +end if + +randomize timer + +dim as integer x = rnd * 10 +dim as integer y = rnd * 10 + +print x; " +"; y; " ="; AddNumbers( x, y ) + +'' Done with the library; the OS will automatically unload libraries loaded +'' by a process when it terminates, but we can also force unloading during +'' our program execution to save resources; this is what the next line does. +'' Remember that once you unload a previously loaded library, all the symbols +'' you got from it via dylibsymbol will become invalid, and accessing them +'' will cause the application to crash. +dylibfree( library ) %% - -{{fbdoc item="section" value="Executables that export symbols"}} - If an executable has symbols that must be available to other shared libraries when those shared libraries are loaded, use the ##[[KeyPgExport Export]]## procedure declaration specifier, and the //[[CompilerOptexport -export]]// command line option when making (linking) the executable. - - The //[[CompilerOptexport -export]]// option has no extra effect when used with the //[[CompilerOptdylib -dylib]]// or //[[CompilerOptdll -dll]]// command line options. - -{{fbdoc item="section" value="Loading Shared Libraries Dynamically"}} - Shared libraries can be loaded and used at run time by dynamically loading the library and its symbols at runtime. - - ##[[KeyPgDylibload Dylibload]]## can be used to load and obtain a handle to a shared library. - - ##[[KeyPgDylibsymbol Dylibsymbol]]## is used to obtain the address of a symbol in a loaded shared library. - - ##[[KeyPgDylibfree Dylibfree]]## is used to unload a shared library when it is no longer needed. - - Procedures in the shared library must use the ##[[KeyPgExport Export]]## specifier to ensure that the symbols name is placed in the shared library's export table. {{fbdoc item="see"}} - [[ProPgStaticLibraries Static Libraries]] @@ -105,4 +182,4 @@ LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./mytest - [[CompilerOptexport Compiler Option: -export]] - [[CompilerOptdylib Compiler Option: -dylib]] -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} +{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgSourceFiles.wakka b/fbdocs/manual/cache/ProPgSourceFiles.wakka index 7cb39dea90..5fbe747055 100644 --- a/fbdocs/manual/cache/ProPgSourceFiles.wakka +++ b/fbdocs/manual/cache/ProPgSourceFiles.wakka @@ -1,39 +1,39 @@ {{fbdoc item="title" value="Source Files (.bas)"}}---- -Text files read by FreeBASIC and compiled into executable code. +Fichiers texte lus par FreeBasic et compilés en code exécutable. -A source file is a text file that contains FreeBASIC language statements. A program might be made from just one source file or possibly hundreds. Source files are read by the compiler and compiled into object code. Object code is then linked to create an executable or can be stored for later use as a library. +Un fichier source est un fichier texte qui contient des instructions en langage FreeBasic. Un programme peut être constitué d'un seul fichier source ou, éventuellement, de centaines. Les fichiers source sont lus par le compilateur et compilés en code objet. Le code objet est alors lié pour créer un exécutable ou peut être stocké pour une utilisation ultérieure comme une bibliothèque. -FreeBASIC by default, automatically takes care of compiling sources and linking object modules in to executables, so normally it is possible to make an executable program by just passing the names of the source files on the ##fbc## command line. For example, assuming we had three source files that together made a program, we could create an executable for the program by running ##fbc##, the FreeBASIC compiler on a command line as follows: +FreeBasic par défaut, se charge automatiquement de compiler les sources et de relier les modules objet dans des exécutables, donc normalement il est possible de faire un programme exécutable en passant simplement le nom des fichiers sources sur la ligne de commande de ##fbc##. Par exemple, en supposant que nous avons trois fichiers sources qui, ensemble, constituent un programme, nous pouvons créer un exécutable pour le programme en exécutant ##fbc##, le compilateur FreeBasic sur une ligne de commande comme suit: ## fbc myprog.bas tools.bas funcs.bas ## -{{fbdoc item="section" value="Unicode support"}} - - Besides ASCII files with Unicode escape sequences (\u), FreeBASIC can parse UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE source (.bas) or header (.bi) files, they can be freely mixed with other sources/headers in the same project (also with other ASCII files). +{{fbdoc item="section" value="Support de l'Unicode + - En plus des fichiers ASCII avec des séquences d'échappement Unicode (\u), FreeBasic peut analyser des fichiers source (.bas) ou en-têtes (.bi) UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE, ils peut être librement mélangés avec d'autres sources/en-têtes dans le même projet (également avec d'autres fichiers ASCII). - - Literal strings can be typed in the original non-Latin alphabet, just use a text-editor that supports one of the Unicode formats listed above. +
  • Les chaînes littérales peuvent être tapées dans l'alphabet d'origine non-latin, il suffit d'utiliser un éditeur de texte qui prend en charge l'un des formats Unicode énumérés ci-dessus. -{{fbdoc item="section" value="Implicit main()"}} - Some languages require a special ##main()## procedure be defined as an entry point to the program which define the first statements that will be executed when the program starts. FreeBASIC allows executable statements in module level code and normally the first source file passed to fbc on the command line will be used as the "main" module. The main module can be explicitly names by passing //-m filename// on the command line, where //filename// is the name of the main module without the .bas extension. +{{fbdoc item="section" value="main() implicite + Certaines langues nécessitent une procédure spéciale ##main()## définie comme point d'entrée pour le programme définissant les premières instructions qui seront exécutées au lancement du programme. FreeBASIC considère que les instructions exécutables du code au niveau module et situées, normalement, dans le premier fichier source passé sur la ligne de commande de fbc, constitueront le module principal ("main()). Le module principal peut être explicitement nommé en passant //-m filename// sur la ligne de commande, où //filename// est le nom du module principal sans l'extension .bas . {{fbdoc item="filename" value="examples/manual/proguide/sourcefiles.bas"}}%%(freebasic) '' sample.bas declare sub ShowHelp() - '' This next line is the first executable statement in the program + '' La ligne suivante est la premiere instruction executable dans le programme if command(1) = "" then ShowHelp end 0 - end if + End If sub ShowHelp() - print "no options specified." + Print "no options specified." end sub %% -{{fbdoc item="section" value="Header Files"}} - A header file is a special kind of source file that typically only contains declarations and has a ##.bi## extension. See [[ProPgHeaderFiles Header Files (.bi)]]. +{{fbdoc item="section" value="Fichiers en-tête + Un fichier d'en-tête est un type spécial de fichier source qui généralement ne contient que des déclarations et une extension ##.bi##. Voir [[ProPgHeaderFiles Les fichiers d'en-tête (.bi)]]. {{fbdoc item="see"}} - - [[CompilerCmdLine fbc command-line]] - - [[ProPgHeaderFiles Header Files (.bi)]] + - [[CompilerCmdLine La ligne de commande de fbc]] + - [[ProPgHeaderFiles Les fichiers d'en-tête (.bi)]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgStaticLibraries.wakka b/fbdocs/manual/cache/ProPgStaticLibraries.wakka index fae5b33bc2..8eede127c1 100644 --- a/fbdocs/manual/cache/ProPgStaticLibraries.wakka +++ b/fbdocs/manual/cache/ProPgStaticLibraries.wakka @@ -1,68 +1,68 @@ {{fbdoc item="title" value="Static Libraries"}}---- -A static library is compiled code that can be later used when building an executable. +Une bibliothèque statique est du code compilé qui peut être utilisé plus tard lors de la construction d'un exécutable. -When the compiler makes an executable, the basic source files are first turned in to object files. The object files are then linked together to make an executable. When we compile source code, we don't necessarily have to make an executable. We could instead group all of the object files (made from sources) in to a single file called a static library. +Lorsque le compilateur génère un exécutable, les fichiers sources de base sont d'abord transformés en fichiers objets. Les fichiers objets sont ensuite liés ensemble pour créer un exécutable. Lorsque nous compilons le code source, nous ne le faisons pas nécessairement pour créer un exécutable. Nous pouvons plutôt grouper tous les fichiers objets (fabriqués à partir des sources) en un fichier unique appelé une bibliothèque statique. -The library is referred to as static, because when the object files which it contains are later linked in to an executable, a copy of all the needed code in the library is added to the executable. +La bibliothèque est appelée statique, parce que lorsque les fichiers objets qu'elle contient sont ensuite liés dans un fichier exécutable, une copie de tout le code nécessaire de la bibliothèque est ajouté à l'exécutable. -Once the library is made, we can then use the code that it contains just as if we were compiling the source directly with our program. +Une fois que la bibliothèque est générée, Une fois que la bibliothèque est générée, nous pouvons alors utiliser le code qu'elle contient comme si nous avions compilé les sources directement avec notre programme. -Following is a simple example of creating a static library using these three files: - - ##mylib.bas## - the source for the library - - ##mylib.bi## - the header for the library - - ##mytest.bas## - a test program +Voici un exemple simple créant une bibliothèque statique en utilisant ces trois fichiers: + - ##mylib.bas## - le source de la bibliothèque + - ##mylib.bi## - l'en-tête pour la bibliothèque + - ##mytest.bas## - un programme de test -Our library will be a single module providing a single function: +Notre bibliothèque sera un module unique assurant une fonction unique: {{fbdoc item="filename" value="examples/manual/proguide/static-lib/mylib.bas"}}%%(freebasic) '' mylib.bas -'' compile with: fbc -lib mylib.bas +'' compiler avec: fbc -lib mylib.bas -'' Add two numbers together and return the result +'' Additionne deux nombres ensemble et retourne le résultat Public Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer Return( x + y ) End Function %% -Compile the library with: +Compiler la bibliothèque avec: ##fbc -lib mylib.bas## -The //[[CompilerOptlib -lib]]// option tells the compiler to take the source code, ##mylib.bas##, and turn it in to an object file ##mylib.o##, then store the object file in to a library file, also called an archive, ##libmylib.a##. A library might contain many modules (source files) each with many functions, but for this simple example, it is just one each. +L'option //[[CompilerOptlib -lib]]// indique au compilateur de prendre le code source, ##mylib.bas##, et de le transformer en un fichier objet ##mylib.o##, puis de stocker le fichier objet dans un fichier bibliothèque, aussi appelé une archive, ##libmylib.a##. Une bibliothèque peut contenir de nombreux modules (fichiers source), chacun avec de nombreuses fonctions, mais pour cet exemple simple, il n'y en a simplement qu'un seul. -To make use of the library in some other source code, we need some way of telling the compiler what exactly is in the library. A good way to do this is to put the declarations ( also called an interface, or API ) for the library in to a header file. +Pour faire usage de la bibliothèque dans un autre code source , nous avons besoin d'une certaine façon de dire au compilateur ce qui est exactement dans la bibliothèque. Une bonne façon pour y parvenir est de mettre les déclarations (également appelée une interface ou API) de la bibliothèque dans un fichier d'en-tête. {{fbdoc item="filename" value="examples/manual/proguide/static-lib/mylib.bi"}}%%(freebasic) '' mylib.bi #inclib "mylib" Declare Function Add2( ByVal x As Integer, ByVal y As Integer ) As Integer %% -There is no need to compile the header. We want this in its source form so it can be included with other source files. The ##[[KeyPgInclib #inclib]]## statement will tell the compiler the name of a static library that we need to link with when eventually making an executable. +Il n'est pas nécessaire de compiler l'en-tête. Nous le voulons dans sa forme source, comme cela il peut être inclus avec les autres fichiers source. L'instruction ##[[KeyPgInclib #inclib]]## dira au compilateur le nom de la bibliothèque statique que nous voulons lier lorsque, éventuellement, nous désirerons générer un exécutable. -With our library (.a file) and a header (.bi file) we can try them out in a test program: +Grâce à notre bibliothèque (un fichier .a) et un fichier d'en-tête (.bi file) nous pouvons les essayer dans un programme de test: {{fbdoc item="filename" value="examples/manual/proguide/static-lib/mytest.bas"}}%%(freebasic) '' mytest.bas -'' compile with: fbc mytest.bas +'' compiler avec: fbc mytest.bas #include once "mylib.bi" Print Add2(1,2) %% -The ##[[KeyPgInclude #include]]## statement tells the compiler to include the source code from ##mylib.bi## just as if we had typed it in to the original source. With the way we have written our include file, it tells the compiler everything it needs to know about the library. +L'instruction ##[[KeyPgInclude #include]]## indique au compilateur d'inclure le code source de ##mylib.bi## comme si nous l'avions tapé dans le source original. Avec la manière dont nous avons écrit notre fichier d'inclusion, il indique au compilateur tout ce qu'il doit savoir sur la bibliothèque. -We compile this with: +Nous compilons ceci avec: ##fbc mytest.bas## -Then when we run the ##mytest## executable, we should get the result of: +Puis, quand nous lancerons l'exécutable ##mytest##, nous devrions obtenir ce résultat: ##3## -More than one source module can be used when making a library. And basic programs can use more than one library by including each needed header. Some libraries are so large that they might use several headers. On very large projects, making libraries out of some code modules that seldom change can improve compile times dramatically. +Plus d'un module source peut être utilisé lors de la fabrication de la bibliothèque. Et les programmes de base peuvent utiliser plus d'une bibliothèque en incluant les fichiers d'en-tête nécessaires. Certaines bibliothèques sont si importantes qu'elles peuvent utiliser plusieurs en-têtes. Pour de très grands projets, la création de bibliothèques avec certains modules de code qui ne changent que rarement peut améliorer considérablement les temps de compilation. -Libraries can optionally contain debugging information specified with the //[[CompilerOptg -g]]// command line option. +Les bibliothèques peuvent éventuellement contenir des informations de débogage spécifiées avec l'option de ligne de commande //[[CompilerOptg -g]]//. -Object files, and therefore libraries, are platform specific and in some cases specific to a particular version of the compiler and FreeBASIC runtime library. +Les fichiers objets, et donc les bibliothèques, sont dépendants de la plate-forme et dans certains cas dépendants d'une version particulière du compilateur et de la bibliothèque d'exécution FreeBasic. {{fbdoc item="see"}} - - [[ProPgSharedLibraries Shared Libraries]] + - [[ProPgSharedLibraries Bibliothèques partagées]] - ##[[KeyPgInclib #inclib]]## - ##[[KeyPgInclude #include]]## - - [[CompilerOptlib Compiler Option: -lib]] + - [[CompilerOptlib Option du compilateur: -lib]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgStorageClasses.wakka b/fbdocs/manual/cache/ProPgStorageClasses.wakka index 1af5435717..100d6626cd 100644 --- a/fbdocs/manual/cache/ProPgStorageClasses.wakka +++ b/fbdocs/manual/cache/ProPgStorageClasses.wakka @@ -1,42 +1,42 @@ {{fbdoc item="title" value="Storage Classes"}}---- -Visibility and lifetime of variables, objects and arrays +Visibilité et durée de vie des variables, des objets et des tableaux -A variable, object or array's storage class determines when and where memory is allocated for it and when that memory is destroyed. There are 2 storage classes in FreeBASIC: //automatic// and //static//. +Une classe de stockage pour variable, object ou tableau détermine quand et où de la mémoire leur est allouée et quand elle sera détruite. Il existe deux 2 classes de stockage dans FreeBASIC: //automatic// et //static//. -{{fbdoc item="section" value="Automatic"}} +{{fbdoc item="section" value="Automatic (Automatique) - //Automatic// variable, object and array lifetimes begin at the point of declaration and end when leaving the scope they are declared in. + La durée de vie d'une variable, d'un objet ou d'un tableau //automatic// commence au point de déclaration et se termine quand on quitte la portée de leur déclaration. - //Automatic// entities are guaranteed to have unique storage for each instance of the block in which they are declared. For example, the //automatic// variables declared within a procedure will be allocated at different addresses and have unique state (value) for each call to the procedure. + Les entités //automatic// ont la garantie d'avoir un stockage unique pour chaque instance du bloc dans lequel elles sont déclarées. Par exemple, les variables //automatic// déclarées dans une procédure seront alloués à des adresses différentes et auront un état unique (valeur) pour chaque appel de la procédure. - //Automatic// variables, objects and arrays are defined using the ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]## and ##[[KeyPgVar Var]]## keywords without the ##[[KeyPgShared Shared]]## specifier. + Les variables, objets et tableaux //automatic// sont définis en utilisant les mots-clefs ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim ReDim]]## et ##[[KeyPgVar Var]]## sans le spécificateur ##[[KeyPgShared Shared]]##. - The memory for //automatic// variables, objects and arrays is allocated on the program stack. + La mémoire pour les variables, objets et tableaux //automatic// est allouée sur la pile du programme. - //Automatic// variables, objects and arrays have no linkage. + Les variables, objets et tableaux //automatic// ne sont pas liés. -{{fbdoc item="section" value="Static"}} +{{fbdoc item="section" value="Static (Statique) - //Static// variable, object and array lifetimes begin at program creation and end with program termination. + La durée de vie d'une variable, d'un objet ou d'un tableau //static// commence à la création du programme et se termine quand on quitte le programme. - //Static// entities are guaranteed to have the same storage for each instance of the block in which they are declared. For example, the //static// variables declared within a procedure will be allocated at the same address, and retain their state (value) across each call to the procedure. + Les entités //static// ont la garantie d'avoir le même stockage pour chaque instance du bloc dans lequel elles sont déclarées. Par exemple, les variables //static// déclarées dans une procédure seront alloués à la même adresse et conserveront leur état (valeur) pour chaque appel à la procédure. - //Static// variables, objects and arrays are declared using the ##[[KeyPgStatic Static]]## keyword. Entities declared using the ##[[KeyPgShared Shared]]## specifier are implicitly //static//. All entities declared within a procedure that is declared using the ##[[KeyPgStatic Static]]## specifier are also implicitly //static//. + Les variables, objets et tableaux //static// sont déclarées en utilisant le mot-clef ##[[KeyPgStatic Static]]##. Entités déclarés en utilisant le spécificateur ##[[KeyPgShared Shared]]## sont implicitement //static//. Toutes les entités déclarées dans une procédure qui est déclarée en utilisant le spécificateur ##[[KeyPgStatic Static]]## sont aussi implicitement //static//. - The memory for //static// variables, objects and arrays is allocated in the ##.BSS## section of the executable, or in the ##.DATA## section if they are initialized when defined. //Static// variable-length arrays must be declared empty, with an empty subscript range list; their element data is still allocated in the free store (when they are resized), but the internal array data is allocated in the ##.DATA## section of the executable to allow the element data to persist throughout program execution. + La mémoire pour les variables, objets et tableaux //static// est allouée dans la section ##.BSS## de l'exécutable ou dans la section ##.DATA## si les variables, objets et tableaux ont été initialisés lors de leur définition. Les tableaux de longueur variable //static// doivent être déclarés vides, avec une liste de gamme d'indices vide; leurs éléments de données sont toujours alloués dans le stock libre (quand ils sont redimensionnés), mais le tableau interne des données est alloué dans la section ##.DATA## de l'exécutable pour permettre aux l'éléments de données de persister tout au long de l'exécution du programme. - //Static// variables, objects and arrays have internal linkage by default, unless previously declared using the ##[[KeyPgExtern Extern]]## or ##[[KeyPgCommon Common]]## keywords. + Les variables, objets et tableaux //static// sont liés en interne par défaut, à moins qu'ils n'aient été préalablement déclarés en utilisant les mots-clefs ##[[KeyPgExtern Extern]]## ou ##[[KeyPgCommon Common]]##. {{fbdoc item="target"}} - - In DOS and Windows platforms, the size of the program stack can be adjusted at compile-time using the ##//-t//## [[CompilerCmdLine command-line switch]]. In Linux platforms, the size of the program stack can be adjusted at load-time by modifying ##/etc/security/limits.conf##, or on a per-thread basis using the shell builtin ##ulimit##. + - Sous DOS et Windows, la taille de la pile du programme peut être ajustée à la compilation en utilisant l'[[CompilerCmdLine option de ligne de commande]] ##//-t//##. Sous Linux, la taille de la pile du programme peut être ajustée au moment du chargement en modifiant ##/etc/security/limits.conf## ou sur une base par thread à l'aide de la commande interne du shell ##ulimit##. {{fbdoc item="diff"}} - - ""QuickBASIC"" allows //static// entities to be declared within procedures and ##DEF FN## routines only. + - QuickBASIC permet aux entités //static// d'être déclarées seulement dans les procédures et les routines ##DEF FN##. {{fbdoc item="see"}} - ##[[KeyPgExtern Extern]]##, ##[[KeyPgCommon Common]]## - ##[[KeyPgDim Dim]]##, ##[[KeyPgRedim Redim]]##, ##[[KeyPgVar Var]]##, ##[[KeyPgShared Shared]]## - ##[[KeyPgStatic Static]]## - - [[ProPgVarProcLinkage Linkage]] + - [[ProPgVarProcLinkage Liens]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgTypeAliases.wakka b/fbdocs/manual/cache/ProPgTypeAliases.wakka index 00e23b3481..8f9708bc49 100644 --- a/fbdocs/manual/cache/ProPgTypeAliases.wakka +++ b/fbdocs/manual/cache/ProPgTypeAliases.wakka @@ -1,139 +1,139 @@ {{fbdoc item="title" value="Type Aliases"}}---- -Additional names for variable or object types +D'autres noms pour les types de variable ou d'objet -**{{anchor name="OVERVIEW|Overview"}}** -**{{anchor name="DECL|Declaration"}}** -**{{anchor name="OVERLOAD|Overload resolution"}}** -**{{anchor name="PROCPTRPTR|Pointers to procedure pointers"}}** -**{{anchor name="TYPEFORWARD|Type forwarding"}}** -**{{anchor name="INCTYPES|Incomplete types"}}** +**[[#OVERVIEW">Vue d'ensemble]]** +**[[#DECL">Déclaration]]** +**[[#OVERLOAD">Résolution de la surcharge]]** +**[[#PROCPTRPTR">Pointeurs de pointeurs de procédure]]** +**[[#TYPEFORWARD">Transmission de type]]** +**[[#INCTYPES">Types incomplets]]** -{{anchor name="OVERVIEW"}}{{fbdoc item="section" value="Overview"}} - Type aliases are alternative names for a type. They can be used to facilitate a mass change from one type to another, save typing, or make circular dependency possible. +{{fbdoc item="section" value="Vue d'ensemble + Les alias de type sont d'autres noms pour un type. Ils peuvent être utilisés pour faciliter un changement en masse d'un type à un autre, en diminuant la frappe ou rendre possible une dépendance circulaire. -{{anchor name="DECL"}}{{fbdoc item="section" value="Declaration"}} - Type aliases are declared using the ##[[KeyPgTypeAlias Type]]## keyword much like declaring variables or objects with [[KeyPgExtern Extern]] or [[KeyPgDim Dim]]. + + {{fbdoc item="section" value="Déclaration - The following example declares a type alias to ##[[KeyPgSingle Single]]## called "##//float//##", a procedure, and defines and initializes two variables of that type: + Les alias de type sont déclarés en utilisant le mot-clé ##[[KeyPgTypeAlias Type]]## un peu comme la déclaration de variables ou d'objects avec [[KeyPgExtern Extern]] ou [[KeyPgDim Dim]]. - {{fbdoc item="filename" value="examples/manual/proguide/typalias/builtin.bas"}}%%(freebasic) + L'exemple suivant déclare un alias de type ##[[KeyPgSingle Single]]## appelé "##//float//##", une procédure et définit et initialise deux variables de ce type: type float as single -declare function add (a as float, b as float) as float +Type float As Single -dim foo as float = 1.23 -dim bar as float = -4.56 - %% +Declare Function add (a As float, b As float) As float +Dim foo As float = 1.23 + Dim bar As float = -4.56 - Procedure pointer type aliases are declared in the same fashion, as shown in the following example: + %% - {{fbdoc item="filename" value="examples/manual/proguide/typalias/procptr_1.bas"}}%%(freebasic) + Les alias de type de pointeur de procédure sont déclarés de la même façon, comme le montre l'exemple suivant: Declare Function f (ByRef As String) As Integer -Type func_t As Function (ByRef As String) As Integer +Declare Function f (ByRef As String) As Integer -Dim func As func_t = @f +Type func_t As Function (ByRef As String) As Integer -Function f (Byref arg as String) as Integer - Function = Cint(arg) +Dim func As func_t = @f + Function f (ByRef arg As String) As Integer +Function = CInt(arg) End Function + %% + -{{anchor name="OVERLOAD"}}{{fbdoc item="section" value="Overload resolution"}} - Type aliases are just that - aliases. For all intents and purposes, a type alias **is** the type it aliases. So as far as procedure overload resolution is concerned, a procedure declared with a parameter of type "##//alias_to_T//##" is the same as a procedure declared with a parameter of type "##//T//##" (the same applies to overloading member procedures as well). + {{fbdoc item="section" value="Résolution de la surcharge - In other words, it is an error - duplicated definition - to declare a procedure where parameters differ only in a type and its alias, as the following example shows: - - {{fbdoc item="filename" value="examples/manual/proguide/typalias/overload.bas"}}%%(freebasic) -Type float As Single + Les alias de type ne sont que cela - des alias. A toutes fins utiles, un alias de type **est** du type qu'il remplace. Ainsi dans le cas où la résolution de la surcharge de procédure est concernée, une procédure déclarée avec un paramètre de type "##//alias_vers_T//##" est la même qu'une procédure déclarée avec un paramètre de type "##//T//##" (la même chose s'applique ainsi à la surcharge membres des procédures). +En d'autres termes, c'est une erreur -double définition- de déclarer une procédure où les paramètres ne diffèrent que par un type et son alias, comme l'exemple suivant le montre: Declare Sub f Overload (a As Single) +Type float As Single +Declare Sub f Overload (a As Single) '' If uncommented, this will generate a duplicated definition error -'' Declare Sub f (a As float) -%% -{{anchor name="PROCPTRPTR"}}{{fbdoc item="section" value="Pointers to procedure pointers"}} - Pointers to procedure pointers are just like any other pointer type, except they point to procedure pointers. Because the syntax for declaring procedure pointers doesn't allow directly creating a pointer to procedure pointer, a type alias is used. +'' Declare Sub f (a As float) + %% - The following example declares a pointer to a procedure returning an integer pointer, and then a pointer to a pointer to a procedure returning an integer: + - {{fbdoc item="filename" value="examples/manual/proguide/typalias/procptr_2.bas"}}%%(freebasic) -dim pf as function() as integer ptr + {{fbdoc item="section" value="Pointeurs de pointeurs de procédure +Les pointeurs de pointeurs de procédure sont comme n'importe quel autre type de pointeur, sauf qu'ils pointent vers des pointeurs de procédure. Parce que la syntaxe pour déclarer des pointeurs de procédure ne permet pas de créer directement un pointeur sur pointeur de procédure, un alias de type est utilisé. -type pf_t as function() as integer +L'exemple suivant déclare un pointeur vers une de procédure retournant un pointeur d'entier, puis un pointeur vers un pointeur vers une de procédure retournant un entier: dim ppf as pf_t ptr - %% + Dim pf As Function() As Integer Ptr -{{anchor name="TYPEFORWARD"}}{{fbdoc item="section" value="Type forwarding"}} - Type aliases can be forward referencing: an alias can refer to some other type not yet fully defined. +Type pf_t As Function() As Integer + Dim ppf As pf_t Ptr - {{fbdoc item="filename" value="examples/manual/proguide/typalias/fwd_1.bas"}}%%(freebasic) -TYPE foo AS bar + %% + -TYPE sometype - f AS foo PTR +{{fbdoc item="section" value="Transmission de type + Des alias de type peuvent être avant le référencement: un alias peut faire référence à un autre type qui n'est pas encore entièrement défini. END TYPE -TYPE bar - st AS sometype - a AS INTEGER +Type foo As bar + Type sometype + f As foo Ptr END TYPE - %% + Type bar - Using a type alias and forward referencing allows circular dependencies between types. + st As sometype - {{fbdoc item="filename" value="examples/manual/proguide/typalias/fwd_2.bas"}}%%(freebasic) -TYPE list as list_ + a As Integer +End Type -TYPE listnode - parent AS list PTR - text AS string -END TYPE +%% + En utilisant un alias de type et un référencement précoce permet des dépendances circulaires entre les types. + %%(freebasic) +Type list As list_ -TYPE list_ - first AS listnode PTR - count AS integer +Type listnode + parent As list Ptr + text As String END TYPE - %% + Type list_ -{{anchor name="INCTYPES"}}{{fbdoc item="section" value="Incomplete types"}} - A type is considered incomplete until the size of it, that is the number of bytes it would need to occupy in memory is known, and the offsets of all of its fields are known. It is not possible to allocate space for an incomplete type. It is not possible to declare a variable having the data type of an incomplete type, pass an incomplete type as a parameter, or access the members of an incomplete type. +first As listnode Ptr + count As Integer - However, pointers to incomplete types may be allocated, declared as members in other types, or passed as parameters to a procedures since the size of a pointer is known. + End Type + + %% + - {{fbdoc item="filename" value="examples/manual/proguide/typalias/incomp.bas"}}%%(freebasic) -TYPE sometype AS sometype_ +{{fbdoc item="section" value="Types incomplets +Un type est considéré comme incomplet jusqu'à ce que la taille de celui-ci (c'est le nombre d'octets qui lui sont nécessaires en mémoire) soit connue ainsi que les positions de tous ses champs. Il n'est pas possible d'allouer de l'espace mémoire pour un type incomplet. Il n'est pas possible de déclarer une variable ayant un type de données incomplet, de passer un type incomplet comme paramètre ou d'accéder aux membres d'un type incomplet. +Toutefois, des pointeurs vers des types incomplets peuvent être attribués, déclarés comme membres dans d'autres types ou passés comme paramètres à une procédure, dès lors que la taille d'un pointeur est connue. +'' END TYPE +Type sometype As sometype_ '' Not allowed since size of sometype is unknown -'' TYPE incomplete + '' TYPE incomplete '' a AS sometype '' END TYPE '' Allowed since size of a pointer is known -TYPE complete - a AS sometype ptr -END TYPE -DIM x AS complete +Type complete +a As sometype Ptr +End Type + Dim x As complete '' Not allowed since size of sometype is still unknown -'' DIM size_sometype AS INTEGER = SIZEOF( sometype ) +'' DIM size_sometype AS INTEGER = SIZEOF( sometype ) '' Complete the type -TYPE sometype_ - value as integer -END TYPE -'' Allowed since the types are now completed -DIM size_sometype AS INTEGER = SIZEOF( sometype ) - -TYPE completed - a AS sometype +Type sometype_ + value As Integer END TYPE -DIM size_completed AS INTEGER = SIZEOF( completed ) - %% +'' Allowed since the types are now completed + Dim size_sometype As Integer = SizeOf( sometype ) -{{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} +Type completed diff --git a/fbdocs/manual/cache/ProPgTypeObjects.wakka b/fbdocs/manual/cache/ProPgTypeObjects.wakka index 69b6674f48..3bf754ffbe 100644 --- a/fbdocs/manual/cache/ProPgTypeObjects.wakka +++ b/fbdocs/manual/cache/ProPgTypeObjects.wakka @@ -1,5 +1,5 @@ {{fbdoc item="title" value="Types as Objects"}}---- -An example of the overloadable operators and member procedures +Un exemple des opérateurs et membres de procédures surchargeables {{fbdoc item="desc"}} !!! WRITEME !!! diff --git a/fbdocs/manual/cache/ProPgUDTs.wakka b/fbdocs/manual/cache/ProPgUDTs.wakka index c5f83ea5dd..b2b6da33f6 100644 --- a/fbdocs/manual/cache/ProPgUDTs.wakka +++ b/fbdocs/manual/cache/ProPgUDTs.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="User Defined Types"}}---- -Custom types. +Types personnalisés. -{{fbdoc item="section" value="Overview"}} - //User-Defined Types// are special kinds of [[ProPgVariables variables]] which can be created by the programmer. A User-Defined Type (UDT) is really just a container that contains a bunch of other variables, like an [[ProPgArrays array]], but unlike arrays UDTs can hold //different// variable types (whereas arrays always hold many variables of the //same// type). In fact, UDTs can even have [[ProPgProcedures procedures]] inside of them! +{{fbdoc item="section" value="Vue d'ensemble + //Les types définis par l'utilisateur// sont des types particuliers de [[ProPgVariables variables]] qui peuvent être créés par le programmeur. Un type défini par l'utilisateur (User-Defined Type = UDT) est réellement juste un conteneur qui contient un tas d'autres variables, comme un [[ProPgArrays tableau]], mais au contraire des tableaux les types définis par l'utilisateur peuvent contenir //différents// types de variables (alors que les tableaux contiennent toujours de nombreuses variables du //même// de type). En fait, les types définis par l'utilisateur peuvent même avoir des [[ProPgProcedures procédures]] à l'intérieur d'eux! -{{fbdoc item="section" value="Members"}} - The different variables and/or procedures stored inside a UDT are called "members", or more generally, items. Members can be variables of just about any type, including numerical types, strings, [[ProPgPointers pointers]], [[KeyPgEnum enums]], and even arrays (the only exception being [[ProPgVarLenArrays variable-length arrays]] declared using [[KeyPgRedim ReDim]], which cannot be used in UDTs because of the way they are used internally. Variables are created in UDTs much the same way variables are created normally, except that the Dim keyword is optional. UDT members are accessed via the [[KeyPgOpMemberAccess . operator]], so for example if you created a variable called someVar in a UDT you would access it with the name of the UDT variable followed by ".someVar". Here is an example: +{{fbdoc item="section" value="Membres + Les différentes variables et/ou procédures stockées dans un type défini par l'utilisateur sont appelées "membres", ou, plus généralement, les éléments. Les membres peuvent être des variables de n'importe quel type, y compris les types numériques, les chaînes, les [[ProPgPointers pointeurs]], [[KeyPgEnum les Enums]], et, même, les tableaux (la seule exception étant [[ProPgVarLenArrays les tableaux de longueur variable]] déclarés avec [[KeyPgRedim ReDim]], qui ne peuvent être utilisés dans les types définis par l'utilisateur en raison de le façon dont ils sont utilisés en interne). Les variables sont créées dans les types définis par l'utilisateur de la même façon que les variables sont créées normalement, sauf que le mot clé [[KeyPgDim Dim]] est facultatif. Les membres d'un type défini par l'utilisateur sont accessibles via [[KeyPgOpMemberAccess . Operator]], ainsi, par exemple si vous avez créé une variable appelée //someVar// dans un type défini par l'utilisateur vous pouvez y accéder avec le nom de votre variable de type défini par l'utilisateur suivi de ".someVar". Voici un exemple: {{fbdoc item="filename" value="examples/manual/proguide/udt/simple.bas"}}%%(freebasic) 'Define a UDT called myType, with an Integer member named someVar @@ -21,10 +21,10 @@ myUDT.someVar = 23 Print myUDT.someVar %% - Notice that the [[KeyPgType Type...End Type]] does not actually create a variable of that type, it only defines what variables of that type contain. You must create a variable of that type to actually use it! + Notez que [[KeyPgType Type...End Type]] ne crée pas réellement une variable de ce type, il définit seulement ce que contiennent les variables de ce type. Vous devez créer une variable de ce type pour l'utiliser effectivement! -{{fbdoc item="section" value="UDT Pointers"}} - UDT Pointers are, as the name implies, pointers to UDTs. They are created like regular pointers, but there is a special way to use them. To access the member of a UDT pointed to by a pointer, you use the [[KeyPgOpPtrMemberAccess -> operator]]. For example, if myUDTPtr is a pointer to a UDT which has a member someVar, you would access the member as myUDTPtr->someVar, which is a much cleaner shorthand for the equally valid *(myUDTPtr).someVar. +{{fbdoc item="section" value="Pointeurs de types définis par l'utilisateur + Les pointeurs de types définis par l'utilisateur sont, comme leur nom l'indique, des pointeurs vers des types définis par l'utilisateur. Ils sont créés comme des pointeurs habituels, mais il y a une façon particulière de les utiliser. Pour accéder à un membre d'un type défini par l'utilisateur pointé par un pointeur, vous devez utiliser [[KeyPgOpPtrMemberAccess -> Operator]]. Par exemple, si //myUDTPtr// est un pointeur vers un type défini par l'utilisateur qui a un membre //someVar//, vous accéder à celui-ci comme cela //**myUDTPtr->someVar**//, qui est un raccourci bien plus clair que //*(myUDTPtr).someVar//. {{fbdoc item="filename" value="examples/manual/proguide/udt/ptr-access.bas"}}%%(freebasic) Type rect @@ -44,12 +44,12 @@ Sleep {{fbdoc item="see"}} - - [[ProPgTypeAliases Type Aliases]] - - [[KeyPgTypeTemp Temporary Types]] - - [[ProPgCtorsDtors Constructors and Destructors]] - - [[ProPgMemberProcedures Member Procedures]] - - [[ProPgMemberAccessRights Member Access Rights]] - - [[ProPgOperatorOverloading Operator Overloading]] + - [[ProPgTypeAliases Alias de type]] + - [[KeyPgTypeTemp Types temporaire]] + - [[ProPgCtorsDtors Constructeurs et destructeurs]] + - [[ProPgMemberProcedures Membres des procédures]] + - [[ProPgMemberAccessRights Droits d'accès aux membres]] + - [[ProPgOperatorOverloading Surcharge d'opérateur]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgVarLenArrays.wakka b/fbdocs/manual/cache/ProPgVarLenArrays.wakka index 64e8b43d10..6c17e278be 100644 --- a/fbdocs/manual/cache/ProPgVarLenArrays.wakka +++ b/fbdocs/manual/cache/ProPgVarLenArrays.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Variable-length Arrays"}}---- -Resizable homogeneous data structures. +Structures redimensionnables de données homogènes. -{{fbdoc item="section" value="Overview"}} - Variable-length arrays are [[ProPgArrays arrays]] that can, during program execution, either be resized to hold more or less elements, or have their dimension[s] use a different subscript range. The memory used by a variable-length array to store its elements is allocated at runtime, in the free store (the heap), as opposed to fixed-length arrays whose data is either allocated on the program stack or in the ##.BSS## or ##.DATA## sections of the executable, depending on whether they were defined with ##[[KeyPgStatic Static]]##. +{{fbdoc item="section" value="Vue d'ensemble + Les tableaux de longueur variable sont des [[ProPgArrays tableaux]] qui peuvent, au cours de l'exécution du programme, être redimensionnés pour contenir plus ou moins d'éléments, ou voir leur(s) dimension(s) utiliser une plage d'indices différente. La mémoire utilisée par un tableau de longueur variable pour stocker ses éléments est attribuée à l'exécution, dans le stock libre (le tas), par opposition aux tableaux de longueur fixe dont les données sont soit stockées sur la pile du programme ou dans les sections ##.BSS## ou ##.DATA## de l'exécutable, selon qu'ils ont été définis ou non avec ##[[KeyPgStatic Static]]##. -{{fbdoc item="section" value="Declaration and definition"}} - A variable-length array is declared with the ##[[KeyPgExtern Extern]]## keyword, followed by a variable identifier, a parenthesized list of zero (0) or more subscript ranges and an element [[CatPgStdDataTypes datatype]]. For an array to be declared variable-length, either an empty subscript range list can be used, or one or more of the subscript ranges must have non-constant values - that is, the ranges must be specified by variables or objects convertible to ##[[KeyPgInteger Integer]]##. +{{fbdoc item="section" value="Déclaration et définition + Un tableau de longueur variable est déclaré avec le mot-clé ##[[KeyPgExtern Extern]]##, suivi par un identifiant de variable, une liste entre parenthèses de zéro (0) ou plusieurs plages d'indices un élément d'un certain [[CatPgStdDataTypes type de donnée]]. Pour déclarer un tableau de longueur variable, soit on peut utiliser une liste de plage avec des indices vides, soit un ou plusieurs indices doivent avoir des valeurs non-constantes - c'est à dire, que les plages doivent être spécifiées par des variables ou des objects convertibles en ##[[KeyPgInteger Integer]]##. {{fbdoc item="filename" value="examples/manual/proguide/arrays/varlen_1.bas"}}%%(freebasic) dim maxLowerBound as integer = -5 @@ -17,17 +17,17 @@ extern arrayOfStrings(maxLowerBound to maxUpperBound, 20) as string '' Declares a one-dimensional variable-length array of elements of type BYTE.. extern arrayOfBytes() as byte %% - A variable-length array is defined with either the ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## keywords, following the same form as declaration. The ##[[KeyPgRedim Redim]]## keyword always defines variable-length arrays, whether the subscript ranges are constant or not. Variable-length arrays cannot be defined with static storage using ##[[KeyPgStatic Static]]##. + Un tableau de longueur variable est défini avec l'un ou l'autre des mots-clefs ##[[KeyPgDim Dim]]## ou ##[[KeyPgRedim ReDim]]##, en suivant la même forme de déclaration. Le mot-clef ##[[KeyPgRedim ReDim]]## définit toujours un tableau de longueur variable,que l'intervalle des indices soit constant ou non. Les tableaux de longueur variable ne peuvent pas être définis avec un stockage statique en utilisant ##[[KeyPgStatic Static]]##. {{fbdoc item="filename" value="examples/manual/proguide/arrays/varlen_2.bas"}}%%(freebasic) '' Defines one-dimensional variable-length arrays of type SHORT and INTEGER.. dim arrayOfShorts() as short redim arrayOfIntegers(9) as integer %% - Since the memory for variable-length arrays is allocated at runtime, when they are defined, the elements of variable-length arrays declared with ##[[KeyPgExtern EXTERN]]## cannot be accessed until the array is defined. Similarly, variable-length arrays defined with empty subscript range lists have zero size - they hold zero elements - so they too must be resized before any elements can be accessed. + Comme la mémoire des tableaux de longueur variable est allouée lors de l'exécution, quand ils sont définis, les éléments de tableaux de longueur variable déclarés avec ##[[KeyPgExtern Extern]]## ne sont pas accessibles jusqu'à ce que le tableau soit défini. De même, les tableaux de longueur variable définis avec une liste de plage avec des indices vides ont une taille de zéro - ils ont zéro éléments - de sorte qu'eux aussi doivent être redimensionnées avant que les éléments puissent être consultés. -{{fbdoc item="section" value="Resizing"}} - Resizing a variable-length array refers to "redefining" the array with different values for its subscript range[s], allowing the array to grow or shrink. Elements outside the new subscript range[s] are erased; object elements will be destroyed. If the array is resized to a larger size, new elements are added initialized with a zero or //null// value; object elements are default-constructed. Variable-length arrays are resized using the ##[[KeyPgRedim Redim]]## keyword following the same form as definition. +{{fbdoc item="section" value="Redimensionnement + Redimensionner un tableau de longueur variable se réfère à "redéfinir" le tableau avec des valeurs différentes pour sa plage d'indice(s), permettant au tableau d' augmenter ou de diminuer. Les éléments en dehors de la nouvelle gamme d'indice(s) sont effacés; les éléments objets seront détruits. Si le tableau est redimensionné à une taille plus grande, de nouveaux éléments sont ajoutés initialisés avec un zéro ou une valeur //nulle//; les éléments objets auront leur valeur de construction par défaut. Les tableaux de longueur variable sont redimensionnés à l'aide du mot-clef ##[[KeyPgRedim ReDim]]## en suivant la même forme que la définition. {{fbdoc item="filename" value="examples/manual/proguide/arrays/varlen_3.bas"}}%%(freebasic) '' Define an empty variable-length array of SINGLE elements.. @@ -36,6 +36,6 @@ dim array() as single '' Resize the array to hold ten (10) SINGLE elements.. redim array(9) as single %% - By default, element values of a variable-length array are lost when resized - the array will contain zero or more elements initialized to a zero or //null// value, or if the elements are objects, they will be default-constructed. To retain the previous element values during a resize, use the ##[[KeyPgPreserve Preserve]]## keyword. + Par défaut, Par défaut, les valeurs des éléments d'un tableau de longueur variable sont perdus lors d'un redimensionnement - e tableau contiendra zéro ou plusieurs éléments initialisés à une valeur zéro ou //nulle//, ou si les éléments sont des objets, ils auront leur valeur de construction par défaut. Pour conserver les valeurs précédentes des éléments au cours d'un redimensionnement, utilisez le mot-clef ##[[KeyPgPreserve Preserve]]##. {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgVarProcLinkage.wakka b/fbdocs/manual/cache/ProPgVarProcLinkage.wakka index 5d0cce1979..26d6a70893 100644 --- a/fbdocs/manual/cache/ProPgVarProcLinkage.wakka +++ b/fbdocs/manual/cache/ProPgVarProcLinkage.wakka @@ -1,40 +1,40 @@ {{fbdoc item="title" value="Variable and Procedure Linkage"}}---- -Name visibility within and between modules +Visibilité des noms à l'intérieur et entre les modules - //Linkage// refers to the visibility of the name of a variable, object or procedure between one or more modules of a program. In other words, a linkage dictates how a name is shared between modules. There are two main types of linkage a name can have: //internal// and //external//. + //Linkage (Liens)// fait référence à la visibilité du nom d'une variable, d'un objet ou d'une procédure entre un ou plusieurs modules d'un programme. In other words, a linkage dictates how a name is shared between modules. Il existe deux principaux types de liaison d'un nom: //internal (interne)// et //external (externe)//. -{{fbdoc item="section" value="Internal linkage"}} +{{fbdoc item="section" value="Internal linkage (Liaison interne) - Names with //internal linkage// only refer to variables, objects or procedures defined within their own module; they are not outwardly visible to other modules. This means that two or more modules can refer to different things using the same name. Note that linkage only refers to visibility of a name, and depending on storage class and lifetime, a variable, object or procedure with internal linkage may be shared between modules using its address. + Les noms avec "//internal linkage//" (liaison interne) font seulement référence à des variables, des objets ou des procédures définis au sein de leur propre module; ils ne sont pas visibles de l'extérieur par d'autres modules. Cela signifie que deux ou plusieurs modules peuvent se référer à des choses différentes en utilisant le même nom. Notez que "linkage (Liens)" se réfère uniquement à la visibilité d'un nom, et selon sa classe de stockage et sa durée de vie, une variable, un objet ou une procédure avec "//internal linkage//" (liaison interne) peut être partagé entre les modules en utilisant son adresse. - {{fbdoc item="subsect" value="Module-scope declarations"}} + {{fbdoc item="section" value="Déclarations de portée module - Variable and object names declared at module-scope have internal linkage unless otherwise declared with ##[[KeyPgExtern Extern]]## or ##[[KeyPgCommon Common]]##. For example, variable names first introduced with ##[[KeyPgDim Dim]]## or ##[[KeyPgStatic Static]]## have internal linkage, and those variables can only be referred to by name within the module in which they are defined. Note that using ##[[KeyPgShared Shared]]## only allows name visibility within the module's procedures, and does not contribute to the name's linkage. + Les noms de variables et d'objets déclarés au niveau de portée-module ont un "//internal linkage//" (liaison interne) sauf s'ils sont déclarés avec ##[[KeyPgExtern Extern]]## ou ##[[KeyPgCommon Common]]##. Par exemple, les noms de variables déclarés la première fois avec ##[[KeyPgDim Dim]]## ou ##[[KeyPgStatic Static]]## ont un "//internal linkage//" (liaison interne) et ces variables peuvent seulement être désignées par leur nom dans le module dans lequel elles sont définies. Notez que l'utilisation de ##[[KeyPgShared Shared]]## ne permet que la visibilité de nom dans les procédures du module et ne contribue pas à la liaison de nom. - Procedure names declared with ##[[KeyPgPrivate Private]]## have internal linkage. + Les noms de procédure déclarées avec ##[[KeyPgPrivate Private]]## ont un "//internal linkage//" (liaison interne). - {{fbdoc item="subsect" value="Local-scope declarations"}} + {{fbdoc item="section" value="Déclarations de portée locale - All variable and object names declared at local-scope (in a ##[[KeyPgDo Do]]## loop, or procedure body, for instance) have internal linkage. + Tous les noms de variables et d'objets déclarés de portée locale (dans une boucle ##[[KeyPgDo Do]]## ou dans le corps d'une procédure, par exemple) ont un "//internal linkage//" (liaison interne). -{{fbdoc item="section" value="External linkage"}} +{{fbdoc item="section" value="External linkage (Liaison externe) - Names with //external linkage// may refer to variables, objects or procedures defined within their module or in another module. Having external linkage means that a name is outwardly visible to other modules, and all modules that use that same external name all refer to the same variable, object or procedure. Thus, only one module may define an external name (the compiler will complain about a duplicated definition if it finds an additional definition of a name with external linkage). + Les noms avec un "//external linkage//" (liaison externe) peuvent faire référence à des variables, des objets ou des procédures définis au sein de leur propre module ou dans un autre module. Avoir un "//external linkage//" (liaison externe) signifie que le nom est visible vers l'extérieur à d'autres moduleset tous les modules qui utilisent ce même nom externe se réfèrent tous à la même variable, au même objet ou à la même procédure. Ainsi, un seul module peut définir un nom externe (le compilateur se plaindra d'une définition en double s'il constate une définition supplémentaire d'un nom avec "//external linkage//" (liaison externe)). - {{fbdoc item="subsect" value="Module-scope declarations"}} + {{fbdoc item="section" value="Déclarations de portée module - Variable and object names declared at module-scope are declared to have external linkage with ##[[KeyPgExtern Extern]]## or ##[[KeyPgCommon Common]]##. + Les noms de variables et d'objets déclarés au niveau de portée-module pour avoir un "//external linkage//" (liaison externe) sont déclarées avec ##[[KeyPgExtern Extern]]## ou ##[[KeyPgCommon Common]]##. - ##[[KeyPgExtern Extern]]## declares the variable having external linkage, but does not define it. This external declaration must come before any definition of the same name (a declaration without ##[[KeyPgExtern Extern]]## specifies internal linkage, and currently, any further external declarations of that name signify a duplicated definition). Variable and object names with external linkage declared using ##[[KeyPgExtern Extern]]## are always in the shared scope, and so can be referred to within procedure bodies. + ##[[KeyPgExtern Extern]]## déclare que la variable a un "//external linkage//" (liaison externe), mais ne la définit pas. Cette déclaration externe doit passer avant toute définition du même nom (une déclaration sans ##[[KeyPgExtern Extern]]## spécifie un "//internal linkage//" (liaison interne), et actuellement, les déclarations ultérieures externes de ce nom signifient une définition double). Les noms de variables et d'objets avec "//external linkage//" (liaison externe) déclarés à l'aide de ##[[KeyPgExtern Extern]]## sont toujours dans la portée partagée (shared scope), et on peut donc se référer à eux dans les corps de procédure. - ##[[KeyPgCommon Common]]## declares the variable having external linkage as well as defining the variable. But, it is different from ##[[KeyPgExtern Extern]]## in that the ##[[KeyPgCommon Common]]## definition of the variable may appear in more than one module. When used with arrays, only variable-length arrays without subscripts may be declared, and the array must be sized at run-time using ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim ReDim]]## before it can be used. Variable and object names with external linkage declared using ##[[KeyPgCommon Common]]## are only in the shared scope if the ##[[KeyPgShared Shared]]## scope specifier is also given. Shared variables can be referred to within procedure bodies. + ##[[KeyPgCommon Common]]## déclare que la variable a un "//external linkage//" (liaison externe) ainsi qu'il définit la variable. Mais, il est différent de ##[[KeyPgExtern Extern]]## par le fait que la définition ##[[KeyPgCommon Common]]## de la variable peut apparaître dans plus d'un module. Lorsqu'il est utilisé avec des tableaux, seuls des tableaux de longueur variable, sans indices peuvent être déclarés, et le tableau doit être dimensionné de moment de l'exécution à l'aide de ##[[KeyPgDim Dim]]## ou ##[[KeyPgRedim ReDim]]## avant qu'il puisse être utilisé. Les noms de variables et d'objets avec un "//external linkage//" (liaison externe) déclarés à l'aide de ##[[KeyPgCommon Common]]## ne sont que dans la portée partagée si le spécificateur de portée ##[[KeyPgShared Shared]]## est aussi utilisé. On peut se référer aux variables partagées dans les corps de procédures. - When both ##[[KeyPgExtern Extern]]## and ##[[KeyPgCommon Common]]## are both used to declare and define a variable, the effect is that the meaning of ##[[KeyPgCommon Common]]## statement is altered to behave as though it were a ##[[KeyPgDim Dim]]## declaration. So it is generally, not recommended to mix ##[[KeyPgExtern Extern]]## and ##[[KeyPgCommon Common]]## on the same variable in the same module. However, variables may be declared and defined with ##[[KeyPgCommon Common]]## in one module and then referenced with ##[[KeyPgExtern Extern]]## in another module without confusion. + Quand ##[[KeyPgExtern Extern]]## et ##[[KeyPgCommon Common]]## sont utilisés les deux ensemble pour déclarer et définir une variable, l'effet est que le sens de la déclaration ##[[KeyPgCommon Common]]## est modifié de façon à se comporter comme s'il s'agissait d'une déclaration ##[[KeyPgDim Dim]]##. Il est donc généralement pas recommandé de mélanger ##[[KeyPgExtern Extern]]## et ##[[KeyPgCommon Common]]## sur la même variable dans le même module. Toutefois, les variables peuvent être déclarées et définies avec ##[[KeyPgCommon Common]]## dans un module et puis référencées avec ##[[KeyPgExtern Extern]]## dans un autre module, sans confusion. - Procedure names are declared to have external linkage by default. Declarations using ##[[KeyPgPublic Public]]## explicitly specify external linkage. + Les noms de procédure sont déclarés comme ayant un "//external linkage//" (liaison externe) par défaut. Les déclarations utilisant explicitement ##[[KeyPgPublic Public]]## signifient "//external linkage//" (liaison externe). - {{fbdoc item="subsect" value="Local-scope declarations"}} + {{fbdoc item="section" value="Les déclarations de portée locale - Currently, names declared at local-scope cannot have external linkage. + Actuellement, les noms déclarés de portée locale ne peuvent pas avoir un "//external linkage//" (liaison externe). {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/ProPgVariableScope.wakka b/fbdocs/manual/cache/ProPgVariableScope.wakka index c924854bd2..6f8adaf916 100644 --- a/fbdocs/manual/cache/ProPgVariableScope.wakka +++ b/fbdocs/manual/cache/ProPgVariableScope.wakka @@ -1,115 +1,115 @@ {{fbdoc item="title" value="Variable Scope"}}---- -Visibility and access rules for variables and objects +Règles de visibilité et d'accès pour les variables et objets -A variable's scope refers to its visibility in a program. A variable is not visible (cannot be accessed) outside the scope in which it was declared. Where and how a variable is declared determines its scope. +La portée d'une variable se réfère à sa visibilité dans le programme. Une variable n'est pas visible (n'est pas accessible) en dehors de la portée pour laquelle elle a été déclarée. Où et comment une variable est déclarée détermine son champ d'application. - In FreeBASIC, there are 4 categories of scope: **//local//**, **//shared//**, **//common//** and **//common shared//**. Each of these scopes has different visibility rules, which are detailed below. + En FreeBasic, il ya 4 catégories de portée: **//local//**, **//shared//**, **//common//** et **//common shared//**. Chacune de ces portées a des règles de visibilité différentes qui sont détaillées ci-dessous. -{{fbdoc item="section" value="Local Scope"}} +{{fbdoc item="section" value="Portée locale (local) - Variables declared in the local scope are visible only in the most local instance of the IF, FOR, SCOPE, function, or module block in which they are declared. + Les variables déclarées dans la portée locale sont visibles uniquement dans l'instance la plus locale d'une fonction IF, FOR, SCOPE ou du bloc module où elles ont été déclarées. - - ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, the main body, and each compound statement implicitly define a new local scope block. - - Explicitly declared variables using ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## take the scope of the local most block in which they are declared. - - Implicit variables take the scope of the the local most ##[[KeyPgScope Scope...End Scope]]## block in which they are first used, otherwise take the scope of the ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, or main body in which they are used. + - ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]##, le corps principal du programme et chaque instruction composée définissent implicitement des blocs de nouvelles portées locales. + - Les variables déclarées explicitement en utilisant ##[[KeyPgDim Dim]]## ou ##[[KeyPgRedim ReDim]]## prennent la portée du bloc le plus local dans lequel sont déclarées. + - Les variables implicites prennent la portée du bloc le plus local ##[[KeyPgScope Scope...End Scope]]## dans lequel elles ont été utilisées en premier, autrement elles ont la portée de ##[[KeyPgSub Sub]]##, ##[[KeyPgFunction Function]]## ou du corps principal où elles sont utilisées. - In the local scope, there is no visibility between module-level code and function level code. Furthermore, variables dimensioned within a block decision or loop statement will only be visible within the block in which they are dimensioned. Variables declared in the local scope of a module are not visible in any of the functions within that module. Similarly, local variables declared inside functions are not visible in the module-level code, nor any other function within the module. + Dans la portée locale il n'y a pas de visibilité entre le code au niveau du module et le code au niveau de la fonction. En outre, les variables dimensionnées dans un bloc de décision ou une instruction de boucle ne seront visibles que dans le bloc dans lequel ont été dimensionnées. Les variables déclarées dans portée locale d'un module ne sont pas visibles dans l'une quelconque des fonctions au sein de ce module. De même, les variables locales déclarées à l'intérieur des fonctions ne sont pas visibles dans la code au niveau du module, ni aucune autre fonction au sein du module. - Variables declared inside ##[[KeyPgScope Scope]]## blocks may only be declared of local scope, and are not visible outside the block. ##[[KeyPgScope Scope]]## blocks, however, inherit the surrounding scope, so local variables declared outside the ##[[KeyPgScope Scope]]## block will be visible inside (//see example program//). + Les variables déclarées à l'intérieur de blocs ##[[KeyPgScope Scope]]## ne peuvent être déclarées que de portée locale et ne sont pas visibles à l'extérieur du bloc. Les blocs ##[[KeyPgScope Scope]]##, cependant, héritent de la portée environnante, ainsi les variables locales déclarées en dehors du bloc ##[[KeyPgScope Scope]]## seront visibles à l'intérieur de celui-ci (//voir exemple de programme//). - You can declare a variable to be of local scope explicitly by using the ##[[KeyPgDim Dim]]## statement, or implicitly by simply introducing the variable (//see [[ProPgImplicitdeclarations Implicit Declarations]]//). The example program ##**local.bas**## demonstrates visibility rules for the local scope. + Vous pouvez déclarer une variable comme étant de portée locale explicitement en utilisant l'instruction ##[[KeyPgDim Dim]]## ou implicitement par simple introduction de la variable (//voir [[ProPgImplicitdeclarations Les déclarations implicites]]//). L'exemple de programme ##**local.bas**## démontre les règles de visibilité pour la portée locale. **local.bas** {{fbdoc item="filename" value="examples/manual/proguide/varscope/local.bas"}}%%(freebasic) -'' visible only in this module +'' visible seulement dans ce module Dim As Integer local_moduleLevel1 '' OK. Print local_moduleLevel1 Scope - '' OK; SCOPE Blocks inherit outer scope + '' OK; Blocs SCOPE heritent portée environnante Print local_moduleLevel1 - '' visible only in this SCOPE Block + '' visible seulement dans ce Bloc SCOPE Dim As Integer local_moduleLevel2 '' OK. Print local_moduleLevel2 End Scope -'' Error; can't see inner-SCOPE vars +'' Error; impossible voir variables SCOPE-interieure '' print local_moduleLevel2 Function some_function( ) As Integer - '' visible only in this function + '' visible seulement dans cette fonction Dim As Integer local_functionLevel '' OK. Print local_functionLevel - '' Error; can't see local module-level vars + '' Error; impossible voir variables niveau-module local '' print local_moduleLevel1 - '' Error; can't see local module-level vars + '' Error; impossible voir variables niveau-module local '' print local_moduleLevel2 function = 0 End Function -'' print local_functionLevel '' Error; can't see function_level vars +'' print local_functionLevel'' Error; impossible voir variables niveau_fonction End 0 %% -{{fbdoc item="section" value="Shared Scope"}} +{{fbdoc item="section" value="Portée partagée (Shared Scope) - Variables declared in the shared scope of a module are visible to both the module and all functions of that module. + Les variables déclarées de portée partagée (shared scope) dans un module sont visibles dans tout le module ainsi que toutes les fonctions de celui-ci. - Unlike the local scope, the shared scope makes module-level variables visible to functions of that module. In other words, the module //shares// its declarations with its functions. + Contrairement à la portée locale, la portée partagée (shared scope) rend les variables de niveau module visibles à toutes les fonctions de ce module. En d'autres termes le module //partage// ses déclarations avec ses fonctions. - Variables can only be declared to be of shared scope at the module-level. Ie., only modules can share variables. Neither functions nor ##[[KeyPgScope Scope]]## blocks can declare variables in the shared scope, thus variables declared there can only be local to that function or block. + Les variables peuvent seulement être déclarées de portée partagée au niveau du module. C'est à dire, seuls les modules peuvent partager des variables. Ni les fonctions, ni les blocs ##[[KeyPgScope Scope]]## ne peuvent déclarer des variables de portée partagée, donc les variables déclarées peuvent seulement être locales à cette fonction ou bloc. - You can declare a variable to be of shared scope by using the DIM statement with the ##[[KeyPgShared Shared]]## keyword. The example program ##**shared_scope.bas**## demonstrates visibility rules for the shared scope. + Vous pouvez déclarer une variable comme étant de portée partagée en utilisant l'instruction DIM avec mot-clé ##[[KeyPgShared Shared]]##. L'exemple de programme ##**shared_scope.bas**## démontre les règles de visibilité pour la portée partagée. ##**shared.bas**## {{fbdoc item="filename" value="examples/manual/proguide/varscope/shared.bas"}}%%(freebasic) -'' visible throughout this module +'' visible dans tout le module Dim Shared As Integer shared_moduleLevel1 '' OK. Print shared_moduleLevel1 Scope - '' OK; can see outer-scope vars + '' OK; peut voir variables portee-environnante Print shared_moduleLevel1 - '' Error; SCOPE-level vars cannot be shared + '' Error; variables niveau-SCOPE impossible etre partagees '' dim shared as integer shared_ModuleLevel2 End Scope End 0 Function some_function( ) As Integer - '' OK; can see shared module-level vars + '' OK; peut voir variables niveau-module partagees Print shared_moduleLevel1 - '' Error; function-level vars cannot be shared + '' Error; variables niveau-fonction impossible etre partagees '' dim shared as integer sharedFunctionLevel function = 0 End Function %% -{{fbdoc item="section" value="Common Scope"}} +{{fbdoc item="section" value="Portée commune (Common Scope) - Variables declared in the common scope are visible to all modules. + Les variables déclarées de portée commune (Common Scope) sont visibles pour tous les modules. - Variables declared with ##[[KeyPgCommon Common]]## are visible to other modules with a matching ##[[KeyPgCommon Common]]## variable declaration. The variable name declared must match from between modules. + Les variables déclarées avec ##[[KeyPgCommon Common]]## sont visibles à d'autres modules avec une déclaration de variable ##[[KeyPgCommon Common]]## correspondant. Le nom de la variable déclarée doit correspondre aux modules entre eux. ##**module1.bas**## {{fbdoc item="filename" value="examples/manual/proguide/varscope/module1.bas"}}%%(freebasic) -'' compile with: +'' compiler avec: '' fbc -lang qb module1.bas module2.bas '$lang: "qb" @@ -117,12 +117,12 @@ End Function Declare Sub Print_Values() Common m1 As Integer Common m2 As Integer - ' This is executed after all other modules + ' Ceci est execute apres tous autres modules m1 = 1 Print "Module1" -Print "m1 = "; m1 ' m1 = 1 as set in this module -Print "m2 = "; m2 ' m2 = 2 as set in module2 +Print "m1 = "; m1 ' m1 = 1 comme defini dans ce module +Print "m2 = "; m2 ' m2 = 2 comme defini dans module2 Print_Values %% @@ -134,18 +134,18 @@ Common m2 As Integer m2 = 2 -print "Module2" ' This is executed first -print "m1 = "; m1 ' m1 = 0 (by default) +Print "Module2" ' Ceci est execute en premier +Print "m1 = "; m1 ' m1 = 0 (par defaut) print "m2 = "; m2 ' m2 = 2 Sub Print_Values() print "Module2.Print_Values" - print "m1 = "; m1 ' Implicit variable = 0 - print "m2 = "; m2 ' Implicit variable = 0 + Print "m1 = "; m1 ' Variable implicite = 0 + Print "m2 = "; m2 ' Variable implicite = 0 End Sub %% -**Output:** +**Affichage:** %% Module2 m1 = 0 @@ -158,11 +158,11 @@ End Sub m2 = 0 %% -{{fbdoc item="section" value="Common Shared Scope"}} +{{fbdoc item="section" value="Portée commune partagée (Common Shared Scope) - Variables declared in the common shared scope are visible to all modules and all functions of those modules. + Les variables déclarées de portée commune partagée (Common Shared Scope) sont visibles à tous les modules et toutes leurs fonctions. - Variables declared with ##[[KeyPgCommon Common]]## are visible to other modules with a matching ##[[KeyPgCommon Common]]## variable declaration. The variable name declared must match from between modules. Within a module the ##[[KeyPgShared Shared]]## declaration modifier gives the variable module scope and makes the variable visible to all subs and functions. + Les variables déclarées avec ##[[KeyPgCommon Common]]## sont visibles aux autres modules avec une déclaration de variable ##[[KeyPgCommon Common]]## correspondant. Le nom de la variable déclarée doit correspondre aux modules entre eux. Dans un module le modificateur de déclaration ##[[KeyPgShared Shared]]## donne à la variable la portée niveau-module et la rend visible à tous les "sub" et fonctions. //**##module3.bas##**// {{fbdoc item="filename" value="examples/manual/proguide/varscope/module3.bas"}}%%(freebasic) @@ -215,7 +215,7 @@ End Sub %% {{fbdoc item="ex"}} - See examples above. + Voir les exemples ci-dessus. {{fbdoc item="see"}} - ##[[KeyPgScope Scope]]## @@ -223,7 +223,7 @@ End Sub - ##[[KeyPgCommon Common]]## - ##[[KeyPgShared Shared]]## - [[ProPgVariables Variables]] - - [[ProPgImplicitdeclarations Implicit Declarations]] + - [[ProPgImplicitdeclarations Les déclarations implicites]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} diff --git a/fbdocs/manual/cache/ProPgVariables.wakka b/fbdocs/manual/cache/ProPgVariables.wakka index 307e97deea..1308d166e2 100644 --- a/fbdocs/manual/cache/ProPgVariables.wakka +++ b/fbdocs/manual/cache/ProPgVariables.wakka @@ -1,16 +1,16 @@ {{fbdoc item="title" value="Variables"}}---- -Symbols representing data in memory. +Symboles représentant les données en mémoire. {{fbdoc item="desc"}} - Variables are name symbols which can be manipulated. They are declared and referenced using names composed of letters, numbers, and character "_". These reference names cannot contain most other symbols because such symbols are part of the FreeBASIC programming language. They also cannot contain spaces. See //[[ProPgIdentifierRules Indentifier Rules]]//. + Les variables sont des noms symboles qui peuvent être manipulés. Elles sont déclarées et référencées en utilisant des noms composés de lettres, de chiffres et le caractère "_". Ces noms de référence ne peuvent pas contenir la plupart des autres symboles parce que ceuc-ci font partie du langage de programmation FreeBasic. Ils ne peuvent pas contenir d'espaces. Voir //[[ProPgIdentifierRules Règles d'identification]]//. - In FreeBASIC, variables can be defined using the ##[[KeyPgDim Dim]]## statement. + En FreeBasic, les variables peuvent être définies en utilisant la déclaration ##[[KeyPgDim Dim]]##. - Variables are available for later access depending on where and how the ##[[KeyPgDim Dim]]## declaration for that variable is given. Depending on the [[ProPgVariableScope scope]] of a variable, a defined variable can be available within the main area of a program, within a procedure, through an entire module, or through out an entire program. See //[[ProPgVariableScope Variable Scope]]//. + Les variables sont disponibles pour un accès ultérieur en fonction du lieu et comment la déclaration ##[[KeyPgDim Dim]]## a été donnée pour cette variable. Selon sa [[ProPgVariableScope portée]], une variable définie est accessible dans lapartie principale du programme, dans une procédure, à travers le module entier ou dans tout le programme. Voir //[[ProPgVariableScope Portée des variables]]//. - Variables are also made available when they are passed as parameters to a procedure such as ##[[KeyPgFunction Function]]## or ##[[KeyPgSub Sub]]##. + Les variables sont également disponibles lorsqu'elles sont passées comme paramètres à une procédure telle que ##[[KeyPgFunction Function]]## ou ##[[KeyPgSub Sub]]##. - After a variable is declared with the ##[[KeyPgDim Dim]]## statement, they can be assigned, passed to procedures, and used in expressions wherever their [[CatPgStdDataTypes Standard Data Type]] is similar. Sometimes variables are automatically converted to other data types before being used in expressions, or passed as parameters to procedures. See //[[ProPgDataConversion Coercion and Conversion]]//. + Dès qu'une variable est déclarée avec l'instruction ##[[KeyPgDim Dim]]##, elle peut être affectée, passée à des procédures et utilisée dans des expressions ayant un [[CatPgStdDataTypes type de données standard]] similaire. Parfois, les variables sont automatiquement converties vers d'autres types de données avant d'être utilisées dans des expressions ou transmises en tant que paramètres à des procédures. Voir //[[ProPgDataConversion Promotion et Conversion]]//. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/proguide/variables/variables.bas"}}%%(freebasic) @@ -37,9 +37,9 @@ End Sub %% {{fbdoc item="see"}} - - [[ProPgDataConversion Coercion and Conversion]] + - [[ProPgDataConversion Promotion et Conversion]] - ##[[KeyPgDim Dim]]## - - [[ProPgIdentifierRules Identifier Rules]] - - [[ProPgVariableScope Variable Scope]] + - [[ProPgIdentifierRules Règles d'identification]] + - [[ProPgVariableScope Portée d'une variable]] {{fbdoc item="back" value="CatPgProgrammer|Programmer's Guide"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/QuickBASIC.wakka b/fbdocs/manual/cache/QuickBASIC.wakka index c4ed3b0c79..d24467a9b5 100644 --- a/fbdocs/manual/cache/QuickBASIC.wakka +++ b/fbdocs/manual/cache/QuickBASIC.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="Microsoft QuickBASIC"}}---- -A BASIC compiler, interpreter and IDE +Un compilateur, interpréteur et IDE BASIC -""QuickBASIC"" is a twenty year old interpreter/compiler upon which FreeBASIC is modeled. It runs in 16-bit MS-DOS. +QuickBASIC est un interpréteur / compilateur de vingt ans qui a servi de modèle pour FreeBASIC. Il fonctionne sous 16-bit MS-DOS. -More information from [[http://en.wikipedia.org Wikipedia]]: +Plus d'information sur [[http://en.wikipedia.org">Wikipedia]]: -Microsoft ""QuickBASIC"" (often shortened, correctly, to QB, or incorrectly, to "QBasic", which is a different system) is a descendant of the BASIC programming language that was developed by the Microsoft Corporation for use with the MS-DOS Operating System. It was loosely based on GW-BASIC but in addition provided user-defined types, improved programming structures, better graphics and disk support and a compiler in addition to the interpreter. Microsoft sold ""QuickBASIC"" as a commercial development suite. +Microsoft QuickBASIC (souvent abrégé, correctement, QB, ou de façon erronée, "QBasic", qui est un système différent) est un descendant du langage de programmation BASIC qui a été développé par la société Microsoft pour une utilisation avec le système d'exploitation MS-DOS. Il était vaguement basé sur GW-BASIC mais en outre fournissait des types définis par l'utilisateur, des structures de programmation améliorées, de meilleurs graphismes et de support de disque et un compilateur en plus de l'interprèteur. Microsoft a vendu QuickBASIC comme une suite de développement commercial. -Microsoft released the first version of ""QuickBASIC"" on August 18, 1985 stored on a single 5.25" floppy disk. ""QuickBASIC"" came with a markedly different Integrated Design Environment (IDE) from the one supplied with previous versions of BASIC. Line numbers were no longer needed since users could insert and remove lines directly via an onscreen text editor. +Microsoft a publié la première version de QuickBASIC le 18 août 1985 stockée sur une seule disquette 5,25". QuickBASIC est apparu avec un environnement de conception intégré (IDE) nettement différent de celui qui était fourni avec les versions précédentes. Les numéros de ligne n'étaient plus nécessaires et les utilisateurs pouvaient insérer et supprimer des lignes directement via un éditeur de texte à l'écran. -Microsoft's "PC BASIC Compiler" was included which could be used to compile programs into DOS executables. The editor also had an interpreter built in which would run the program without leaving the editor at all, and could be used to debug the program before creating an executable file. Unfortunately there were some small, subtle differences between the interpreter and the compiler, so that sometimes programs running perfectly well in the interpreter would fail after compilation, or even not compile at all. +Le compilateur Microsoft "PC BASIC" était inclus et compilait les programmes en exécutables DOS. L'éditeur avait également un interprèteur interne permettant l'exécution du programme sans quitter l'éditeur et qui pouvait être utilisé pour déboguer le programme avant de créer un fichier exécutable. Malheureusement, il y avait quelques petites différences subtiles entre l'interprèteur et le compilateur, de sorte que parfois, les programmes exécutés parfaitement dans l'interpréteur échouaient après la compilation ou ne se compilaient même pas du tout. -The last version of ""QuickBASIC"" was 4.5 (1988) although there was continued development of the Microsoft Basic Professional Development System (PDS), the last release of which was version 7.1 (June 1990). The PDS version of the IDE was called ""QuickBASIC"" Extended (QBX). The successor to ""QuickBASIC"" and PDS was Visual Basic for MSDOS 1.0 provided in Standard and Professional versions. Later versions of Visual Basic did not include DOS versions as Microsoft wanted developers to concentrate on Windows applications. +La dernière version de QuickBASIC fut la 4.5 (1988) même s'il y avait poursuite du développement du Microsoft Basic Professional Development System (PDS), dont la dernière version a été la 7.1 (June 1990). La version PDS de l'IDE a été appelée QuickBASIC Extended (QBX). Le successeur de QuickBASIC et PDS fut Visual Basic pour MSDOS 1.0 produit dans les versions Standard et Professionnelle. Les versions ultérieures de Visual Basic ne comprenaient pas les versions DOS car Microsoft voulait que les développeurs se concentrent sur les applications Windows. -A replacement for GW-BASIC, based on ""QuickBASIC"" 4.5 was included with MS-DOS 5 and later versions. This is called QBASIC. Compared to ""QuickBASIC"", it is limited as it lacks a few functions, can only handle programs of a limited size, lacks support for separate modules, and is an interpreter only. It cannot be used to produce executable files directly although programs developed using it can still be compiled by a ""QuickBASIC"" 4.5, PDS 7.1 or VBDOS 1.0 compiler, if one is available. +Un remplacement pour GW-BASIC, basé sur QuickBASIC 4.5 a été inclus avec MS-DOS 5 et ses versions ultérieures. On l'appela QBASIC. Comparé à QuickBASIC, il est limité car il manque quelques fonctions, ne peut gérer que des programmes d'une taille limitée, manque de support des modules séparés et c'est un seulement un interprèteur. Il ne peut pas être utilisé pour produire des fichiers exécutables directement, bien que les programmes élaborés puissent encore être compilés par un compilateur QuickBASIC 4.5, 7.1 ou PDS VBDOS 1.0, si vous possédez l'un des deux. -To learn more about the language, history, and community of ""QuickBASIC"" and its free interpreter-only counterpart, you should see also en.wikipedia.org/wiki/QBasic. There are more links, and more information, including a barebones tutorial for Quick/QBasic programming. +Pour en savoir plus sur le langage, l'histoire et la communauté de QuickBASIC et son interprèteur libre, allez voir le [[http://en.wikipedia.org/wiki/QBasic">Wikipedia QBasic]]. Il y a plus de liens et d'informations, y compris un tutoriel "barebones" pour la programmation rapide QBasic. -==External links== -~- [[http://www.petesqbsite.com/ Pete's QB Site]]. One of the oldest remaining QB sites (since Oct 1998). -~- [[http://www.qbasicnews.com/ QQN/QBN: QBasic/QuickBasic News]]. -~- [[http://www.qbasicnews.com/sections.php?id=4 QQN's Newbies Section]] which includes a link for downloading QBasic. \ No newline at end of file +**Liens externes** +[[http://www.petesqbsite.com/">Pete's QB Site]]. Un des plus anciens sites QB restant (depuis oct. 1998). +[[http://www.qbasicnews.com/">QQN/QBN: QBasic/QuickBasic News]]. +[[http://www.qbasicnews.com/sections.php?id=4">QQN's Newbies Section]] qui inclut un lien pour télécharger QBasic. \ No newline at end of file diff --git a/fbdocs/manual/cache/SVNCygwin.wakka b/fbdocs/manual/cache/SVNCygwin.wakka new file mode 100644 index 0000000000..43c85a3059 --- /dev/null +++ b/fbdocs/manual/cache/SVNCygwin.wakka @@ -0,0 +1,7 @@ +{{fbdoc item="title" value="Compiling from SVN for Cygwin"}}---- +At the moment, there is no standard distribution for Cygwin. Therefore, if you wish to have a Cygwin-specific build of FreeBASIC, you'll have to build it yourself. You should only build for Cygwin if you wish to use a linux library that does not have a Windows port. I will not go over the details for installing Cygwin, if you need more information see http://www.cygwin.com/ . + +After Cygwin is properly installed the Linux specific instructions found under //[[SVNLinux Compiling from SVN for Linux]]// should produce the expected results. Instead of running the installation script "install.sh" you should copy fbc.exe and the bin and lib directories to your installation directory. + + +{{fbdoc item="back" value="SVNCompile|Compiling from SVN"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/SVNDOSWin32.wakka b/fbdocs/manual/cache/SVNDOSWin32.wakka new file mode 100644 index 0000000000..a99bd8d469 --- /dev/null +++ b/fbdocs/manual/cache/SVNDOSWin32.wakka @@ -0,0 +1,163 @@ +{{fbdoc item="title" value="Compiling from SVN for DOS on Win32"}}---- +This guide shows how to compile a DOS ""FreeBASIC"" (compiler and libraries) using DJGPP and a DOS version of ""FreeBASIC"". A cross-compilation (using a win32 fbc with -target dos) isn't necessary anymore since fbc version 0.21.0 (so maybe this will work directly on DOS now?). + +{{fbdoc item="section" value="Setting up the environment"}} + + Choose a place for the SVN ""FreeBASIC"", for example ##C:\""FreeBASIC""-dos##. Then checkout the current development base [[https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC]] into ##C:\""FreeBASIC""-dos## using an SVN client. + + A working ""FreeBASIC"" installation is needed; this guide assumes it is in C:\""FreeBASIC""-0.21.1-dos, but of course it can be somewhere else too. It should also be possible to use FB 0.20.0, and maybe even earlier versions, to compile the current FB. The working fbc has to be in the PATH, or you'll have to specifiy ##FBC=C:/path/to/fbc## manually when configuring. + + ""FreeBASIC"" needs a specific DJGPP setup currently. The needed packages can be found on the [[http://www.delorie.com/djgpp/getting.html DJGPP homepage]]. Download DJGPP 2.03 (current) packages, with djdev204.zip from DJGPP 2.04 (beta). For most of the following packages, the one ending in ##b## for binaries is needed. + - autoconf (acnf*.zip) + - automake (amak*.zip) + - binutils (bnu*b.zip, bnu*a.zip) + - bash (bsh*.zip) + - djdev (djdev*.zip) - //pick up djdev204.zip or later from the ##beta/## directory// + - fileutils (fil*.zip) + - gcc (gcc*.zip) + - gpp (gpp*.zip) + - grep (grep*.zip) + - awk (gwk*.zip) + - m4 (m4*.zip) + - make (mak*.zip) + - perl (perl*.zip) + - sed (sed*.zip) + - shellutils (shl*.zip) + - textutils (txt*.zip) + + Follow the DJGPP instructions to set up a standard DJGPP installation. Currently it comes down to: + - Extracting everything into ##C:\DJGPP##. + - Adding an environment variable named "DJGPP": + ##DJGPP## = ##C:\DJGPP\djgpp.env## + + Additionally you should copy + ##C:\DJGPP\lib\gcc\djgpp\4.42\libsupcxx.a## + to + ##C:\DJGPP\lib\gcc\djgpp\4.42\libsupcx.a## + because fbc expects that shorter name (probably a 8.3 file name issue). + + Add C:\DJGPP\bin to the PATH and make sure ##gcc## really maps to ##C:\DJGPP\bin\gcc.exe## (ditto for the binutils). In case you're on win32 and have ""MinGW"" or MSYS installed, it might be safer to remove those from the PATH for a while, or use a batch script like this to open a console having DJGPP and the working DOS FB in its PATH: + + %%set DJDIR=C:\djgpp +set DJGPP=%DJDIR%\djgpp.env + +set PATH=%DJDIR%\bin;%PATH% +set PATH=C:\FreeBASIC-0.21.1-dos;%PATH% + +cd C:\FreeBASIC-dos +cmd +%% + +{{fbdoc item="section" value="Compiling FreeBASIC"}} + + Enter the following commands into a DOS prompt. Note: DJGPP's bash can be used too, it contains a few bugs causing some problems with the ./configure scripts, but anyways that doesn't seem to make a difference for building ""FreeBASIC"". On the plus side, bash lets you run the configure scripts directly, without having to use ##sh##. + + %%cd C:\FreeBASIC-dos%% + + Compile the new fbc.exe: + + %%cd src\compiler\obj\dos +sh ../../configure --enable-standalone +make +make install +cd ..\..\..\..%% + + Note: The ../../configure output should say it's building for ##i386-pc-msdosdjgpp## (and not something with ##mingw##). + + Compile the new libfb.a: + + %%cd src\rtlib\obj\dos +sh ../../configure CFLAGS=-O2 +make +make install +cd ..\..\..\..%% + + Compile the new libfbgfx.a: + + %%cd src\gfxlib2\obj\dos +sh ../../configure CFLAGS=-O2 +make +make install +cd ..\..\..\..%% + + C:\""FreeBASIC""-dos now contains the new fbc.exe, while C:\""FreeBASIC""-dos\lib\dos contains the new fb/fbgfx libraries. + +{{fbdoc item="section" value="Making the new FreeBASIC tree usable"}} + + Several files need to be copied into the C:\""FreeBASIC""-dos tree to enable it to compile ""FreeBASIC"" programs (and FreeBASIC itself again; those cases are marked with "for rebuilding"). + + From ##C:\""FreeBASIC""-0.21.1-dos## into ##C:\""FreeBASIC""-dos\lib\dos##: + - ##libc.a## (Note: this is not the original one from DJGPP, we're using a modified version, see ""FreeBASIC""/src/contrib/djgpp/crt0) + - ##libintl.a## (for rebuilding) + - ##libz.a## (for rebuilding) + + From ##C:\""FreeBASIC""-0.21.1-dos## into ##C:\""FreeBASIC""-dos\bin\dos##: + - ##ar.exe## + - ##as.exe## + - ##ld.exe## + + These files need to be copied from DJGPP into the C:\""FreeBASIC""-dos tree: + + From ##C:\DJGPP\lib\gcc\djgpp\## into ##C:\""FreeBASIC""-dos\lib\dos##: + - ##libgcc.a## + - ##libsupcx.a## (Note: the original file is named ##libsupcxx.a##, but we're using the shorter version for FB to avoid long file name problems that occurred with this in the past) + + From ##C:\DJGPP\lib## into ##C:\""FreeBASIC""-dos\lib\dos##: + - ##crt0.o## + - ##gcrt0.o## + - ##libbfd.a## (for rebuilding) + - ##libemu.a## + - ##libiberty.a## (for rebuilding) + - ##libm.a## + + Now you can use C:\""FreeBASIC""-dos instead of C:\""FreeBASIC""-0.21.1-dos to compile FB programs. + +{{fbdoc item="section" value="Recompiling after SVN updates or changes to the source code"}} + + For convenience you can rebuild the compiler and libraries (or just the changed component) in the same directory as before, using the same commands as before. However there may be chicken-egg problems after updates to the build system or the rtlib/gfxlib interface. Building fbc first avoids chicken-egg problems between fbc and the runtime libraries, but not all problems can be avoided while rebuilding in the same tree. It is safer (but more work) to use two separate FB directories (one being a working FB installation, the other being the tree you want to compile). + +{{fbdoc item="section" value="Useful options for building rtlib and gfxlib"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##CC=## + (Useful if not using whatever is found in the PATH) + + - ##RANLIB=## + + - ##CFLAGS=## + Useful to override the default "-O2 -g" and just use "-O2", unless you want debug symbols. + + You can pass these to the makefile too, but by passing them to configure they will be written to the makefile and you won't have to remember them the next time you're make'ing. + + {{fbdoc item="subsect" value="make"}} + + - ##AR=## + (The AR variable is not forwarded by configure currently, so it has to be passed to the makefile) + +{{fbdoc item="section" value="Useful options for building the compiler"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##--disable-objinfo## + If specified fbc will not be linked against libbfd/libiberty/libintl. This can save a lot of trouble during compilation of fbc, at the cost of the [[DevObjinfo objinfo feature]] being disabled. + + - ##--enable-standalone## (This is always used for the ""FreeBASIC""-dos release) + Build a standalone fbc that can run from the ""FreeBASIC"" tree. It will seek binutils and libraries in the ""FreeBASIC"" tree. + + - ##FBC=## + + {{fbdoc item="subsect" value="make"}} + + - ##DEBUG=1## + fbc will be compiled with ##-g##. Useful for debugging fbc. + For example: + ##make DEBUG=1## + + - ##EXTRAERR=1## + fbc will be compiled with ##-exx##. Useful for debugging fbc. The resulting fbc will be notably slower. + + - ##FB_BFD=1 BFD_VER=## + This will result in fbc using FB libbfd headers to use libbfd directly, instead of using the DJGPP's C libbfd headers through fbc's default C libbfd wrapper. The FB libbfd header version must be specified, for example ##BFD_VER=217##. The libbfd.a that this fbc will be linked against must match this version exactly. + +{{fbdoc item="back" value="SVNCompile|Compiling from SVN"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/SVNFreeBSD.wakka b/fbdocs/manual/cache/SVNFreeBSD.wakka new file mode 100644 index 0000000000..d539719ef1 --- /dev/null +++ b/fbdocs/manual/cache/SVNFreeBSD.wakka @@ -0,0 +1,91 @@ +===== Building FreeBASIC from SVN on FreeBSD ===== + +This instructional guide is based upon [[http://drv.nu/freebasic/building/freebsd/ this page]]. Yes, I changed some things. Trust me on all this, I know what I am doing, even if you don't think so. + +===== Prerequisites ===== + +First, you need to check out the FreeBASIC Subversion repository. This is something beyond the scope of this document, and if you're reading this page, you've probably already done this anyways. But some people feel they know everything, but don't, so, if you haven't done so already, then do these steps here: + + 1) First, set the FBC_SRC variable in your shell (**DO THIS EVEN IF YOU ALREADY CHECKED OUT THE SOURCE**) like so: ##FBC_SRC=~/src/fbc/fbc-svn## + 1) Next, check out the source: ##svn co https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC ${FBC_SRC}/FreeBASIC## + 1) **NOTE**: If you copy and paste the command in line two (above) as-is, you'll get a "#" mark in the paste. Delete it, it'll muck everything up if you don't. + +**IMPORTANT NOTE**: DON'T EXIT YOUR SHELL! FBC_SRC is only set for your current shell session and does not exist in any process except your current shell, and any (sub)processes that you start from that shell. + +Also, for graphics, you need to have X11 installed. To keep shit simple, the ##x11/xorg## meta-port provides the entire X.org distribution (by declaring all of X.org as dependencies). + +If you're on a clean FreeBSD install (which you're probably not), you can install X like so (as root): +##cd /usr/ports/x11/xorg +make install distclean## + +Note that this process will take an hour or more, even on a fast quad-core machine, but like I already said, you probably already have X11 and don't need to do any of this. + +Finally, since the compiler is written in FreeBASIC itself, you'll need to install a prebuilt copy of FreeBASIC - I (segin) have provided a build and you can find it [[http://www.freebasic.net/forum/viewtopic.php?t=15046 in this forum post]]. + +==== External dependencies ==== + +If you've done everything right, you'll find the FreeBASIC runtime library source at ##~/src/fbc/fbc-svn/FreeBASIC/src/rtlib## unless you did something wrong, and the source is elsewhere (or not checked out at all). If these instructions are too confusing, well, it's a wiki page and someone else can make it less confusing. + +Next, you're gonna need to symlink some C runtime objects into the FreeBASIC build tree, as well as create the directories for FreeBSD libraries: +##cd ${FBC_SRC}/FreeBASIC/lib +mkdir freebsd +cd freebsd +ln -s /usr/lib/crt1.o +ln -s /usr/lib/crti.o +ln -s /usr/lib/crtbegin.o +ln -s /usr/lib/crtend.o +ln -s /usr/lib/crtn.o +cd ../../bin/freebsd +ln -s /usr/bin/as +ln -s /usr/bin/ar +ln -s /usr/bin/ld## + +If ##mkdir## fails and says the ##freebsd## directory already exists, pretend it worked anyways and continue as normal. + +At this point, you need to have the libbfd library from GNU binutils 2.17 - note that the version must be //exactly// 2.17, not 2.16, or 2.17.23.23. or 2.18, or anything but 2.17. FreeBASIC currently only has headers for version 2.17, and the library interface changes between versions, so use exactly that version, not newer or older ones. + +For the moment, issue a blank ##cd## statement without specifying a directory - this will take you back to ##~## - your home directory. + +Now, download binutils 2.17 like so: +##fetch http://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 +tar jxf binutils-2.17.tar.bz2 +cd binutils-2.17## + +And then build the relevant libraries: +##cd intl && ./configure && make && cp libintl.a ${FBC_SRC}/FreeBASIC/lib/freebsd/ && cd .. +cd bfd && ./configure && make && cp libbfd.a ${FBC_SRC}/FreeBASIC/lib/freebsd/ && cd .. +cd libiberty && ./configure && make && cp libiberty.a ${FBC_SRC}/FreeBASIC/lib/freebsd/## + +===== Building FreeBASIC proper===== + +At this point, you should have all the things done that you need to do before tackling the part of building FreeBASIC itself. Now, you compile the Runtime Library. + +==== Building the Runtime Library ==== + +All you should have to do is this: +##cd ${FBC_SRC}/FreeBASIC/src/rtlib/obj/freebsd +../../configure +gmake +gmake MULTITHREADED=1 +gmake install## + +And now gfxlib2. + +==== Building the Graphics Library, gfxlib2 ==== + +Again, just like with the runtime, do: +##cd ${FBC_SRC}/FreeBASIC/src/gfxlib2/obj/freebsd +../../configure +gmake +gmake install## + +If the build fails complaining about not being able to find X11/extensions/X.h, it's because the X.org guys restructured what packages some headers are in, removing library interface headers from the protocol headers packages and putting them in the package of the actual library they describe the interface of. Example: XInput.h was in inputproto but was removed from there and instead put in libXi. You have upgraded your xorg packages partially and have version mismatches - do ##portupgrade -R xorg## to fix it. + +==== Building the Compiler ==== + +The compiler is straightforward, do: +##cd ${FBC_SRC}/FreeBASIC/src/compiler/obj/freebsd +../../configure +gmake## + +And that's it! You should have a "fbc_new", cut from the latest subversion source! If you're looking to package a distribution, you can use the install.sh from my prebuilt copy. \ No newline at end of file diff --git a/fbdocs/manual/cache/SVNLinux.wakka b/fbdocs/manual/cache/SVNLinux.wakka new file mode 100644 index 0000000000..e80b8b0cab --- /dev/null +++ b/fbdocs/manual/cache/SVNLinux.wakka @@ -0,0 +1,129 @@ +{{fbdoc item="title" value="Compiling from SVN for Linux"}}---- +This guide shows how to compile a Linux ""FreeBASIC"" (compiler and libraries) on an x86 Linux system using a Linux version of ""FreeBASIC"". Note: Compiling the 32bit FB on a 64bit Linux system requires extra steps and is a bit harder, though surely possible. + +{{fbdoc item="section" value="Setting up the environment"}} + + Choose a place for the SVN ""FreeBASIC"", for example ##~/""FreeBASIC""##. Then checkout the current development base: + + %%cd ~/FreeBASIC +svn checkout https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC .%% + + An existing ""FreeBASIC"" installation is needed. + + You will need many development tools and libraries, including but not limited to: + - ##subversion## + - ##gcc## + - ##""g++""## (or ##""gcc-c++""## on Fedora) + - ##binutils-dev## (or ##binutils-devel## on Fedora, and ##binutils-static## on Fedora 14 and later) + - ##perl## + - ##autoconf## + - ##libncurses-dev## (or ##ncurses-devel## on Fedora) + - ##libx11-dev## (or ##libX11-devel## on Fedora) + - ##libxext-dev## (or ##libXext-devel## on Fedora) + - ##libxpm-dev## (or ##libXpm-devel## on Fedora) + - ##libxrandr-dev## (or ##libXrandr-devel## on Fedora) + - ##libxrender-dev## (or ##libXrender-devel## on Fedora) + - ##libgpm-dev## (or ##gpm-devel## on Fedora) + - ##freeglut3-dev## (or ##freeglut-devel## on Fedora, or another one that pulls in OpenGL headers) + +{{fbdoc item="section" value="Compiling FreeBASIC"}} + + Open up a shell and enter the following commands. + + %%cd ~/FreeBASIC%% + + Compile the new fbc: + + %%cd src/compiler/obj/linux +../../configure +make +make install +cd ../../../..%% + + Compile the new libfb.a and libfbmt.a: + + %%cd src/rtlib/obj/linux +../../configure CFLAGS=-O2 +make +make MULTITHREADED=1 +make install +cd ../../../..%% + + Compile the new libfbgfx.a: + + %%cd src/gfxlib2/obj/linux +../../configure CFLAGS=-O2 +make +make install +cd ../../../..%% + + Now you can install the new fbc/libraries into /usr/local, overwriting the old installation (might require root privileges): + + %%./install.sh -i%% + + Note: If the existing installation and the just-compiled ""FreeBASIC"" use different prefixes (or one is standalone, but not the other) then the install.sh or install-standalone.sh scripts won't replace the existing files. You will need to remove the previous installation first, either by running ##install.sh -u## or ##install-standalone -u## in the ""FreeBASIC"" directories you installed the existing ""FreeBASIC"" from, or by manually deleting the files. + +{{fbdoc item="section" value="Recompiling after SVN updates or changes to the source code"}} + + You can rebuild the compiler and libraries (or just the changed component) in the same directory as before, using the same commands as before. Since the FB installation in /usr/local is (normally) used for compilation, you don't have to worry about chicken-egg problems. However in case you're using a standalone fbc and rebuilding it in its own directory, you can run into the same problems as described on the Compiling For DOS/win32 pages. + +{{fbdoc item="section" value="Useful options for building rtlib and gfxlib"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##CC=## + (Useful if not using the default from the system) + + - ##RANLIB=## + + - ##CFLAGS=## + Useful to override the default "-O2 -g" and just use "-O2", unless you want debug symbols. + + You can pass these to the makefile too, but by passing them to configure they will be written to the makefile and you won't have to remember them the next time you're make'ing. + + {{fbdoc item="subsect" value="make"}} + + - ##AR=## + (The AR variable is not forwarded by configure currently, so it has to be passed to the makefile) + +{{fbdoc item="section" value="Useful options for building the compiler"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##--disable-objinfo## + If specified fbc will not be linked against libbfd/libiberty/libintl. This can save a lot of trouble during compilation of fbc, at the cost of the [[DevObjinfo objinfo feature]] being disabled. + + - ##--enable-standalone## + Build a standalone fbc that can run from the ""FreeBASIC"" tree and doesn't need to be installed. It will seek binutils and libraries in the ""FreeBASIC"" tree, thus they need to be copied in. You can look at the ""FreeBASIC""-linux-standalone release to see what files are expected. The ##install-standalone.sh## script can be used to install/uninstall this fbc to/from /usr/share/freebasic. + + - ##--prefix=/a/path/to/somewhere## + Changes the /usr/local prefix to something else. Only useful for the non-standalone build. + For example: + ##../../configure --prefix=/usr## + Then ##install.sh -i## will install into /usr instead of /usr/local (and fbc will use /usr instead of /usr/local to find binutils, libraries and headers). + + - ##--enable-crosscomp-## + fbc will be compiled supporting cross-compilation for the specified target. To actually cross-compile something though additional binutils and libraries will be needed in the ""FreeBASIC""/bin/ and ""FreeBASIC""/lib/ directories. Besides, this may only work with the standalone build of fbc. + For example: + ##../../configure --enable-crosscomp-dos## + + - ##FBC=## + + {{fbdoc item="subsect" value="make"}} + + - ##DEBUG=1## + fbc will be compiled with ##-g##. Useful for debugging fbc. + For example: + ##make DEBUG=1## + + - ##EXTRAERR=1## + fbc will be compiled with ##-exx##. Useful for debugging fbc. The resulting fbc will be notably slower. + + - ##FB_BFD=1 BFD_VER=## + This will result in fbc using FB libbfd headers to use libbfd directly, instead of using the system's C libbfd headers through fbc's default C libbfd wrapper. The FB libbfd header version must be specified, for example ##BFD_VER=217##. The libbfd.a that this fbc will be linked against must match this version exactly. + + Note: The linking process to build fbc will prefer the system's libbfd (from ##/usr/lib##) over libbfd's found in library search paths (such as /usr/share/freebasic/lib/linux), //and// it will prefer shared libraries (##libbfd.so##) over static libraries (##libbfd.a##). + Because of that it's easier to use the default C libbfd wrapper, unless you exactly know your system's libbfd version and it won't change (unlikely). + If you don't want to link against a shared libbfd (which is likely to be present on your system because of the binutils), you can place (a specific) ##libbfd.a## into ##/usr/local/lib##, and it will be preferred over anything from ##/usr/lib##. + +{{fbdoc item="back" value="SVNCompile|Compiling from SVN"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/SVNWin32MSYS.wakka b/fbdocs/manual/cache/SVNWin32MSYS.wakka new file mode 100644 index 0000000000..ca390e4da1 --- /dev/null +++ b/fbdocs/manual/cache/SVNWin32MSYS.wakka @@ -0,0 +1,173 @@ +{{fbdoc item="title" value="Compiling from SVN for Win32, using MinGW/MSYS"}}---- +This guide shows how to compile a win32 ""FreeBASIC"" (compiler and libraries) using ""MinGW""/MSYS and a win32 version of ""FreeBASIC"". + +{{fbdoc item="section" value="Setting up the environment"}} + + Choose a place for the SVN ""FreeBASIC"", for example ##C:\""FreeBASIC""##. Then checkout the current development base [[https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC]] into ##C:\""FreeBASIC""## using an SVN client. + + A working ""FreeBASIC"" installation is needed; this guide assumes it is in C:\""FreeBASIC""-0.21.1-win32, but of course it can be somewhere else too. It should also be possible to use FB 0.20.0, and maybe even earlier versions, to compile the current FB. The working fbc has to be in the PATH, or you'll have to specifiy ##FBC=C:/path/to/fbc## manually when configuring. + + The ""MinGW"" and MSYS downloads can be found on [[http://www.mingw.org]] and their Sourceforge page. ""MinGW""/MSYS are split up into many packages, representing the individual tools you might or might not need. The "core" (GCC, binutils, mingw runtime, Windows API libraries) can be found under ""BaseSystem"" in the Downloads area on Sourceforge. You can use the installer tool provided by ""MinGW"" to install everything, and/or manually download and extract the needed packages. Besides ""MinGW""'s GCC port, there also is [[http://tdm-gcc.tdragon.net/ TDM-GCC]], which can be used instead of ""MinGW""'s GCC. TDM-GCC seems to be more stable & up-to-date recently, compared to ""MinGW""'s GCC. + + The required ""MinGW"" packages in general: + - ##gcc-core## + - ##""gcc-g++""## + - ##binutils## + - ##mingwrt## + - ##w32api## + - ##make## + + These are the packages used to make the ""FreeBASIC""-0.21 releases: + TDM-GCC 4.4.1 (from [[http://sourceforge.net/downloads/tdm-gcc/]]) + - ##gcc-4.4.1-tdm-2-core.tar.gz## ([[http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.4%20series/4.4.1-tdm-2%20SJLJ/gcc-4.4.1-tdm-2-core.zip/ link]]) + - ##""gcc-4.4.1-tdm-2-g++.tar.gz""## ([[http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.4%20series/4.4.1-tdm-2%20SJLJ/gcc-4.4.1-tdm-2-g%2B%2B.tar.gz/ link]]) + ""MinGW"" environment with binutils 2.19.1 (from [[http://sourceforge.net/downloads/mingw]]) + - ##binutils-2.19.1-mingw32-bin.tar.gz## ([[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GNU-Binutils/binutils-2.19.1/binutils-2.19.1-mingw32-bin.tar.gz/ link]]) + - ##mingwrt-3.17-mingw32-dev.tar.gz## ([[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.17/mingwrt-3.17-mingw32-dev.tar.gz/ link]]) + - ##mingwrt-3.17-mingw32-dll.tar.gz## ([[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.17/mingwrt-3.17-mingw32-dll.tar.gz/ link]]) + - ##w32api-3.14-mingw32-dev.tar.gz## ([[http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.14/w32api-3.14-mingw32-dev.tar.gz/ link]]) + - ##make-3.81-20090914-mingw32-bin.tar.gz## ([[http://sourceforge.net/projects/mingw/files/MinGW/make/make-3.81-20090914-mingw32/make-3.81-20090914-mingw32-bin.tar.gz/ link]]) + - ##gettext-0.17-1-mingw32-dev.tar.lzma## (for libintl.a) ([[http://sourceforge.net/projects/mingw/files/MinGW/gettext/gettext-0.17-1/gettext-0.17-1-mingw32-dev.tar.lzma/download link]]) + + This is what the current ""FreeBASIC"" source code is supposed to work with. A more recent GCC (like GCC 4.5.0) might require extra work to get to compile ""FreeBASIC"", if ""FreeBASIC"" hasn't been updated to it yet. For example, the libgcc.a from ""MinGW""'s GCC 4.5.0 currently requires libgcc_eh.a to be linked in, which fbc doesn't do yet. TDM-GCC 4.5.0 could work though, because it doesn't require libgcc_eh. Previous ""MinGW"" versions should work fine too (for example GCC 3.4.5 with binutils 2.16/2.17). + + ""MinGW""/TDM-GCC packages are supposed to be extracted to ##C:\""MinGW""##, and MSYS should be installed to ##C:\msys\1.0##. You should add ##C:\""MinGW""\bin## to the PATH, so gcc & co will be found. If you add ##C:\msys\1.0\bin## to your PATH, you can compile ""FreeBASIC"" from a cmd.exe prompt instead of using the MSYS shell. + + In order to compile ""FreeBASIC""'s gfxlib, ""DirectX"" headers are needed in ##C:\""MinGW""\include##, specifically ##ddraw.h## and ##dinput.h##. You can get the headers from here: [[http://alleg.sourceforge.net/files/dx80_mgw.zip]] + +{{fbdoc item="section" value="Compiling FreeBASIC"}} + + Open up an MSYS shell and enter the following commands. You can also use a cmd.exe/DOS prompt; then you might need to use backslashes instead of forward-slashes in the ##cd## commands, and invoke the ../../configure scripts via ##sh ../../configure##. + + %%cd C:/FreeBASIC%% + + Compile the new fbc.exe: + + %%cd src/compiler/obj/win32 +../../configure --enable-standalone +make +make install +cd ../../../..%% + + Compile the new libfb.a and libfbmt.a: + + %%cd src/rtlib/obj/win32 +../../configure CFLAGS=-O2 +make +make MULTITHREADED=1 +make install +cd ../../../..%% + + Compile the new libfbgfx.a: + + %%cd src/gfxlib2/obj/win32 +../../configure CFLAGS=-O2 +make +make install +cd ../../../..%% + + C:\""FreeBASIC"" now contains the new fbc.exe, while C:\""FreeBASIC""\lib\win32 contains the new fb/fbmt/fbgfx libraries. + +{{fbdoc item="section" value="Making the new FreeBASIC tree usable"}} + + Several files need to be copied into the C:\""FreeBASIC"" tree to enable it to compile ""FreeBASIC"" programs (and ""FreeBASIC"" itself again; those cases are marked with "for rebuilding"). + + From C:\""FreeBASIC""-0.21.1-win32 into C:\""FreeBASIC""\bin\win32: + - ##ar.exe## + - ##as.exe## + - ##dlltool.exe## + - ##ld.exe## + - ##""GoRC.exe""## + + From ##C:\""MinGW""\lib\gcc\mingw32\4.4.1## into ##C:\""FreeBASIC""\lib\win32##: + - ##crtbegin.o## + - ##crtend.o## + - ##libgcc.a## + - ##""libsupc++.a""## + + From ##C:\""MinGW""\lib## into ##C:\""FreeBASIC""\lib\win32##: + - ##crt2.o## + - ##dllcrt2.o## + - ##gcrt2.o## + - ##libadvapi32.a## + - ##libbfd.a## (for rebuilding) + - ##libgdi32.a## + - ##libgmon.a## + - ##libiberty.a## (for rebuilding) + - ##libintl.a## (for rebuilding) + - ##libkernel32.a## + - ##libmingw32.a## + - ##libmingwex.a## + - ##libmoldname.a## + - ##libmsvcrt.a## + - ##libuser32.a## + - ##libwinmm.a## + - ##libwinspool.a## + + The advapi32, gdi32, kernel32, msvcrt, user32, winmm and winspool libraries may also be renamed to *.dll.a instead of just *.a if you prefer. + + Now you can use C:\""FreeBASIC"" instead of C:\""FreeBASIC""-0.21.1-win32 to compile FB programs. + You can copy more Windows API libraries (or others), if/when you want/need them. + +{{fbdoc item="section" value="Recompiling after SVN updates or changes to the source code"}} + + For convenience you can rebuild the compiler and libraries (or just the changed component) in the same directory as before, using the same commands as before. However there may be chicken-egg problems after updates to the build system or the rtlib/gfxlib interface. Building fbc first avoids chicken-egg problems between fbc and the runtime libraries, but not all problems can be avoided while rebuilding in the same tree. It is safer (but more work) to use two separate FB directories (one being a working FB installation, the other being the tree you want to compile). + +{{fbdoc item="section" value="Useful options for building rtlib and gfxlib"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##CC=## + (Useful if not using the default from the system) + + - ##RANLIB=## + + - ##CFLAGS=## + Useful to override the default "-O2 -g" and just use "-O2", unless you want debug symbols. + + You can pass these to the makefile too, but by passing them to configure they will be written to the makefile and you won't have to remember them the next time you're make'ing. + + {{fbdoc item="subsect" value="make"}} + + - ##AR=## + (The AR variable is not forwarded by configure currently, so it has to be passed to the makefile) + +{{fbdoc item="section" value="Useful options for building the compiler"}} + + {{fbdoc item="subsect" value="configure"}} + + - ##--disable-objinfo## + If specified fbc will not be linked against libbfd/libiberty/libintl. This can save a lot of trouble during compilation of fbc, at the cost of the [[DevObjinfo objinfo feature]] being disabled. + + - ##--enable-standalone## (This is always used for the ""FreeBASIC""-win32 release) + Build a standalone fbc that can run from the ""FreeBASIC"" tree. It will seek binutils and libraries in the ""FreeBASIC"" tree. + + - ##--prefix=C:/path/to/somewhere## + Changes the /usr/local prefix to something else. Only useful for the non-standalone build. + For example: + ##../../configure --prefix=C:/""FreeBASIC""## + Then ##install.sh -i## will install into C:\""FreeBASIC"" instead of /usr/local (and fbc will use C:\""FreeBASIC"" instead of /usr/local to find binutils, libraries and headers). + + Note: MSYS maps ##/usr/local## to ##C:\msys\1.0\local##. + + - ##--enable-crosscomp-## + fbc will be compiled supporting cross-compilation for the specified target. To actually cross-compile something though additional binutils and libraries will be needed in the ""FreeBASIC""/bin/ and ""FreeBASIC""/lib/ directories. Besides, this may only work with the standalone build of fbc. + For example: + ##../../configure --enable-crosscomp-dos## + + - ##FBC=## + + {{fbdoc item="subsect" value="make"}} + + - ##DEBUG=1## + fbc will be compiled with ##-g##. Useful for debugging fbc. + For example: + ##make DEBUG=1## + + - ##EXTRAERR=1## + fbc will be compiled with ##-exx##. Useful for debugging fbc. The resulting fbc will be notably slower. + + - ##FB_BFD=1 BFD_VER=## + This will result in fbc using FB libbfd headers to use libbfd directly, instead of using the system's C libbfd headers through fbc's default C libbfd wrapper. The FB libbfd header version must be specified, for example ##BFD_VER=217##. The libbfd.a that this fbc will be linked against must match this version exactly. + +{{fbdoc item="back" value="SVNCompile|Compiling from SVN"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/SephKnows.wakka b/fbdocs/manual/cache/SephKnows.wakka index c3ed0ea121..19e13ed177 100644 --- a/fbdocs/manual/cache/SephKnows.wakka +++ b/fbdocs/manual/cache/SephKnows.wakka @@ -1 +1 @@ -Email me at [[sephknows@gmail.com sephknows@gmail.com]] \ No newline at end of file +{{fbdoc item="title" value="SephKnows"}}---- \ No newline at end of file diff --git a/fbdocs/manual/cache/SrcPgGfxNull.wakka b/fbdocs/manual/cache/SrcPgGfxNull.wakka index b97697e99c..c77bc2f267 100644 --- a/fbdocs/manual/cache/SrcPgGfxNull.wakka +++ b/fbdocs/manual/cache/SrcPgGfxNull.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="GFX_NULL"}}---- -Using the ##GFX_NULL## driver in Windows +Utilisation du driver ##GFX_NULL## dans Windows - The client area of the window is updated using GfxLib. Menus, toolbars or dialogs can be added to the window using normal Win API calls. + La zone cliente de la fenêtre est mis à jour en utilisant GfxLib. Les menus, barres d'outils ou les dialogues peuvent être ajoutés à la fenêtre en utilisant des appels normaux de l'API Win. {{fbdoc item="filename" value="examples/manual/extras/gfx-null.bas"}}%%(freebasic) -'' Example of use of the GFX_NULL driver in windows +'' Exemple of use of the GFX_NULL driver in windows '' The GfxLib is set up in the ON_Create sub '' The GFXLib buffer is drawn to screen in th On_Paint Sub '' The GfXLib is updated in the event loop diff --git a/fbdocs/manual/cache/TblEscapeSequences.wakka b/fbdocs/manual/cache/TblEscapeSequences.wakka index 87f7bd5928..073ef405c4 100644 --- a/fbdocs/manual/cache/TblEscapeSequences.wakka +++ b/fbdocs/manual/cache/TblEscapeSequences.wakka @@ -1,14 +1,14 @@ {{fbdoc item="title" value="Escape Sequences"}}---- -Allowed escape sequences in string literals. +Séquences d'échappement admises dans les chaînes littérales. {{fbdoc item="desc"}} - The accepted escape sequences are: - {{table columns="2" cellpadding="1" cells="\a;beep;\b;backspace;\f;formfeed;\l or \n;newline;\r;carriage return;\t;tab;\unnnn;unicode char in hex;\v;vertical tab;\nnn;ascii char in decimal;\&hnn;ascii char in hex;\&onnn;ascii char in octal;\&bnnnnnnnn;ascii char in binary;\\;backslash;\(double quote);double quote;\';single quote"}} + Les séquences d'échappement acceptés sont: + {{table columns="" cellpadding="2" cells="\a;beep;\b;backspace;\f;formfeed;\l or \n;newline = passage à la ligne;\r;carriage return = retour chariot;\t;tab = tabulation;\unnnn;unicode char en hex;\v;vertical tab = tabulation verticale;\nnn;ascii char en décimal;\&hnn;ascii char en hex;\&onnn;ascii char en octal;\&bnnnnnnnn;ascii char en binaire;\\;backslash;\(double quote);double quote = guillemets doubles;\';single quote = guillemets simples;
    {{fbdoc item="see"}} - - [[KeyPgOpPpEscape Operator ! (Escaped String)]] - - [[KeyPgOpPpNoescape Operator $ (Non-Escaped String)]] + - [[KeyPgOpPpEscape Operator ! (Echappement chaînes)]] + - [[KeyPgOpPpNoescape Operator $ (Non-Echappement chaînes)]] - ##[[KeyPgOptionescape Option Escape]]## - - [[ProPgLiterals Literals]] + - [[ProPgLiterals Littéraux]] {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/TblRuntimeErrors.wakka b/fbdocs/manual/cache/TblRuntimeErrors.wakka index 2c34db1d33..67381f59e7 100644 --- a/fbdocs/manual/cache/TblRuntimeErrors.wakka +++ b/fbdocs/manual/cache/TblRuntimeErrors.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Runtime Error Codes"}}---- -Runtime error codes and messages used by the runtime library. +Codes d'erreurs de fonctionnement et messages utilisés par la librairie d'exécution. {{fbdoc item="desc"}} - Freebasic returns the following runtime error codes: - {{table columns="2" cellpadding="1" cells=" 0 ;No error; 1 ;Illegal function call; 2 ;File not found signal; 3 ;File I/O error; 4 ;Out of memory; 5 ;Illegal resume; 6 ;Out of bounds array access; 7 ;Null Pointer Access; 8 ;No privileges; 9 ;interrupted signal; 10 ;illegal instruction signal; 11 ;floating point error signal; 12 ;segmentation violation signal; 13 ;Termination request signal; 14 ;abnormal termination signal; 15 ;quit request signal; 16 ;return without gosub; 17 ;end of file"}} + Freebasic retourne les codes d'erreur de fonctionnement suivants: + {{table columns="" cellpadding="2" cells=" 0 ;No error = Pas d'erreur; 1 ;Illegal function call = Appel illégal de fonction; 2 ;File not found signal = Signal de fichier non trouvé 3 ;File I/O error = Erreur E/S fichier; 4 ;Out of memory = Dépassement mémoire; 5 ;Illegal resume = Resume illégal; 6 ;Out of bounds array access = Accès tableau hors limites; 7 ;Null Pointer Access = Accè à un pointeur nul; 8 ;No privileges = Pas de privilèges; 9 ;interrupted signal = Signal d'interruption; 10 ;illegal instruction signal = Signal d'instruction illégale; 11 ;floating point error signal = Signal d'erreur de virgule flottante; 12 ;segmentation violation signal = Signal de violation de segmentation; 13 ;Termination request signal = Signal de requête d'arrêt; 14 ;abnormal termination signal = Signal de fin anormale; 15 ;quit request signal = Signal de requête pour quitter; 16 ;return without gosub = Return sans gosub; 17 ;end of file = Fin de fichier;
    - No user error code range is defined. If ##[[KeyPgError Error]]## is used to set an error code it is wise to use high values to avoid collisions with the list of built-in error codes. (This built-in list may be expanded later.) + Aucune plage de codes d'erreurs utilisateur n'est définie. Si ##[[KeyPgError Error]]## est utilisé pour valider des codes d'erreurs, il est conseillé d'utiliser des valeurs élevées pour éviter des collisions avec la liste des codes d'erreurs intégrées. (La liste intégrée des codes pouvant être agrandie plus tard.) {{fbdoc item="see"}} - ##[[KeyPgErr Err]]## - ##[[KeyPgError Error]]## - ##[[KeyPgOnerror On Error]]## - - {{fbdoc item="keyword" value="ProPgErrorHandling|Error Handling"}} + - [[ProPgErrorHandling Gestion des erreurs]] {{fbdoc item="back" value="DocToc|Table of Contents"}} diff --git a/fbdocs/manual/cache/TblTruth.wakka b/fbdocs/manual/cache/TblTruth.wakka index dd718c159f..b0f81c040c 100644 --- a/fbdocs/manual/cache/TblTruth.wakka +++ b/fbdocs/manual/cache/TblTruth.wakka @@ -1,47 +1,47 @@ -{{fbdoc item="title" value="Bitwise Operators Truth Tables"}}---- -Computed values for the bitwise logical operators. +{{fbdoc item="title" value="Bitwise Opérateurs Truth Tables"}}---- +Les valeurs calculées pour les opérateurs logique bit à bit. -**{{anchor name="BINARY|Binary operators"}}** - Operators that take two operands. -**{{anchor name="UNARY|Unary operator"}}** - Operator that take a single operand. +**[[#BINARY">Les opérateurs binaires]]** + Les opérateurs qui prennent deux opérandes. +**[[#UNARY">Les opérateurs unaires]]** + Opérateur qui prennent un seul opérande. - These logical operators return a value based on the value of their operand(s). For the binary operators, each bit in the left-hand side value is applied logically to the corresponding bit in the right-hand side value. The result of this operation is returned. For the unary operator, (##[[KeyPgOpNot Operator Not]]##), the logic is applied to its right-hand side operand only. + Ces opérateurs logiques retournent une valeur basée sur la valeur de leur(s) opérande (s). Pour les opérateurs binaires, chaque bit de la valeur de gauche est appliqué logiquement au bit correspondant dans la valeur de droite. Le résultat de cette opération est renvoyé. Pour l'opérateur unaire, (##[[KeyPgOpNot Opérateur Not]]##), la logique est appliquée seulement à son opérande de droite. -<<{{anchor name="BINARY"}}{{fbdoc item="section" value="Binary operators"}} +**Les opérateurs binaires** - =={{fbdoc item="keyword" value="KeyPgOpAnd|Operator And (Conjunction)"}}== - Bits in the result are set if and only if both of the corresponding bits in the left and right-hand side operands are set. + **[[KeyPgOpAnd Opérateur And (Conjonction)]]** + Les bits dans le résultat sont à 1 si et seulement si les deux bits correspondants dans les opérandes de gauche et de droite sont à 1. - {{table columns="5" cellpadding="2" cells="Lhs;0;0;1;1;Rhs;0;1;0;1;Result;0;0;0;1"}} + {{table columns="" cellpadding="2" cells="
    Côté gauche;0;0;1;1;Côté droit;0;1;0;1;Résultat;0;0;0;1;
    - =={{fbdoc item="keyword" value="KeyPgOpEqv|Operator Eqv (Equivalence)"}}== - Bits in the result are set if and only if both of the corresponding bits in the left and right-hand side operands are both either set or unset. + **[[KeyPgOpEqv Opérateur Eqv (Equivalence)]]** + Les bits dans le résultat sont à 1 si et seulement si les deux bits correspondants dans les opérandes de gauche et de droite sont à 0 ou à 1. - {{table columns="5" cellpadding="2" cells="Lhs;0;0;1;1;Rhs;0;1;0;1;Result;1;0;0;1"}} + {{table columns="" cellpadding="2" cells="Côté gauche;0;0;1;1;Côté droit;0;1;0;1;Résultat;1;0;0;1;
    - =={{fbdoc item="keyword" value="KeyPgOpImp|Operator Imp (Implication)"}}== - Bits in the result are set if and only if the corresponding bit in the left-hand side operand implies the bit in the right-hand side operand. + **[[KeyPgOpImp Opérateur Imp (Implication)]]** + Les bits dans le résultat sont à 1 si et seulement si le bit correspondant dans l'opérande gauche implique le bit de l'opérande de droite. - {{table columns="5" cellpadding="2" cells="Lhs;0;0;1;1;Rhs;0;1;0;1;Result;1;1;0;1"}} + {{table columns="" cellpadding="2" cells="Côté gauche;0;0;1;1;Côté droit;0;1;0;1;Résultat;1;1;0;1;
    - =={{fbdoc item="keyword" value="KeyPgOpOr|Operator Or (Inclusive Disjunction)"}}== - Bits in the result are set if either of the corresponding bits in the left and right-hand side operands are set. + **[[KeyPgOpOr Opérateur Or (Disjonction Inclusive)]]** + Les bits dans le résultat sont à 1 si l'un des bits correspondants dans les opérandes de gauche et de droite est à 1 . - {{table columns="5" cellpadding="2" cells="Lhs;0;0;1;1;Rhs;0;1;0;1;Result;0;1;1;1"}} + {{table columns="" cellpadding="2" cells="Côté gauche;0;0;1;1;Côté droit;0;1;0;1;Résultat;0;1;1;1;
    -<<>> - =={{fbdoc item="keyword" value="KeyPgOpXor|Operator Xor (Exclusive Disjunction)"}}== - Bits in the result are set if and only if one of the corresponding bits in the left and right-hand side operands is set. +; **[[KeyPgOpXor Opérateur Xor (Disjonction Exclusive)]]** + Les bits dans le résultat sont à 1 si et seulement si l'un des bits correspondants dans les opérandes de gauche et de droite est à 1. + {{table columns="" cellpadding="2" cells="Côté gauche;0;0;1;1;Côté droit;0;1;0;1;Résultat;0;1;1;0;
    - {{table columns="5" cellpadding="2" cells="Lhs;0;0;1;1;Rhs;0;1;0;1;Result;0;1;1;0"}} + **Les opérateurs unaires** -{{anchor name="UNARY"}}{{fbdoc item="section" value="Unary operators"}} +**[[KeyPgOpNot Opérateur Not (Complément)]]** - =={{fbdoc item="keyword" value="KeyPgOpNot|Operator Not (Complement)"}}== - Bits in the result are set if the corresponding bits in the right-hand side operand are unset, and unset if they are set. + Les bits dans le résultat sont à 1 si les bits correspondants de l'opérande du côté droit sont à 0, et à 1 s'ils sont à 0. + {{table columns="" cellpadding="2" cells="Côté droit;0;1;Résultat;1;0;
    - {{table columns="3" cellpadding="2" cells="Rhs;0;1;Result;1;0"}} + ;
    >>::c:: diff --git a/fbdocs/manual/cache/TblVarTypes.wakka b/fbdocs/manual/cache/TblVarTypes.wakka index f5a4cc36e9..8cd00e070a 100644 --- a/fbdocs/manual/cache/TblVarTypes.wakka +++ b/fbdocs/manual/cache/TblVarTypes.wakka @@ -1,28 +1,28 @@ {{fbdoc item="title" value="Standard Data Type Limits"}}---- -Standard variable types and limits. +Types de variables standard et leurs limites. -{{fbdoc item="section" value="Numeric Types"}} +**Types Numériques** -~~{{table columns="7" cellpadding="1" cells=" Type ; Size (in bits) ; Format ; Minimum Value ; Maximum Value ; Literal Suffix ; Sig. Digits ; BYTE; 8; signed integer;-128 ;+127;;2+;UBYTE; 8; unsigned integer;0;+255;###;2+;SHORT;16;signed integer;-32768 ;+32767;###;4+;USHORT;16; unsigned integer;0 ;65535;###;4+;INTEGER;32;signed integer;-2147483648 ;+2147483647;%, l;9+;UINTEGER; 32;unsigned integer; 0;4294967295;ul;9+;LONG;[*]; signed integer; [*] ;[*];&;[*];ULONG;[*]; unsigned integer; [*];[*];###;[*];LONGINT; 64; signed integer; -9 223 372 036 854 775 808 ;+9 223 372 036 854 775 807; ll;18+;ULONGINT; 64; unsigned integer; 0 ;+18 446 744 073 709 551 615; ull ;19+;SINGLE; 32;floating point;[**]+/-1.401 298 E-45 ;[**]+/-3.402 823 E+38;!, f;6+;DOUBLE;64; floating point;[**]+/-4.940 656 458 412 465 E-324;[**]+/-1.797 693 134 862 316 E+308;#;15+"}} +{{table columns="" cellpadding="2" cells=" Type ; Taille (en bits) ; Format ; Valeur Minimum ; Valeur Maximum ; Suffixe littéral ; Sig. Digits ; BYTE; 8;entier signé-128 ;+127;;2+;UBYTE; 8;entier non-signé0;+255; 2+;SHORT;16;entier signé-32768 ;+32767; 4+;USHORT;16;entier non-signé0 ;65535; 4+;INTEGER;32;entier signé-2147483648 ;+2147483647;%, l;9+;UINTEGER; 32;entier non-signé 0;4294967295;ul;9+;LONG;[*];entier signé [*] ;[*];&[*];ULONG;[*];entier non-signé [*];[*]; [*];LONGINT; 64;entier signé -9 223 372 036 854 775 808 ;+9 223 372 036 854 775 807; ll;18+;ULONGINT; 64;entier non-signé 0 ;+18 446 744 073 709 551 615; ull ;19+;SINGLE; 32;virgule flottante;[**]+/-1.401 298 E-45 ;[**]+/-3.402 823 E+38;!, f;6+;DOUBLE;64;virgule flottante;[**]+/-4.940 656 458 412 465 E-324;[**]+/-1.797 693 134 862 310 E+308;#;15+;
    -~&[*] //##[[KeyPgLong Long]]## and ##[[KeyPgUlong Ulong]]## data types vary with platform. Currently, they are aliases to either ##[[KeyPgInteger Integer]]## or ##[[KeyPgLongint Longint]]## and their unsigned versions, respectively.// -~&[""**""] //The minimum and maximum values for the floating-point types ##[[KeyPgSingle Single]]## and ##[[KeyPgDouble Double]]## are, respectively, the values closest to zero and the values closest to positive and negative infinity.// +[*] Les types de données //##[[KeyPgLong Long]]## et ##[[KeyPgUlong Ulong]]## varient avec la plate-forme. Actuellement, ils sont "aliasés" vers ##[[KeyPgInteger Integer]]## ou ##[[KeyPgLongint LongInt]]## et leurs versions non-signé, respectivement.// +[**] //Les valeurs minimum et maximum pour les types à virgule flottante ##[[KeyPgSingle Single]]## et ##[[KeyPgDouble Double]]## sont, respectivement, les valeurs les plus proches de zéro et les valeurs les plus proches de l'infini positif et négatif.// -{{fbdoc item="section" value="String Types"}} +**Types chaîne** -~~{{table columns="5" cellpadding="2" cells="Type ; Character Size (in bytes) ; Minimum Size (in characters) ; Maximum Size (in characters) ; Literal Suffix ; String ; 1 ; 0 ; [**]+2147483647 ; $ ; Zstring ; 1 ; 0 ; [**]+2147483647 ; [N/A] ; Wstring ; [*] ; [*]0 ; [*,**]+2147483647 ; [N/A]""}} +{{table columns="" cellpadding="2" cells="Type ; Taille caractère (en octets) ;Taille Minimum (en caractères) ;Taille Maximum (en caractères) ;Suffixe Littéral; String ; 1 ; 0 ; [**]+2147483647 ; $ ; Zstring ; 1 ; 0 ; [**]+2147483647 ; [N/A] ; Wstring ; [*] ; [*]0 ; [*,**]+2147483647 ; [N/A];
    -~&[*] //Unicode, or "wide", characters vary in both size and availability with platform.// -~&[""**""] //All runtime library string procedures take and produce ##[[KeyPgInteger Integer]]## values for sizes and positions. The actual maximum size will vary (smaller) with storage location and/or platform.// +[*] //Unicode, ou "large" ("wide"), caractères varient en taille et en disponibilité avec plate-forme..// +[**] //Toutes les procédures de bibliothèque d'exécution de chaîne de prennent et de produisent des valeurs ##[[KeyPgInteger Integer]]## pour les tailles et positions. La taille maximum réelle varie (plus petite) avec l'emplacement de stockage et/ou la plate-forme.// -{{fbdoc item="section" value="Arrays"}} +**Tableaux** -~~{{table columns="4" cellpadding="2" cells=" Maximum Subscript Range ; Maximum Elements per Dimension ; Minimum/Maximum Dimensions ; Maximum Size (in bytes) ; [*][-2147483648, +2147483647] ; [*]+2147483647 ; 1/9 ; [*]+2147483647 "}} +{{table columns="" cellpadding="2" cells="Plage maxi indices;Nbre maxi éléments par dimension ;Dimensions Minimum/Maximum ;Taille Maximum (en octets) ; [*][-2147483648, +2147483647] ; [*]+2147483647 ; 1/9 ; [*]+2147483647 ;
    -~&[*] //All runtime library array procedures take and produce ##[[KeyPgInteger Integer]]## values for subscripts and indexes. The actual limits will vary (smaller) with the number of dimensions, element size, storage location and/or platform.// +[*] //Toutes les procédures de bibliothèques d'exécution prennent et produisent des valeurs ##[[KeyPgInteger Integer]]## pour les indices et les index. Les limites réelles varieront (plus petites) en fonction du nombre de dimensions, de la taille des éléments, de l'emplacement de stockage et/ou de la plate-forme.// {{fbdoc item="see"}} - [[ProPgIdentifierRules]] usage of suffixes for variables - [[ProPgLiterals]] usage of suffixes for literals / numbers + ##[[ProPgIdentifierRules Usage des suffixes pour les variables]]## + ##[[ProPgLiterals Usage des suffixes pour les littéraux/nombres]]## {{fbdoc item="back" value="DocToc|Table of Contents"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/TekRat.wakka b/fbdocs/manual/cache/TekRat.wakka index 317b37ffb2..2e304741da 100644 --- a/fbdocs/manual/cache/TekRat.wakka +++ b/fbdocs/manual/cache/TekRat.wakka @@ -1,3 +1,3 @@ -TekRat +{{fbdoc item="title" value="TekRat"}}---- -Contact me at: [[tekrat@2d.com tekrat@2d.com]] \ No newline at end of file +TekRat \ No newline at end of file diff --git a/fbdocs/manual/cache/TutBasicInput.wakka b/fbdocs/manual/cache/TutBasicInput.wakka index 8605223a29..401683dd33 100644 --- a/fbdocs/manual/cache/TutBasicInput.wakka +++ b/fbdocs/manual/cache/TutBasicInput.wakka @@ -1,54 +1,54 @@ {{fbdoc item="title" value="Basic Input"}}---- -Get Information into your Program. +Obtenez de l'information dans votre programme. -Input is the life of any program. If you can't get something into your program, how are you going to get anything out of it? What you will find here is the basics of how to get information into your FreeBASIC program. +L'entrée est la vie de tout programme. Si vous ne pouvez pas obtenir quelque chose dans votre programme, comment allez-vous tirer quelque chose de lui? Ce que que vous trouverez ici, ce sont les bases sur la façon d'obtenir des informations dans votre programme FreeBASIC. -Here's a very basic program that will ask for your name: +Voici un programme très basique qui vous demandera votre nom: %%(freebasic) -'Create a place to put the user's name +'Créer une place pour mettre le nom utilisateur dim as string strMyName -' Ask for the user's name and store it in the string 'strMyName' -input "What is your name? ", strMyName +' Interroger pour le nom utilisateur et le stocker dans la chaine 'strMyName' +Input "Quel est votre nom? ", strMyName -' Wait half a second +' Attente une demi seconde sleep 500 -' Show them their name +' Afficher le nom print -print "I now know your name is "; strMyName +Print "Je sais que votre nom est "; strMyName print -' Wait until someone presses a button before you exit -print "Press any button to exit" +' Attendre quelqu'un appuie sur une touche avant de terminer +Print "Appuyez sur une touche pour terminer" sleep %% -INPUT is the easiest way to get information from someone. They just type in some text and press Enter when they are done. +INPUT est le moyen le plus simple pour obtenir des informations de quelqu'un. Ils ont juste à taper du texte et à appuyer sur Entrée lorsque c'est fait. -What if you you only want one keystroke? The easiest way is to use the {{fbdoc item="keyword" value="KeyPgGetkey|GETKEY"}} method. {{fbdoc item="keyword" value="KeyPgGetkey|GETKEY"}} gives you the {{fbdoc item="keyword" value="CptAscii|ASCII"}} value of a key that was pressed. +Que faire si vous ne voulez qu'une seule frappe? Le plus simple est d'utiliser la méthode [[KeyPgGetkey GetKey]]. [[KeyPgGetkey GetKey]] vous renvoie la valeur [[CptAscii ASCII]] de la touche qui a été appuyée. %%(freebasic) -' Ask the user for input -Print "Press your favorite key:" +' Demande une entrée à l'utilisateur +Print "Appuyez sur votre touche favorite:" -' Set a place to keep the ASCII value of the key +' Définit un endroit pour garder la valeur ASCII de la touche Dim As Integer strKeyPress -' Keep going until a key is pressed +' Continue jusqu'à ce qu'une touche soit appuyée Do strKeyPress = GetKey Loop Until strKeyPress <> 0 -' Show the key the user pressed +' Affiche la touche appuyée par l'utilisateur Print -Print "Your favorite key is: "; Chr(strKeyPress) +Print "Votre touche favorite est: "; Chr(strKeyPress) -' Wait until someone presses a button before you exit +' Attend qu'une touche soit appuyée pour terminer Print -Print "Press any button to exit" +Print "Appuyez sur une touche pour terminer" Sleep %% -For more information check out the {{fbdoc item="keyword" value="CatPgInput|User Input"}} Section. \ No newline at end of file +Pour plus d'informations consultez le section [[CatPgInput Saisie utilisateur]]. \ No newline at end of file diff --git a/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects.wakka b/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects.wakka index c6fe3c609c..edbc4e151f 100644 --- a/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects.wakka +++ b/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects.wakka @@ -2,7 +2,7 @@ **Introduction** - This tutorial is aimed at people who want to know more about the new features added to ##Type##, commonly being referred to as 'types as objects', and 'that OOP stuff'. It aims to walk you through these new features, so is aimed at people who don't really understand it yet, but want to learn. A ##Type## in FreeBASIC is an aggregate data type, like a struct in C, or a record in Pascal. Here's just a short sample of typical ##Type## usage. + Ce tutoriel est destiné aux personnes qui veulent en savoir plus sur les nouvelles fonctionnalités ajoutées à ##**Type**##, communément dénommées '//types comme des objets//' et '//du genre POO//' (Programmation Orientée Objets). Il vise à vous guider à travers ces nouvelles fonctionnalités, ainsi est il destiné aux personnes qui ne comprennent pas vraiment encore, mais qui veulent apprendre. Un ##**Type**## en FreeBASIC est un type de données agrégées, comme une structure en C ou un '//record//' en Pascal. Voici un court exemple d'utilisation typique de ##**Type**##. %%(freebasic) Type person_info @@ -14,11 +14,11 @@ Type person_info End Type %% -In this usage it's used as a kind of container for related data; in this example it could be as an entry in an address book. With the new features, however, it can be used more like the class in ""C++"", in that it can do much more than contain just simple fields of data. It becomes a way to express an idea of an object, and this makes object oriented programming much simpler. We will now look at these new features. +Dans cette utilisation, il est employé comme un type de conteneur pour les données relatives; dans cet exemple, il pourrait être aussi une entrée dans un carnet d'adresses. Avec les nouvelles fonctionnalités, cependant, il peut être utilisé plus comme une classe en C++, car il peut faire beaucoup plus que contenir de simples champs de données. Il devient un moyen d'exprimer une idée d'un objet, ce qui rend la programmation orientée objet beaucoup plus simple. Nous allons maintenant examiner ces nouvelles fonctionnalités. **Property** -We'll start by looking at property. When you add a property to a ##Type##, you access it as if it were an ordinary member, but what happens, is instead of just getting or setting a variable as normal, it calls a function instead. Take a look at this example: +Nous allons commencer par examiner la ##**Property**## (propriété). Quand vous ajoutez une ##**Property**## à un ##**Type**##, vous y accéder comme s'il s'agissait d'un membre ordinaire, mais que se passe-t-il, est-ce seulement pour obtenir ou définir une variable comme d'habitude, au lieu de cela il appelle une fonction. Jetez un oeil à cet exemple: %%(freebasic) Type bar @@ -45,17 +45,17 @@ foo.x = 5 Print foo.x %% -We include in our ##Type## some declarations for a ##Property##; they are very similar to ordinary function declarations. The first one declares a getter, the second a setter. The ##p_x## member is just an ordinary ##Integer## member. +Nous incluons dans notre ##**Type**## certaines déclarations de ##**Property**##; elles sont très semblables aux déclarations de fonction ordinaires. La première déclare un procureur (getter), la seconde un fixeur (setter). Le membre ##p_x## est simplement un nombre ##**Integer**##. -Next we write the code for the properties; again, the syntax is very similar to that of normal functions. Note the way we return a value: instead of ##Function = value##, we do ##Property = value##. You can do ##Return value## as well. Also note that you can refer to the member directly as ##p_x##; you can also use the keyword ##this##, for example ##this.p_x = n##; using ##this## isn't usually needed, but it can help in some ambiguous circumstances. +Ensuite, nous écrivons le code pour les ##**Property**##; encore une fois, la syntaxe est très similaire à celle des fonctions normales. Notez la manière dont nous retournons une valeur: au lieu de ##**Function = valeur**##, nous faisons ##**Property = valeur**##. Vous pouvez faire aussi ##**Return valeur**##. Notez également que vous pouvez vous référer directement au membre ##**p_x**##; vous pouvez également utiliser le mot-clé ##**this**##, par exemple ##**this.p_x = n**##; utiliser ##**this**## n'est généralement pas nécessaire, mais il peut aider dans certaines circonstances ambiguës. -Then follows some testing code; this shows how we can use the property as if it were any ordinary member. When you run the program it will also print to screen to show that the property get/set code has been called. +Vient ensuite un peu de code de test; cela montre comment nous pouvons utiliser ##**Property**## comme s'il s'agissait d'un membre ordinaire. Lorsque vous exécutez le programme, il sera également affiché à l'écran pour montrer quel code de ##**Property**## "get/set" a été appelé. -Now this code is fairly trivial, but as you get used to the idea you'll see it can be put to some good uses. Imagine as an example you are writing a GUI, and the TYPE represents a button on the screen, you could do ##button.text = "Hello World!"##, and make the property code update the screen to show the changes. Or maybe you are using the ##Type## to maintain some kind of list; you could do ##list.size += 10## and then put some code in your property to make the list larger. +Maintenant, ce code est assez trivial, mais comme on s'habitue à l'idée vous verrez qu'il peut être utilisé pour certains bons usages. Imaginez, comme un exemple, que vous écrivez une interface graphique (GUI) et que le ##**Type**## représente un bouton sur l'écran, vous pourriez avoir ##**button.text = "Hello World!"**##, et faire que le code de ##**Property**## mette à jour l'écran pour montrer les changements. Ou peut-être que vous utilisez ##**Type**## pour maintenir une sorte de liste; vous pouvez avoir ##**list.size += 10**## et puis mettre un peu de code dans votre ##**Property**## de rendre la liste plus grande. -**Constructor/Destructor** +**Constructeur/Destructeur** -##Constructor##s are functions that are called when the ##Type## gets created - when you use ##Dim##, for example. A ##Destructor## is a function that gets called when the ##Type## goes out of scope; this could be when the program ends, for a ##Type## in the main code, or when a function ends, for a local ##Type##. Look at the following example, expanded from the last. +Les ##**Constructor**##s sont des fonctions qui sont appelées quand le ##**Type**## est créé - lorsque vous utilisez ##**Dim**##, par exemple. Un ##**Destructor**## est une fonction appelée quand ##**Type**## sort de la portée; il peut s'agir de la fin du programme, pour un ##**Type**## dans le code principal ou quand une fonction se termine, pour un ##**Type**## local. Regardez l'exemple suivant, expansion du précédent. %%(freebasic) Type bar @@ -96,11 +96,11 @@ foo.x = 5 Print foo.x %% -Again the syntax is somewhat similar to normal functions. Note that this time I changed ##p_x## to be an ##Integer ptr##. The constructor then ##Allocate##s the memory for this when ##foo## is created, and gives it a default value; then it ##De-Allocate##s this memory once it is destroyed. So you can use ##Constructor##s and ##Destructor##s to set things up for you, then clean up once its finished with. Again a trivial example, but bring back the example of some kind of list, and having it set the list up for you, and clean it up when it's finished with can be quite handy. +Encore une fois la syntaxe est quelque peu semblable à toutes les fonctions normales. Notez que cette fois j'ai modifié ##**p_x**## pour un ##**Integer ptr**##. Le ##**Constructor**##, ensuite ##**Allocate**## de la mémoire pour lui quand ##**foo**## est créé, et lui donne une valeur par défaut; puis le ##**Destructor**## ##**Deallocate**## cette mémoire. Ainsi, vous pouvez utiliser ##**Constructor**##s et ##**Destructor**##s pour mettre les choses en place pour vous, puis nettoyer une fois terminé. Retour sur un exemple trivial, ramenant l'exemple d'une certaine liste, la mettant en place pour vous et la nettoyant lorsque tout est fini, cela peut être très pratique. -**Methods** +**Méthodes** -You can also have regular ##Sub##s and ##Function##s inside your ##Type##; in some terminology, these are referred to as methods. We'll carry on our example: +Vous pouvez également avoir des ##**Sub**##s et ##**Function**##s ordinaires dans votre ##**Type**##; dans une certaine terminologie, ce sont des méthodes. Nous allons poursuivre notre exemple: %%(freebasic) Type bar @@ -154,11 +154,11 @@ Print foo.x Print "address p_x points to", foo.Addr() %% -So this time we added a ##Sub##, that multiplies the integer pointed to by ##p_x## by five, and a function that gets the memory address that the pointer holds. +Alors, cette fois nous avons ajouté une ##**Sub**##, qui multiplie par 5 l'entier pointé par ##**p_x**## et une fonction qui récupère l'adresse mémoire contenue dans ce pointeur. **Private/Public** -By default all of the members of the bar type are public; that means that we can read/write or call them. However, sometimes you might want to make them private. Take for example our member ##p_x##; we can currently do ##Print *foo.p_x##, and it will allow us to print the value it points to. We might want to make it private, so that only the members of the ##bar## type (the constructor, destructor, property, and methods) can access it. That way we can make sure we only deal with ##p_x## by the ways we choose. If for example we did '##""DeAllocate""(foo.p_x)##' in our main code, then when the destructor runs, it would try to free it again, known as a 'double free'. Change the ##Type## declaration as follows: +Par défaut, tous les membres du ##**Type bar**## sont ##**Public**##; cela signifie que nous pouvons les lire/écrire ou appeler. Cependant, parfois, vous voudrez peut-être les rendre ##**Private**##. Prenons l'exemple de notre membre ##**p_x**##; alors nous pouvons faire ##**Print *foo.p_x**## et cela nous permettra d'afficher la valeur vers laquelle il pointe. Nous pourrions vouloir le rendre ##**Private**##, de sorte que seuls les membres du ##**Type bar**## (##**Constructor**##, ##**Destructor**##, ##**Property**## et ##**Méthodes**##) peuvent y accéder. De cette façon, nous pouvons nous assurer que nous ne traîtons avec ##**p_x**## que par les moyens que nous avons choisis. Si par exemple on '##**Deallocate(foo.p_x)**##' dans notre code principal, lorsque le ##**Destructor**## fonctionnera, il essaiera de le libérer à nouveau, ce qui est connu sous le nom de "double libération". Modifiez la déclaration de ##**Type**## comme suit: %%(freebasic) Type bar @@ -173,7 +173,7 @@ private: End Type %% -Now try adding ##Print *foo.p_x## to the main code and compile it. You'll get a message from fbc "##error 173: Illegal member access, found 'p_x' in 'Print *foo.p_x'##", showing that indeed the compiler is now enforcing the fact we made ##p_x## private. When you use ##private:## or ##public:##, any members following that statement follow the rule. Here's a rather pointless example just to show the syntax: +Maintenant, essayez d'ajouter ##**Print *foo.p_x**## dans le code principal et compilez-le. Vous recevrez un message de fbc ##**error 173: Illegal member access, found 'p_x' in 'Print *foo.p_x'**##, montrant bien que le compilateur est maintenant obligé de faire respecter le fait que nous avons déclaré ##**p_x Private**##. Quand vous utilisez ##**Private:**## ou ##**Public:**##, tous les membres suivant cette déclaration suivent la règle. Voici un exemple, assez inutile, juste pour montrer la syntaxe: %%(freebasic) Type bar @@ -188,11 +188,11 @@ private: End Type %% -In the above type, the members ##a##, ##b##, and ##e## are private; ##c## and ##d## are public. +Dans le ##**Type**## ci-dessus, les membres ##a##, ##b## et ##e## sont ##**Private**##; ##c## et ##d## sont ##**Public**##. -**Operator overloading** +**Surcharge des opérateurs** -Operator overloading is a way of telling the compiler what to do in the case where we want to perform some kind of operation involving our ##Type##. Take this example: +La surcharge d'opérateur est une façon de dire au compilateur ce qu'il faut faire dans le cas où nous voulons effectuer une certaine sorte d'opération impliquant notre ##**Type**##. Prenez cet exemple: %%(freebasic) Type bar @@ -204,7 +204,7 @@ Dim As bar x, y, z z = x + y %% -Now normally the compiler will throw an error when it sees this, as it has no idea how to add together two ##Type##s, but we can define what we want to happen. Here's how: +Maintenant, normalement le compilateur génère une erreur lorsqu'il voit cela, car il n'a aucune idée de comment ajouter ensemble deux ##**Type**##s, mais nous pouvons définir ce que nous voulons qu'il se produise. Voici comment: %%(freebasic) Type bar @@ -223,7 +223,7 @@ z = x + y Print z.n %% -In this code, I use ##lhs## and ##rhs## to refer to the left and right hand side operands of the operator. Note also the expression ##type(lhs.n + rhs.n)##; this builds the ##Type## that will be returned. If you had a type like: +Dans ce code, j'utilise ##**lhs**## (left-hand) et ##**rhs**## (right-hand) pour désigner les opérandes du côté gauche et du côté droit de l'opérateur. Notez aussi l'expression ##**type(lhs.n + rhs.n)**##; ceci construit le ##**Type**## qui sera retourné. Si vous aviez un ##**Type**## comme: %%(freebasic) Type bar @@ -233,13 +233,13 @@ Type bar End Type %% -Then you would build it like ##type(xpart, ypart, zpart)##. +Vous l'auriez construit ainsi ##**type(xpart, ypart, zpart)**##. -Most or all operators can be overloaded, and most of them are binary ops, meaning they have two operands like the + example above. Some are unary ops having only a right hand side, like ##Not## and unary minus. They would be done like '##Operator Not(ByRef rhs As bar) As bar##'. +La plupart ou tous les opérateurs peuvent être surchargés, et la plupart d'entre eux sont des opérateurs binaires, ce qui signifie qu'ils ont deux opérandes comme dans l'exemple **+** ci-dessus. Certains sont des opérateurs unaires ayant seulement le côté droit, comme ##**Not**## et ##**- unaire**##. Ils seraient obtenus comme ceci ##**Operator Not(ByRef rhs As bar) As bar**##. -There are some special cases where they have to be declared inside the ##Type##; these are the assignment operators and casts. +Il y a quelques cas particuliers où ils doivent être déclarés à l'intérieur du ##**Type**##; ce sont les opérateurs d'affectation et les "cast". -Assignment operators are things like ##+= -= mod=## etc, and also ##Let##. ##Let## is used when you do an assignment like: +Les opérateurs d'affectation sont comme ceci ##**+= -= mod=**## etc, et aussi ##**Let**##. ##**Let**## est utilisé lorsque vous faites une tâche d'affectation comme: %%(freebasic) Dim As bar foo @@ -247,7 +247,7 @@ Dim As Integer x foo = x %% -And casts are kind of the reverse; they are used when you cast to another datatype like: +Et "casts" sont des cas inverses, ils sont utilisés lorsque vous "cast" vers un autre type de données comme ceci: %%(freebasic) Dim As bar foo @@ -255,7 +255,7 @@ Dim As Integer x x = foo %% -Heres a short example using ##Let## and ##Cast##: +Voici un court exemple utilisant ##**Let**## et ##**Cast**##: %%(freebasic) Type bar @@ -289,18 +289,18 @@ z = x + y Print z %% -You need to have separate lets and casts for each data type you want to support. The operators that need declaring within the type are known as non-static, and the ones that don't are known as global. There is a technical reason for this; the non-static ones need to know which instance (in the technical jargon, in our example above, we would say that ##x## is an instance of ##bar##) of the ##Type## they are referring to, and this is accomplished by a hidden '##this##' reference. This hidden '##this##' reference is how the other members like operators and methods know which instance of the ##Type## the call refers to. Most operators can be overloaded; here's a list of the ones that currently can be: +Vous devez avoir séparé les **let**s et **cast**s pour chaque type de données que vous voulez supporter. Les opérateurs qui doivent être déclarés dans le ##**Type**## sont connus comme non-statiques et ceux qui ne sont pas connus comme globals. Il y a une raison technique pour cela; les non-statiques doivent savoir à quelle instance (dans le jargon technique, dans notre exemple précédent, nous dirions que ##**x**## est une instance de ##**bar**##) de ##**Type**## ils font référence et ceci est accompli par la référence cachée ##**this**##. Cette référence cachée ##**this**## est le moyen pour que les autres membres comme les opérateurs et les méthodes sachent à quelle instance de ##**Type**## se réfère l'appel. La plupart des opérateurs peuvent être surchargés; voici une liste de ceux qui actuellement peuvent l'être: -Assignment ops: +opérateurs d'affectation: ##let##, ##+=##, ##-=##, ##*=##, ##/=##, ##\=##, ##mod=##, ##shl=##, ##shr=##, ##and=##, ##or=##, ##xor=##, ##imp=##, ##eqv=##, ##^=## -Unary ops: +opérateurs unaires: ##-##, ##not##, ##@##, ##*##, ##->## -Binary ops: +opérateurs binaires: ##+##, ##-##, ##*##, ##/##, ##\##, ##mod##, ##shl##, ##shr##, ##and##, ##or##, ##xor##, ##imp##, ##eqv##, ##^##, ##=##, ##<>##, ##<##, ##>##, ##<=##, ##>=## -**Overloaded Constructors/Methods** +**Constructeurs/Méthodes surchargés** -As with normal functions, our ##Type##'s constructor and methods can be overloaded. For constructors, this provides a way to specify details on how the instance should be constructed. Here's a short example: +Comme pour les fonctions normales, le ##**Constructor**## et les méthodes de notre ##**Type**## peuvent être surchargés. Pour les ##**Constructor**##s, cela fournit un moyen de spécifier les détails sur la façon dont l'instance doit l'être construite. Voici un court exemple: %%(freebasic) Type bar @@ -324,9 +324,9 @@ Dim baz As bar = bar(25) Print baz.x %% -The first ##Constructor##, that had no arguments, is known as the default constructor. This sets up ##foo.x## to an initial value of 10. However, we have also specified another constructor that will accept an initial value. Note the way we ask for this to be called ##Dim baz As bar = bar(25)##. You can also leave out the default constructor, and then you will always have to specify the initial value using the constructor that takes an argument. You can't have an overloaded destructor, because there's no way to manually choose which one would be called. +Le premier ##**Constructor**##, qui n'a aucun argument, est appelé le ##**Constructor**## par défaut. Il définit ##foo.x## avec une valeur initiale de 10. Cependant, nous avons aussi spécifié un autre ##**Constructor**## qui accepte une valeur initiale. Notez la manière avec laquelle nous l'appelons ##**Dim baz As bar = bar(25)**##. Vous pouvez également omettre le ##**Constructor**## par défaut et alors vous devrez toujours spécifier une valeur initiale en utilisant le ##**Constructor**## qui nécessite un argument. Vous ne pouvez pas avoir un ##**Destructor**## surchargé, parce qu'il n'existe aucun moyen manuel de choisir celui que vous désirez appeler. -Overloaded methods are very similar: +Les méthodes surchargées sont très similaires: %%(freebasic) Type bar @@ -337,21 +337,21 @@ Type bar End Type %% -They work just they same as normal overloaded functions. +Elles fonctionnent de la même façon que les fonctions normales surchargées. -**Closing** +**Clôture** -I hope this tutorial has been useful for you, although there are still a few things left to learn; if you've got this far, it shouldn't be too hard for you to pick them up. There is some more information available in the wiki and on the forums, and also in part 2 of this tutorial, available here - [[TutBeginnersGuideToTypesAsObjects2 Beginners Guide to Types as Objects (Part 2)]] +J'espère que ce tutoriel vous a été utile, mais il y a encore quelques petites choses à apprendre; si vous avez pu aller jusqu'ici, il ne devrait pas être trop difficile pour vous de les intégrer. Il y a quelques informations disponibles dans le wiki et sur les forums, et aussi dans la partie 2 de ce tutoriel qui est disponible ici - [[TutBeginnersGuideToTypesAsObjects2 Guide pour débutants, de types en tant qu'objets (Partie 2)]] -**More reading** +**Lectures supplémentaires** - ##[[KeyPgProperty Property]]## - ##[[KeyPgConstructor Constructor]]## - ##[[KeyPgDestructor Destructor]]## - ##[[KeyPgOperator Operator]]## - ##[[KeyPgThis This]]## - - [[KeyPgTypeTemp Anonymous Types]] - - [[ProPgTypeObjects Types as Objects]] + - [[KeyPgTypeTemp Types anonymes]] + - [[ProPgTypeObjects Types comme objets]] - ##[[KeyPgVisPublic Public:]]## - ##[[KeyPgVisPrivate Private:]]## - ##[[KeyPgVisProtected Protected:]]## \ No newline at end of file diff --git a/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects2.wakka b/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects2.wakka index d96e955842..1bb7d286c6 100644 --- a/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects2.wakka +++ b/fbdocs/manual/cache/TutBeginnersGuideToTypesAsObjects2.wakka @@ -1,167 +1,162 @@ {{fbdoc item="title" value="Beginners Guide to Types as Objects (Part 2)"}}---- **Introduction.** ----- +Bienvenue dans la deuxième partie du tutoriel. Dans cette partie je suppose que vous avez lu la Partie 1, essayé les exemples et expérimenté avec des tests de votre choix. Je vais maintenant couvrir certains sujets que je n'ai pas inclus dans la Partie 1. -Welcome to the second part of the tutorial, In this part I assume that you have read through Part 1, tried the examples, and experimented with some tests of your own. I'll now cover some topics that I didn't include in Part 1. +**Property indexée.** -**Indexed property.** +Une ##**Property**## indexée est une ##**Property**## qui se comporte comme un tableau, sauf que comme dans le cas d'une ##**Property**## ordinaire, une fonction est appelée lorsque vous y accédez. Je vais commencer par un exemple très court juste pour vous montrer la syntaxe. ---- -An indexed property is a property that behaves like an array, except that like in the case of a regular property, a function gets called when you access it. I'll start with a very short example just to show the syntax. - -%%(freebasic) Type foo - Declare Property bar(ByVal index As Integer, ByVal value As Integer) - Declare Property bar(ByVal index As Integer) As Integer - dummy As Integer -End Type -Property foo.bar(ByVal index As Integer, ByVal value As Integer) - Print "Property set, index=" & index & ", value=" & value -End Property +Declare Property bar(ByVal index As Integer, ByVal value As Integer) +Declare Property bar(ByVal index As Integer) As Integer + dummy As Integer + End Type + Property foo.bar(ByVal index As Integer, ByVal value As Integer) +Print "Property set, index=" & index & ", value=" & value -Property foo.bar(ByVal index As Integer) As Integer - Print "Property get, index=" & index - Property = 0 End Property + Property foo.bar(ByVal index As Integer) As Integer +Print "Property get, index=" & index -Dim baz As foo - +Property = 0 + End Property + Dim baz As foo baz.bar(0) = 42 + Print baz.bar(0) -%% -As you can see, the declaration for our indexed property is very similar to a regular one, except this time we add an argument for the index. I include a dummy integer member, because a type must have at least one data member. As you can see, the property is then used with (0), to denote we want to get/set the zeroth index, just the same as we would for an ordinary array. Now I'll show you a slightly more useful example, and I will describe it: +%% +Comme vous pouvez le voir la déclaration de notre ##**Property**## indexée est très similaire à une ##**Property**## ordinaire, sauf que cette fois on ajoute un argument pour l'indice. J'inclus un membre entier factice parce qu'un type doit avoir au moins un membre de données. Comme vous pouvez le voir la ##**Property**## est alors utilisé avec (0), pour indiquer que nous voulons obtenir/définir l'indice "zéroième", exactement comme on le ferait pour un tableau ordinaire. Maintenant, je vais vous montrer un exemple un peu plus utile et je vais le décrire: +%% -%%(freebasic) Type foo - Declare Constructor(ByVal num_elements As Integer) - Declare Destructor() + +Declare Constructor(ByVal num_elements As Integer) +Declare Destructor() Declare Property bar(ByVal index As Integer, ByVal value As Integer) Declare Property bar(ByVal index As Integer) As Integer -private: - x As Integer ptr - size As Integer -End Type + Private: + x As Integer Ptr +size As Integer + End Type + Constructor foo(ByVal num_elements As Integer) +x = CAllocate(num_elements * SizeOf(Integer)) + +size = num_elements + End Constructor + Destructor foo() +Deallocate(x) -Constructor foo(ByVal num_elements As Integer) - x = CAllocate(num_elements * sizeof(Integer)) - size = num_elements -End Constructor - -Destructor foo() - DeAllocate(x) End Destructor + Property foo.bar(ByVal index As Integer, ByVal value As Integer) +If (index >= 0) And (index < size) Then -Property foo.bar(ByVal index As Integer, ByVal value As Integer) - If (index >= 0) AND (index < size) Then - x[index] = value +x[index] = value Else Error 6 End If -End Property + End Property + Property foo.bar(ByVal index As Integer) As Integer +If (index >= 0) And (index < size) Then -Property foo.bar(ByVal index As Integer) As Integer - If (index >= 0) AND (index < size) Then - Property = x[index] +Property = x[index] Else Error 6 End If -End Property - -Dim baz As foo = foo(10) - + End Property + Dim baz As foo = foo(10) baz.bar(1) = 42 + Print baz.bar(1) + %% +Cette fois j'ai ajouté un ##**Constructor**## et un ##**Destructor**##, qui allouer et désallouer un tableau dynamique dans la mémoire, ##**x**##, avec le nombre d'éléments spécifiés dans le ##**Constructor**##. Puis, quand les fonctions de ##**Property**## sont invoquées, Je vérifie si l'indice est dans les limites du tableau, s'il l'est alors j'effectue la demande obtenir/définir. Si l'index spécifié est hors limites, alors ##**'Error 6'**## se produit, qui est un moyen d'interrompre le programme avec ##**'out of bounds error'**## de FB, vous pouvez remplacer ceci par votre propre routine de traitement des erreurs. Essayez ceci en modifiant le code ##**'baz.bar(1) = 42'**## par ##**'baz.bar(10) = 42'**##, et vous verrez ceci en action, car nous n'avons précisé que 10 éléments (indice 0-9) +**"Constructor" de copie.** -This time, I've added a constructor and destructor, which will allocate and deallocate a dynamic memory array, x, with the number of elements specified in the constructor. Then when the property functions are invoked, I check if the index is within the bounds of the array, if it is then I perform the requested get or set. If the index specified is out of bounds, then 'Error 6' occurs, which is a way to abort the program with FB's 'out of bounds error', you could replace this with your own error handling routines. Try this out, by changing the code 'baz.bar(1) = 42' to 'baz.bar(10) = 42', and you'll see it in action, as we specified only 10 elements (index 0-9) +Un ##**Constructor**## de copie est un type spécial de ##**Constructor**##, qui est utilisé pour faire une copie d'un objet existant. Lorsque vous écrivez du code comme celui-ci: **Copy constructor.** ----- - -A copy constructor is a special type of constructor, that is used to make a copy from an existing object. When you write code like this: - -%%(freebasic) Type foo + ... -End Type +End Type Dim As foo a Dim As foo b = a %% -What happens is FreeBASIC automatically generates hidden code to construct b, by making a copy of a, this is the default copy constructor, and simply copies the data fields (members) across. We can define our own copy constructor, here's just a brief snippet to show how we declare it. - -%%(freebasic) +Ce qui se passe c'est que FreeBasic génère automatiquement du code caché pour construire **b**, en faisant une copie de **a**, c'est le ##**Constructor**## de copie par défaut, et il recopie simplement les champs de données (membres). Nous pouvons définir notre propre ##**Constructor**## de copie; voici juste un bref extrait pour montrer comment on le déclare. +Dim As foo b = a Type foo - Declare Constructor(ByRef obj As foo) - ... -End Type -%% -This will come in very useful for a reason I will now explain. +Declare Constructor(ByRef obj As foo) -**Deep/Shallow copy.** ----- +... +End Type + %% + Ce sera très utile pour une raison que je vais maintenant vous expliquer. +**Copie profonde/superficielle.** +Dans l'exemple précédent où nous avions le code ##**'Dim As foo b = a'**##, c'est ce qu'on appelle une copie superficielle, une simple recopie des champs de données a été effectuée, mais parfois ce n'est pas souhaitable, imaginez que l'un des membres soit un pointeur, ce qui va arriver, c'est que l'adresse vers laquelle pointe le pointeur sera recopiée, ainsi les deux objets pointeront vers la même zone mémoire. L'exemple suivant illustre cela: -In that previous example, where we did the code 'Dim As foo b = a', that was what is known a shallow copy, it just simply copied the data fields across, however sometimes this is not desirable, imagine that one of the members is a pointer, what will happen is that the address that pointer points to will be copied across, so both objects will point to the same memory. An example of this follows: +This will come in very useful for a reason I will now explain. -%%(freebasic) Type foo - x As Integer ptr +x As Integer Ptr + End Type Dim As foo a - -a.x = Allocate(sizeof(Integer)) -*a.x = 42 - +a.x = Allocate(SizeOf(Integer)) + *a.x = 42 Dim As foo b = a Print *a.x, *b.x *a.x = 420 - Print *a.x, *b.x -DeAllocate(a.x) +Deallocate(a.x) + %% -As you see, because they both point to the same memory, changing one affects the other. As explained in the previous section on the copy constructor, FreeBASIC creates the code to do shallow copies by default. This is also true if we do an assignment like: +Comme vous le voyez, parce qu'ils pointent tous deux vers la même mémoire, changer l'un affecte l'autre. Comme expliqué dans la section précédente sur le ##**Constructor**## de copie, FreeBASIC crée le code pour faire des copies superficielles par défaut. Cela est également vrai si nous faisons une affectation comme: -%%(freebasic) -Dim As foo a, b +Print *a.x, *b.x +Dim As foo a, b b = a + %% -In this case also, FreeBASIC creates a default assignment operator (Let) to perform a shallow copy. In order to do deep copies, we need to define a copy constructor, and an assignment operator, that is overloaded to accept our type. Here's an example using them. +Dans ce cas également FreeBasic crée un opérateur d'affectation par défaut (Let) pour effectuer une copie superficielle. Afin de faire des copies complètes nous avons besoin de définir un ##**Constructor**## de copie et un opérateur d'assignation qui est surchargé pour accepter notre ##**Type**##. Voici un exemple qui les utilise. +Dim As foo a, b -%%(freebasic) Type foo - Declare Constructor() - Declare Constructor(ByRef obj As foo) - Declare Destructor() - Declare Operator Let(ByRef obj As foo) - x As Integer ptr -End Type +Declare Constructor() -Constructor foo() +Declare Constructor(ByRef obj As foo) + +Declare Destructor() +Declare Operator Let(ByRef obj As foo) + x As Integer Ptr + End Type + Constructor foo() Print "Default ctor" - x = CAllocate(sizeof(Integer)) + x = CAllocate(SizeOf(Integer)) End Constructor Constructor foo(ByRef obj As foo) Print "Copy ctor" x = CAllocate(sizeof(Integer)) - *x = *obj.x -End Constructor +*x = *obj.x -Destructor foo() +End Constructor + Destructor foo() Print "dtor" - DeAllocate(x) + Deallocate(x) End Destructor Operator foo.Let(ByRef obj As foo) @@ -170,79 +165,77 @@ Operator foo.Let(ByRef obj As foo) End Operator Dim As foo a - -*a.x = 42 - -Dim As foo b = a 'Uses the copy constructor - + *a.x = 42 + Dim As foo b = a 'Uses the copy constructor Print *a.x, *b.x *a.x = 420 Print *a.x, *b.x + %% -As you can see, the copy constructor gets called on the line 'Dim As foo b = a' and this time, we allocate some memory, and copy the data in the new copy constructor, so that we can adjust x in one object without it affecting the other. If we change the main code as follows: +Comme vous pouvez le voir le ##**Constructor**## de copie est appelé sur la ligne '##**Dim As foo b = a**##' et cette fois, nous avons alloué de la mémoire, et copié les données dans le nouveau ##**Constructor**## de copie, de sorte que nous pouvons ajuster **x** dans un objet sans que cela affecte les autres. Si nous modifions le code principal comme suit: -%%(freebasic) -Dim As foo a, b +*a.x = 420 +Dim As foo a, b *a.x = 42 + b = a 'The assignment operator (Let) gets used this time. Print *a.x, *b.x - *a.x = 420 Print *a.x, *b.x %% -Then this time the assignment operator is used. Note that in the assignment operator code, we don't need to allocate any memory because it has already been allocated in the default constructor, we just need to copy the data across. The line '*x = *obj.x' performs this copy. If we had something more advanced, like a dynamic memory array, then we would need to reallocate the memory to be the correct size to fit the data being copied. Here's a more advanced version just to show that. +Alors, à ce moment-là, l'opérateur d'affectation est utilisé. Notez que dans le code de l'opérateur d'affectation nous n'avons pas besoin d'allouer de la mémoire car elle a déjà été allouée dans le ##**Constructor**## par défaut, il suffit de copier les données dedans. La ligne '##***x = *obj.x**##' effectue cette copie. Si nous avions quelque chose de plus avancé comme un tableau dynamique en mémoire, nous aurions besoin de réallouer de la mémoire, pour avoir la bonne taille en fonction des données qui sont copiées. Voici une version plus avancée juste pour montrer cela. + +*a.x = 420 -%%(freebasic) Type foo - Declare Constructor(ByVal num_elements As Integer) - Declare Constructor(ByRef obj As foo) - Declare Destructor() - Declare Operator Let(ByRef obj As foo) - x As Integer ptr - size As Integer -End Type +Declare Constructor(ByVal num_elements As Integer) + +Declare Constructor(ByRef obj As foo) -Constructor foo(ByVal num_elements As Integer) +Declare Destructor() +Declare Operator Let(ByRef obj As foo) + x As Integer Ptr + size As Integer + End Type + Constructor foo(ByVal num_elements As Integer) Print "Default ctor" - x = CAllocate(sizeof(Integer) * num_elements) - size = num_elements -End Constructor + x = CAllocate(SizeOf(Integer) * num_elements) +size = num_elements -Constructor foo(ByRef obj As foo) - Print "Copy ctor" - x = CAllocate(sizeof(Integer) * obj.size) - size = obj.size - For i As Integer = 0 To size - 1 - x[i] = obj.x[i] - Next i End Constructor + Constructor foo(ByRef obj As foo) + Print "Copy ctor" + x = CAllocate(SizeOf(Integer) * obj.size) +size = obj.size -Destructor foo() - Print "dtor" - DeAllocate(x) +For i As Integer = 0 To size - 1 + x[i] = obj.x[i] + Next i + End Constructor + Destructor foo() + Print "dtor" + Deallocate(x) End Destructor Operator foo.Let(ByRef obj As foo) Print "Let" - x = ReAllocate(x, sizeof(Integer) * obj.size) - size = obj.size - For i As Integer = 0 To size - 1 - x[i] = obj.x[i] - Next i -End Operator - -Dim As foo a = foo(5) - -a.x[0] = 42 -a.x[1] = 420 + x = Reallocate(x, SizeOf(Integer) * obj.size) +size = obj.size +For i As Integer = 0 To size - 1 + x[i] = obj.x[i] + Next i + End Operator + Dim As foo a = foo(5) + a.x[0] = 42 + a.x[1] = 420 Dim As foo b = a 'Uses the copy constructor Print a.x[0], a.x[1], b.x[0], b.x[1] @@ -257,124 +250,119 @@ b = a ' Now using the assignment operator Print a.x[0], a.x[1], b.x[0], b.x[1] %% -This may seem quite complex at first, it's worth just reading through it again, and experimenting with the examples, it's not too tricky once you're used to it. +Cela peut paraître assez complexe au premier abord, mais cela vaut la peine d'une relecture, et d'expérimenter avec les exemples, ce n'est pas trop compliqué une fois qu'on a l'habitude de l'utiliser. -**Passing objects to functions ByVal** ----- - -The idea of deep and shallow copies also applies to passing an object to a function by value. When you pass a reference to an object (ByRef), you can modify the object, and these modifications will persist, however you can also pass by value, which will mean you can modify it without the changes persisting outside of the function. When an object is passed by value to a function, a new copy is created, and if that object has a copy constructor, then this is invoked, if it doesn't, then the hidden shallow copy is performed. Once the function ends, the objects destructor is called. +**Passage d'objets aux fonctions par valeur (ByVal)** +L'idée de copies profondes et peu profondes s'applique également au passage par valeur d'un objet à une fonction. Lorsque vous transmettez une référence à un objet (ByRef), vous pouvez modifier l'objet, et ces modifications persisteront, mais vous pouvez également le passer par la valeur, ce qui signifie que vous pouvez le modifier sans que les changements persistent en dehors de la fonction. Quand un objet est passé par valeur à une fonction, une nouvelle copie est créée et si cet objet a un ##**Constructor**## de copie, alors celui-ci est invoqué, s'il n'en a pas, alors une copie cachée superficielle est effectuée. Une fois que la fonction se termine, le ##**Destructor**## des objets est appelé. **New/Delete** ----- -New and delete are special operators for dynamically allocating memory, then destroying it. Because it is used with dynamic memory, it is used with pointers. In all the examples up until now, we just used Dim to create our objects, this will create them on the stack, but by using new we can create them dynamically, which can allow more flexibility, just like using Allocate/DeAllocate with normal memory. Another important thing about new, is that you don't need to check if the pointer is NULL after new, like you would if you did allocate. If new fails, it causes an exception, which will end the program. In later versions of FreeBASIC, it is likely that some kind of try..catch mechanism will be created to allow better exception handling, but as of the time of writing, this is not yet implemented. +##**New**## et ##**Delete**## sont des opérateurs spéciaux d'allocation dynamique de mémoire, puis ils la détruisent. Parce qu'ils sont utilisés avec de la mémoire dynamique, ils sont utilisés avec des pointeurs. Dans tous les exemples jusqu'à présent, nous avons juste utilisé ##**Dim**## pour créer nos objets, cela va les créer sur la pile, mais en utilisant ##**New**## nous pouvons les créer dynamiquement, ce qui peut permettre plus de flexibilité, tout comme l'utilisation de ##**Allocate/DeAllocate**## avec la mémoire normale. Une autre chose importante à propos de ##**New**##, est que vous n'avez pas besoin de vérifier si le pointeur est NULL après ##**New**##, comme vous le feriez si vous aviez utilisé ##**Allocate**##. Si ##**New**## échoue, il provoque une exception, ce qui terminera le programme. Dans les versions ultérieures de FreeBasic, il est probable qu'un certain type de mécanisme ##**try..catch**## sera créé afin de permettre une meilleure gestion des exceptions, mais au moment où j'écris, ce n'est pas encore mis en oeuvre. -There are two different varieties of the new/delete. The first type, creates just a single element or object, for example: +Il existe deux variantes différentes de ##**New**##/##**Delete**##. Le premier type, crée seulement un seul élément ou objet, par exemple: +---- -%%(freebasic) -Dim As Integer ptr foo = new Integer +Dim As Integer Ptr foo = New Integer *foo = 1 Print *foo Delete foo -%% -This will create a new Integer, then destroy it when we call delete. Remember I used ptr, because it is dynamic memory. For simple data types you can also specify a default value, by placing it in parenthesis after the data type, ie: +%% -%%(freebasic) -Dim As Integer ptr foo = new Integer(42) +Cela va créer un ##**New Integer**##, puis le détruire quand nous appelons ##**Delete**##. Souvenez-vous j'ai utilisé ##**Ptr**##, parce que c'est de la mémoire dynamique. Pour les types de données simples vous pouvez également spécifier une valeur par défaut, en la plaçant entre parenthèses après le type de données, à savoir: +Dim As Integer ptr foo = new Integer +Dim As Integer Ptr foo = New Integer(42) Print *foo Delete foo %% -This also works for UDT's with just simple data fields: +Cela fonctionne également pour les types de données utilisateur avec seulement de simples champs de données: %%(freebasic) Type foo - x As Integer - y As Integer + +x As Integer + +y As Integer End Type -Dim As foo ptr bar = new foo(1, 2) - -Print bar->x, bar->y +Dim As foo Ptr bar = New foo(1, 2) +Print bar->x, bar->y Delete bar -%% - -This initialization won't work for more complex types involving constructors/destructors etc., however a useful feature is that when using new/delete with objects, it also calls the constructor and destructor, try the following example: + %% + Cette initialisation ne fonctionne pas pour les types plus complexes impliquant des ##**Constructor**##s/##**Destructor**##s etc, cependant il y a une fonctionnalité utile, c'est que lors de l'utilisation ##**New**##/##**Delete**## avec des objets, il appelle également ##**Constructor**## et ##**Destructor**##, essayez l'exemple suivant: +End Type -%%(freebasic) Type foo - Declare Constructor() - Declare Destructor() - x As Integer - y As Integer -End Type + +Declare Constructor() +Declare Destructor() +x As Integer + +y As Integer + +End Type Constructor foo() Print "ctor" -End Constructor - -Destructor foo() + End Constructor + Destructor foo() Print "dtor" End Destructor -Dim As foo ptr bar = new foo - -Delete bar +Dim As foo Ptr bar = New foo + Delete bar %% -You will see that the constructor and destructor for the object are called. - -The second type of new/delete is for creating arrays, this time the number of elements is placed after the dataype in square brackets '[]'. When using the array version, you must also use 'delete[]' instead of 'delete', so that FreeBASIC knows you are deleting an array, here is a simple example using the Integer type: +Vous verrez que le ##**Constructor**## et le ##**Destructor**## de l'objet sont appelés. + Le deuxième type de ##**New**##/##**Delete**## est pour la création de tableaux, cette fois le nombre d'éléments est placé entre crochets '[]', après le type de donnée. Lorsque vous utilisez la version tableau, vous devez également utiliser '##**delete[]**##' au lieu de '##**delete**##', de sorte que FreeBasic sait que vous supprimez un tableau, voici un exemple simple utilisant le type ##**Integer**##: +End Destructor -%%(freebasic) -Dim As Integer ptr foo = new Integer[20] +Dim As Integer Ptr foo = New Integer[20] foo[1] = 1 Print foo[1] Delete[] foo + %% -This will create a dynamic array, with 20 Integer elements. It should be noted this is different from Allocate, which takes the number of bytes as its argument; using new, you should specify the number of elements. The array method works just the same for objects: +Cela va créer un tableau dynamique, avec 20 éléments entiers. Il convient de noter que ceci est différent de ##**Allocate**##, qui nécessite le nombre d'octets comme argument; en utilisant ##**New**##, vous devez spécifier le nombre d'éléments. La méthode tableau fonctionne de la même façon pour les objets: +Dim As Integer ptr foo = new Integer[20] -%%(freebasic) Type foo - Declare Constructor() - Declare Destructor() - x As Integer - y As Integer -End Type +Declare Constructor() +Declare Destructor() +x As Integer + +y As Integer + +End Type Constructor foo() Print "ctor" -End Constructor - -Destructor foo() + End Constructor + Destructor foo() Print "dtor" End Destructor -Dim As foo ptr bar = new foo[3] - -Delete[] bar +Dim As foo Ptr bar = New foo[3] + Delete[] bar %% -When you run this code, you will see that three constructor/destructor pairs are called, because we created an array of three instances of foo. - -You must remember to call Delete, or Delete[] for any memory allocated with New, or you will cause a memory leak, just like the way you must rememeber to call DeAllocate for any memory you allocate with the Allocate function. - +Lorsque vous exécuterez ce code, vous verrez que trois paires de ##**Constructor**##/##**Destructor**## sont appelés, parce que nous avons créé une gamme de trois instances de "foo". + Vous devez vous souvenir d'appeler ##**Delete**## ou ##**Delete[]**## pour toute mémoire allouée avec ##**New**##, ou vous provoquerez une perte de mémoire, tout comme vous devez vous souvenir d'appeler ##**DeAllocate**## pour toute mémoire que vous allouez avec la fonction ##**Allocate**##. **Name Mangling** ----- -Name mangling, also known as name decoration, is something that happens behind the scenes, at a lower level, and as such is not essential to know about. The reason for name mangling is to resolve problems that are involved with more than one function sharing the same name, which happens when functions are overloaded, or are part of a type. Take for example the overloaded subs shown below: +##**Name mangling**##, aussi appelé ##**name decoration**##, est quelque chose qui se passe en coulisses, à un niveau inférieur, et en tant que tel n'est pas essentiel à connaître. La raison du ##**Name mangling**## est de résoudre les problèmes provoqués par le fait que plusieurs fonctions ont le même nom, ce qui arrive lorsque des fonctions sont surchargées ou font partie d'un type. Prenez par exemple les ##**sub**##s surchargées ci-dessous: -%%(freebasic) -Sub foo overload () +Delete[] bar +Sub foo Overload () End Sub @@ -383,89 +371,101 @@ Sub foo(ByVal i As Integer) End Sub %% -If we didn't have name mangling, then both might be known at a lower level as FOO, which would cause a name clash, so they have to be decorated in order to know which one should be called when they are used. For the first sub, the compiler actually creates a sub called _Z3FOOv, and for the second it creates a sub called _Z3FOOi. The compiler then remembers these, and chooses the appropriate sub to call, depending on how you call it, for example 'foo()' will actually call _Z3FOOv, and 'foo(1)' will actually call _Z3FOOi. We can spot something from this, that the 'v' stands for void (no argument), and 'i' stands for integer. The full details of name mangling are quite complex, and vary between compilers, the Microsoft compilers use a different name mangling scheme to GNU compilers, and other compilers may use different schemes as well. The main thing we need to know, is that FreeBASIC follows the GCC 3.x ABI (Application binary interface), meaning that any overloaded functions, or complex types will only be compatible with other compilers using the same scheme. This is an unfortunate limitation, but it is not really a FreeBASIC problem, it is common of all the compilers that use advanced features, and even if all the compiler authors agreed on a common name mangling scheme, there are still other issues that would cause incompatability. +Si nous n'avions pas le ##**name mangling**##, alors les deux pourraient être connues à un niveau inférieur sous le nom de FOO, ce qui provoquerait un conflit de nom, elles doivent donc être "décorées" pour savoir laquelle doit être appelée quand ils sont utilisées. Pour la première ##**sub**##, le compilateur crée en fait une ##**sub**## appelée _Z3FOOv et pour la seconde, il crée une ##**sub**## appelée _Z3FOOi. Le compilateur se souvient alors de cela et choisit la ##**sub**## appropriée à appeler, selon la façon dont vous l'appelez, par exemple 'foo()' appellera effectivement _Z3FOOv, et 'foo(1)' appellera _Z3FOOi. Nous pouvons deviner quelque chose, que 'v' est utilisé pour "void" (pas d'argument), et 'i' pour "integer". Les détails complets de ##**name mangling**## sont assez complexes et varient entre les compilateurs, les compilateurs Microsoft utilisent un schéma de ##**name mangling**## différent de celui des compilateurs GNU et d'autres compilateurs peuvent utiliser des systèmes différents, eux aussi. La principale chose que nous devons savoir, La principale chose que nous devons savoir, c'est que FreeBasic suit GCC 3.x ABI (Application binary interface), ce qui signifie que toutes les fonctions surchargées, ou des types complexes ne seront compatibles qu'avec d'autres compilateurs utilisant le même schéma. Il s'agit d'une limitation malheureuse, mais ce n'est pas vraiment un problème FreeBasic, il est commun à tous les compilateurs qui utilisent des fonctionnalités avancées, et même si tous les auteurs compilateur étaient sur un schéma commun de ##**name mangling**##, il y aurait d'autres questions qui seraient cause d'incompatibilité. -**Implicit this** ----- +**"this" implicite** +De nouveau, il n'est pas impératif de tout connaître sur ce sujet, c'est quelque chose qui se passe en coulisses à un niveau inférieur. Lorsque vous appelez une fonction membre d'un objet, ce qui se passe c'est qu'un paramètre caché est passé, de sorte que la fonction sait quelle instance de l'objet est visée. Cela est également vrai pour les membres ##**property/constructor/destructor/operator**##. Si nous regardons un exemple très simple: -This again is not necessary to know about mostly, its something that happens behind the scenes at a lower level. When you call a member function of an object, what actually happens is a hidden first parameter is passed, so that the function knows which instance of the object is being refered to. This is also true for the property/constructor/destructor/operator members. If we look at a very simple example: +End Sub -%%(freebasic) Type foo - Declare Sub bar(ByVal n As Integer) - x As Integer + +Declare Sub bar(ByVal n As Integer) +x As Integer + End Type Sub foo.bar(ByVal n As Integer) - x = n +x = n + End Sub Dim baz As foo baz.bar(5) -%% - -What actually happens behind the scenes is something essentially equivalent to this: + %% + Ce qui se passe réellement dans les coulisses est quelque chose d'essentiellement équivalent à cela: +End Type -%%(freebasic) Type foo x As Integer End Type Sub foo_bar(ByRef _this As foo, ByVal n As Integer) - _this.x = n +_this.x = n End Sub Dim baz As foo + foo_bar(baz, 5) %% + Cette méthode utilisant un '##**this**##' explicite est souvent utilisée dans des langues qui ne disposent pas de moyens pour rendre cela plus facile. OOP (Programmation Orientée Objet) est tout simplement un ensemble de concepts, qui peuvent être codés dans la plupart des langages, certaines choses sont plus difficiles à mettre en œuvre, comme les constructeurs, vous auriez à appeler explicitement une fonction 'create' ou 'init'. Pour certaines choses telles que la distinction public / privé, c'est encore plus difficile, voire impossible, parce que le compilateur ne sait pas les faire respecter. La raison de l'ajout de fonctionnalités à un langage orienté objet est de cacher beaucoup de cela, et d'ajouter le sucre syntaxique pour rendre cela plus simple à faire, ou plus transparent dans l'utilisation, comme la façon dont nous pouvons utiliser les propriétés comme si elles étaient membres ordinaires de données, plutôt que des fonctions, qui est ce qu'elles sont vraiment. +**Conseils pour le débogage/profilage** -This method using an explicit 'this' is often used in languages that do not have facilities to make it easier. OOP is really just a set of concepts, that can be mostly coded in almost any language, some things are more difficult to implement, such as constructors, you would have to explicitly call a 'create', or 'init' function. For some things such as private/public distinction, it is even more difficult or impossible because the compiler does not know to enforce them. The reason for adding OOP features to a language is to hide a lot of this, and add syntactic sugar to make it simpler to do, or more transparent in use, such as the way we can use properties as if they were ordinary data members, rather than functions, which is what they really are. - -**Hints for debugging/profiling** ----- - -When using GDB or other debuggers, and the gprof profiling tool, the information shown is in the ""C++"" syntax, and all your variable names and other symbols are shown in upper case, here is just a very short overview to help you understand how these are shown: - -Here's an example type: +Lorsque vous utilisez ##**GDB**## ou autres débogueurs, et l'outil de profilage ##**gprof**##, l'information est présentée dans la syntaxe C++ et tous vos noms de variables et autres symboles sont affichés en majuscules, voici juste un très bref tour d'horizon pour vous aider à comprendre comment ils sont affichés: + Here's an example type: +End Sub -%%(freebasic) Type bar - Declare Constructor() - Declare Constructor(ByRef obj As bar) - Declare Constructor(ByVal n As Integer) - Declare Destructor() - Declare Operator Cast() As Any ptr - Declare Operator Let(ByVal n As Integer) - Declare Property foo(ByVal n As Integer) - Declare Property foo() As Integer - member As Any Ptr -End Type -%% - -When using GDB, these will be shown as follows (note in ""C++"" they use :: where we would use . (dot), '::' is known as the scope resolution operator): +Declare Constructor() +Declare Constructor(ByRef obj As bar) + +Declare Constructor(ByVal n As Integer) + +Declare Destructor() +Declare Operator Cast() As Any Ptr + +Declare Operator Let(ByVal n As Integer) + +Declare Property foo(ByVal n As Integer) + +Declare Property foo() As Integer +member As Any Ptr + End Type + %% + Si vous utilisez ##**GDB**##, ils seront affichés comme suit (notez qu'en C++ on utilise :: où on devrait utiliser . (dot), '::' est connu comme l'opérateur de résolution de portée): + BAR::BAR() - Le constructeur par défaut + BAR::BAR(BAR&) - Le constructeur de copie (& en C++ signifie une référence, comme byref) + BAR::BAR(int) - Le constructeur prenant un argument entier (notez qu'il n'y a aucun symbole spécial pour désigner ByVal, car c'est la valeur de passage par défaut dans les méthodes C/C++) + BAR::~BAR() - Le destructeur + BAR::operator void*() - Un "cast" vers "Any ptr" (void est similaire à Any, * signifie pointeur) + BAR::operator=(int) - L'opérateur d'affectation (Let), désigné par '=', en C/C++ '=' est une affectation, '==' teste l'égalité. +BAR::FOO(int) - Validateur de Property foo, prenant un argument entier +BAR::FOO() - Récupérateur de Property foo + +Les sub/functions membres sont présentés de la même manière que les propriétés, les propriétés indexées sont indiquées aussi de même, juste avec un argument supplémentaire pour l'indice. + + Voici comment les types de données FB seront affichés: + Any ptr - void * + ZString ptr - char * + String - FBSTRING + byte - signed char + ubyte - bool + short - short + ushort - unsigned short - BAR::BAR() - The default constructor - BAR::BAR(BAR&) - The copy constructor (& in ""C++"" means a reference, like byref) - BAR::BAR(int) - The constructor taking an integer argument (note there is no special symbol to denote ByVal, as this is the default passing method in C/""C++"") - BAR::~BAR() - The destructor - BAR::operator void*() - A cast to Any ptr (void is similar to Any, * means pointer) - BAR::operator=(int) - The assignment operator (Let), dentoted by '=', in C/""C++"" '=' is assignment, '""==""' is equality testing. - BAR::FOO(int) - Property foo setter, taking an integer argument - BAR::FOO() - Property foo getter - -Member sub/functions are shown in the same way as properties, indexed properties are shown the same also, just with the extra argument for the index. - -Here is how the FB data types will be shown: - -Any ptr - void * -ZString ptr - char * -String - FBSTRING -byte - signed char -ubyte - bool -short - short -ushort - unsigned short integer - int + uinteger - unsigned int + +longint - long long +ulongint - unsigned long long +J'espère que ceci vous aura aidé à comprendre comment les choses sont affichées dans GDB / gprof, un peu d'expérimentation facilitera les choses. +**Autres lectures** +http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgOpNew +http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgOpDelete +http://en.wikipedia.org/wiki/Copy_constructor +http://en.wikipedia.org/wiki/Object_copy +http://en.wikipedia.org/wiki/Name_mangling longint - long long ulongint - unsigned long long diff --git a/fbdocs/manual/cache/TutConditionalCompilation.wakka b/fbdocs/manual/cache/TutConditionalCompilation.wakka index ae09483a21..a2a6ef185d 100644 --- a/fbdocs/manual/cache/TutConditionalCompilation.wakka +++ b/fbdocs/manual/cache/TutConditionalCompilation.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Conditional Compilation And You"}}---- -//Written by aetherFox for [[http://petesqbsite.com/sections/express/issue9/index.html#compilation QB Express Issue #9]]// +//Ecrit par aetherFox pour [[http://petesqbsite.com/sections/express/issue9/index.html#compilation">QB Express Issue #9]]// -Conditional Compilation is one of those parts of programming that sit in the dusty corners of the knowledge banks of programmers world-over, yet is one of the most ingenious additions to any language. Usually something that was reserved for C programmers, with the power of freeBASIC's new preprocessor, you can now use conditional compilation to help your program. +La compilation conditionnelle est une de ces parties de la programmation qui sont oubliées dans les coins poussiéreux des banques de connaissances des programmeurs du monde fini, mais c'est encore l'un des ajouts les plus ingénieux pour n'importe quelle langage. Habituellement réservée aux programmeurs C, avec la puissance du nouveau préprocesseur FreeBASIC, vous pouvez maintenant utiliser la compilation conditionnelle pour améliorer votre programme. -The preprocessor allows you flexibility in changing the way code is generated through the use of conditional compilation. Take this scenario: you are debugging the code in your program, and you want to add some extra code to output a few variables, but remove them in the final version. The code would be something like this: +Le préprocesseur permet de la flexibilité en changeant la façon dont le code est généré par l'utilisation de la compilation conditionnelle. Prenez ce scénario: vous débogguez du code dans votre programme et vous voulez ajouter du code supplémentaire pour afficher quelques variables, mais celles-ci seront supprimées dans la version finale. Le code ressemblerait à ceci: ##%%(freebasic) #define DEBUG @@ -12,53 +12,53 @@ The preprocessor allows you flexibility in changing the way code is generated th #ifdef DEBUG Print "Debug Value" #endif 'DEBUG -%%## +%% -**Note** you do not need the comment after the ##[[KeyPgEndif #endif]]##, but is it good practice. +## -Basically, the above code checks to see whether ##DEBUG## has been defined, and if it has, then the code between the ##[[KeyPgPpifdef #ifdef]]...[[KeyPgPpendif #endif]]## will be executed. While this may seem silly, the uses this has are amazing. If you simply remove one line at the top of your program (##[[KeyPgPpdefine #define]] DEBUG##), then all the 'debug code' that you've added won't be sent to the compiler -- the preprocessor removes it, reducing the bloat of the final executable. +**Notez** que le commentaire après ##[[KeyPgEndif #endif]]## n'est pas obligatoire, mais c'est une bonne habitude. -##%%(freebasic) +Fondamentalement, le code ci-dessus vérifie si ##DEBUG## a été défini, et si c'est le cas, alors le code entre les ##[[KeyPgPpifdef #ifdef]]...[[KeyPgPpendif #endif]]## sera exécuté. Même si cela peut sembler idiot, les utilisations de ceci sont étonnantes. Si vous enlevez simplement une ligne en haut de votre programme (##[[KeyPgPpdefine #define]] DEBUG##), alors tout le code de déboggage que vous avez ajouté ne sera pas envoyé au compilateur -- le préprocesseur le supprimera --, réduisant ainsi l'expansion exagérée de l'exécutable final. + ##%%(freebasic) 'Turn on debugging - #define DEBUG + #define DEBUG 'Turn off debugging - #undef DEBUG -%%## +#undef DEBUG -The ##[[KeyPgPpundef #undef]]## directive is a way of 'undefining' something, in this case ##DEBUG##. While it is strictly not needed (just commenting out the line '##[[KeyPgPpdefine #define]] DEBUG##' is enough), it makes the code much clearer, and has other uses: +%% -##%%(freebasic) +## + La directive ##[[KeyPgPpundef #undef]]## est une façon de "dé-définir" quelque chose, dans ce cas, DEBUG. Alors qu'elle est strictement inutile (il suffit de commenter la ligne ##[[KeyPgPpdefine #define]] DEBUG##), elle rend le code plus clair, et a d'autres usages: + ##%%(freebasic) #ifndef DEBUG - Print "Production Version" - #endif 'DEBUG -%%## +Print "Production Version" -While not the most useful example, this demonstrates the use of another directive: ##[[KeyPgPpifndef #ifndef]]##. This directive will cause the code to be compiled if the symbol is not defined. +#endif 'DEBUG -Much like a normal programming language, the sense of the conditional can be reversed using a variant of else, ##[[KeyPgElse #else]]##: +%% -##%%(freebasic) - #ifdef DEBUG - Print "Test Version" - #else - Print "Production Version" - #endif 'DEBUG -%%## +## + Bien que n'étant pas l'exemple le plus utile, ceci démontre l'utilisation d'une autre directive: ##[[KeyPgPpifndef #ifndef]]##. Cette directive va provoquer la compilation du code si le symbole n'est pas défini. + Tout comme dans un langage de programmation normale, le sens du conditionnel peut être inversé en utilisant une variante de "else", ##[[KeyPgElse #else]]##: + ##%%(freebasic) + #ifdef DEBUG + Print "Test Version" +#else -Of course, there are many applications to this. Who says you need to do this on debug code only? You could actually check the effect of a new piece of code, or some test routines by simply defining a name like ##TESTCODE## and using the preprocessor directives to encompass your code for conditional compilation: +Print "Production Version" -##%%(freebasic) - #define TESTCODE +#endif 'DEBUG + %% - #ifdef TESTCODE - BulletRoutine() - TestFireRoutine() - #endif -%%## + ## + Bien sûr, il existe de nombreuses applications à cela. Qui a dit que vous avez besoin pour ce faire sur le code de débogage uniquement? Vous pouvez effectivement vérifier l'effet d'un nouveau morceau de code ou de quelques routines de test en définissant simplement un nom comme ##TESTCODE## et l'utilisation des directives du préprocesseur pour inclure votre code pour la compilation conditionnelle: + ##%%(freebasic) + #define TESTCODE +#ifdef TESTCODE -The scope of this tutorial is a limited one, but this method is used by professionals. It makes life easy when programming. I have used this method in my own code. To see this code in action, view the source [[http://avinash.apeshell.net/stuff/ship/flyaround.bas here]]. +BulletRoutine() -Avinash 'aetherFox' Vora -**avinashvora** [at] **gmail** [dot] **com**. -http://avinash.apeshell.net \ No newline at end of file +TestFireRoutine() +#endif +%% \ No newline at end of file diff --git a/fbdocs/manual/cache/TutConstQualifiers.wakka b/fbdocs/manual/cache/TutConstQualifiers.wakka index ae50280cc1..73f5d82e0d 100644 --- a/fbdocs/manual/cache/TutConstQualifiers.wakka +++ b/fbdocs/manual/cache/TutConstQualifiers.wakka @@ -1,82 +1,82 @@ {{fbdoc item="title" value="Const Qualifiers and You"}}---- -Note: As with all things regarding scope, Const qualifiers may be a bit difficult to understand. You should have a thorough understanding of variable scope before attempting to understand Const qualfiers. +Remarque: Comme pour tout ce qui concerne la portée, les qualificatifs Const peuvent être un peu difficile à comprendre. Vous devriez avoir une compréhension approfondie de la portée des variables avant de tenter de comprendre les qualficateurs Const. -Also note my cliche title, which I chose because of it's clicheness. +A noter également mon titre cliché, que j'ai choisi à cause de sa "clichetitude". -What the heck are Const qualifiers? Const qualifiers are a feature recently added to the language (fbc 0.18.3); they're a standard part of C""++"" and now they exist in FreeBasic too. Const qualifiers are yet another form of protection - they allow some "variables" to act like constants to certain parts of your program, in other words some parts of the program are allowed to access (read) them but not modify them. Just another kind of type safety, really, but an extremely useful one. In particular, they are very useful in OO situations, but you can probably benefit from them to some degree even if you aren't interested in OOP. +Que diable sont les qualificatifs Const? Les qualificatifs Const sont une caractéristique ajoutée récemment au langage (FBC 0.18.3), ils sont un élément standard du C++ et maintenant, ils existent aussi dans FreeBASIC. Les qualificatifs Const sont encore une autre forme de protection - ils permettent à certaines "variables" d'agir comme des constantes dans certaines parties de votre programme, en d'autres termes certaines parties du programme sont autorisés à accéder à eux (en lecture), mais pas de les modifier. Juste un autre genre de type de sécurité, vraiment, mais extrêmement utile. Ils sont très utiles, en particulier, dans les situations de OO (Orientée Objet), mais vous pouvez probablement en bénéficier à un certain degré, même si vous n'êtes pas intéressé à la POO (Programmation Orientée Objet). -The Const qualifier in FreeBasic is essentially an extension to data type declarations, and they may be used with Dim, UDT members, and procedure parameters. Generally you put it right after the "As" part of the variables's data type declaration: +Le qualificatif Const dans FreeBASIC est essentiellement un prolongement des déclarations de type de données, et il peut être utilisé avec Dim, les membres UDT (définis par l'utilisateur) et les paramètres de procédure. En général, vous le mettez juste après le ##//AS//## faisant partie de la déclaration des variables de type de données: %%(freebasic) Dim As Const Integer my_const_int = 5 %% -(By the way, throughout this tutorial I use only Integers and Integer Ptrs as examples - however, Const qualifiers //should// work the same way with all other variable types, including Types, Enums, and anything else that declares something. If for any reason it doesn't, it's probably a bug and you should report it.) +(A propos, dans ce tutoriel, je n'utilise que des entiers et des pointeurs d'entiers comme exemples - cependant, les qualificatifs Const // doivent// fonctionner de la même façon avec tous les autres types de variables, y compris les types, énumérations et bien d'autres qui déclarent quelque chose. Si pour quelque raison ce n'est pas pas le cas, c'est probablement un bug et vous devez le signaler.) -Note in this case we are allowed to change it once - when we create it. But after that, you may not change it any more. In fact, you //must// initialize it - the compiler will give an error if you don't (interestingly, you are allowed to set it equal to "Any", in which the contents are not guaranteed and could be anything). But you may not do anything that modifies it after that. It will actually give you an error if, for example, you try to do something like this: +Notez que dans ce cas, nous sommes autorisés à modifer sa valeur une fois - lors de la création. Mais après cela, vous ne pouvez pas le changer plus. En fait, vous //devez// l'initialiser - le compilateur donnera une erreur si vous ne l'avez pas fait (fait intéressant, vous êtes autorisés à le fixer à elle égale à "//Any//", dans lequel le contenu n'est pas garanti et pourrait être n'importe quoi). Mais vous ne pouvez pas faire quelque chose qu'il le modifie par la suite. Il vous donnera vraiment une erreur si, par exemple, vous essayez de faire quelque chose comme ceci: %%(freebasic) my_const_int = 3 %% -Yet, since this doesn't change the variable any, you can do +Pourtant, puisque cela ne change pas la variable existante, vous pouvez le faire. %%(freebasic) Print my_const_int %% -Now this is all very good, but it doesn't seem much different from the normal usage of Const. That is, the following two lines so far seem to mean, for all practical purposes, the same thing: +Maintenant tout cela est très bon, mais ne semble pas très différent de l'utilisation normale de Const. Autrement dit, les deux lignes suivantes semblent dire jusqu'à présent, à toutes fins pratiques, la même chose: %%(freebasic) Dim As Const Integer my_const_int = 5 Const my_int As Integer = 5 %% -Do they? Not quite. You see, the Const qualifier allows you to create consts that act as variables except that they can't be modified. That means you can put them inside Types and other places. What's more, you can put them inside Sub/Function declarations - and this is a very key reason for their existence: +Est-ce vrai? Pas tout à fait. Vous voyez, le qualificatif Const vous permet de créer des constantes qui agissent comme des variables, sauf qu'elles ne peuvent pas être modifiées. Cela signifie que vous pouvez les mettre à l'intérieur de Types et d'autres endroits. De plus, vous pouvez les mettre à l'intérieur de déclarations de Sub / Function - et c'est une raison très essentielle de leur existence: %%(freebasic) Sub my_sub (some_num As Integer) End Sub %% -Normally functions are allowed to modify the variables you send to them. Of course, whether they modify the original variable or just a local copy of the variable depends on whether you use ByVal or ByRef (and of course pointers is a whole different things altogether), but they normally are allowed to modify a variable. This may be undesirable, for whatever reason, and the Const qualifier exists to prevent that. In the function given above, some_num can be modified by the function. Normally it would only be a local copy that is modified, which is fine, since it won't affect the original Const Integer, but what if we declare the function like this? +Normalement les fonctions sont autorisées à modifier les variables que vous leur envoyez. Bien sûr, soit elles modifient la variable d'origine, soit tout simplement une copie locale de la variable; cela dépend de l'utilisation de ByVal ou ByRef (et bien sûr de pointeurs, ce qui est tout à fait différent), mais elles sont normalement autorisées à modifier une variable. Cela peut être indésirable, pour une raison quelconque, et le qualificatif Const existe pour empêcher cela. Dans la fonction ci-dessus, some_num peut être modifié par la fonction. Normalement, ce ne serait qu'une copie locale qui serait modifiée, ce qui est bien, car elle n'affecte pas l'"Integer Const" original, mais si nous déclarion la fonction comme cela? %%(freebasic) Sub my_sub (ByRef some_num As Integer) End Sub %% -Now my_sub has direct access to whatever variable you pass to it, and for that reason you are not allowed to do this sort of thing +Maintenant my_sub a un accès direct à toute variable que vous lui passez, et pour cette raison vous n'êtes pas autorisé à faire ce genre de chose %%(freebasic) my_sub(my_const_int) %% -Why? Simply because the function may modify the variable. We don't know for sure that it will, of course, but it might, so we can't do that. In fact, the error you'll get if you try to compile that is "Invalid assignment/conversion." It's almost as if the Const Integer is a different variable type, but only when it's ByRef. In that case, it would act like trying to pass a string to an integer argument (or vice-versa). Yet if it's not passed ByRef, we don't have a problem, since there's no way the function can possibly modify the variable! +Pourquoi? Tout simplement parce que la fonction peut modifier la variable. Nous ne sommes pas certain qu'elle le fera, bien sûr, mais elle le pourrait, donc nous ne pouvons pas faire cela. En fait, l'erreur que vous obtiendrez si vous essayez de compiler est "affectation / conversion invalide". C'est presque comme si l'entier Const était un autre type de variable, mais seulement quand il est ByRef. Dans ce cas, il agit comme s'il essayait de passer une chaîne à un argument entier (ou vice-versa). Pourtant, s'il n'est pas passé ByRef, nous n'avons pas de problème, car il n'y a aucun moyen pour que la fonction puisse éventuellement modifier la variable! -And of course, if we did something like this: +Et bien sûr, si nous faisions quelque chose comme ceci: %%(freebasic) Sub my_sub (ByRef some_num As Const Integer) End Sub %% -Then it compiles just fine, but if you try to do the following within the function, you get an error: +Ensuite la compilation se passe très bien, mais si vous essayez de faire ce qui suit dans la fonction, vous obtiendrez une erreur: %%(freebasic) some_num = 3 %% -Why? Once again, the original variable has been passed ByRef to the sub. It's now in local scope, but because it's ByRef, any modifications to the variable would modify the original, which cannot be done. Once again, it's entirely possible to create a copy of the variable and modify it all you want: +Pourquoi? Une fois encore, la variable d'origine a été transmise ByRef à la Sub. Nous avons maintenant une portée locale, mais parce que c'est ByRef, toute modification de la variable modifierait l'original, ce qui ne peut pas être fait. Une fois encore, il est tout à fait possible de créer une copie de la variable et de la modifier tant que vous voulez: %%(freebasic) Dim As Integer copy_of_some_num = some_num copy_of_some_num = 3 %% -But you can't modify some_num itself! +Mais vous ne pouvez pas modifier some_num lui-même! -Now we come to pointers. What about them? For pointers it's a bit more complicated; it's possible to declare the pointer //itself// as Const, OR what the pointer points to - or even BOTH! So all of the following are valid: +Nous arrivons maintenant aux pointeurs. Qu'est-ce qui se passe pour eux? Pour les pointeurs, c'est un peu plus compliqué, il est possible de déclarer le pointeur //lui-même// comme const OU ce que le pointeur pointe - ou même LES DEUX! Donc toutes les déclarations suivantes sont valables: %%(freebasic) Declare Sub my_sub_a (ByRef ptr_A As Const Byte Ptr) @@ -86,88 +86,88 @@ Declare Sub my_sub_b (ByRef ptr_B As Byte Const Ptr) Declare Sub my_sub_c (ByRef ptr_C As Const Byte Const Ptr) %% -The first one makes it so you can change the pointer itself all you want, but not the data that the pointer points to (even if you change *what* the pointer points to). The second allows you to change what the pointer points to, but you can't make it point to anything else. The third won't let you change what the pointer points to OR the pointer itself! In all cases you can make a copy of the pointer - //but it must be a Const Integer Ptr or a Const Integer Const Ptr since otherwise you would be able to change the contents of whatever the original pointer points to!// This is great protection against anything being modified! +La première fait en sorte que vous pouvez changer le pointeur lui-même comme vous voulez, mais pas les données vers lesquelles il pointe (même si vous changez *ce que* le pointeur pointe). La seconde vous permet de changer ce que le pointeur pointe, mais vous ne pouvez pas le faire pointer vers autre chose. Le troisième ne vous laissera pas changer ce que le pointeur pointe OU le pointeur lui-même! Dans tous les cas vous pouvez faire une copie du pointeur - // mais il doit être un Ptr Integer Const ou un Const Integer Const Ptr car sinon vous seriez en mesure de modifier le contenu de ce vers quoi le pointeur original pointe!// Ceci est une excellente protection contre quoi que ce soit en cours de modification! -In case the behaviour of the Const qualifier seems a bit strange to you, I'll explain exactly how it decides what's safe to allow and what isn't. It can actually be summed up pretty quickly: The Const qualifier aims to protect the original data. It doesn't care if you make a copy of the data, or change that copy, it just doesn't want you to be able to change the original data. Remembering this will help you a great deal. Of course, it needs to know //what// the original data is, which is why when there's pointers involved there are so many different places to put the Const qualifier (and you can even put it in twice - or more, depending on how many pointers there are!) So long as you remember what the Const qualifier is for, you'll never have any difficulty figuring out where to put it - or even if you need it at all (or if you need to //not// use it). +Vous pouvez également utiliser le qualificatif Const dans types définis par l'utilisateur. En fait, c'est vraiment une chose très importante pour la POO (de façon similaire aux espaces de noms, qui tout en n'étant pas directement partie de la POO sont néanmoins très liés) - mais même si vous n'utilisez pas la POO, vous pouvez toujours utiliser des qualificatifs Const dans vos types. Je n'ai même pas vraiment besoin de vous montrer un exemple, maintenant que leur fonctionnement est assez évident, mais voici quand même un exemple pour vous: You can also use the Const qualifier in UDTs. In fact, it's actually a very important thing to OOP (in a similar fashion to Namespaces, which while not a direct part of OOP nevertheless are very much related) - but even if you don't use OOP you can still use Const qualifiers in your Types. I don't even really need to show you an example, as it's pretty obvious by now how it works, but here's an example for you: -%%(freebasic) Type my_type - As Const Integer t_int= 5 -End Type - +As Const Integer t_int= 5 + End Type Dim As my_type t t.t_int = 3 + %% +Et, évidemment, la compilation échouera, puisque le membre t_int est Const. En outre, vous pouvez aussi déclarer la variable de ce type (dans ce cas, t) avec le qualificatif Const. Ce qui suit ne se compilera pas non plus, puisque TOUS les membres de t sont Const: And obviously this won't compile, since the member t_int is Const. Furthermore, you can also declare the variable of that type (in this case, t) with the Const qualifier. The following will not compile either, since ALL members of t are Const: -%%(freebasic) Type my_type - As Integer t_int= 5 -End Type - +As Integer t_int= 5 + End Type Dim As Const my_type t t.t_int = 3 + %% +Comme pour le côté POO des choses (et si vous n'êtes pas intéressé par la POO, vous pouvez sauter cette partie) - vous vous posez peut-être des questions sur les méthodes. Les méthodes implicitement passe l'objet ByRef lorsqu'elles sont appelées. Y-a-t-il un moyen de créer des objets constants? Bien sûr! Nous avons déjà vu cela. Mais certaines méthodes modifieront l'objet, et d'autres non. Y-a-t-il une distinction? La réponse est oui. Le 23 Novembre 2007, nous avons maintenant des procs Const. Cela signifie que vous pouvez faire ceci: As for the OOP side of things (and if you aren't interested in OOP you can skip this part) - you may be wondering about methods. Methods implicitly pass the object ByRef as this when called. Is there a way to create constant objects? Of course! We've already seen that. But some object methods will modify the object, and some won't. Is there a distinction? The answer is yes. As of November 23, 2007, we now have Const procs. That means you can do this: -%%(freebasic) Type my_object - Public: - Declare Sub modifier_sub () - +Public: + Declare Sub modifier_sub () 'Subs that do not modify the object are declared Const... + Declare Const Sub non_modifier_sub () - Private: - some_num As Integer = 3 -End Type - + Private: + some_num As Integer = 3 + End Type Sub my_object.modifier_sub () - this.some_num = 3 -End Sub +this.some_num = 3 + End Sub Sub my_object.non_modifier_sub() - Print this.some_num -End Sub +Print this.some_num + End Sub 'Note that only Const objects must be initialized (though in this case the non-Const object will also be), + 'just like variables. Thus, you must either have a Constructor for the object, or else you must give all variables 'default initial values (as I did here), in which case the compiler makes a default constructor for you. Dim As Const my_object t = my_object Dim As my_object u - 'Both of these will compile: + t.non_modifier_sub() u.non_modifier_sub() - '...but the first of these will not compile, since non-Const methods of Const objects may not be called! + t.modifier_sub() u.modifier_sub() - 'Sleep so we can see the results + Sleep %% +Une fois encore, la façon dont cela fonctionne est basé sur la règle simple. Comme la copie implicite est passée ByRef, toute méthode est normalement capable de modifier le contenu de l'objet - et si l'objet est déclaré As Const, ce n'est pas censé se produire! Ainsi, il existe essentiellement deux types de méthode. Les deux types ont des noms donnés dans la page de documentation C++ (listées ci-dessous dans les références): il y a des manipulateurs et des inspecteurs. Les mutateurs peuvent modifier les objets, mais les inspecteurs ne le peuvent pas. Ainsi, pour les objets déclarés As Const, seules les méthodes inspecteurs peuvent être utilisées pour ces objets - alors que toutes les méthodes peuvent être appelées en cas de objets non-Const. Les méthodes inspecteurs sont, bien sûr, celles déclarées comme des méthodes Const. Ainsi, pour les objets Const seules leurs méthodes Const peut être utilisées. -Once again, the way this works is based on the simple rule. Since the implicitly passed copy of this is passed ByRef, any method is normally able to modify the contents of the object - and if the object is declared As Const, that's not supposed to happen! Thus, there are essentially two kinds of method. The two kinds are given names in the C""++"" documentation page (listed below in the references): there are mutators and inspectors. Mutators may modify objects, but inspectors do not. Thus, for objects declared As Const, only the inspector methods for those objects may be used - while all methods may be called for non-Const objects. The inspector methods are, of course, the ones declared as Const methods. Thus, for Const objects only their Const methods may be used. +Tout cela est très bien, mais certains d'entre vous se demandent peut-être - Pourquoi dois-je connaître cela? Eh bien, une réponse directe serait hors de la *portée* (hé) de ce tutoriel, je vais donc aller à l'encontre - Pourquoi avons-nous besoin de la portée du tout? La raison des qualificatifs Const (et des méthodes Const futures) est la même que la raison de la portée dans les procédures et les modules, et la raison même pour cacher des objets variables: parce que nous voulons être certains que quelque chose ne changera pas de façon inattendue au milieu du programme, quand on s'y attend le moins. Parfois, nous voulons que les choses changent et c'est pourquoi nous n'utilisons pas le qualificatif Const. Mais quand vous voulez les choses restent ce qu'elles sont, vous utilisez le qualificateur Const, et vous pouvez être certain que rien ne changera (et le compilateur ne compilera pas le code s'il existe un danger que cela se produise!). Ceci est la définition de Const, comment il fonctionne, et c'est la raison pour laquelle vous l'utilisez! Et en général, c'est la raison pour laquelle vous utilisez tout contrôle de portée ou de données cachées. -This is all very good, but some of you may be asking - Why do I need this? Well, a direct answer would be out of the *scope* (heh) of this tutorial, so I'll counter - why do we need scope at all? The reason for Const qualifiers (and the future Const methods) is the same as the reason for scope within procedures and modules, and the same reason for hiding of variables in objects: because we want to be certain that something won't unexpectedly change in the middle of the program, when we least expect it. Sometimes we want things to change, and that's when we //don't// use the Const qualifier. But when you want something to stay what it is, you use the Const qualifier, and you can be certain it will not change (and the compiler won't compile the code if there is danger of it happening!) This is the definition of Const, how it works, and it's the reason you use it! And in general, it's the reason you use //any// scoping control or data hiding. +**Quelques notes finales** -**Some final notes** -If you use Const qualifiers, remember that it is a relatively new feature. There is very little documentation to tell us what is "wrong" or "right", so generally it will take some experimenting. If you feel that it does something it shouldn't do (or doesn't do something it should), by all means report it on the forum! If it is seen as a problem by anyone else, submit a bug report. In general, however, it should work exactly as I've said and all the examples given should do as I say they will (compile if I say they will, not compile if I say they won't). One very important thing to remember, of course, is that they aren't in the latest official release - you must have the latest SVN release for them to work (if the compiler gives an error about one of the examples given here that I told you will compile, then you'll know you need a newer version). +Si vous utilisez le qualificatif Const, n'oubliez pas que c'est un élément relativement nouveau. Il y a très peu de documentation pour nous dire ce qui est "mauvais" ou "correct", aussi généralement il faudra faire quelques expériences. Si vous sentez qu'il fait quelque chose qu'il ne doit pas faire (ou ne pas faire quelque chose qu'il doit faire), par tous moyens signaler-le sur le forum! Si c'est considéré comme un problème par quelqu'un d'autre, soumettez un rapport de bogue. En général, cependant, il devrait fonctionner exactement comme je l'ai dit et tous les exemples donnés devraient s'exécuter comme j'ai dit qu'ils le devraient (compilés si je dis qu'ils le seront, non compilés si je dis qu'ils ne le seront pas). Une chose très importante à se rappeler, bien sûr, c'est qu'ils ne sont pas dans la dernière version officielle - vous devez avoir la dernière version SVN pour en bénéficier (si le compilateur donne une erreur sur l'un des exemples donnés ici que j'ai indiqué comme compilable, alors vous saurez que vous avez besoin d'une version plus récente). +Si vous avez d'autres difficultés avec les qualificatifs Const, n'oubliez pas que même s'il n'y a pas de documentation pour eux il, y a beaucoup de gens sur le forum qui les connaissent et les comprennent, et qui peuvent vous aider pour toutes les questions que vous pourriez poser. -If you have any other difficulties with Const qualifiers, remember that even though there's no documentation for them there are plenty of people on the forum who know about and understand them, and can help you with any questions you may have. +Si vous ne comprenez toujours pas les qualificatifs Const, vous êtes probablement un débutant qui ne connaît pas encore suffisamment la notion de portée - et c'est très bien, vous allez apprendre en pratiquant. Finalement certains documents convenables pour cette fonction seront créés, mais jusque-là c'est tout ce que vous avez. Gardez à l'esprit: si vous ne comprenez pas comment ils fonctionnent, vous n'aurez probablement pas besoin d'eux. Pour ma part, j'ai écrit des programmes corrects longtemps avant qu'ils n'apparaissent, et je vais probablement continuer à le faire sans les utiliser là où ils ne sont pas nécessaires. Il y a des cas spécifiques où ils sont utiles, et si vous comprenez ces cas, alors vous pouvez aussi bien les utiliser quand ces cas se présentent. Mais si vous ne comprenez pas, ce n'est pas grave! -If you still don't understand Const qualifiers, you probably are a newbie who doesn't know much about scope yet anyways - and that's fine, you'll learn as you go. Eventually some decent documentation for this feature will be created, but until then this is all you have. Bear in mind: if you don't understand how they work, you probably won't need them. I for one have written fine programs long before they were around, and I'll probably continue to do so without using them anywhere they aren't needed. There are specific instances when they're useful, and if you understand those instances then you may as well use them when those instances arise. But if you don't understand, that's fine! - -Finally, here are some links that should be helpful. The first is a C""++"" documentation page about Const qualifiers in C""++"" - of course, it only makes sense if you understand C""++"", and they also talk about things we don't have yet (i.e., Const methods). Nevertheless it's a fine place to start if you know any C""++"", so check it out if you like. There is also a link to a forum topic in which I asked about FreeBasic development (and learned about Const qualifiers), and a link to the original SourceForge Feature Request page in which Const qualifiers were originally requested as a feature: +Enfin, voici quelques liens qui devraient être utiles. Le premier est une page de documentation C++ sur le qualificatif Const en C++ - bien sûr, elle n'a de sens que si vous comprenez le C++, et elle parle de notions que nous n'avons pas encore (c'est à dire, les méthodes Const). Néanmoins c'est une bonne façon pour commencer si vous connaissez le C++, donc allez vérifier si vous voulez. Il y a aussi un lien vers un sujet du forum dans lequel j'ai questionné sur le développement FreeBASIC (et appris les qualificatifs Const), et un lien vers la page d'origine SourceForge Feature Request dans lequel qualificatifs Const ont initialement été demandés comme une caractéristique: http://www.parashift.com/c++-faq-lite/const-correctness.html + http://www.freebasic.net/forum/viewtopic.php?t=9975&postdays=0&postorder=asc&start=0 +http://sourceforge.net/tracker/index.php?func=detail&aid=1480621&group_id=122342&atid=693199 http://sourceforge.net/tracker/index.php?func=detail&aid=1480621&group_id=122342&atid=693199 \ No newline at end of file diff --git a/fbdocs/manual/cache/TutDynaArrayType.wakka b/fbdocs/manual/cache/TutDynaArrayType.wakka index 235623c5ba..4bfbca518e 100644 --- a/fbdocs/manual/cache/TutDynaArrayType.wakka +++ b/fbdocs/manual/cache/TutDynaArrayType.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="Dynamic Arrays in Types"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -=== Introduction === +
    Introduction -A dynamic array in a type definition is a very useful feature, but FreeBasic doesn't support it. Or rather, it doesn't support it directly. However, you can create dynamic arrays by using pointers and the associated memory functions. +Un tableau dynamique dans une définition de type est une fonctionnalité très utile, mais FreeBASIC ne le supporte pas. Ou plutôt, il ne le supporte pas directement. Cependant, vous pouvez créer des tableaux dynamiques en utilisant les pointeurs et les fonctions associées à la mémoire. -An array is simply a contiguous block of memory that holds a certain data type. Arrays in FreeBasic use an array descriptor to describe the data contained within the array, and you can use this same technique to build a dynamic array within a type. The two elements you need within your type-def are a pointer to a particular data type, and a size indicator. +Un tableau est simplement un bloc contigu de mémoire qui contient un certain type de données. Les tableaux en FreeBASIC utilisent un descripteur de tableau pour décrire les données contenues dans celui-ci et vous pouvez utiliser cette même technique pour construire un tableau dynamique dans un type. Les deux éléments dont vous avez besoin dans votre "type def" sont un pointeur sur un type particulier de données et un indicateur de taille. -You can then use the ptr field to allocate a block of memory to the needed size, and save that size in the size indicator field. The size field is used to tell you how many elements are currently in the array. Once the array has been initialized, you can then use pointer indexing to access each element in the array. +Vous pouvez ensuite utiliser le "champ ptr" pour allouer un bloc de mémoire de la taille nécessaire et enregistrer cette taille dans le champ de l'indicateur de taille. Le champ de taille est utilisé pour vous dire combien d'éléments sont actuellement dans le tableau. Une fois que le tableau a été initialisé, vous pouvez ensuite utiliser l'indexation pointeur pour accéder à chaque élément du tableau. -=== Getting the Point(er) in Code === +
    Obtenir le Pointeur dans le Code -The following program illustrates the steps in creating, initializing and resizing a dynamic type-def array. +Le programme suivant illustre les étapes de la création, l'initialisation et le redimensionnement dynamique d'un tableau "type def". %%(freebasic) 'Define type: 'size is current size of array @@ -69,9 +69,9 @@ Deallocate myType.darray End %% -=== How it Works === +
    Comment ça marche? -The first step is, of course, to define the type-def: +La première étape est, bien sûr, de définir le "type-def": %%(freebasic) Type DType size As Integer @@ -79,63 +79,63 @@ Type DType End Type %% -Since this is just an example there are only two elements within the type, a size indicator and the array pointer. Notice that the array pointer is defined as an Integer ptr. When you define a pointer to a particular type, you are creating a "typed" pointer. The compiler can use this type information to check to make sure the values being placed into the array are valid, and will also use this information for pointer arithmetic. +Comme ce n'est qu'un exemple, il y a seulement deux éléments dans le type, un indicateur de taille et le pointeur de tableau. Notez que le pointeur de tableau est défini comme un "ptr Integer". Lorsque vous définissez un pointeur sur un type particulier, vous créez un pointeur typé. Le compilateur peut utiliser ces informations de type pour vérifier et s'assurer que les valeurs placées dans le tableau sont valides et utilisera ces informations pour l'arithmétique des pointeurs. -The next step is to define the working variables. +La prochaine étape est de définir les variables de travail. %%(freebasic) Dim myType As DType Dim As Integer i, tmp %% -Here an instance of the type is created, as well as some working variables that are used in the following code. WARNING: You must initialize the array pointer before you can use it; using an uninitialized ptr can cause program crashes, system lockups and all sorts of bad things. +Voici un exemple du type qui a été créé, ainsi que certaines variables de travail qui sont utilisées dans le code suivant. ATTENTION: Vous devez initialiser le pointeur de tableau avant que vous puissiez l'utiliser; utiliser un pointeur non initialisé peut provoquer des plantages du programme, des blocages du système et toutes sortes de mauvaises choses. %%(freebasic) myType.darray = Callocate(5, Sizeof(Integer)) myType.size = 5 %% -These two lines of code initialize the array pointer to hold 5 integers. Callocate is used to allocate the memory segment, since Callocate will initialize the segment to zeros. +Ces deux lignes de code initialisent le pointeur de tableau pour contenir 5 entiers. "Callocate" est utilisé pour allouer le segment de mémoire, "Callocate" va initialiser le segment avec des zéros. -The size field stores the current length of the array. Now, of course, you could calculate the size of the array by simply dividing the number of bytes in the allocation by the size of an integer, but using a size indicator within the type is much cleaner and saves you a calculation in your program. +Le champ de la taille stocke la longueur courante du tableau. Maintenant, bien sûr, vous pouvez calculer la taille du tableau en divisant simplement le nombre d'octets dans l'allocation par la taille d'un entier, mais en utilisant un indicateur de taille dans le type est beaucoup plus propre et vous fait gagner un calcul dans votre programme. %%(freebasic) For i = 0 To myType.Size - 1 myType.darray[i] = i Next %% -This section of code loads the array with some values. You can see why saving the size of the array simplifies the coding process. Since the array is a typed pointer, you can access the array using the pointer indexing method, which is almost like accessing a predefined array. +Cette section de code charge le tableau avec quelques valeurs. Vous pouvez voir que sauver la taille du tableau simplifie le processus de codage. Comme le tableau est un pointeur typé, vous pouvez accéder au tableau en utilisant la méthode d'indexation pointeur, qui est presque comme l'accès à un tableau prédéfini. %%(freebasic) For i = 0 To myType.Size - 1 Print "darray[";i;" ]:";myType.darray[i] Next %% -This section simply prints out the values using the same method that was used to load the array. +Cette section affiche simplement les valeurs en utilisant la même méthode qui a été utilisée pour charger le tableau. -Of course, this should be a dynamic array, so you should be able to resize the array, and this is exactly what the next section of code will do. +Bien sûr, cela doit être un tableau dynamique, donc vous devriez être capable de redimensionner le tableau et c'est exactement ce que la section de code suivante va faire. %%(freebasic) tmp = myType.size myType.darray = Reallocate(myType.darray, 10) myType.size = 10 %% -The first line of code saves the current size of the array so that the new memory segment can be initialized while not overwriting any existing data. You will see this in a moment. +La première ligne de code enregistre la taille actuelle du tableau de sorte que le nouveau segment de mémoire peut être initialisé sans écraser les données existantes. Vous verrez dans un instant. -The second line uses the Reallocate function to resize the memory segment, that is, resize the array. In this case, the array is being made larger; you could of course make the array smaller. If you were to make the array smaller, any data not in the new segment would be lost, as you would expect. +La seconde ligne utilise la fonction "Reallocate" pour redimensionner le segment de mémoire, c'est-à dire redimensionner le tableau. Dans ce cas, le tableau est plus grand; vous pourriez bien sûr faire le tableau plus petit. Si vous deviez faire le tableau plus petit, toutes les données en-dehors du nouveau segment seraient perdues, comme vous le souhaitiez. -The last line of code above saves the new array size in the size indicator. +La dernière ligne de code ci-dessus enregistre la taille du tableau nouveau dans l'indicateur de taille. %%(freebasic) For i = tmp - 1 To myType.Size - 1 myType.darray[i] = i Next %% -Here, you can see why the old array size was saved. In the For statement, the initialization procedure starts from the old index and iterates through the newly added indexes, storing data within the memory segment. This is like using the Redim Preserve statement on a normal array. +Ici, vous pouvez voir pourquoi l'ancienne taille du tableau a été enregistrée. Dans l'instruction "For", la procédure d'initialisation commence à partir de l'ancien indice et parcourt les indices nouvellement ajoutés, stockant les données dans le segment de mémoire. C'est comme utiliser la déclaration "Redim Preserve" sur un tableau normal. %%(freebasic) For i = 0 To myType.Size - 1 Print "darray[";i;" ]:";myType.darray[i] Next %% -This code section simply prints out the new values. +Cette section de code affiche simplement les nouvelles valeurs. %%(freebasic) Deallocate myType.darray %% -This is vitally important. You should always deallocate any allocated memory that you have created in your program to prevent memory leaks. +Ceci est d'une importance vitale. Vous devez toujours libérer toute la mémoire allouée que vous avez créé dans votre programme afin de prévenir les fuites de mémoire. -When you run the program you should see the following output: +Lorsque vous exécutez le programme, vous devriez avoir l'affichage suivant: %%(freebasic) darray[ 0 ]: 0 darray[ 1 ]: 1 @@ -156,4 +156,4 @@ darray[ 8 ]: 8 darray[ 9 ]: 9 Press any key... %% -The first print out shows the original array. The second print out shows the newly resized array. +Le premier affichage montre le tableau original. Le second affichage montre le tableau nouvellement redimensionné. diff --git a/fbdocs/manual/cache/TutDynamicArrays.wakka b/fbdocs/manual/cache/TutDynamicArrays.wakka index 6d4aa22415..362f932977 100644 --- a/fbdocs/manual/cache/TutDynamicArrays.wakka +++ b/fbdocs/manual/cache/TutDynamicArrays.wakka @@ -1,25 +1,25 @@ {{fbdoc item="title" value="Dynamic Arrays"}}---- -Hello, this page explains the proper use of dynamic arrays in FreeBASIC. While it isn't a very long tutorial, many people have had some troubles with this and I felt it was worth putting into the "Getting Started" tutorial page. +Bonjour, cette page explique la bonne utilisation des tableaux dynamiques en FreeBASIC. Bien que ce ne soit pas un très long tutoriel, beaucoup de gens ont eu quelques problèmes avec cette notion et j'ai senti que cela valait la peine dans le mettre dans la partie "Mise en route" des tutoriels. -Arrays are neat; they can be used and resized throughout a program, with little difficulties. Firstly, we should discuss both ways a dynamic array can be created. In the same code, I will explain how to redimension a Dynamic Shared Array within a sub or function. Read the comments within the code to understand it better. +Les tableaux sontsoigneusement ordonnés; ils peuvent être utilisés et redimensionnées à travers un programme, avec peu de difficultés. Tout d'abord, nous devrions discuter des deux manières de créerun tableau dynamique. Dans le même code, je vais vous expliquer comment redimensionner un "//Dynamic Shared Array//" dans une SUB ou FUNCTION. Lisez les commentaires dans le code pour mieux le comprendre. %%(freebasic) declare sub mySub () -' as of 0.17, OPTION DYNAMIC and '$DYNAMIC are unecessary. you must define an array to be dynamic each time -' as you can see, both following ways are successful at creating a dynamic array +' Comme depuis 0.17 DYNAMIC et $DYNAMIC sont inutiles. vous devez définir un tableau dynamique à chaque fois +' comme vous le voyez les deux méthodes sont utilisables pour déclarer un tableau avec succès dim shared myArray1() as ubyte redim shared myArray2(0) as ubyte mySub -' because we shared the arrays, they are accessable from anywhere within the module +' comme les tableaux sont partagés ils sont accessibles dans tout le module print myArray1(5) ' will print 2 print myArray2(6) ' will print 3 sub mySub () - ' do NOT use "redim shared" within a sub or function! even if it is shared, you must omit the word "shared" for it to work + ' NE PAS utiliser "redim shared" dans une sub ou function! même s'il est partagé, vous devez omettre le mot "shared" pour que cela fonctionne redim myArray1(0 to 9) as ubyte redim myArray2(0 to 9) as ubyte myArray1(5) = 2 @@ -27,14 +27,14 @@ sub mySub () end sub %% -Now, you may be wondering how you can redimension an array while using the PRESERVE keyword. Normally, you simply add PRESERVE as the syntax for REDIM will state. Yet in fact, this only works if the first array dimension is the only one changing! For example, the following program would not work properly: +Maintenant, vous vous demandez peut-être comment vous pouvez redimensionner un tableau en utilisant le mot-clef PRESERVE. Normalement, il suffit d'ajouter PRESERVE comme l'indique la syntaxe de REDIM. Pourtant, en fait, cela ne fonctionne que si on ne change que la première dimension du tableau! Par exemple, le programme suivant ne fonctionnera pas correctement: %%(freebasic) -' declare the dynamic array the cleaner way +' déclarer le tableau dynamique de la meilleure façon redim shared myArray(0 to 9, 0 to 9) as ubyte dim as ubyte x, y, i -' fill the array with values +' remplir le tableau avec des valeurs for y = 0 to 9 for x = 0 to 9 i += 1 @@ -42,7 +42,7 @@ for y = 0 to 9 next x next y -' proves the values are good originally: +' prouve que les valeurs sont correctes à l'origine: for y = 0 to 9 for x = 0 to 9 print using "##,"; myArray(x, y); @@ -54,10 +54,10 @@ print "Press a key..." sleep cls -' redimension the arrays +' redimensionne le tableau redim preserve myArray(0 to 18, 0 to 12) as ubyte -' the values have not been preserved properly! +' les valeurs n'ont pas été préservées correctement! for y = 0 to 9 for x = 0 to 9 print using "##,"; myArray(x, y); @@ -69,6 +69,6 @@ sleep end %% -Try it out! You can see that it does not work properly. This is because only the first dimension in an array may change sizes, while the rest remain the same size, in order for PRESERVE to work properly. +Essayez-le! Vous pouvez voir qu'il ne fonctionne pas correctement. C'est parce que seule la première dimension d'un tableau peut changer de taille, tandis que le reste conserve la même taille, pour que PRESERVE fonctionne correctement. -There is a workaround, which I will post later, after I edit it in order to make sense to any program, not just mine, and make some revisions so it does not go out of bounds. For the moment, get creative ;) \ No newline at end of file +Il existe une solution, que je posterai plus tard, après l'avoir modifiée afin de lui donner un sens pour tout programme, pas seulement le mien, et de faire quelques révisions afin de ne pas sortir des limites. Pour le moment, soyez créatif ;) \ No newline at end of file diff --git a/fbdocs/manual/cache/TutFBgfxImgAndFontBuf.wakka b/fbdocs/manual/cache/TutFBgfxImgAndFontBuf.wakka index 8256608992..860bb31601 100644 --- a/fbdocs/manual/cache/TutFBgfxImgAndFontBuf.wakka +++ b/fbdocs/manual/cache/TutFBgfxImgAndFontBuf.wakka @@ -1,31 +1,31 @@ {{fbdoc item="title" value="FBgfx Image and Font Buffers"}}---- -Creating and understanding your FBgfx image and font buffers +Créer et comprendre votre image FBgfx et les tampons de la police de caractères -The FBgfx Image Buffer - Creating Buffers - Buffer Format - Getting Pixels -The FBgfx Font Header - Header Details - Creating a Font Buffer - Assigning Font Characters -Tips & Tricks - Coloring your Custom Fonts - ""ScrPtr vs ImgBuf"" +Le tampon d'image FBgfx + Créer des zones tampons + Format tampon + Récupérer des Pixels +Le fichier en-tête FBgfx Font + Détails du fichier en-tête + Création d'un tampon police de caractères + Affectation des caractères de la police +Trucs et astuces + Coloriage de vos polices personnalisées + ScrPtr vs ImgBuf -**Download Accompanying Tutorial Files: [[http://pritchard.hmcsoft.org/files/fb%20font%20tut.7z FreeBASIC Font Tutorial.7z]]** +**Télécharger les fichiers d'accompagnement du Tutoriel: [[http://pritchard.hmcsoft.org/files/fb%20font%20tut.7z">FreeBASIC Font Tutorial.7z]]** -===The FBgfx Image Buffer=== +
    Le tampon d'image FBgfx -FBgfx has a new data type in .17 and above. This type is called ##IMAGE##. You can use it by including the FBgfx Header in your program (##[[KeyPgInclude #include]] "fbgfx.bi"##) and then accessing the namespace for FBgfx, via ##FB.IMAGE##. When we create buffers in this tutorial, we're going to be using the ##fb.Image [[KeyPgPtr ptr]]## type. A pointer, because it's dynamic memory which we can resize. +FBgfx a un nouveau type de données depuis la version 0.17 et suivantes. Ce type est appelé IMAGE. Vous pouvez l'utiliser en incluant l'en-tête FBgfx dans votre programme (# include "fbgfx.bi") et ensuite accéder à l'espace de noms pour FBgfx, via FB.IMAGE. Quand nous créerons des zones tampons dans ce tutoriel, nous utiliserons le type "fb.Image Ptr". Un pointeur, car c'est de la mémoire dynamique que l'on peut redimensionner. -To use an image in the FBgfx Library, you have to create it via image buffer. Your buffer is an area of memory allocated (created, made available) for your image. You have to deallocate (free, make available to other programs) the buffer when you are done using it at the end of your program. FBgfx has its own internal pixel format, as well as an image header at the beginning of every buffer created. The image header contains information about your image. Things like its width, height, bit depth, etc., while the pixel Buffer contains the actual colors for each individual pixel in RGB (red, blue, green) format. +Pour utiliser une image dans la bibliothèque FBgfx, vous devez le créer via un tampon image. Votre tampon est une zone de mémoire allouée (créée, mis à disposition) pour votre image. Vous avez à désallouer (libérer, rendre disponible à d'autres programmes), la mémoire tampon lorsque vous avez terminé de l'utiliser à la fin de votre programme. FBgfx a son propre format de pixel interne, ainsi qu'une tête au début de chaque tampon image créé. L'en-tête de l'image contient des informations sur votre image. Comme sa largeur, hauteur, profondeur de bits, etc, tandis que le tampon pixel contient les couleurs réelles, pour chaque pixel individuel en format RVB (rouge, bleu, vert). -==Creating Buffers== +**Créer des zones tampons** -The size of the buffer you create will vary depending on screen depth. Your bytes-per-pixel are the number of bytes needed to store individual pixels. Thus, a 32-bit pixel depth screen will need 4 bytes per pixel (8 bits in a byte). You don't need to worry about this, however, as using the ##fb.Image [[KeyPgPtr ptr]]## setup to create your buffer makes it very easy to get the information we need from our buffers. You only need to know this information to understand how much size a buffer may take up total, for memory usage information. +La taille du buffer que vous créezt varie en fonction de la profondeur d'écran. Le "bytes-per-pixel ou bpp = octets par pixel" est le nombre d'octets nécessaires pour stocker les pixels individuels. Ainsi, un écran 32-bit de profondeur de pixel aura besoin de 4 octets par pixel (8 bits dans un octet). Vous n'avez pas besoin de vous inquiéter à ce sujet, cependant, l'utilisation de ##fb.Image [[KeyPgPtr Ptr]]## pour créer votre configuration mémoire tampon rend cela très facile pour obtenir les informations nécessaires à la création de nos tampons. Vous avez seulement besoin de connaître cette information pour comprendre quelle quantité de mémoire la taille d'un tampon peut occuper au total, concernant les informations d'utilisation de la mémoire. -Actually creating the buffer is very simple. It's just a simple creation of an ##fb.Image [[KeyPgPtr ptr]]##, and a call to ##[[KeyPgImagecreate Imagecreate]]## (""Example1.bas""): +En fait, la création du tampon mémoire est très simple. C'est juste une simple création d'un ##fb.Image [[KeyPgPtr Ptr]]## et un appel à ##[[KeyPgImagecreate ImageCreate]]## (Exemple1.bas): %%(freebasic) #include "fbgfx.bi" @@ -50,13 +50,13 @@ Print "Our buffer was destroyed." sleep %% -==Code Dissection== +**Dissection du Code** %%(freebasic) #include "fbgfx.bi" %% -This includes the header file which contains the definition for the ##fb.Image## type. +Cela inclut le fichier d'en-tête qui contient la définition du type ##fb.Image##. %%(freebasic) '' Our image width/height @@ -64,25 +64,25 @@ Const ImgW = 64 Const ImgH = 64 %% -This creates constants which will be used to decide the size of our image. FBgfx doesn't know about these. We'll have to pass them to ##[[KeyPgImagecreate Imagecreate]]## when we use it. +Ceci crée des constantes qui seront utilisées pour décider de la taille de notre image. FBgfx ne connaît rien à ce sujet. Nous devrons les passer à ##[[KeyPgImagecreate ImageCreate]]## lorsque nous l'utiliserons. %%(freebasic) '' Screens have to be created before a call to imagecreate Screenres 640, 480, 32 %% -This creates our FBgfx screen. ##[[KeyPgImagecreate Imagecreate]]## needs to know our bit depth beforehand. However, FBgfx's ##[[KeyPgImagecreate Imagecreate]]## now has an extra parameter allowing you to set the depth yourself. +Ceci crée notre écran FBgfx. ##[[KeyPgImagecreate ImageCreate]]## a besoin de connaître la profondeur de bit à l'avance. Toutefois, ##[[KeyPgImagecreate ImageCreate]]## FBgfx a maintenant un paramètre supplémentaire vous permettant de régler la profondeur soi-même. %%(freebasic) '' Create our buffer Dim as FB.Image ptr myBuf = ImageCreate(ImgW, ImgH) %% -This first of all creates a pointer that is of the ##fb.Image## type. It's just a location of memory. We haven't filled it with anything yet. In fact, right now it equals zero, and could not be used. That's considered to be null. +Avant tout il faut créer un pointeur qui du type ##fb.Image##. C'est juste un emplacement mémoire. Nous n'avons encore rien rempli. En fait, actuellement, il est égal à zéro et ne peut pas être utilisé. Il est considéré comme nul. -The ##[[KeyPgImagecreate Imagecreate]]## call returns the address of an area in memory of a newly created ##fb.Image## which we initialize our pointer with. The size of this buffer depends on the bit depth, but the width/height of the image contained in the buffer is going to be the ones we set earlier. ##[[KeyPgImagecreate Imagecreate]]## can also take a fill color and depth as the third and fourth arguments, respectively; if not specified, the image will be created filled with the transparent color and match the current screen color depth. +L'appel d'##[[KeyPgImagecreate ImageCreate]]## renvoie l'adresse d'une zone de la mémoire d'un ##fb.Image## nouvellement créé qui sert à l'initialisation de notre pointeur. La taille de ce tampon dépend de la profondeur de bits, mais la largeur et la hauteur de l'image contenue dans le tampon seront celles que nous avons définies précédemment. ##[[KeyPgImagecreate ImageCreate]]## peut aussi prendre une couleur de remplissage et de profondeur dans les troisième et quatrième arguments, respectivement; si ce n'est pas spécifié, l'image sera créée remplie avec la couleur transparente et sa profondeur sera celle de la couleur courante de l'écran. -We now have allocated a space in memory. It's enough space to hold an ""ImgWxImgH"" image, along with the data FBgfx holds within its ##fb.Image## type. We'll need to destroy it later for proper memory management. +Nous avons maintenant un espace alloué en mémoire. C'est un espace suffisant pour contenir une image "ImgWxImgH", avec les données que "FBgfx" détient au sein de son type ##fb.Image##. Nous allons avoir besoin de le détruire plus tard, pour une gestion appropriée de la mémoire. %%(freebasic) '' Print the address of our buffer. @@ -90,7 +90,7 @@ Print "Buffer created at: " & myBuf sleep %% -This is just there to let you know what we've done. We print the address of ##myBuf##. If it's not ##0##, we can assume that ##[[KeyPgImagecreate Imagecreate]]## had worked. +Ceci, juste pour vous faire savoir ce que nous avons fait. Nous affichons l'adresse de ##myBuf##. Si ce n'est pas ##0##, nous pouvons supposer que ##[[KeyPgImagecreate ImageCreate]]## a fonctionné. %%(freebasic) '' Destroy our buffer. Always DESTROY buffers you CREATE @@ -99,15 +99,15 @@ Print "Our buffer was destroyed." sleep %% -Here we destroy our buffer with a call to ##[[KeyPgImageDestroy Imagedestroy]]##. We don't have to use ##[[KeyPgImageDestroy Imagedestroy]]## to deallocate our buffer, but it's best to use it for consistency and clarity. +Ici, nous détruisons notre tampon avec un appel à ##[[KeyPgImageDestroy ImageDestroy]]##. Nous n'avons pas à utiliser ##[[KeyPgImageDestroy ImageDestroy]]## pour désallouer notre tampon, mais il est préférable de l'utiliser pour la cohérence et la clarté. -==Buffer Format== +**Format du tampon** -Now that we know how to create buffers, we might want to know more information about what's being held inside of them. You can open up the ##fbgfx.bi## header file and find the ##fb.Image## type, and you can see all of this cool stuff inside of it. +Maintenant que nous savons comment créer des tampons, on peut vouloir avoir plus d'informations sur ce qui aura lieu à l'intérieur. Vous pouvez ouvrir le fichier d'en-tête ##fbgfx.bi## et trouver le type ##fb.Image## et voir tous ces trucs excellents à l'intérieur de celui-ci. -We actually don't need to know much about the format itself. The reason for this is, we used an ##fb.Image [[KeyPgPtr ptr]]##. Everything after the ##Buf + [[KeyPgSizeof Sizeof]](fb.Image)## in memory belongs to pixels. Everything before that is the header. The header can be accessed very easily because we used the ##fb.Image [[KeyPgPtr ptr]]##. All you have to know is what you want to look for. +En fait, Nous n'avons pas besoin d'en savoir beaucoup sur le format lui-même. La raison en est que nous avons utilisé une ##fb.Image [[KeyPgPtr Ptr]]##. Dans la mémoire, tout ce qui suit ##Buf + [[KeyPgSizeof SizeOf]](fb.Image)## correspond aux pixels. Tout ce qui est avant correspond à l'en-tête. L'en-tête est très facilement accessible parce que nous avons utilisé un ##fb.Image [[KeyPgPtr Ptr]]##. Tout ce que vous devez savoir est ce que vous voulez chercher. -==FB.IMAGE Data Type== +**FB.IMAGE Data Type** %%(freebasic) '' Image buffer header, new style (incorporates old header) @@ -124,20 +124,20 @@ type IMAGE field = 1 end type %% -This same information can be found in ##fbgfx.bi##. As you can see, this data type saves a *lot* of neat information about your buffer. The Width, Height, Pitch (bytes per row), and Bit Depth (bytes per pixel) are all contained. In the union is included the type of header, and the old header itself within the same space. The new header format is indicated by a type value of ##7##. The old header format is not used in the default dialect in the newer versions of FB, so we're not going to cover it here. +Cette même information peut être trouvée dans ##fbgfx.bi##. Comme vous pouvez le voir, ce type de données permet de stocker *beaucoup* d'information ordonnée concernant votre tampon. La largeur, la hauteur, pitch (octets par ligne) et la profondeur de bits (octets par pixel) sont toutes intégrées. Dans l'union est inclus le type d'en-tête et l'ancienne en-tête elle-même dans le même espace. Le format de nouvel en-tête est indiquée par une valeur type de 7. Le format d'ancienne en-tête n'est pas utilisé dans le dialecte par défaut dans les nouvelles versions de FB, alors nous n'allons pas le couvrir ici. -How do we access that information within the header? If you're familiar with pointers (which you should be, we used a pointer for our buffer in the first example), then all you have to do is access your buffer like a pointer, and directly access the data within. This may leave you to believe that all that's contained in your buffer is the ##fb.Image## type itself, but that's just not true. Using a ##fb.Image [[KeyPgPtr ptr]]## allows the compiler to think that's what's contained in the buffer, even though only the first part does so. +Comment pouvons-nous accéder à ces informations dans l'en-tête? Si vous connaissez bien les pointeurs (vous devriez l'être, nous avons utilisé un pointeur pour notre tampon dans le premier exemple), alors tout ce que vous avez à faire est d'accéder à votre tampon comme un pointeur, et accéder directement aux données à l'intérieur. Cela peut vous laisser croire que tout ce qui est contenu dans votre mémoire tampon est le type ##fb.Image## lui-même, mais ce n'est tout simplement pas vrai. L'utilisation d'une ##fb.Image [[KeyPgPtr Ptr]]## permet au compilateur de penser que c'est ce qui est contenu dans la mémoire tampon, même si seule la première partie le fait. -==Getting Pixels== +**Récupérer des Pixels** -The first section of our buffer which FreeBASIC helps us out with contains the header information. Add the size of the ##fb.Image## to our address, and the rest of our buffer contains pixels (""Example2.bas""). +La première section de notre tampon que FreeBASIC nous fournit contient les informations d'en-tête. Ajoutez la taille de la ##fb.Image## à notre adresse et le reste de notre tampon contient les pixels (Example2.bas). %%(freebasic) '' We have to include this to use our FB.IMAGE datatype, remember. #include "fbgfx.bi" %% -Remember to include our ##fb.Image## data type! +N'oubliez pas d'inclure notre type de données ##fb.Image##! %%(freebasic) '' This one is very important. @@ -147,19 +147,19 @@ Remember to include our ##fb.Image## data type! Dim as uInteger ptr myPix = cast( uInteger ptr, ( cast( ubyte ptr, myBuf ) + sizeof(FB.Image) ) ) %% -Phew. Alright. We have to make sure we get the exact address of our pixels. An integer contains 4 bytes. 3 of these are used for our RGB, and the extra is generally used for alpha when you need it (some people are very resourceful and will use the alpha byte - or channel - to store all kinds of data). If we're even ONE BYTE off, your Red can become your Green, and your Blue into your Red! So we have to cast to a ##[[KeyPgUbyte ubyte]] [[KeyPgPtr ptr]]## first. +Ouf. Très bien. Nous devons nous assurer que nous obtenons bien l'adresse exacte de nos pixels. Un nombre entier contient 4 octets. 3 d'entre eux sont utilisés pour nos RVB et l'extra est généralement utilisé pour le canal alpha lorsque vous en avez besoin (certaines personnes très débrouillardes et utiliseront l'octet alpha - ou canal alpha - pour stocker toutes sortes de données). Même si nous avons seulement UN OCTET de décalage, notre Rouge deviendra Vert et notre Beu deviendra Rouge! Nous devons donc appliquer un ##[[KeyPgUbyte UByte]] [[KeyPgPtr Ptr]]## en premier. -You probably also noticed that we simply added ##sizeof(fb.Image)## to our address. That's another perk of using ##fb.Image##! If you add its size to the start of the buffer, we have just skipped all the memory addresses relating to the header and are now at our pixels. +Vous avez sans doute également remarqué que nous avons simplement ajouté ##sizeof(fb.Image)##à notre adresse. C'est un autre avantage de l'utilisation de ##fb.Image##! Si vous ajoutez sa taille au début du buffer, nous avons juste sauté toutes les adresses mémoire liées à l'en-tête et nous sommes maintenant sur nos pixels. -Finally, we cast it all to a ##[[KeyPgUinteger Uinteger]] [[KeyPgPtr Ptr]]##, mainly for safety. We're in 32 bit depth mode, so we need 4 bytes per pixels. A ##[[KeyPgUinteger Uinteger]]## has that. +Finalement, nous effectuons un ##[[KeyPgUinteger UInteger]] [[KeyPgPtr Ptr]]## sur la tout, principalement pour la sécurité. Nous sommes en mode 32 bits de profondeur, nous avons donc 4 octets par pixel. Cela correspond à un ##[[KeyPgUinteger UInteger]]##. -Here's a small line if you still don't understand how this works. Here is our buffer: |FB.IMAGE Header|Pixels| +Voici une petite ligne si vous ne comprenez toujours pas comment cela fonctionne. Voici notre tampon: | FB.IMAGE Header | Pixels | -If what's contained in the first section of our buffer is the ##fb.Image## Header, it's obviously going to be that big in size. So, we can get our address for the pixels, simply by adding the size of the ##fb.Image## datatype onto our original address. +Si ce qui est contenu dans la première section de notre tampon est l'en-tête de ##fb.Image##, c'est bien évidemment qu'il va être aussi grand en taille. Ainsi, nous pouvons obtenir notre adresse pour les pixels, simplement en ajoutant la taille de la ##fb.Image## à l'adresse de notre type de donnée d'origine. -One problem though! If we add that size to our buffer address, to try and get a new one, we end up with strange results. This is because our datatype isn't one byte long. We have to cast to a ##[[KeyPgUbyte Ubyte]] [[KeyPgPtr Ptr]]## first, then add the address. A ##[[KeyPgUbyte Ubyte]]## is one byte long, so we'll get the exact byte we need in memory to work with. +Un problème cependant! Si nous ajoutons cette taille du tampon à notre adresse, pour tenter d'en obtenir une nouvelle, nous nous retrouvons avec des résultats étranges. C'est parce que notre type de données n'est pas d'un octet de longueur. Nous devons d'abord Cast ##[[KeyPgUbyte UByte]] [[KeyPgPtr Ptr]]## puis ajouter l'adresse. Un ##[[KeyPgUbyte UByte]]## a une longueur d'un octet, ainsi nous obtiendrons en mémoire l'octet exact nécessaire pour les manipulatios. -Finally, we're in 32-bits. We just casted to a ##[[KeyPgUbyte Ubyte]] [[KeyPgPtr Ptr]]##. Although we *can* just assign the uInteger ptr the address of the ##[[KeyPgUbyte Ubyte]]##, it's best practice to cast it to a ##[[KeyPgUinteger Uinteger]] [[KeyPgPtr Ptr]]## first. We finally have the address of our pixels, in the right datatype (one per pixel!). We could manipulate those pixels directly now, if we'd like. +Enfin, nous sommes en 32-bits. Nous avons seulement fait un Cast ##[[KeyPgUbyte UByte]] [[KeyPgPtr Ptr]]##. Bien que nous puissions simplement attribuer au "uInteger ptr" l'adresse du ##[[KeyPgUbyte UByte]]##, c'est une meilleure pratique de Cast vers un ##[[KeyPgUinteger UInteger]] [[KeyPgPtr Ptr]]## en premier. Nous avons enfin l'adresse de nos pixels, dans le type de données convenable (un par pixel!). Nous pouvons manipuler les pixels directement maintenant, si nous le souhaitons. %%(freebasic) @@ -171,33 +171,33 @@ Print "Image Pitch: " & myBuf->Pitch Print "" %% -This is what I was talking about earlier. FB will treat your pointer as if it's an ##fb.Image [[KeyPgPtr ptr]]##, so you can access the data in the header directly. Since we have the size of the image as well as its pixels address now, we could edit and manipulate them as if they were a pointer to our screen buffer! See ""ScrPtr vs ImgBuf.bas"" for an example on this. +C'est ce dont je parlais plus tôt. FB traitera votre pointeur comme si c'était un ##fb.Image [[KeyPgPtr Ptr]]##, vous pouvez donc accéder aux données de l'en-tête directement. Puisque nous avons maintenant la taille de l'image ainsi que son adresse pixels, nous pouvons les éditer et les manipuler comme s'ils étaient un pointeur sur notre tampon d'écran! Voir ScrPtr ImgBuf.bas vs pour un exemple à ce sujet. -===FBGfx Font Header=== +
    L'en-tête FBGfx Font -==Header Details== +**Détails de l'en-tête** -The first row of an image buffer that will be used as a font contains the header information for your font, on a byte by byte basis (remember that the first row of pixels are going to be the first byes since it's stored in row->column). +La première ligne du tampon d'image qui sera utilisée comme une police contient les informations d'en-tête de votre police, sur la base d'un octet par octet (rappelez-vous que la première rangée de pixels correspond aux premiers octets car il sont stockés dans ligne -> colonne). -The very first byte tells us what version of the header we're using. Currently, only 0 is supported, as only one header version has been released. The second byte tells us the first character supported in our font, and the third byte tells us the last. +Le tout premier octet nous dit quelle version de l'en-tête que nous utilisons. Actuellement, seul 0 est pris en charge, car une seule version en-tête est autorisée. Le deuxième octet nous indique le premier caractère pris en charge dans notre police et le troisième octet nous indique le dernier. -0; Byte; Header Version -1; Byte; First Character Supported -2; Byte; Last Character Supported -3 to (3 + ""LastChar - FirstChar""); Byte; Width of each Character in our font. +0; Octet; Version de l'en-tête +1; Octet; Premier caractère supporté +2; Octet; Dernier caractère supporté +3 à (3 + DernierCaractère - PremierCaractère); Octet; Largeur de chaque caractère dans notre police. -==Creating a Font Buffer== +**Création d'une zone tampon de police** -If you had a font that supported character 37 as the first, and character 200 as the last, your bytes would contain: +Si vous aviez une police de caractères dont le premier est le caractère 37 et le dernier le caractère 200, vos octets devraient contenir: -0 for the header version. It's the current only version supported. -37 for the first character supported. -200 for the last character supported. -94 bytes containing the widths of each character. +0 pour la version en-tête. C'est la version actuelle uniquement pris en charge. +37 pour le premier caractère pris en charge. +200 pour le dernier caractère pris en charge. +94 octets contenant les largeurs de chaque caractère. -Since the first row is taken up for header data, the font buffer will be an image buffer whose height is the font height plus one. That is, if you have a font height of 8, you need a buffer height of 9. You'll be putting the font in the second row of your buffer, rather than the first as you usually would. +Puisque la première ligne est prise pour les données d'en-tête, le tampon de la police sera un tampon d'image dont la hauteur est la hauteur de la police, plus un. Donc, si vous avez une hauteur de police de 8, vous avez besoin d'une hauteur du tampon de 9. Vous mettrez la police dans la deuxième rangée de votre tampon, plutôt que la première comme vous le feriez habituellement. -Here's an example (""Example3.bas""), which creates a font buffer. It only creates it and assigns header data right now, not the actual font: +Voici un exemple (Exemple3.bas) qui crée une zone tampon de police. Il ne crée qu'elle et affecte seulement les données d'en-tête, pas la police effective: %%(freebasic) '' The first supported character @@ -208,7 +208,7 @@ Const LastChar = 190 Const NumChar = (LastChar - FirstChar) + 1 %% -These constants help us. It makes the code cleaner and faster. +Ces constantes nous aident. Elles rendent le code plus propre et plus rapide. %%(freebasic) @@ -217,7 +217,7 @@ These constants help us. It makes the code cleaner and faster. Dim as FB.Image ptr myFont = ImageCreate( ( NumChar * 8 ), 8 + 1 ) %% -Create our font buffer. Remember, we need to add horizontal space for each character in the font (8 pixels wide). We also need to add an extra row for our font header information. +Créer notre buffer de police. Rappelez-vous, nous avons besoin d'ajouter un espace horizontal pour chaque caractère dans la police (8 pixels de large). Nous avons aussi besoin d'ajouter une rangée supplémentaire pour notre information d'en-tête de police. %%(freebasic) @@ -226,7 +226,7 @@ Create our font buffer. Remember, we need to add horizontal space for each char Dim as uByte ptr myHeader = cast(uByte ptr, myFont ) %% -Get the exact, casted, and having no warnings address of our font buffer. The header goes on a byte by byte basis, so we can't work on this with an ##fb.Image## type. +Nous obtenons notre buffer de police, exact, dans le bon format et n'ayant pas d'avertissements concernant les adresses. L'en-tête est sur une base d'un octet pour un octet, donc nous ne pouvons pas travailler sur lui avec un type ##fb.Image##. %%(freebasic) @@ -239,7 +239,7 @@ myHeader[1] = FirstChar myHeader[2] = LastChar %% -Assign the header information described above, into the first three bytes. The header version, the first supported character, and the last supported character. +Attribuons à l'en-tête les informations décrites ci-dessus, dans les trois premiers octets. La version d'en-tête, le premier caractère et le dernier caractère pris en charge. %%(freebasic) @@ -250,7 +250,7 @@ For DoVar as Integer = 0 to NumChar - 1 Next %% -Each character in our font can have its own width, so we have to assign these. The ##3 +## skips the header information. ""##DoVar##"" starts at 0, so the first time it runs through that code, we'll be at index 3. Give all supported characters a width of 8. +Chaque caractère de notre police peut avoir sa propre largeur, nous devons donc les affecter. Le ##3 +## saute les information d'en-tête. ##DoVar## commence à 0, donc la première fois qu'il utilise ce code, nous sommes à l'indice 3. Donnant à tous les caractères pris en charge une largeur de 8. %%(freebasic) @@ -258,13 +258,13 @@ Each character in our font can have its own width, so we have to assign these. ImageDestroy( myFont ) %% -Just reminding you :D +Juste pour vous rappeler -==Assigning Font Characters== +**Affectation des caractères de la police** -This is fairly simple. We'll use ''FreeBASIC'''s default font to draw onto our buffer. Remember to draw starting at column 1, rather than column 0, as the very first column is reserved for header data. Start the character you're drawing at your first supported character, and give it the color you want. Be warned, you can't have custom colors when drawing your font. When you add a character to our buffer, it's stuck the color you draw it as! See the tips & tricks section on how to get around this, however. +C'est assez simple. Nous allons utiliser la police par défaut de FreeBASIC pour la dessiner sur notre tampon. N'oubliez pas que les dessins commencent à la colonne 1, non pas la colonne 0, parce que la toute première colonne est réservée pour les données d'en-tête. Démarrer en dessinant d'abord le premier caractère supporté et donnez-lui la couleur que vous voulez. Attention, vous ne pouvez pas avoir de couleur personnalisée lors de l'élaboration de votre de police. Lorsque vous ajoutez un caractère à votre buffer, sa couleur est bloquée définitivement sur celle qui est utilisée pour le dessiner! Voir la section "Conseils et astuces" pour contourner ce problème. -Here's the modified code (""Example4.bas""), where we'll add the font drawing via FreeBASIC's default font onto our buffer. +Voici le code modifié (Exemple4.bas), où nous allons ajouter le dessin de la police via la police FreeBASIC par défaut dans notre tampon. %%(freebasic) '' NEW!!! @@ -272,21 +272,21 @@ Here's the modified code (""Example4.bas""), where we'll add the font drawing vi Dim as uByte CurChar %% -Just to have a quick index of the current ASCII character we're drawing onto our font. +Juste pour avoir un indice rapide du caractère ASCII courant on dessine sur notre police. %%(freebasic) Draw String myFont, ( DoVar * 8, 1 ), chr(CurChar), rgb(rnd * 255, rnd * 255, rnd * 255) %% -Skip the first row of our image buffer, as that contains font buffer information. Draw our font using FBgfx's font as our custom font. Fill it with a random color. You should note that we're drawing right into our buffer, with "##Draw String myFont##...". +Sautez la première ligne du tampon image, car elle contient des informations sur la police. Utilisez la police police FBgfx pour dessiner notre police personnalisée. Remplissez-la avec une couleur aléatoire. Notez que nous avons dessiné dans le tampon, avec "##Draw String myFont##...". %%(freebasic) Print chr(CurChar); %% -Just for clarity, so you can see the characters we're drawing into the buffer. +Pour plus de clarté seulement, de façon à voir le dessin des caractères que nous avons mis dans le tampon. %%(freebasic) @@ -296,15 +296,15 @@ Draw String (0, 88), "HOW ARE ya DOIN Today?! YA DOIN FINE?!", , myFont sleep %% -Test out our new font. Of course, it's the same one we're used to. You could have created your own from your own custom font buffer somewhere. +Testez notre nouvelle police. Bien sûr, c'est la même que celle à laquelle nous sommes habitués. Vous pourriez avoir créé la vôtre à partir du tampon de votre propre police personnalisée. -===Tips & Tricks=== +
    Trucs & astuces -==Coloring Your Custom Fonts== +**Colorisation de vos polices personnalisées** -Alright, so by now you have realized that once you color a custom font, you can't use ##[[KeyPgDrawString Draw String]]## to change that color. Well, no fear, we can get around that (""CustFontCol.bas""). It might be a bit slow, however. +Bon, maintenant que vous avez réalisé qu'une fois que vous colorisez une police personnalisée, vous ne pouvez pas utiliser ##[[KeyPgDrawString Draw String]]## pour changer cette couleur. Eh bien, aucune crainte, nous pouvons contourner cela (CustFontCol.bas). Cependant, cela pourrait être un peu lent. -We can create a font object, which has a function to return a font buffer. What the code does is it redraws the font buffer every time we change color, and returns the font buffer stored in the object. This *could* in theory be sped up if we knew the range of characters to redraw, so we could only redraw from the lowest to the highest. Figuring out that range in itself, could also be slow. +Nous pouvons créer un objet police, contenant une fonction qui retourne un tampon police. Que fait ce code? il redessine le tampon de la police chaque fois que nous changeons de couleur et renvoie le tampon de la police stockée dans l'objet. Cela *pourrait* théoriquement être accéléré si l'on connaissait la gamme des caractères à redessiner, alors nous pourrions redessiner que ceux-là du plus bas au plus élevé. Mais déterminer cela, pourrait aussi être très lent. %%(freebasic) #include "fbgfx.bi" @@ -426,9 +426,9 @@ Scope End Scope %% -==""ScrPtr vs ImgBuf""== +**ScrPtr vs ImgBuf** -Comparison of how to draw onto image buffer pixels, versus how to draw on the screen's buffer (""ScrPtr vs ImgBuf.bas""): +Comparaison sur comment dessiner des pixels dans le tampon d'image, par rapport à comment dessiner sur le tampon de l'écran (ScrPtr vs ImgBuf.bas): %%(freebasic) #include "fbgfx.bi" @@ -497,7 +497,7 @@ sleep cast(ubyte ptr, mybuff) + Y * Pitch + X * Bpp Every Y contains PITCH number of bytes. In order to reach your new Y, you - have to skip an entire row. + have to skip an entire row. It should be safe to do the pointer arithmetic in cases where the pointer's data type is not one byte long, so you may find it easier to use a pointer type to @@ -507,4 +507,4 @@ sleep size. And, obviously, so will the BPP, which will just cancel to 1 :D '/ -%% \ No newline at end of file +## \ No newline at end of file diff --git a/fbdocs/manual/cache/TutFunctionOverloading.wakka b/fbdocs/manual/cache/TutFunctionOverloading.wakka index b913e01c1d..250717a24f 100644 --- a/fbdocs/manual/cache/TutFunctionOverloading.wakka +++ b/fbdocs/manual/cache/TutFunctionOverloading.wakka @@ -1,94 +1,94 @@ {{fbdoc item="title" value="Function Overloading"}}---- -//written by [[LaananFisher :stylin:]]// +//Ecrit par [[LaananFisher :stylin:]]// ----- +
    Qu'est-ce que c'est? -====What is It?==== +La surcharge de fonction est aussi près que vous pouvez venir à la programmation générique sans avoir de modèles. En programmation fonctionnelle (ou modulaire), l'accent est mis sur la valeur, tandis que dans la programmation générique, l'accent est mis sur le //type//. Des fonctions similaires sont appelées en fonction du type de l'argument passé. La surcharge de fonction est un pas de côté dans la programmation générique, permettant à un identifiant de fonction d'être associé à une variété de fonctions qui fonctionnent avec une variété de types différents - et de le rendre totalement transparent pour le client (vous). -Function overloading is as close as you can come to generic programming without having templates. In functional (or modular) programming, the emphasis is on value, while in generic programming, the emphasis is on //type//. Similar functions are called based on the type of the argument passed. Function overloading is a side-step into generic programming, allowing a function identifier to be associated with a variety of functions that work with a variety of different types - and making it all transparent to the client (you). - -Simply put, function overloading involves defining functions that have the same name, but different //signatures//. A function's signature is a combination of all the information needed to correctly reference the function, and includes the function's parameter list and return type. These are what we redefine, or overload. Let's start off with a small example. Say we need functions that output the string respresentation of a number. We simply write: - +Autrement dit, la surcharge de fonction consiste à définir des fonctions qui ont le même nom, mais des //signatures// différentes. La signature d'une fonction est une combinaison de toutes les informations nécessaires pour référencer correctement la fonction et inclut la liste des paramètres de la fonction et le type de retour. Ceci est ce que nous redéfinissons, ou de surchargeons. Commençons avec un petit exemple. Supposons que nous avons besoin de fonctions affichant la chaîne représentatant un certain nombre. Nous écrivons tout simplement: ##%%(freebasic) -option explicit '' force explicit declaration of variables -option byval '' default passing convention as by value + +Option Explicit '' force explicit declaration of variables +Option ByVal '' default passing convention as by value '' to declare functions with similar functionality but that accept different argument types, -'' we 'simply' create new function names :( -declare function print_byte( as byte ) '' outputs a stringified byte -declare function print_short( as short ) '' outputs a stringified short -dim as byte b = 102 -dim as short s = 10240 +'' we 'simply' create new function names :( +Declare Function print_byte( As Byte ) '' outputs a stringified byte +Declare Function print_short( As Short ) '' outputs a stringified short +Dim As Byte b = 102 +Dim As Short s = 10240 print_byte( b ) -print_short( s ) -sleep : end 0 +print_short( s ) +Sleep : End 0 '' function definitions squished for brevity - don't do this outside a space-constrained tutorial ;} -function print_byte( n as byte ) : print str( n ) : return : end function -function print_short( n as short ) : print str( n ) : return : end function -%%## ----- +Function print_byte( n As Byte ) : Print Str( n ) : Return : End Function +Function print_short( n As Short ) : Print Str( n ) : Return : End Function +%% +## -====What Does It Do For Me?==== +
    Que fait-elle pour moi? +Le problème ici est que non seulement nous avons deux signatures de fonction différentes, mais nous avons deux //identifiants// de fonction différents, ainsi, nous - et non le compilateur - devons nous souvenir d'appeler la fonction convenable. Comme vous l'imaginez peut-être, cela peut être assez déroutant si vous décidez que vous voulez manipuler des INTEGER, SINGLE et DOUBLE. De plus, pour être complet, vous pouvez avoir des fonctions qui acceptent à la fois les versions signées et non signées de chacun de ces cas. De toute évidence, vous allez avoir une sorte de nommage de configuration système à faire pour rendre ceci plus facile pour vous-même. Et, bien sûr, vous aurez envie de manipuler aussi vos propres types, et - oh, attendez, nous avons oublié les pointeurs. OK, maintenant vous aurez besoin de doubler la liste des noms de fonction, vous devez non seulement trouver ces noms, mais aussi essayer de vous en souvenir quand vous écrirez le code qui utilisera ces fonctions. Et puis, après tout, vous avez les conversions implicites disponibles / imposées à vous, et le compilateur se fera un plaisir de vous laisser glisser un DOUBLE dans votre fonction "print_integer" - woops! Bug-ville, nous voilà! Il doit sûrement y avoir une meilleure méthode? -The problem here is that not only do we have two different function signatures, but we have two different function //identifiers// as well; we - not the compiler - have to remember both in order to call the right function. As you may be able to imagine, this can be pretty confusing if you decide you want to support INTEGERs, SINGLEs and DOUBLEs as well. Plus, for completeness, you may want to have functions that accept both the signed and unsigned versions of each of these. Clearly, you're going to have some kind of naming-scheme setup to make this easier on yourself. And, of course you'll want to support your own TYPEs as well, and - oh wait, we forgot about pointers. OK, now you'll need to double the list of function names you not only need to come up with, but also try and remember when you're actually writing code that uses these functions. Since, after all, you do have implicit conversions available to/forced upon you, and the compiler will happily let you slip a DOUBLE in to your print_integer function - woops! Bug-city, here we come! Surely there must be a better way? - -There is, and don't call me Shirley. I mentioned before that the compiler uses two primary components to establish a function signature: the parameter list and the return type. I also mentioned that through overloading, we can define multiple functions with different signatures, and still keep the same function name for all of them. You may be thinking this is our way out of our dilema, convoluted name space and all. Well, you're right - check this out: +Ceci étant, ne m'appelez pas Shirley. J'ai déjà mentionné que le compilateur utilise deux composants principaux pour établir une signature de fonction: la liste des paramètres et le type de retour. J'ai aussi mentionné que grâce à la surcharge, on peut définir des fonctions multiples avec des signatures différentes, en gardant toujours le même nom de fonction pour chacun d'elles. Vous pouvez penser que c'est notre moyen de sortir de notre dilemme, espace de nom alambiqué et autres. Eh bien, vous avez raison - jetez un oeil sur ceci: ##%%(freebasic) -option explicit '' force explicit declaration of variables -option byval '' default passing convention as by value + +Option Explicit '' force explicit declaration of variables +Option ByVal '' default passing convention as by value '' to overload function print_numeric that we can redefine to accept different argument -'' types while keeping the name intact, we use the OVERLOAD keyword on our intial function: -declare function print_numeric overload( as byte ) '' outputs a stringified byte -declare function print_numeric( as short ) '' outputs a stringified short -declare function print_numeric( as integer ) '' outputs a stringified integer -declare function print_numeric( as longint ) '' outputs a stringified longint +'' types while keeping the name intact, we use the OVERLOAD keyword on our intial function: +Declare Function print_numeric Overload( As Byte ) '' outputs a stringified byte +Declare Function print_numeric( As Short ) '' outputs a stringified short +Declare Function print_numeric( As Integer ) '' outputs a stringified integer +Declare Function print_numeric( As LongInt ) '' outputs a stringified longint '' define some variables -dim as byte b = 102 -dim as short s = 10240 -dim as integer i = 1024000000 -dim as longint li = 1024000000000000000 +Dim As Byte b = 102 +Dim As Short s = 10240 +Dim As Integer i = 1024000000 +Dim As LongInt li = 1024000000000000000 '' enter the wonderful world of function overloading :) + print_numeric( b ) print_numeric( s ) print_numeric( i ) print_numeric( li ) - -sleep : end 0 +Sleep : End 0 '' define our function overloads -function print_numeric( n as byte ) : print str( n ) : return : end function -function print_numeric( n as short ) : print str( n ) : return : end function -function print_numeric( n as integer ) : print str( n ) : return : end function -function print_numeric( n as longint ) : print str( n ) : return : end function -%%## ----- +Function print_numeric( n As Byte ) : Print Str( n ) : Return : End Function +Function print_numeric( n As Short ) : Print Str( n ) : Return : End Function +Function print_numeric( n As Integer ) : Print Str( n ) : Return : End Function +Function print_numeric( n As LongInt ) : Print Str( n ) : Return : End Function +%% +## + +
    Qu'est-ce que cela signifie? -====What does It Mean?==== +Une chose qui devrait se remarquer d'emblée est de voir comment il est incroyablement facile de faire cela. Cela peut sembler étrange compte tenu de la liberté, la flexibilité et la sécurité de type, qui s'offre à vous, mais là encore les constructions de niveau le plus élevé sont comme ça. En un mot, en utiliser des méthodes comme celle-ci ne rendra pas seulement de votre vie beaucoup plus facile, mais vous passerez moins de temps dans le débogage et c'est une bonne chose, peu importe le type de code que vous écriviez. -One thing that should stand out right away is how incredibly easy it is to do this. That might seem strange considering the freedom, flexibility and //type-safety// if offers you, but then again most higher-level constructs are like that. In a nutshell, using methods like this will not only make your life a whole lot easier, but you'll be spending less time debugging, and that's a good thing no matter what kind of code you write. +Cela signifie //flexibilité//. La surcharge de fonction offre la possibilité d'ajouter plus de fonctionnalités (print_numeric( f as fraction)) tout en gardant intact votre code actuel. Votre code ne casse pas parce que vous voulez soutenir l'impression de la représentation numérique d'un mouchoir, d'une armure ou de tout autre chose. Vous pourriez maintenant penser que le code ci-dessus n'est pas si trivial que ça et que ce qui semble très simple - parce que ça l'est - est vraiment le fondement de l'écriture d'un meilleur code. Et vous auriez raison. -It means //flexibility//. Function overloading offers the ability to add more features ( print_numeric( f as fraction) ) while still keeping your current code intact. Your code doesn't break because you want to support printing the numeric representation of a handkerchief, or armor, or whatever else. You may now be thinking that the above code is not so trivial anymore, and that what seems really simple - because it is - is really the foundation of writing better code. You'd be right. +Cela signifie //maintenabilité//: Donc, vous avez vos 80 fonctions d'écriture_d'un_certain_nom_que_vous_devez_vérifier_chaque_fois_que_vous_en_avez_besoin_pour_l'écriture_ou_le_débogage. Tout est grand dans votre petit monde tortueux et d'auto-dégoût. Qu'est-ce qui se passe quand quelque chose doit changer? Si seulement une de ces fonctions doit changer, BAM! Un cauchemar de maintenance. Vous allez avoir à rechercher dans l'ensemble code de base pour être //complètement// sûr que vous n'avez pas raté une fonction ici ou là; triste façon de passer un samedi soir, mon ami. -It means //maintainability//: So you've got your 80 functions of print_some_long_name_you_need_to_look_up_everytime_you_want_to_use_it written and debugged. Everything's great in your little torturous, self-loathing world. What happens when something needs to change? Even if only 1 of those functions needs to change, BAM! A maintenence nightmare. You're going to have to search the entire code-base to be //completely// sure you haven't missed a function here or there; sad way to spend a Saturday night, my friend. +Cela signifie //sécurité//: Vous pouvez remarquer que j'utilise deux options dans ces exemples: [[KeyPgOptionexplicit Option Explicit]] et [[KeyPgOptionbyval Option ByVal]]. Je suis fort sur la sécurité, et je le suis encore plus en demandant au compilateur de surveiller mes arrières. J'utilise ceci parce que c'est plus sûr et je vais demander toute la sécurité que je peux obtenir. La surcharge de fonction met également en sécurité - sécurité contre le mal (lire: accidentelle) les conversions implicites. Considérez que nous sommes réellement en mesure de retourner, à partir de ces fonctions, une valeur qui repose sur l'argument que nous lui passons. Comme précédemment, si un double a été autorisé à être tronquer à notre insu, cela signifie que de nombreux comprimés d'Excedrin essaieront de faire disparaître les maux de tête débogage. C'est tout au sujet de la chose de sécurité de type, quelque chose qui force certains à se moquer de C//pp//. -It means //safety//: You may notice that I utilize two OPTIONs in these examples: [[KeyPgOptionexplicit OPTION EXPLICIT]] and [[KeyPgOptionbyval OPTION BYVAL]]. I'm big on safety, and I'm even bigger on having the compiler watch my back for me. I use these because it is safer to, and I'll take all the safety I can get. Function overloading also affords you safety - safety against evil (read: accidental) implicit conversions. Consider if we were actually returning a value from these functions that was dependent on the argument we passed to it. As above, if a double were allowed to get truncated without our knowledge, that spells many pills of excedrin trying to make that debugging headache go away. It's all about the type-safety, something which cause many to scoff at C//pp//. +
    Conclusion ----- +J'espère que vous avez appris au moins les rudiments de la surcharge de fonction (puisque c'est tout ce que je couvert). Et j'espère que vous commencez à penser à des thèmes que j'ai soulevé, si ce n'était pas le cas auparavant. La prochaine fois je discuterai des fonctions surchargées avec différents nombres de paramètres, différents types de retour, ainsi que des joies et des pièges des deux. Restez à l'écoute. ====Wrapping Up==== diff --git a/fbdocs/manual/cache/TutGettingStartedQB.wakka b/fbdocs/manual/cache/TutGettingStartedQB.wakka index 1a9c8a403c..c267c2a868 100644 --- a/fbdocs/manual/cache/TutGettingStartedQB.wakka +++ b/fbdocs/manual/cache/TutGettingStartedQB.wakka @@ -1,41 +1,41 @@ {{fbdoc item="title" value="Getting Started"}}---- -This is a good introduction to FB for QBasic programmers, based on SJ Zero's tutorial. +C'est une bonne introduction à FB pour les programmeurs QBasic, sur la base d'un tutoriel de SJ Zero. -==Getting started with the software== +**Pour commencer avec le logiciel** -You can download FreeBASIC here: [[http://www.freebasic.net/index.php/download]] -And FBIDE here: [[http://fbide.sourceforge.net/]] +Vous pouvez télécharger FreeBASIC ici: http://www.freebasic.net/index.php/download +Et FBIDE ici: http://fbide.sourceforge.net/ -When installing FBIDE, select "FBIDE only," to not install the old version of FB included in that package. -When running FBIDE the first time, you will have to browse to find the FB compiler on your computer. +Lors de l'installation de FBIDE, sélectionnez "FBIDE only," pour ne pas installer l'ancienne version de FB incluse dans ce paquet. +Lors de l'exécution FBIDE la première fois, vous aurez à parcourir les répertoires (browse) pour trouver le compilateur FB sur votre ordinateur. -==Hello World!== +**Hello World!** -Open up FBIDE and type the following: +Ouvrez FBIDE et tapez la commande suivante: %% - PRINT "Hello World!" + PRINT "Bonjour le monde!" SLEEP %% -Now press F5. Congratulations, you've just seen how much like QB FreeBASIC really is. Now you can use most console commands for QB just like you remember. For example: +Maintenant, appuyez sur F5. Félicitations, vous venez de voir comment FreeBasic est vraiment tout comme QB FreeBasic. Maintenant, vous pouvez utiliser la plupart des commandes de la console pour QB comme vous vous en souvenez. Par exemple: %% LOCATE 10,10 - PRINT "I'm the center of the universe!" + PRINT "Je suis le centre de l'univers!" SLEEP %% -==The Amazing Screen 13== +**L'extraordinaire Screen 13** -Now, put "SCREEN 13" before your code, to see how easy it is to use graphics modes: +Maintenant, mettez "SCREEN 13" avant votre code, pour voir combien il est facile d'utiliser les modes graphiques: %% SCREEN 13 PRINT "Hello World!" SLEEP %% -From there, all of the standard QB graphics commands work as you remember, as you can see in this example: +A partir de là, toutes les commandes graphiques standard fonctionnent, comme vous pouvez le voir dans cet exemple: %% SCREEN 13 @@ -47,7 +47,7 @@ From there, all of the standard QB graphics commands work as you remember, as yo SLEEP %% -FreeBASIC also has new graphics features. For example, QB has never had a screen 14 or greater. Try running this program: +FreeBasic a également de nouvelles fonctionnalités graphiques. Par exemple, QB n'a jamais eu de SCREEN 14 ou plus. Essayez de lancer ce programme: %% SCREEN 15 LINE (1,1)-(100,100),1,bf @@ -58,9 +58,9 @@ FreeBASIC also has new graphics features. For example, QB has never had a screen SLEEP %% -After opening a graphics window via the SCREEN command, you can also hit ALT-ENTER to change between windowed and fullscreen modes. +Après l'ouverture d'une fenêtre graphique via la commande SCREEN, vous pouvez également appuyer sur ALT-ENTRER pour changer du mode fenêtré et au mode plein écran. -Another nice feature of the graphics library in FreeBASIC is that you can do page flipping in any video mode. The following code demonstrates this. +Une autre fonctionnalité intéressante de la bibliothèque graphique dans FreeBasic est que vous pouvez faire un changement de page dans n'importe quel mode vidéo. Le code suivant illustre cela. %% DIM as integer page @@ -78,7 +78,7 @@ Another nice feature of the graphics library in FreeBASIC is that you can do pag SCREENSET page, notpage 'This flips the page CLS 'First we clear the screen - b = b + 1 + b = b + 1 IF b > 100 THEN b = 0 FOR a = 1 TO 128 PSET (b,a),a 'Then we draw a line. It moves without flickering. @@ -87,22 +87,22 @@ Another nice feature of the graphics library in FreeBASIC is that you can do pag LOOP UNTIL INKEY = CHR(27) %% -This works for any mode, so you can use the high resolution modes for your programs with page flipping, using standard QB graphics commands! +Ceci fonctionne pour n'importe quel mode, vous pouvez donc utiliser les modes à haute résolution pour vos programmes avec le changement de page, en utilisant des commandes graphiques QB! -==Why ASM is No Longer Required== +**Pourquoi ASM n'est plus nécessaire** -I wouldn't be saying this if it wasn't true. Using ASM in BASIC to increase the functionality of your program is no longer necessary. Ignoring SDL, Allegro, DirectX, OpenGL, et. al. for a minute, you've got the above page flipping and advanced graphics modes at your disposal, as well as Inkey, which we've all grown to love or hate, but there are also two new input commands which do things QBers have had to resort to assembly code to do since the dawn of time: +Je n'aurais pas dit cela si ce n'était pas vrai. Utilisation d' ASM dans BASIC pour augmenter la fonctionnalité de votre programme n'est plus nécessaire. Ignorant SDL, Allegro, DirectX, OpenGL, etc... pour une minute, vous avez le changement de page et des modes graphiques avancés à votre disposition, ainsi que Inkey, que nous avons tous appris à aimer ou détester, mais il y a également deux commandes d'entrée nouvelles qui font des choses pour lesquelles les utilisateurs de QB devaient recourir à du code assembleur, depuis la nuit des temps: %% DIM as integer x, y, buttons CONST as integer escapeKey = 1 SCREEN 12 - WHILE NOT MULTIKEY(escapeKey) 'this checks the escape key every frame - GETMOUSE x, y, , buttons 'This gets the mouse state - PRINT x,y,buttons + WHILE NOT MULTIKEY(escapeKey) 'Cela vérifie la touche d'échappement chaque passage + GETMOUSE x, y, , buttons 'Ceci obtient l'état de la souris + PRINT x,y,buttons WEND %% -With this knowlege, you should be able to begin programming in FreeBASIC, with all the perks that it entails; Speed, power, and portability! +Avec cette connaissance, vous devriez être en mesure de commencer la programmation dans FreeBASIC, avec tous les avantages que cela comporte. Vitesse, puissance et la portabilité! diff --git a/fbdocs/manual/cache/TutHowToProgGame1.wakka b/fbdocs/manual/cache/TutHowToProgGame1.wakka index bcbf785d7b..773e598cfb 100644 --- a/fbdocs/manual/cache/TutHowToProgGame1.wakka +++ b/fbdocs/manual/cache/TutHowToProgGame1.wakka @@ -1,39 +1,39 @@ -{{fbdoc item="title" value="How to Program a Game: Lesson 1"}} +{{fbdoc item="title" value="How to Program a Game: Lesson 1"}}---- -{{fbdoc item="section" value="Introduction by Lachie Dazdarian"}} -The objective of this series of lessons is to help newbies who know very little of BASIC to learn the basics of programming in FreeBASIC necessary to create any computer game. Some elementary BASIC knowledge would help a lot, though I believe that people who don't know BASIC at all should comprehend these lessons too. I'm using here the word (well, it's an acronym) "BASIC" and not FreeBASIC, because if you know the basics of QuickBASIC, Visual BASIC or any other variant of BASIC, these lessons should be easy to comprehend. +**Introduction par Lachie Dazdarian** +L'objectif de cette série de leçons est d'aider les débutants qui connaissent un peu le BASIC, à apprendre les bases de la programmation en FreeBASIC nécessaires pour créer un jeu sur ordinateur. Quelues connaissances de base du BASIC seront très utiles pour faciliter les choses, cependant je crois que ceux qui ne connaissent pas le BASIC à fond peuvent quand même comprendre ces leçons. J'utilise ici le mot (enfin, c'est un acronyme) "BASIC" et non pas FreeBASIC, parce que si vous connaissez les bases de QuickBASIC, Visual Basic ou toute autre variante de Basic, ces leçons doivent être faciles à comprendre. -I'm starting this series because I feel that tutorials of this kind were always something what our community was lacking, even before FreeBASIC. I've corresponded during my programming lifetime with quite few programming newbies, and they all had almost identical problems when trying to program a game. So I think I'm able to detect what beginners need quite well and on what way the stuff needs to be explained to them. I also remember my beginnings and the problems I had with using separated routines that were never meant to be combined and used to create a game. The breaking point for me was the moment when I discovered RelLib (a QuickBASIC graphics library by R.E.Lope) and the scrolling engine that was created with it. That scrolling engine motivated me to explore its mechanics and expand on it (with some help from R.E.Lope). In one single moment I acquired the ability to program most of the stuff (necessary to complete a game) by myself. It's like driving a bike. The moment when you acquire the actual skill lasts for one second. +Je commence cette série parce que je pense que des tutoriels de ce genre ont toujours été quelque chose qui a manqué à notre communauté, même avant FreeBASIC. J'ai correspondu durant ma vie de programmeur avec quelques novices en programmation et ils ont toujours eu à peu près les mêmes problèmes quand ils ont essayé de programmer un jeu. Donc, je pense que je suis capable de détecter ce dont les débutants ont besoin et de quelle façon les choses doivent leur être expliquées. Je me souviens aussi de mes débuts et des problèmes que j'ai eus avec l'aide des routines séparées qui n'ont jamais été destinées à être combinées et utilisées pour créer un jeu. Le point de rupture a été pour moi le moment où j'ai découvert RelLib (une bibliothèque graphique en QuickBASIC par R.E.Lope) et le moteur de défilement qui a été créé avec elle. Ce moteur de défilement m'a incité à explorer ses mécaniciens et à le développer (avec une certaine aide de R.E.Lope). En un seul instant j'ai acquis la capacité de programmer la plupart des choses (nécessaires pour compléter un jeu) tout seul. C'est comme conduire un vélo. Le moment où vous avez acquis la compétence réelle a duré une seconde. -So that's my goal with this series. To learn you enough so you would be self-sufficient in 90% of cases. And the best way to learn new things is to see them applied. Many tutorials fail in this by being too generic. You will always need help from more expert programmers, but the point is that you don't need it on every step. Have in mind that this depends on the type of game you are developing and the graphics library / tools you are using. +Donc, c'est mon objectif avec cette série. Pour vous en apprendre suffisamment pour que vous soyez auto-suffisant dans 90% des cas. Et la meilleure façon d'apprendre de nouvelles choses est de les voir appliquées. De nombreux tutoriels échouent dans cette tâche car trop génériques. Vous aurez toujours besoin d'aide de programmeurs plus expérimentés, mais l'idée est que vous n'en avez pas besoin à chaque étape. Ayez à l'esprit que cela dépend du type de jeu que vous développez et la bibliothèque graphique / outils que vous utilisez. -The example programs and mini-games we'll create will be coded in GFXlib (the FreeBASIC's built-in graphics library). Lynn's Legacy, ArKade, Mighty Line and Poxie were coded in it (among many others), and I think those games are good references. But don't worry. Switching from one graphics library to another is relatively easy when you know how to code in at least one. +Les programmes d'exemple et de mini-jeux que nous allons créer seront codés en GFXlib (la bibliothèque graphique intégrée de FreeBASIC). Lynn Legacy, Arkade, Line Puissant et Poxie ont été codées avec elle (entre autres) et je pense que ces jeux sont de bonnes références. Mais ne vous inquiétez pas. Passer d'une librairie graphique à l'autre est relativement facile quand on sait comment en utiliserer au moins une. -This tutorial will not deal with raycasting engines (3D programming) or something "advance" like that. If you want that but are a beginner, you NEED the following lessons FIRST. +Ce tutoriel ne traitera pas des moteurs "raycasting" (programmation 3D) ou quelque chose d'"avancé" de ce genre. Si vous voulez utiliser cela, mais n'êtes qu'un débutant, vous avez BESOIN des leçons suivantes EN PREMIER. -Since we are going to code in FreeBASIC you need to get FreeBASIC first (if you don't have it yet) from http://www.freebasic.net (the examples were compiled with version 0.18b), and one of the FreeBASIC IDEs available. I recommend FBIDE or FBEdit. +Puisque nous allons coder en FreeBASIC vous avez besoin en premier FreeBASIC (si vous ne l'avez pas encore) à partir de http://www.freebasic.net (les exemples ont été compilés avec la version 0.18b) et l'un des IDE FreeBASIC disponibles. Je recommande FBIDE ou FBEdit. -{{fbdoc item="section" value="Example #1: A simple program - The circle moves!"}} +**Exemple #1: Un programme simple - Le cercle se déplace!** -We'll start with some elementary stuff. The first program we'll code will not feature external graphics, because loading graphics from external files (usually BMP images) is always a dirty business and will confuse you at this point. Trust me on this. Be patient. +Nous allons commencer avec des trucs élémentaires. Le premier programme que nous allons le coder n'aura pas d'éléments graphiques externes, car le chargement des graphiques à partir des fichiers externes (généralement des images BMP) est toujours une affaire compliquée et vous embrouillera pour un début. Croyez-moi. Soyez patient. -The program we'll create will allow you to move a circle around the screen. A very simple program, but through making it we'll learn important facts and a lot of elementary statements and methods necessary to create any game with GFXlib. +Le programme que nous allons créer va vous permettre de déplacer un cercle autour de l'écran. Un programme très simple, mais à travers lui, nous allons apprendre des notions importantes, beaucoup de déclarations élémentaires et méthodes nécessaires pour créer n'importe quel jeu avec GFXlib. -As we are using GFXlib you need to be aware of the gfxlib.txt file(GFXlib's documentation) placed in the /FreeBASIC/docs directory. That's our Bible and very useful with these lessons since I will not explain every parameter of every statement used in the example programs (most likely). This document is somewhat outdated as FreeBASIC moved on with new versions, so be sure to refer to this online FreeBASIC manual too (part of the FreeBASIC Wiki). +Comme nous utilisons GFXlib vous devez être au courant du fichier gfxlib.txt (documentation GFXlib) situé dans le répertoire /FreeBASIC/docs. C'est notre bible et il très utile pour ces leçons puisque je ne vais pas expliquer tous les paramètres de chaque déclaration utilisée dans les programmes d'exemple (le plus probable). Ce document est quelque peu dépassé depuis que FreeBASIC a évolué avec les nouvelles versions, donc n'oubliez pas de consulter aussi le manuel en ligne du FreeBASIC (partie du Wiki FreeBASIC). -Open a new program in FBIDE. First thing we'll do is set the graphic mode. What's setting a graphic mode? Choosing the program's graphic resolution and color depth in bits (8-bit, 16-bit, ...). For example, 8-bit color depth is the standard 256 colors mode (8 bits per pixel). The graphic mode is set with the SCREEN statement like this: +Ouvrez un nouveau programme dans FBIDE. La première chose que nous allons faire est de définir le mode graphique. Quoi? Fixer un mode graphique? Choix de la résolution graphique du programme et de la profondeur des couleurs en bits (8 bits, 16 bits, ...). Par exemple, la profondeur de couleur 8 bits est le standard en mode 256 couleurs (8 bits par pixel). Le mode graphique est réglé avec la déclaration écran suivante: %%(freebasic) SCREEN 13,8,2,0 %% -13 means 320*200 graphic resolution, 8 means 8-bit graphics, 2 means two work pages, and 0 means window mode (input 1 for full screen mode). Minimum of 2 work pages is recommended for any graphics dependant program. These things will become clearer a little bit later. For more details about the SCREEN statement refer to GFXlib's documentation or FreeBASIC Wiki (a more "advanced" version of the SCREEN statement is SCREENRES). +13 signifie une résolution graphique de 320*200, 8 signifie graphiques 8-bit, 2 signifie deux pages de travail et 0 signifie mode fenêtré (1 pour plein écran). Un minimum de 2 pages de travail est recommandée pour tout programme dépendant de graphiques. Ces notions deviendront plus claires un peu plus tard. Pour plus de détails sur la déclaration SCREEN référez-vous à la documentation de GFXlib ou au Wiki FreeBASIC (une version plus "avancée" de SCREEN est SCREENRES). -The next thing we'll do is set a loop that plays until the user pushes the letter Q on the keyboard. Loops are foundation of any program, not just a computer game. Coding a program on a way it would stop/halt every now and then and wait for the user to type something in is a BAD and WRONG way to program anything you want for other people to play. We'll use loops as places where the program waits for the user to do something (clicks with mouse or pushes a key) and where the program executes some routine according to user's action. It will also be used as a place where objects not controlled by the player (enemies) are managed/moved. Loops are a must have. +La prochaine étape est de définir une boucle qui joue jusqu'à ce que l'utilisateur appuie sur la lettre Q du clavier. Les boucles sont la base de tout programme et pas seulement pour un jeu d'ordinateur. Coder un programme en utilisant une méthode qui le ferait s'arrêter et le mettrait en attente d'une action quelconque de l'utilisateur est une méthode MAUVAISE et ERRONEE quel que soit ce que vous voulez programmer pour que d'autres personnes puissent y jouer. Nous utiliserons les boucles comme des lieux où le programme attend que l'utilisateur fasse quelque chose (clics avec la souris ou appuie sur une touche) et où le programme exécute une routine selon l'action de l'utilisateur. Elles seront également utilisées comme un lieu où les objets non contrôlés par le joueur (ennemis) seront gérés / déplacés. Les boucles sont un "must". -If you are aware of all these things, you can skip to the end of this section and download the completed example (with comments). If there is something in it you don't understand, then get back here. +Si vous êtes au courant de toutes ces choses, vous pouvez passer à la fin de cette section et télécharger l'exemple terminé (avec commentaires). S'il y a dedans quelque chose que vous ne comprenez pas, revenez ici. -We can set a loop on more ways (with WHILE:WEND statements, using the GOTO statement - Noooo!), but the best way is to use DO...LOOP. This type of loop simply repeats a block of statements in it until the condition is met. You set the condition(s) after LOOP with UNTIL. Check the following code: +Nous pouvons définir une boucle de plusieurs façons (avec les déclarations WHILE: WEND, en utilisant l'instruction GOTO - Noooon), mais la meilleure est d'utiliser DO...LOOP. Ce type de boucle répète simplement un bloc d'instructions jusqu'à ce que la condition soit remplie. Vous établissez la(les) condition(s) après LOOP avec UNTIL. Testez le code suivant: %%(freebasic) SCREEN 13,8,2,0 ' Sets the graphic mode @@ -42,9 +42,9 @@ We can set a loop on more ways (with WHILE:WEND statements, using the GOTO state LOOP UNTIL INKEY$ = "Q" or INKEY$ = "q" %% -If you compile this code and run it, you'll get a small black empty 320*200 window which you can turn off by pushing the letter Q (you might need to hold it). The program simply loops until you press "Q or "q". I used both upper and lower case "Q" symbol in case Caps Lock is turned on on your keyboard. INKEY$ is a statement that returns the last key pushed on the keyboard. I will explain later why it shouldn't be used with games and what's a better substitute. +Si vous compilez ce code et l'exécutez, vous aurez une petit fenêtre 320 * 200 noire et vide et vous pourrez la désactiver en appuyant sur la touche Q (vous pourriez avoir besoin de la maintenir). Le programme boucle tout simplement jusqu'à ce que vous appuyez sur "Q" ou "q". J'ai utilisé les deux: majuscules et minuscules pour la lettre "Q" au cas où les majuscules seraient verrouillées sur votre clavier. INKEY $ est une instruction qui retourne la dernière touche appuyée du clavier . J'expliquerai plus tard pourquoi elle ne doit pas être utilisée dans les jeux et quel est le meilleur substitut. -To draw a circle we'll use the CIRCLE statement (refer to GFXlib's documentation). Check the following code: +Pour tracer un cercle j'utiliserai la déclaration CIRCLE (se référer à la documentation GFXlib). Essayez le code suivant: %%(freebasic) SCREEN 13,8,2,0 ' Sets the graphic mode @@ -56,7 +56,7 @@ To draw a circle we'll use the CIRCLE statement (refer to GFXlib's documentation LOOP UNTIL INKEY$ = "Q" or INKEY$ = "q" %% -The last code draws a small circle on coordinates 150, 90 with a radius of 10 and color 15 (plain white) in a loop, which you can check if you compile the code. So how to move that circle? We need to connect its coordinates with VARIABLES. For this we'll use two variables named circlex and circley. Check the following code: +Le dernier code dessine un petit cercle aux coordonnées 150, 90 avec un rayon de 10 et la couleur 15 (Blanc pur) dans une boucle, que vous pouvez essayer si vous compilez le code. Alors, comment déplacer de ce cercle? Nous devons relier ses coordonnées avec des VARIABLES. Pour cela nous allons utiliser deux variables nommées circlex et circley. Vérifiez le code suivant: %%(freebasic) DIM SHARED AS SINGLE circlex, circley @@ -73,36 +73,36 @@ The last code draws a small circle on coordinates 150, 90 with a radius of 10 an LOOP UNTIL INKEY$ = "Q" or INKEY$ = "q" %% -This makes no change in the result of our program, but it's a step to what we want to accomplish. You can change the amounts to which circlex and circley equal to change the circle's initial position, but that's not what we really want. In order to move the circle we need to connect circlex and circley variables with keyboard statements. +Cela n'apporte aucune modification dans le résultat de notre programme, mais c'est une étape vers ce que nous voulons accomplir. Vous pouvez modifier les valeuurs de circlex et circley, mais ce n'est pas ce que nous voulons vraiment. Afin de déplacer le cercle nous devons connecter les variables circlex et circley avec les déclarations du clavier. -We declared first two variables in our program. Since FreeBASIC ver.0.17 all variables in FreeBASIC programs MUST be declared, although if you use lang qb command line during compiling you can compile using old QBasic compatibility dialect (I dont recommend it as it will keep you deprived of possible advances and extensions which default FB compatibility already provides and will provide). For more info on this check the appropriate page of the FreeBASIC wiki - Using the command line. Variables are declared (dimensioned) on this way: +Nous avons déclaré les deux premières variables dans notre programme. Depuis FreeBASIC ver.0.17 toutes les variables dans les programmes de FreeBASIC doivent être déclarées, mais si vous utilisez la commande en ligne "-lang qb" pendant la compilation, vous pouvez compiler en utilisant la compatibilité avec le vieux dialecte QBasic (je ne le recommande pas car cela vous privera des avancées et extensions possibles que la compatibilité FB par défaut fournit déjà et fournira). Pour plus d'infos sur cela consultez la page appropriée du wiki FreeBASIC - Utilisation de la ligne de commande. Les variables sont déclarées (dimensionnées) de cette façon: %%(freebasic) DIM variable_name [AS type_of_variable] %% -Or... +Ou... %%(freebasic) DIM [AS type_of_variable] variable1, variable2, variable3, ... %% -The data inside [ ] is optional and the brackets are not used. Types of variables available in FreeBASIC are BYTE, SHORT, INTEGER, STRING, SINGLE, DOUBLE and few others, but I don't find details about them important on this level. What you need to know now is that you should declare variables or arrays AS INTEGER when they hold graphics data (memory buffers holding graphics) or when they represent data which doesn't need decimal precision (number of lives, points, etc.). Variables that need decimal precision are declared AS SINGLE or DOUBLE. Those are usually variables used in games which rely on physics formulae like arcade car driving games or jump 'n run games (gravity effect). Simply, the difference between the speed of two pixels per cycle and the speed of one pixel per cycle is most often too large, and in those limits you can't emulate effects like fluid movement on the most satisfactory way. Also, behind DIM you should put SHARED which makes that the specific variable readable in the entire program (all subroutines). Don't use SHARED only with variables declared inside subroutines (I do it very rarely). If you are going to declare ARRAYS inside a subroutine, I advise you to replace DIM with REDIM. Strings are used to hold text data. Like YourName = "Dodo", but you need to declare YourName AS STRING first. +Les données entre [ ] sont facultatives et les crochets ne sont pas utilisés. Les types de variables disponibles en FreeBASIC sont BYTE, SHORT, INTEGER, STRING, SINGLE, DOUBLE et quelques autres, mais il n'est pas important, à ce niveau, de donner des détails sur elles. Ce que vous devez savoir maintenant c'est que vous pouvez déclarer des variables ou des tableaux d' INTEGER quand ils contiennent des données graphiques (tampons mémoire contenant des éléments graphiques) ou quand elles représentent des données qui ne nécessitent de précision décimale (nombre de vies, points, etc;); les variables qui ont besoin de précision décimale sont déclarées AS SINGLE ou DOUBLE. Celles-ci sont généralement des variables utilisées dans les jeux qui reposent sur des formules de physique comme les jeux d'arcade de conduite de voiture ou des jeux "Jump 'n run" (effet de la pesanteur). Simplement, la différence entre la vitesse de deux pixels par cycle et la vitesse d'un pixel par cycle est le plus souvent trop gros, et dans ces limites, vous ne pouvez pas reproduire des effets comme le mouvement des fluides de la manière la plus satisfaisante. Derrière DIM vous pouvez ausi ajouter SHARED qui rend la variable spécifique lisible dans l'ensemble du programme (tous les sous-programmes). N' utiliser pas SHARED uniquement avec les variables déclarées à l'intérieur des sous-routines (je le fais très rarement). Si vous avez à déclarer des TABLEAUX dans une routine, je vous conseille de remplacer DIM par REDIM. Les chaînes sont utilisés pour contenir des données texte. Comme VotreNom = "Dodo", mais vous devez au préalable déclarer VotreNom AS STRING. -Now I will introduce a new statement instead of INKEY$ which can detect multiple keypresses and is much more responsive (perfect response) than INKEY$. The flaw of INKEY$, as well as being very non-responsive (which you probably were able to detect when trying to shut down the previously compiled examples), is that it can detect only one keypress at any given moment which renders it completely unusable in games. +Maintenant je vais vous présenter une nouvelle fonction remplaçant INKEY$ qui permet de détecter de multiples pressions sur les touches et qui est beaucoup plus réactive (réponse parfaite) que INKEY$. La faille du INKEY$, en plus d'être très non-réactive (ce que vous avez probablement remarqué lorsque vous avez essayé de fermer les exemples précédemment compilés), est qu'elle ne peut détecter qu'une seule pression de touche à tout instant ce qui le rend complètement inutilisable dans les jeux. -The substitute we'll use is MULTIKEY (a GFXlib statement) which features only one parameter, and that's the DOS scancode of the key you want to query. You might be lost now. DOS scancode is nothing but a code referred by the computer to a certain keyboard key. If you check Appendix A of the GFXlib's documentation, you will see what each code stands for. For example, MULTIKEY(&h1C) queries if you pushed ENTER. GFXlib allows you to replace these scancodes with "easy to read" constants like it's explained in Appendix A. To use GFXlib you need to include its .bi file (fbgfx.bi) into your source. What's a .bi file? Well, it can be any kind of module you would attach to your source code and which can feature various subroutines (if you don't know what a subroutine is, we'll get on that later) and declarations used in your main module. The code you need to add are these two lines as it follows: +Le substitut, nous allons utiliser est MULTIKEY (une déclaration GFXlib) qui dispose d'un seul paramètre, et c'est le "scancode DOS" de la touche que vous voulez interroger. Vous pourriez être perdu maintenant. Le "scancode DOS" n'est rien d'autre que le code attribué par l'ordinateur aux touches du clavier. Si vous consultez l'annexe A de la documentation de la GFXlib, vous verrez ce que chaque code représente. Par exemple, MULTIKEY(&h1C) correspond à un appui sur la touche ENTRER. La GFXlib vous permet de remplacer ces scancodes par des constantes "facile à lire" comme expliqué dans l'annexe A. Pour utiliser GFXlib vous devez inclure son fichier.bi (fbgfx.bi) dans votre source. Qu'est-ce qu'un fichier.bi? Eh bien, ce peut être n'importe quel type de module que vous joignez à votre code source et qui peut fournir différents sous-programmes (si vous ne savez pas ce qu'est un sous-programme est, nous verrons plus tard) et déclarations utilisées dans votre module principal. Le code que vous devez ajouter corresond aux deux lignes suivantes: %%(freebasic) #include "fbgfx.bi" Using FB %% -It's best to put these two lines somewhere on the beginning of your program (before or after the sub declarations). You don't need to set a path to fbgfx.bi since it's placed in the /FreeBASIC/inc directory. You only need to set a path to a .bi file if it's not in that directory or not in the directory where the source code is. Using FB tells the program that we will be accessing GFXlib symbols without namespace, meaning, without having to put 'FB.' in front of every GFXlib symbol. Refer to FreeBASIC Wiki on USING. +Il est préférable de mettre ces deux lignes quelque part au début de votre programme (avant ou après les déclarations des "sub"). Vous n'avez pas besoin de définir un chemin vers fbgfx.bi car il a placé dans le répertoire /FreeBasic /inc. Vous avez seulement besoin de définir un chemin vers un fichier.bi s'il n'est pas dans ce répertoire ou dans le répertoire du code source. Utiliser FB indique au programme que nous accèderons aux symboles GFXlib sans espace de noms, ce qui signifie, sans avoir à mettre "FB." en face de chaque symbole GFXlib. Reportez-vous au Wiki sur l'UTILISATION de FreeBASIC. -Now the fun starts. +Maintenant, le plaisir commence. -We will add a new variable named circlespeed which flags (sets) how many pixels the circle will move in one cycle (loop). The movement will be done with the arrows key. Every time the user pushes a certain arrow key we will tell the program to change either circlex or circley (depends on the pushed key) by the amount of circlespeed. Check the following code: +Nous allons ajouter une nouvelle variable nommée "circlespeed" dont les drapeaux (bits à 1) indiquent le nombre de pixels du cercle qui se déplacent dans un cycle (une boucle). Le mouvement sera provoqué par les touches flèches. Chaque fois que l'utilisateur appuie sur une touche fléchée nous allons dire au programme de modifier "circlex" ou "circley" (cela dépend de la touche appuyée) par la quantité "circlespeed". Testez le code suivant: %%(freebasic) #include "fbgfx.bi" @@ -129,13 +129,13 @@ We will add a new variable named circlespeed which flags (sets) how many pixels LOOP UNTIL MULTIKEY(SC_Q) OR MULTIKEY(SC_ESCAPE) %% -As you see we also changed the condition after UNTIL since we are using MULTIKEY now. Now you can exit the program by pressing ESCAPE too (I added one more condition). +Comme vous le voyez nous avons aussi changé la condition après UNTIL puisque nous utilisons MULTIKEY maintenant. Maintenant vous pouvez aussi quitter le programme en appuyant sur ESCAPE (j'ai ajouté une autre condition). -If you compile the last version of the code, two things we don't want to happen will happen. The program will run so fast you won't even notice the movement of the circle, and the circle will "smear" the screen (the circles drawn on different coordinates in previous cycles will remain on the screen). To avoid smearing you need to have the CLS statement (clears the screen) in the loop so that in every new cycle the old circle from the previous cycle is erased before the new is drawn. +Si vous compilez la dernière version du code, deux choses indésirables se produisent. Le programme s'exécutera si rapidement que vous ne remarquerez même pas le mouvement du cercle et le cercle "s'étale" sur l'écran (les cercles tracés aux différentes coordonnées dans les cycles précédents ne sont pas effacés et s'accumulent à l'écran). Pour éviter cela vous devez placer l'instruction CLS (nettoie l'écran) dans la boucle de façon que pour chaque nouveau cycle l'ancien cercle du cycle précédent soit effacé avant le tracé du nouveau. -To reduce the speed of the program the quickest fix is the SLEEP command. What it does? It waits until the specified amount of time has elapsed (in milliseconds) or a key is pressed. To escape the key press option use SLEEP milliseconds, 1. This statement is also an efficient solution for the 100 % CPU usage problem. You see, if you don't use that statement any kind of FreeBASIC program with a loop (even the simplest one) will hold up all the computer cycles and make all the other Windows tasks you might be running to crawl. It also makes difficult for you to operate with other tasks while that kind of FreeBASIC program is running. Err...this is not a huge problem and a fair amount of programmers that have released FreeBASIC games so far did not bother to fix it. +Pour réduire la vitesse du programme le correctif le plus rapide est la commande SLEEP. Que fait-elle? Elle attend (ne fait rien) jusqu'à ce que la quantité de temps spécifiée (en millisecondes) soit écoulée ou bien qu'une touche soit appuyée. Pour annuler l'option "touche appuyée" utilisez "SLEEP millisecondes, 1". Cette instruction est également une solution efficace pour le problème d'utilisation du processeur à 100%. Vous voyez, si vous n'utilisez pas cette instruction tout type de programme FreeBASIC avec une boucle (même la plus simple) mobilisera tous les cycles de l'ordinateur et toutes les autres tâches de Windows ne pourront être exécutées correctement. Cela rend également difficile pour vous d'exécuter d'autres tâches pendant l'exécution ce genre de programme FreeBASIC. Euh ... ce n'est pas un problème énorme et une bonne quantité de programmeurs qui ont réalisé des jeux FreeBASIC jusqu'à présent n'ont pas pris la peine de s'en préoccuper. -Copy and paste the following code and compile it: +Copiez et collez le code suivant et compilez le: %%(freebasic) #include "fbgfx.bi" @@ -165,13 +165,13 @@ Copy and paste the following code and compile it: LOOP UNTIL MULTIKEY(SC_Q) OR MULTIKEY(SC_ESCAPE) %% -Viola! Our circle is moving and "slow enough". +Voila! Notre cercle se déplacement "assez lentement". -The last version of the code does not represent the desirable way of coding, but I had to simplify the code in order to make this lesson easy to understand. What we need to do next is declare our variables on the way they should be declared in any "serious" program, and show why we are having two work pages and what we can do with them. +La dernière version du code ne présente pas la meilleure manière de coder, mais j'ai été obligé de le simplifier afin de rendre cette leçon facile à comprendre. Nous allons maintenant déclarer nos variables de la manière dont elles doivent l'être dans tout programme "sérieux" et de montrer l'utilité et l'utilisation de deux pages de travail. -The way variables are declared in the above code is not the most convenient in larger projects where we have huge amount of variables usually associated to several objects (an object can be the player, enemy or anything that is defined with MORE THAN ONE variable). +La façon dont les variables sont déclarées dans le code ci-dessus n'est pas plus pratique que dans les grands projets où nous avons énormément de variables habituellement associées à plusieurs objets (un objet peut être le joueur, un ennemi ou tout ce qui est défini avec PLUS D'UNE VARIABLE). -So first we'll define a user defined data type with the statement TYPE that can contain more variables/arrays (stay with me). We'll name this user data type ObjectType. The code: +Alors d'abord nous allons définir un type de données défini par l'utilisateur avec l'instruction TYPE qui peut contenir plusieurs variables/tableaux (restez avec moi!). Nous allons nommer ce type de données utilisateur "ObjectType". Le code: %%(freebasic) TYPE ObjectType @@ -181,7 +181,7 @@ So first we'll define a user defined data type with the statement TYPE that can END TYPE %% -After this we declare our circle as an object: +Après cela, nous déclarons notre cercle comme un objet: %%(freebasic) DIM SHARED CircleM AS ObjectType @@ -190,9 +190,9 @@ After this we declare our circle as an object: ' the statement CIRCLE, thus "CircleM". %% -How is this method beneficial? It allows us to manage the program variables on a more efficient and cleaner way. Instead of (in this example) having to declare each circle's characteristic (it's position, speed, etc.) separately, we'll simply use a type:def that includes all these variables and associate a variable or an array to it (in this case that's CircleM). So now the circle's x position is flagged with CircleM.X, circle's y position with CircleM.Y and circle's speed with CircleM.speed. I hope you see now why this is better. One user defined type can be connected with more variables or arrays. In this example you can add another object with something like DIM SHARED EnemyCircle(8) AS ObjectType which would allow us to manage 8 "evil" circles with a specific set of routines (an AI of some sort) using the variables from the ObjectType type:def (x, y, speed), and these circles could "attack" the user's circle on some way. In the next lesson all this will become more clear. Have in mind that not ALL variables need to be declared using a type:def. This is only for "objects" in your game that are defined (characterized) with more variables (like a hero determined by health, money, score, strength, etc.). +Comment cette méthode est-elle bénéfique? Elle nous permet de gérer les variables du programme par un moyen plus efficace et plus propre. Au lieu d'avoir (dans cet exemple) à déclarer les caractéristiques de chaque cercle (la position, vitesse, etc) séparément, nous allons simplement utiliser un "type:def" qui comprend toutes ces variables et lui associer une variable ou un tableau (dans notre cas, c'est CircleM). Alors maintenant, la position x du cercle est marqué avec "CircleM.x", la position y cercle avec "CircleM.y" et la vitesse du cercle avec "CircleM.speed". J'espère que vous comprenez maintenant pourquoi c'est mieux. Un Type défini par l'utilisateur peut être connecté à plusieurs variables ou des tableaux. Dans cet exemple, vous pouvez ajouter un autre objet avec quelque chose comme "DIM SHARED EnemyCircle(8) AS ObjectType" qui nous permettrait de gérer 8 "cercles ennemis" avec un ensemble spécifique de routines (une IA d'une certaine sorte) en utilisant les variables "ObjectType type:def (x, y, speed)", et ces cercles pourraient "attaquer" le cercle de l'utilisateur d'une certaine façon. Dans la prochaine leçon tout cela deviendra plus clair. Avoir à l'esprit que TOUTES les variables ne doivent pas être déclarées en utilisant un "type:def". Ce sont seulement pour les "objets" de votre jeu qui seront définis (caractérisés) avec plusieurs variables (comme un héros déterminé par la santé, de l'argent, le score, la force, etc.). -After the change the final version of the code looks like this: +Après le changement de la version finale du code ressemble à ceci: %%(freebasic) #include "fbgfx.bi" @@ -233,31 +233,31 @@ After the change the final version of the code looks like this: LOOP UNTIL MULTIKEY(SC_Q) OR MULTIKEY(SC_ESCAPE) %% -You will notice I added one more statement in the code. The SETMOUSE statement positions the system mouse cursor (first two parameters) and shows or hides it (third parameter; 0 hides it). You should input this statement with these parameters in every program AFTER the SCREEN statement (IMPORTANT!) by default, because even if your program is going to feature a mouse controllable interface, you will most likely draw your own cursor. Trust me on this. Uh, I using that line way too often. +Vous remarquerez, j'ai ajouté une autre instruction dans le code. L'instructione SETMOUSE positionne le curseur de la souris (les deux premiers paramètres) et l'affiche ou le cache (le troisième paramètre; 0 le cache). Vous pouvez utiliser cette instruction avec ces paramètres par défaut dans chacun de vos programmes APRES l'instruction SCREEN (IMPORTANT!), car même si votre programme contôlera la souris, vous préférerez peut être dessiner votre propre curseur. because even if your program is going to feature a mouse controllable interface, you will most likely draw your own cursor. Croyez-moi sur ce point. Euh, j'utilise beaucoup trop cette façon de voir les choses. -Download the completed example with extra comments inside the source: move_circle.zip +Téléchargez l'exemple achevé avec des commentaires supplémentaires à l'intérieur du source: move_circle.zip -Phew, we are done with the first example. Some of you might think I went into too many details, but I feel all this dance was needed to make the next examples and lessons a more enjoyable adventure. +Ouf, nous en avons fini avec le premier exemple. Certains d'entre vous pourraient penser que je suis allé trop dans les détails, mais je me sens que tout cela était nécessaire pour rendre les exemples suivants et les leçons de cette aventure des plus agréables. -Nevertheless, this example is far from what we want, right? So the next chapter will learn you how to load graphics from external files among other things. +Néanmoins, cet exemple est loin d'être ce que nous voulons, non? Alors au chapitre suivant vous apprendrez comment charger des graphismes à partir de fichiers externes, entre autres. -{{fbdoc item="section" value="Example 2: A warrior running around a green field"}} +**Exemple 2: Un guerrier courant autour d'un champ vert** -In the next example we will be applying all the knowledge from the first example, so don't expect for this example to go into every statement again. I will explain every new statement and just brush off the old ones. +Dans l'exemple suivant nous allons appliquer toutes les connaissances du premier exemple, alors ne vous attendez pas pour cet exemple à un retour sur chaque instruction. Je vais vous expliquer chaque nouvelle instruction et juste rafraichir les anciennes. -In this section we'll start to code our mini-game which won't be completed in this lesson. In this lesson we'll just create a program where a warrior runs around a green field (single screen). +Dans cette section, nous allons commencer à coder notre mini-jeu qui ne sera pas terminé dans cette leçon. Dans cette leçon, nous allons simplement créer un programme où un guerrier tourne autour d'un champ vert (un seul écran). -First I'll show you what graphics we'll be using. We are going to work in 8-bit color depth mode, so the images that we are going to use need to be saved in that mode (256 colors mode). For warrior sprites I'll use the sprites of the main character from my first game Dark Quest. +D'abord je vais vous montrer le graphique que nous allons utiliser. Nous allons travailler en mode couleur 8-bit de profondeur, donc les images que nous allons utiliser doivent être enregistrées dans ce mode (mode 256 couleurs). Pour les "sprites" guerrier je vais utiliser les "sprites" du personnage principal de mon premier jeu "Dark Quest". http://hmcsoft.org/fb/htpagl1-sprites.png -As you see this image features 12 sprites of our warrior, each 20*20 pixels large. Two for each direction (walk animation) and one sprite for each direction when the warrior is swinging with his sword. Sword swinging wont be implemented in the first lesson but will become necessary later. +Comme vous le voyez cette image dispose de 12 sprites de nos guerriers, chacun ayant 20 * 20 pixels de large. Deux pour chaque direction (animation de marche) et un sprite pour chaque direction lorsque le guerrier se balance avec son épée. L'épée balancée n'est mis en oeuvre dans la première leçon, mais deviendra nécessaire plus tard. -Second image is the background image which you can check/download if you click here (320*200 pixels large, 8-bit BMP image). +La seconde image est l'image d'arrière-plan que vous pouvez télécharger en cliquant ici (320*200 pixels de large, image BMP 8-bit). -Download both images and place them where you will place the source, or just download the completed example at the end of this section. +Téléchargez les images et placez-les où vous allez placer la source, ou tout simplement Téléchargez l'exemple achevé à la fin de cette section. -On the beginning of our program we should include fbgfx.bi, same as in the first example, and then set the same graphic mode. The code: +Au début de notre programme, Il faut inclure fbgfx.bi, comme dans le premier exemple, puis définir le même mode graphique. Le code: %%(freebasic) #include "fbgfx.bi" @@ -267,23 +267,23 @@ On the beginning of our program we should include fbgfx.bi, same as in the first SETMOUSE 0,0,0 ' Hides the mouse cursor %% -Now we will declare two memory pointers that will point to memory buffers where our graphics will be stored (one for the sprites and one for the background). +Maintenant, nous allons déclarer deux pointeurs de mémoire qui pointeront vers les tampons mémoire où nos graphiques sont stockés (un pour les sprites et un pour le fond). -The first pointer we'll name background1 and declare it with the following line: +Le premier pointeur est nommé "background1" et il est déclaré avec la ligne suivante: %%(freebasic) DIM SHARED background1 AS ANY PTR %% -ANY PTR tells us that background1 will actually be a memory pointer. A pointer defined as an ANY PTR disables the compiler checking for the type of data it points to. It is useful as it can point to different types of data. We'll use pointers because we will allocate memory for our graphics using the IMAGECREATE statement. IMAGECREATE allocates the right amount of memory for a piece of graphics (sprite/image) if we input its height and width. Otherwise we would have to do it manually, meaning, calculate the needed amount of memory as the result of the sprite size, bit-depth and variable size. IMAGECREATE does this for use. As IMAGECREATE results with a pointer, we need to refer a pointer to it and not a variable. Don't worry if you don't know anything about pointers. You don't need to (to comprehend this tutorial). +ANY PTR nous dit que "background1" sera effectivement un pointeur mémoire. Un pointeur défini comme ANY PTR désactive le compilateur pour la vérification le type de données sur lequel il pointe. C'est utile car il peut pointer vers différents types de données. Nous allons utiliser des pointeurs car nous allons allouer de la mémoire pour nos graphiques en utilisant l'instruction IMAGECREATE. IMAGECREATE alloue la bonne quantité de mémoire pour un élement graphique (sprites / image), si nous donnons sa hauteur et sa largeur. Sinon, nous aurions à le faire manuellement, ce qui signifie, calculer la quantité de mémoire nécessaire d'après la taille du sprite, la profondeur de bit et la taille de la variable. IMAGECREATE fait cela pour nous. Comme le résultat d'IMAGECREATE est un pointeur, nous devons nous référer à un pointeur et non une variable. Ne vous inquiétez pas si vous ne savez rien à propos des pointeurs. Vous n'en avez pas besoin pour comprendre ce tutoriel. -The next pointer we'll declare will point to the memory buffer that holds the 12 warrior sprites. We will dimension this pointer as a single dimension array, each element in the array representing one sprite. +Le pointeur suivant pointe vers la mémoire tampon qui contient les 12 sprites du guerrier. Nous allons le dimensionner comme un tableau unidimensionnel, chaque élément du tableau représentant un sprite. %%(freebasic) DIM SHARED WarriorSprite(12) AS ANY PTR %% -Both these lines should be put in the code before the SCREEN statement. That's the way you'll write every program. Subroutine declarations, then variable declarations, then extra subroutine declarations if needed, and then the real code. The beginning of our program should now look like this: +Ces deux lignes devraient être mis dans le code avant l'instruction SCREEN. C'est la façon d'écrire chaque programme. Déclarations des sous-programmes, déclarations des variables, puis les déclarations des sous-programmes supplémentaire si nécessaire, puis le code réel. Le début de notre programme devrait maintenant ressembler à ceci: %%(freebasic) #include "fbgfx.bi" @@ -298,5 +298,5 @@ Both these lines should be put in the code before the SCREEN statement. That's t SETMOUSE 0,0,0 ' Hides the mouse cursor %% -After the screen resolution, color depth and number of work pages are set, we will hide our work page before loading graphics onto it since we don't want for the user to see all of the program's graphics every time he or she starts our program. To accomplish that we'll use the SCREENSET statement. What it does? It sets the work page (first parameter) and the visible page (second parameter). In our case we will set page 1 as the work page and page 0 as the visible page. After using 'SCREENSET 1, 0' every time we draw or load something on the screen it will be loaded/drawn on the work page and won't be visible to the user until we use the statement SCREENCOPY or SCREENSET with different parameters (SCREENSET 1, 1). This allows us to load graphics onto the screen we don't want for the user to see and delete it before coping the content on the work page to the visible page. This page flipping is also useful in loops with "graphics demanding" programs to avoid flicker or some other unwanted occurrence. +Dès que la résolution de l'écran, la profondeur de couleur et nombre de pages du travail sont fixés, nous allons cacher notre page de travail avant le chargement des graphiques sur elle car nous ne voulons pas que l'utilisateur voit tous les graphique du programme à chaque fois qu'il ou elle lance notre programme . Pour accomplir cela, nous allons utiliser l'instruction SCREENSET. Que fait-elle? Elle définit la page de travail (premier paramètre) et la page visible (deuxième paramètre). Dans notre cas nous allons mettre en page 1 la page de travail et en page 0 la page visible. Après l'utilisation de "SCREENSET 1, 0" chaque fois que nous dessinerons ou chargerons quelque chose sur l'écran, cel sera chargé / dessiné sur la page de travail et ne sera pas visible pour l'utilisateur jusqu'à ce que nous utilisons l'instruction SCREENCOPY ou SCREENSET avec des paramètres différents (SCREENSET 1, 1). Cela nous permet de charger des graphiques sur l'écran, invisibles pour l'utilisateur et de les supprimer avant que la page de travail ne soit la page visible. Cette permutation (flipping) de pages est également utile dans les boucles avec des" programmes "exigeant des graphiques" pour éviter le scintillement ou un autre événement indésirable. diff --git a/fbdocs/manual/cache/TutIfStatement.wakka b/fbdocs/manual/cache/TutIfStatement.wakka index 74430ff3b8..4fbb19f6df 100644 --- a/fbdocs/manual/cache/TutIfStatement.wakka +++ b/fbdocs/manual/cache/TutIfStatement.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="The IF Statement"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -You can think of the If statement block as a question that requires a True or False answer. The answer determines which section of code your program will execute. Since computers only work with numbers, you frame the question as a conditional equation that will result in either 0 for False or non-zero for True. +Imaginez le bloc d'instructions IF comme une question qui exige une réponse Vrai ou Faux. La réponse détermine l'exécution de la section de code de votre programme . Puisque les ordinateurs ne fonctionnent qu'avec des chiffres, vous formuler la question comme une équation conditionnelle qui entraînera soit 0 pour faux ou non nul pour vrai. -The If statement has the following formats. +L'instruction IF admet les formats suivants. %%(freebasic) If Then do something[:do something] %% -The is the question that requires a True or False answer. If the answer is True, i.e. not False, then the code following the Then is executed. If the answer is False then the next line of code is executed. + est la question qui requiert la réponse Vrai ou Faux. Si la réponse est Vrai, c'est à dire non Faux, alors le code suivant le THEN est exécuté. Si la réponse est Faux alors la ligne suivante de code est exécutée. -You can execute more than one statement after the Then if you separate the statements with a colon. All of the statements must be on the same line. An easier format is to use the IF code block, as shown below. +Vous pouvez exécuter plus d'une déclaration après le THEN si vous séparez les déclarations par deux points (:). Toutes les déclarations doivent être sur la même ligne. Un format plus facile est d'utiliser le bloc de code IF, comme indiqué ci-dessous. %%(freebasic) If Then @@ -21,7 +21,7 @@ If Then End If %% -In this format if the answer is True then the code block following the Then is executed, starting with statement 1 and executing all statements until the End If is reached. The program will then start executing code after the End If. If the answer is False, the code in the code block is skipped and the code following the End If is executed. +Dans ce format, si la réponse est Vrai le bloc de code suivant est alors exécuté, en commençant avec la déclaration de 1 et l'exécution de toutes les déclarations jusqu'à ce que END IF soit atteint. Le programme va alors commencer à exécuter le code après le END IF. Si la réponse est fausse, le code dans le bloc de code est ignoré et le code suivant le END IF est exécuté. %%(freebasic) If Then @@ -33,7 +33,7 @@ Else End If %% -In this format if is True then the code following the Then is executed. If the answer is False then the code following the Else is executed. In this format you can address both the True and False answers of the . +Dans ce format si is Vrai alors le code suivant le THEN est exécuté. Si la réponse est Faux alors le code suivant le ELSE est exécuté. Dans ce format, vous pouvez donner du code à la fois les réponses Vrai et Faux de l'. %%(freebasic) If Then @@ -43,7 +43,7 @@ ElseIf Then End If %% -In this format if is True then the code following the Then is executed. If the answer is False then the ElseIf is executed. If the ElseIf is True, the code following the Then (of the ElseIf) is executed, otherwise the code following the End If is executed. You can have as many ElseIf statements as you need to fully cover the range of questions you need to ask. +Dans ce format si is Vrai alors le code suivant le THEN est exécuté. Si la réponse est Faux alors le ELSEIF est exécuté. Si le ELSEIF est Vrai, le code suivant le THEN (du ELSEIF) est exécuté, sinon le code suivant le ENDIF est exécuté. Vous pouvez avoir autant de déclarations ELSEIF que nécessaire pour couvrir entièrement la gamme de questions que vous avez à poser. %%(freebasic) If Then @@ -55,15 +55,15 @@ Else End If %% -This format is a combination of all the other formats. If is True then the code following the Then is executed. If the answer is False then the ElseIf is executed. If the ElseIf is True, the code following the Then (of the ElseIf) is executed, otherwise the code following the Else is executed. +Ce format est une combinaison de tous les autres formats. Si est Vrai, alors le code suivant le THEN est ensuite exécuté. Si la réponse est Faux alors le ELSEIF est exécuté. Si le ELSEIF est Vrai, le code suivant le THEN (du ELSEIF) est exécuté, sinon le code suivant le ELSE est exécuté. -This format enables you to ask a series of questions and if the answer is False to all the questions, you can take a default course of action based on the Else block. +Ce format vous permet de poser une série de questions et si la réponse est Faux à toutes les questions, vous pouvez prendre une direction par défaut de l'action basée sur le bloc ELSE. -As you can see you can frame the question in a number of ways and then execute the code based on a number of answer combinations. This gives you a lot of flexibility in how to both frame a question and what to do based on the answers. +Comme vous pouvez le voir, vous pouvez poser la question d'un certain nombre de façons, puis exécuter le code basé sur un certain nombre de combinaisons de réponses. Cela vous donne beaucoup de flexibilité à la fois dans la façon de formuler une question et de quoi faire sur la base des réponses. -The is the question that needs an answer and you frame the question using [[CatPgOperators logical operators]]. + C'est la question qui nécessite une réponse et vous formulez la question à l'aide d'[[CatPgOperators opérateurs logiques]]. -You can mix arithmetic and logical operators, as well as parenthesis, within an If statement. The compiler evaluates the conditional statements from left to right, taking into account the precedence of the operators. For example, all of the following code snippets are legal If statement constructs. +Vous pouvez mélanger l'arithmétique et les opérateurs logiques, ainsi que les parenthèses, dans une instruction IF. Le compilateur évalue les instructions conditionnelles de gauche à droite, en tenant compte de la priorité des opérateurs. Par exemple, tous les extraits de code suivants ont des constructions IF correctes. %%(freebasic) If var1 = 5 Then @@ -71,35 +71,35 @@ If (var1 = 5) And (var2 < 3) Then If (var1 + 6) > 10 Then %% -You will notice that parenthesis are used to group the different parts of the expressions. You should use parenthesis to make sure that you are executing logical portions of the expressions. The expression must ultimately resolve to either True or False, even if you are using arithmetic operators within the expression. +Vous remarquerez que les parenthèses sont utilisées pour regrouper les différentes parties de l'expression. Vous devez utiliser des parenthèses pour vous assurer de l'exécution logique des portions d'expressions. L'expression doit finalement donner Vrai ou Faux, même si vous utilisez des opérateurs arithmétiques dans l'expression. -=== Using Bitwise Operators in an If Statement === +
    Utilisation des opérateurs bit à bit dans une déclaration IF -Remember that the operators And, Or and Not are bitwise operators. That is, they return a value based on the bitwise operation that they perform. You should take care when using bitwise operators within an If statement to make sure that the result will evaluate correctly. +Rappelez-vous que les opérateurs AND, OR et NOT sont des opérateurs binaires. Autrement dit, ils retournent une valeur basée sur le fonctionnement binaire qu'ils effectuent. Vous devez veiller lors de l'utilisation d'opérateurs de bits dans une instruction IF que le résultat sera évalué correctement. -Take the second code snippet listed above. +Voyez l'extrait de code ci-dessous. %%(freebasic) If (var1 = 5) And (var2 < 3) Then %% -If var1 equals 5, the compiler will return True, or -1 for the expression. If var2 is less than 3 then the compiler will return True or -1 for this expression. The compiler will then evaluate the And operator with -1 And -1 returning -1. Since -1 is non-zero, or True, the code following the Then will be executed. +Si ##var1## est égal à 5, le compilateur retourne Vrai, sinon -1 pour l'expression. Si ##var2## est inférieur à 3 alors le compilateur retourne Vrai, sinon -1 pour cette expression. Le compilateur évalue ensuite l'opérateur AND, avec -1 AND -1 retourne -1. Comme -1 est non-zéro, ou Vrai, le code qui suit le THEN sera exécuté. -If either of the statements within the parenthesis evaluate to 0, then And will return 0, which is False, and the code following the Then clause will be skipped. When using bitwise operators you should frame the conditional expressions on either side of the bitwise operator so that they return either True or False. This will give you consistent results in your evaluations. +Si l'une ou l'autre des déclarations entre parenthèses est évaluée à 0, alors le AND retournera 0, ce qui correspond à Faux, et le code qui suit le THEN ne sera pas exécuté. Lorsque vous utilisez les opérateurs de bits, vous devez formuler les expressions conditionnelles de chaque côté de l'opérateur de bits de telle sorte que leur retour soit Vrai ou Faux. Cela vous donnera des résultats cohérents dans vos évaluations. -=== The Not Problem === +
    Le problème NOT -The Not bitwise operator can be a problem in an If statement. You may be used to writing //If Not var Then//, with Not performing a logical, rather than a bitwise operation. In FreeBasic Not performs a bitwise operation, not a logical operation. +L'opérateur binaire NOT peut être un problème dans une déclaration IF. Vous pouvez être amené à utiliser l'écriture //If Not var Then//, avec NOT effectuant une opération logique, plutôt qu'une opération bit à bit. En FreeBASIC, NOT effectue une opération bit à bit, et non pas une opération logique. -If var were to contain the value of 3, then Not 3 is -4, which will be regarded as a True result and the code following the Then will be executed, which is probably not what you wanted. Instead of writing //If Not var Then//, you should write //If var <> 0 Then//. +Si //var// contient la valeur de 3, alors NOT 3 donne -4, ce qui sera considéré comme le résultat Vrai et le code suivant le THEN sera exécuté, ce qui n'est probablement pas ce qui est attendu. Au lieu d'écrire //If Not var Then//, écrivez //If var <> 0 Then//. -=== Overlapping Conditions === +
    Conditions qui se chevauchent -When using compound conditions care must be taken to ensure that the conditions do not overlap. In most cases overlapping conditions will produce unpredictable results. Each condition must produce a unique result, and the combination of the individual results, must itself express a unique result. This is very important in If-ElseIf constructs; an overlapping condition within an If-ElseIf block may execute the wrong code at the wrong time. +Lorsque vous utilisez des conditions combinées, assurez-vous que les conditions ne se chevauchent pas. Dans la plupart des cas, cela va produire des résultats imprévisibles. Chaque condition doit produire un résultat unique, et la combinaison des résultats individuels doit exprimer un résultat unique. C'est primordial dans les constructions IF-ELSEIF; des conditions qui se chevauchent dans un bloc IF-ELSEIF peuvent exécuter un code erroné, au mauvais moment. -=== Nested If Statements === +
    Déclarations IF imbriquées -At times it may become necessary to nest If statements in order to better describe the decision making process of the evaluation. While the If statement can handle multiple arguments within an expression, there are times when you may want to incrementally check for certain ranges of values which you can do using a nested If block. +Parfois, il est nécessaire d'imbriquer des déclarations IF afin de mieux décrire le processus décisionnel de l'évaluation. Bien que la déclaration IF puisse gérer plusieurs arguments dans une expression, il y a des cas où vous voudrez peut-être progressivement contrôler certaines gammes de valeurs en utilisant des blocs de IF imbriquées. %%(freebasic) If Then @@ -113,35 +113,35 @@ If Then End If %% -It is important to close each block properly with an End If when opened by an If to avoid compiler or logical errors. Compiler errors are fairly easy to fix, while logical errors can be tricky to track down and correct. The best way to make sure you are closing the blocks properly is to indent the nested If statements and then indent the matching End If statements at the same level as the If. In the example above, the indentation tells you at a glance which End If goes with which If. +Il est important de fermer chaque bloc correctement avec un END IF lorsqu'il est ouvert par un IF pour éviter des erreurs compilateur ou de logique. Les erreurs du compilateur sont assez faciles à résoudre, tandis que les erreurs de logique peuvent être difficiles à traquer et corriger. La meilleure façon de s'assurer que vous fermer les blocs correctement est l'indentation des déclarations IF imbriquées et ensuite l'indentation des déclarations END IF correspondant au même niveau que le IF. Dans l'exemple ci-dessus, l'indentation vous visualise les couples IF .... END IF. -=== The IIF Function === +
    La fonction IIF -The Iif, or immediate If function returns one of two numeric values based on an expression. You can think if the Iif function as an in-line If statement that acts as a function call. +IIF, ou fonction "immediate If" renvoie l'une des deux valeurs numériques basées sur une expression. Vous pouvez penser si la fonction IIF comme une fonction "in-line If" qui agit comme un appel de fonction. %%(freebasic) Value = Iif(, numeric_value_if_true, numeric_value_if_false) %% -Iif can be used as a standalone function or inside other expressions where you do not want to split the expression to insert an If statement. The numeric values can be literal values, variables or numeric function calls. The limitation of the function is that it will only return a numeric value, not a string value, however you can work around this limitation by using pointers. +IIF peut être utilisé comme une fonction autonome ou à l'intérieur d'autres expressions où vous ne voulez pas diviser l'expression pour insérer une instruction IF. Les valeurs numériques peuvent être des valeurs littérales, des variables ou des appels de fonctions numériques. La limitation de la fonction, c'est qu'elle ne retourne qu'une valeur numérique, et non une chaîne, mais vous pouvez contourner cette limitation en utilisant des pointeurs. -{{table columns="1" cellpadding="2" cells=" The Iif statement will evaluate both the True and False conditions so you need to take care that you do not perform an illegal operation such as divide by zero in a condition, even if that condition is not returned from the function."}} +{{table columns="" cellpadding="2" cells="L'instruction IIF évalue à la fois les conditions Vrai et Faux si devez éviter d'effectuer une opération illégale comme la division par zéro dans un des états, même si cette condition n'est pas retournée par la fonction.;
    -=== Framing the Question === +
    Formuler la question -The If statement is a powerful tool, but you need to make sure that you are framing the question, that is the expression, correctly. Each expression must resolve to True or False, with True always executing the code following the Then. +La déclaration IF est un outil puissant, mais vous devez vous assurer que vous formulez correctement la question qui est l'. Chaque expression doit se résoudre par Vrai ou faux, toujours avec Vrai exécutant le code qui suit THEN. -When writing an If statement you must ask yourself, does this expression resolve to True or False? This is especially true for compound expressions that have a number of terms within the expression. Each term must resolve to True or False and the sum of the terms must resolve to True or False. If there is any doubt that a compound expression is evaluating correctly, break it into nested If statements. +Lors de l'écriture une déclaration IF vous devez vous demander si l'expression se résout par Vrai ou Faux? Cela est particulièrement vrai pour les expressions composées qui ont un certain nombre de termes dans l'expression. Chaque terme doit se résoudre par Vrai ou faux, et l'ensemble des termes doit se résoudre par True ou False. S'il existe le moindre doute sur l'évaluation correcte de l'expression composé, cassez les déclarations IF imbriquées. -=== Checking For Range Values === +
    Vérification des gammes de valeurs -Often times you will need to check for a range of values within an If statement, and in order for the compiler to evaluate the range condition correctly, you must frame the expressions correctly. There are basically two type of range expressions: exclusive and inclusive ranges. Exclusive range expressions exclude a range of values. Inclusive range expressions include a range of values. Each has a particular format that must be followed for proper evaluation. +Souvent, vous aurez besoin de vérifier pour une plage de valeurs dans une instruction IF, et pour que le compilateur évalue correctement la condition pour la plage, vous devez formuler les expressions correctement. Il existe essentiellement deux types d'expressions de gamme: exclusives et inclusives. Les expressions exclusives excluent une plage de valeurs. Les expressions inclusives incluent une gamme de valeurs. Chaque famille a un format particulier qui doit être suivi d'une évaluation adéquate. -== Excluding a Range of Values == +** Excluure une plage de valeurs ** -Suppose that you have a range of values and you want to do something special if the value is less than or equal to 1 or the value is greater than or equal to 10. To put this another way, you want to exclude the numbers 2 through 9 from the special action. +Supposez que vous avez une plage de valeurs et que vous vouliez faire quelque chose de spécial si la valeur est inférieure ou égale à 1 ou supérieure ou égale à 10. Pour exécuter cela vous devez exclure les nombres de 2 à 9 de l'action spéciale. -You can frame this as a question that can then be translated into code. +Vous pouvez formuler cela comme une question qui peut ensuite être traduite en code. %%(freebasic) Is the value a number less than or equal to 1 or a number greater than or equal to 10? @@ -149,7 +149,7 @@ If Yes, then do special action. If No, then do standard action. %% -The key here is the OR. If the lower bound of the value is equal to or less than 1 OR the upper bound of the value is equal to or greater than 10 then do the special action. +La clef ici est OR. Si la borne inférieure de la valeur est égale ou inférieure à 1 OU la limite supérieure de la valeur est égale ou supérieure à 10 alors effectuer l'action spéciale. %%(freebasic) If (value <= 1) Or (value >= 10) Then @@ -159,13 +159,13 @@ Else End If %% -Remember that OR will return True if either condition is True. If the value is 1 or less, or the value is 10 or more, then the expression will return True and the special action will be performed. +Rappelez-vous que OU retournera Vrai si la condition est Vraie. Si la valeur est 1 ou moins, ou la valeur est de 10 ou plus, alors l'expression retournera Vrai et l'action spéciale sera effectuée. -== Including a Range of Values == +** Inclure une gamme de valeurs ** -Inclusion is the opposite of exclusion. As you might guess, the format is similar you but you use the And operator which is the opposite of the OR operator. +L'inclusion est l'opposé de l'exclusion. Comme vous pouvez le deviner, le format est similaire, mais vous utilisez l'opérateur AND qui est l'opposé de l'opérateur OR. -Suppose you want to do something special if the value is a 5, 6 or 7. That is you want to include these numbers within your range expression. Again, you can start by asking a question. +Supposons que vous voulez faire quelque chose de spécial si la valeur est de 5, 6 ou 7. Donc que vous souhaitez inclure ces nombres dans votre expression de gamme. Encore une fois, vous pouvez commencer par poser une question. %%(freebasic) Is the value a number between 5 and 7 (inclusive)? @@ -173,7 +173,7 @@ If Yes, then do special action If No, then do standard action %% -Here you want to include the numbers 5, 6, 7 for consideration. That is if the value is 5 or greater AND the value is 7 or less then do something special. This translates to the following code snippet. +Ici vous souhaitez inclure les nombres 5, 6, 7 pour examen. Donc si la valeur est de 5 ou supérieure et la valeur est de 7 ou inférieure on fait quelque chose de spécial. Cela se traduit par le code suivant. %%(freebasic) If (value >= 5) And (value <= 7) Then @@ -183,4 +183,4 @@ Else End If %% -Remember that the And operator will only return True if both operands return True. If value is 6, 6 is greater than 5 and 6 is also less than 7, so both statements are True and the expression evaluates to True. +Rappelez-vous que l'opérateur AND ne retourneront Vrai que si les deux opérandes sont Vrai. Si la valeur est de 6, 6 est supérieur à 5 et 6 est également inférieur à 7, alors les deux affirmations sont Vrai, et l'expression prend la valeur Vrai.. diff --git a/fbdocs/manual/cache/TutIndexSDLNet.wakka b/fbdocs/manual/cache/TutIndexSDLNet.wakka index f2032b6c19..05b6404c03 100644 --- a/fbdocs/manual/cache/TutIndexSDLNet.wakka +++ b/fbdocs/manual/cache/TutIndexSDLNet.wakka @@ -1,17 +1,17 @@ {{fbdoc item="title" value="SDL_Net: Getting Started"}}---- - A compleate Step by step guide of getting your program from hello world to hello world over a TCP/IP connection, using the SDL_Net SDL library. This tutorial will list all componets required and where to download them at the time of writing followed by how to get each componet in the proper place to perform the proper functions and finally how to write the actuall code. I will assume you have zero previous knowledge and because of that some readers may want to skip the first few bits of the tutorial. -//Written by ""GregF"" (Paragon)// ----- + Un guide complet étape par étape de "hello world" à "hello world" via une connexion TCP/IP, en utilisant la bibliothèque SDL SDL_net.Ce tutoriel va lister tous composants nécessaires et où les télécharger au moment de la rédaction suivie de la façon d'obtenir de chaque composant: à l'endroit approprié pour exécuter les fonctions propres et, enfin, comment écrire le code. Je vais supposer que vous avez zéro connaissance antérieure et de ce fait certains lecteurs peuvent vouloir sauter les premières lignes de ce tutoriel. +//Ecrit par GregF (Paragon)// +
    Etape 1: Ce qui est nécessaire. -===Step 1: What you need.=== - Ok, lets pretend that you just sat down and installed the compiler and an IDE. This list takes it from there. - ~1) SDL_Net.bi - Installed with the compiller. - ~2) SDL_Net.dll Binary -http://www.libsdl.org/projects/SDL_net/ - ~3) SDL.dll runtime library - http://www.libsdl.org/download-1.2.php +Ok, on suppose que vous avez installé le compilateur et un IDE. La liste commence ici. + - SDL_Net.bi - Installé avec le compilateur. + - SDL_Net.dll Binary -http://www.libsdl.org/projects/SDL_net/ + - SDL.dll runtime library - http://www.libsdl.org/download-1.2.php +
    Etape 2: Où les placer. -===Step 2: Where you put it.=== - The .bi file can be put pretty much where ever you want to put it, you will tell the compiler where to find it in the [[KeyPgInclude '$include]] command. The .dll however need to be placed in specific places. The easiest way to make sure that the program will be able to use these files is to have the .dll in the same folder as the compiled executable. You can also put them in any folder that is listed in your Enviroment variable, but I don't recommend that because it will be easier to find and remeber that you need the .dlls if you just put them in the same folder as the executable, which will proably be the same folder as your .bas file for the main program. +Le fichier .bi peut être mis à peu près partout où vous voulez le mettre, vous direz au compilateur où le trouver dans la commande [[KeyPgInclude '$Include]]. Les .dll doivent toutefois être placées dans des endroits spécifiques. La meilleure façon de s'assurer que le programme sera en mesure d'utiliser ces fichiers est d'avoir la .dll dans le même dossier que l'exécutable compilé. Vous pouvez aussi les mettre dans un dossier qui est inscrit dans votre variable d'environnement, mais je ne vousle recommande pas, parce que ce sera plus facile à trouver et de vous rappeler que vous devez avoir les .dll si vous les mettez dans le même dossier que l'exécutable, qui devra probablement être le même dossier que votre fichier .bas pour le programme principal. + Tutoriel en cours ... ---- diff --git a/fbdocs/manual/cache/TutInterfacingWithC.wakka b/fbdocs/manual/cache/TutInterfacingWithC.wakka index 72a7c00388..9258926544 100644 --- a/fbdocs/manual/cache/TutInterfacingWithC.wakka +++ b/fbdocs/manual/cache/TutInterfacingWithC.wakka @@ -1,30 +1,30 @@ {{fbdoc item="title" value="Interfacing with C"}}---- -NOTE! Have to do some spell checking, verify text, code and filenames. +REMARQUE! Faites quelques vérifications orthographique, de vérification du texte, du code et des noms de fichiers. -===Foreword=== -This is a tiny basic tutorial on how to write a simple library in C and then use it in FreeBASIC. The tutorial should be possible to follow without to much knowledge of C or FreeBASIC. After doing this tutorial you should be able to compile a static and a dynamically linked C library. Translate the necessary header files to FreeBASIC header files and understand how to use the libraries in a FreeBASIC project. +
    Avant-propos +Ceci est un mini tutoriel de base sur la façon d'écrire une simple bibliothèque en C et ensuite de l'utiliser dans FreeBASIC. Il devrait être possible de suivre le tutoriel sans pour autant avoir de grandes connaissances du C ou du FreeBASIC. Après avoir essayé ce tutoriel, vous devriez être en mesure de compiler une bibliothèque C statique ou dynamique. Traduire les fichiers d'entête nécessaires pour les fichiers d'entête FreeBASIC et de comprendre comment utiliser les bibliothèques dans un projet FreeBASIC. -===What is a library=== +
    Qu'est-ce qu'une bibliothèque -===Prerequisite=== -This tutorial was written and tested with FreeBASIC 0.16b and the latest Current release of MinGW32 at the time. As a note Dev-cpp uses MinGW32 as it's compiler tool chain. You also get code::blocks with a mingw32 bundle. +
    Condition préalable +Ce tutoriel a été écrit et testé avec FreeBASIC 0.16b et la dernière version actuelle de MinGW32 (à l'époque). Comme une note Dev-cpp utilise MinGW32 que c'est la chaîne d'outils du compilateur. Vous pouvez également obtenir Code::Blocks avec un paquet MinGW32. -===Formal description of the task at hand=== -To demonstrate usage of a C library in FreeBASIC we need to create the simplest possible library with a few functions. A test file in C to demonstrate that our library works as intended. Then we have to translate the library header file to a FreeBASIC header file (*.bi) and finally create a test project in FreeBASIC using the library. +
    Description formelle de la tâche à accomplir +Pour démontrer l'utilisation d'une bibliothèque C en FreeBASIC nous avons besoin pour créer la bibliothèque la plus simple possible avec peu de fonctions. Un fichier de test en C pour démontrer que notre bibliothèque fonctionne comme prévu. Ensuite, nous devons traduire le fichier en-tête bibliothèque vers un fichier d'en-tête FreeBASIC (*.bi) et enfin de créer un projet de test dans FreeBASIC utilisant la bibliothèque.. -===Creating the files=== -So our file list will look like this: -myClib.c: C file implementing our library. -myClib.h: C header file describing the libraries interface. -myClibCTest.c: C file implementing our test program in C. -myClib.bi: FreeBASIC header file. A translation of myClib.h. -myClibFBTest.bas: FreeBASIC -make.cmd: A sample shell script compiling the library and test files. +
    Création des fichiers +Donc, notre liste de fichiers devrait ressembler à ceci: +myClib.c: Fichier C mise en œuvre de notre bibliothèque. +myClib.h: Fichier d'entête C décrivant l'interface des bibliothèques. +myClibCTest.c: Mise en oeuvre notre fichier C programme d'essai de C. +myClib.bi: Fichier d'en-tête FreeBASIC. Une traduction de myClib.h. +myClibFBTest.bas: Test FreeBASIC +make.cmd: Un script shell pour compiler la bibliothèque et les fichiers de test. -==The C file to become a static library. myClib.c == +**Le fichier C pour fabriquer la bibliothèque statique. myClib.c ** %%(C) /* A function adding two integers and returning the result */ #include "myClib.h" @@ -47,106 +47,105 @@ int SampleFunction2() return 10; } -%% -==The header file myClib.h== +%%**Le fichier en-tête myClib.h** %%(C) int SampleAddInt(int i1, int i2); void SampleFunction1(); int SampleFunction2(); %% +**Projet de test C pour vérifier que la lib statique est compatible C. myClibCTest.c:** -==A C test project to verify that the static lib is C compatible. myClibCTest.c:== %%(C) #include #include #include "myClib.h" int main(int argc, char *argv[]) { - printf("SampleAddInt(5, 5):=%d\n", SampleAddInt(5, 5)); - system("PAUSE"); +printf("SampleAddInt(5, 5):=%d\n", SampleAddInt(5, 5)); + system("PAUSE"); return 0; -} + } %% +**Traduire le fichier d'en-tête C dans un fichier en-tête FreeBASIC** -==Translating the C header file to a FreeBASIC header file== +myClib.bi: Pour interfacer la bibliothèque statique et l'inclure automatiquement (# inclib "myClib") j'ai ce fichier. myClib.bi: To interface the static library and automatically include it (#inclib "myClib" ) i have this file. -%%(freebasic) ''include file for libmyClib.a -#IfNDef __myClib_bi__ -#Define __myClib_bi__ +#ifndef __myClib_bi__ +#define __myClib_bi__ #inclib "myClib" +Declare Function SampleAddInt cdecl Alias "SampleAddInt" (ByVal i1 As Integer, ByVal i2 As Integer) As Integer -Declare Function SampleAddInt Cdecl Alias "SampleAddInt" (Byval i1 As Integer, Byval i2 As Integer) As Integer -Declare Sub SampleFunction1 Cdecl Alias "SampleFunction1" () -Declare Function SampleFunction2 Cdecl Alias "SampleFunction2" () As Integer +Declare Sub SampleFunction1 cdecl Alias "SampleFunction1" () +Declare Function SampleFunction2 cdecl Alias "SampleFunction2" () As Integer #endif %% +**Et enfin le fichier en utilisant la bibliothèque FreeBASIC** -==And finally the FreeBASIC file using the library== myClibFBTest.bas: -%%(freebasic) +myClibFBTest.bas: ''Testing functions in myClib.bi #include "myClib.bi" '' -print "SampleAddInt(10, 10):=", SampleAddInt(10, 10) +Print "SampleAddInt(10, 10):=", SampleAddInt(10, 10) '' Just a dumy call SampleFunction1() '' -print "SampleFunction2():=", SampleFunction2() +Print "SampleFunction2():=", SampleFunction2() %% +**Le fichier make: make.cmd** -==The make file: make.cmd== -I have created a batch file to compile all the files. Including a sample in C using the static library. Note the config lines at the top which has to be modified to suite your setup. +J'ai créé un fichier "batch" pour compiler tous les fichiers. Y compris un échantillon en C en utilisant la bibliothèque statique. Notez les lignes de configuration au début qui doit être modifié pour correspondre à votre configuration. %%(cmd) @REM TODO: Set PATH's for this session. SET PATH=C:\mingw32\bin;c:\mingw32\mingw32\bin SET MINGW_INCLUDE="C:/MinGW32/include" SET MINGW_LIB="C:/MinGW32/lib" - @REM + @REM fbc testing SET fbc="C:\portableapps\FreeBASIC\fbc.exe" SET fbc="C:\FreeBasic16b\fbc.exe" @echo *** Verify pat's to compilers @pause @echo off - @REM + @REM Remove old files DEL /F *.o *.a myClibFBTest.exe - @REM + @REM Create static lib from c source gcc.exe -c myClib.c -o myClib.o -I%MINGW_INCLUDE% - @REM -@REM ar: creating libstatictest.a -ar r libmyClib.a myClib.o +@REM ar: creating libstatictest.a +ar r libmyClib.a myClib.o @REM -@REM No nead for ranlib anymore? ar is supposed to take care of it + +@REM No nead for ranlib anymore? ar is supposed to take care of it ranlib libmyClib.a +@REM -@REM @REM Create a test with a C file - gcc.exe -c myClibCTest.c -o myClibCTest.o -I%MINGW_INCLUDE% -gcc.exe myClibCTest.o -o "myClibCTest.exe" -L%MINGW_LIB% libmyClib.a +gcc.exe myClibCTest.o -o "myClibCTest.exe" -L%MINGW_LIB% libmyClib.a echo ===================================== + echo RUnning C sample echo ===================================== myClibCTest.exe - echo ===================================== + echo Creating FreeBASIC sample echo ===================================== REM I thought this explicit reference is unnecessary as I use #inclib SET fbcop= -I myClib -SET fbcfl="myClibFBTest.bas" +SET fbcfl="myClibFBTest.bas" %fbc% %fbcop% %fbcfl% echo ===================================== echo RUnning FreeBASIC sample @@ -154,11 +153,11 @@ echo ===================================== myClibFBTest.exe @pause %% +
    Messages d'erreur rencontrées et leurs solutions -===Encountered error messages and their solutions=== -==undefined reference to== -Trying to link against the static C library without using the cdecl alias "functionname" in the FreeBASIC header file results in errors like this. +**undefined reference to** +Essai de liaison à la bibliothèque statique C sans utiliser l'alias cdecl "functionname" dans le fichier en-tête FreeBASIC résultat d'erreurs de ce genre. %%(cmd) C:\code>"C:\FreeBasic16b\fbc.exe" "myClibFBTest.bas" myClibFBTest.o:fake:(.text+0x3d): undefined reference to `SAMPLEADDINT@8' @@ -166,20 +165,21 @@ myClibFBTest.o:fake:(.text+0x4a): undefined reference to `SAMPLEFUNCTION1@0' myClibFBTest.o:fake:(.text+0x67): undefined reference to `SAMPLEFUNCTION2@0' Press any key to continue . . . %% +Pour résoudre cela, vous devrez localiser les déclarations de fonctions dans un fichier *.bi qui ressemble à ceci: To resolve this you will have to locate function declarations in a *.bi file that look like this: -%%(freebasic) -Declare Function SampleAddInt(Byval i1 As Integer, Byval i2 As Integer) As Integer +Declare Function SampleAddInt(ByVal i1 As Integer, ByVal i2 As Integer) As Integer %% +Et le remplacer par ceci: And change it to something like this: -%%(freebasic) -Declare Function SampleAddInt Cdecl Alias "SampleAddInt" (Byval i1 As Integer, Byval i2 As Integer) As Integer +Declare Function SampleAddInt cdecl Alias "SampleAddInt" (ByVal i1 As Integer, ByVal i2 As Integer) As Integer %% +
    Annexe A: liens -===Appendix A: links=== -The basis for this tutorial is several threads in the forum. -When it evolves and can stand alone the links to the threads might be removed. -Some interesting links containing information on interfacing libraries created in FreeBASIC and used by other languages or visa versa. +La base de ce tutoriel vient de plusieurs "threads" dans le forum. +Quand il évolue et peut être autonome les liens vers les "threads" doivent être supprimés. +Quelques liens intéressants contenant des informations sur l'interfaçage des bibliothèques créées en FreeBASIC et utilisées par d'autres langages ou vice-versa. +[[http://www.freebasic.net/forum/viewtopic.php?t=6515">Comment compiler un projet C comme une lib statique pour l'inclusion.]] [[http://www.freebasic.net/forum/viewtopic.php?t=6515 How do I compile a C project as a static lib for inclusion..]] diff --git a/fbdocs/manual/cache/TutIntroArrays.wakka b/fbdocs/manual/cache/TutIntroArrays.wakka index f9ce8eba05..de7e15466d 100644 --- a/fbdocs/manual/cache/TutIntroArrays.wakka +++ b/fbdocs/manual/cache/TutIntroArrays.wakka @@ -1,87 +1,87 @@ -{{fbdoc item="title" value="Introduction To Arrays"}}---- -//Written by [[WikiRick rdc]]// +{{fbdoc item="title" value="Introduction To Arrays"}}----
    +//Ecrit par [[WikiRick rdc]]//

    Les tableaux sont sans doute la seule construction de programmation la plus utile qui est à votre disposition dans FreeBasic. Beaucoup de problèmes que vous allez essayer de résoudre avec une solution de programmation portent sur des données organisées dans un format tabulaire, et les tableaux sont parfaits pour la gestion de ce type de données. Comprendre les tableaux est une compétence essentielle pour devenir un programmeur compétent.

    Les tableaux sont des segments de mémoire contigus d'un seul type ou de données composites. Vous pouvez penser un tableau comme une table, avec des lignes et des colonnes de données. Un tableau peut avoir une ou plusieurs lignes, et chaque ligne peut avoir une ou plusieurs colonnes. Le nombre de lignes et de colonnes définissent les dimensions du tableau. FreeBasic utilise le schéma de "ligne-majeur" pour les tableaux, ce qui signifie que la première référence de dimension, est la ligne, dans un tableau qui a plus d'une dimension. FreeBasic prend en charge jusqu'à huit dimensions dans un tableau.

    Tableaux uni-dimensionnels -Arrays are probably the single most useful programming construct that is available to you in FreeBasic. Many problems that you will try to solve with a programming solution involve data arranged in tabular format, and arrays are perfect for managing this type of data. Understanding arrays is a crucial skill in becoming a competent programmer. +

    Un tableau avec une seule ligne est appelé tableau uni-dimensionnel. Si un tableau est uni-dimensionnel, alors la ligne n'est pas définie dans la déclaration, seulement le nombre de colonnes dans la ligne. Comme un tableau nécessite un minimum d'une ligne, la ligne est présumée exister dans ce cas. Les extraits de code suivants créent un tableau d'entiers à une seule dimension en utilisant les différents systèmes de définition d'un tableau disponibles dans FreeBasic.

    %%(freebasic) -Arrays are contiguous memory segments of a single or composite data type. You can think of an array as a table, with rows and columns of data. An array can have one or more rows, and each row can have one or more columns. The number of rows and columns define the dimensions of the array. FreeBasic uses the row-major scheme for arrays, which means that the first dimension references the row in an array that has more than one dimension. FreeBasic supports up to eight dimensions in an array. +Dim myArray(10) As Integer

    Dim myArray(1 To 10) As Integer
    -=== One-Dimensional Arrays === +##

    La première méthode définira un tableau avec une seule rangée et 11 colonnes, avec des indices de colonne (numéros) allant de 0 à 10. La seconde méthode définit les limites inférieure et supérieure en utilisant le mot-clé ##**To**##. Ici les indices varieront de 1 à 10.

    Les indices des tableaux uni-dimensionnels -An array with a single row is called a one-dimensional array. If an array is a single-dimensional array, then the row is not defined in the declaration, only the number of columns in the row. Since an array requires a minimum of one row, the row is understood to exist in this case. The following code snippets create a single-dimension integer array using the different array definition schemes available in FreeBasic. +

    Vous pouvez accéder à chaque élément d'un tableau en utilisant une valeur d'indice. Dans le cas d'un tableau à une dimension, l'indice se réfère à un numéro de colonne dans la ligne par défaut. Le format est d'utiliser le nom de la variable tableau suivi de l'indice entre parenthèses.

    %%(freebasic) -%%(freebasic) -Dim myArray(10) as Integer +myArray(5) = 7
    +##

    Cela mettra la colonne 5 du tableau à 7.

    %%(freebasic) -Dim myArray(1 To 10) as Integer -%% +myInt = myArray(5)
    +##

    ##**myInt**## sera affectée avec la valeur courante de la colonne 5 de ##**myArray**##.

    Les tableaux bi-dimensionnels -The first method will define an array with a single row and 11 columns, with column indexes (numbers) ranging from 0 to 10. The second method defines the lower and upper bounds using the ##To## keyword. Here the indexes will range from 1 to 10. +

    Un tableau bi-dimensionnel est un tableau qui a plus d'une rangée, avec des colonnes définies. Un tableau bi-dimensionnel est comme une table, avec un nombre défini de lignes, où chacune a un nombre défini de colonnes. L'extrait de code suivant définit un tableau en utilisant la méthode par défaut.

    %%(freebasic) -=== One-Dimensional Array Indexes === +Dim myArray(2, 10) As Integer
    -You access each element of an array using an index value. In the case of a single-dimension array, the index would refer to a column number in the default row. The format is to use the array variable, with the index surrounded by parenthesis. +##

    La première dimension définit le nombre de lignes du tableau, alors que la deuxième définit le nombre de colonnes de chaque ligne. Dans cet exemple, le tableau a 3 lignes, numérotées de 0 à 2 et chaque ligne a 11 colonnes, numérotées de 0 à 10.

    Vous pouvez aussi définir les bornes inférieure et supérieure d'un tableau.

    %%(freebasic) -%%(freebasic) -myArray(5) = 7 -%% +Dim myArray(1 To 2, 1 To 10) As Integer
    +##

    Cette définition positionne le nombre de lignes à 2, numérotées de 1 à 2 et le nombre de colonnes à 10, numérotées de 1 à 10.

    Les indices des tableaux bi-dimensionnels +

    Pour accéder aux éléments d'un tableau bi-dimensionnel, vous devez utiliser deux index. Le premier sélectionne la ligne et le second la colonne de cette ligne.

    %%(freebasic) -This would set column 5 in the array to 7. +myArray(1, 5) = 7
    -%%(freebasic) -myInt = myArray(5) -%% +##

    Ce code met à 7 la colonne 5 de la ligne 1.

    %%(freebasic) +myInt = myArray(1, 5)
    +##

    ##**myInt**## sera affecté avec la valeur courante contenue dans la colonne 5 de la ligne 1 du tableau.

    Tableaux multi-dimensionnels -This will set the value of ##myInt## to the current value of column 5 in ##myArray##. +

    Pour les tableaux de trois dimensions ou plus, vous devez utiliser le même format que ci-dessus, en tenant compte de la progression des dimensions de tableau. Pour un tableau à trois dimensions, la première dimension serait la ligne, la deuxième la colonne, la troisième serait l'ordre-z, ou la profondeur, pour chaque colonne.

    Par exemple, pour définir un cube dans l'espace, vous devez utiliser les formats y, x, z, où y définit l'axe vertical, x l'axe horizontal et z l'axe de la profondeur. Pour créer un tableau dans ce format, vous pouvez définir le tableau ainsi:

    %%(freebasic) -=== Two-Dimensional Arrays === +Dim myCube(y, x, z) As Integer.
    -A two-dimensional array is an array that has more than one row, along with the defined columns. A two-dimensional array is like a table, with a defined number of rows, where each row has a defined number of columns. The following code snippet defines an array using the default method. +##

    ##**MyCube(10, 10, 10)**## créera un cube de 11 unités verticalement, 0 à 10, 11 unités horizontalement, 0 à 10 et 10 unités en profondeur, 0 à 10. Pour accéder au centre du cube, vous pouvez utiliser ##**iCenter = myCube(5, 5, 5)**##.

    Vous n'aurez probablement jamais besoin d'utiliser des tableaux de plus de trois dimensions, à moins que vous accomplissiez des calculs mathématiques avancés. Toutefois, si vous avez besoin d'utiliser des tableaux de dimensions supérieures, les mêmes principes s'appliquent.

    Les tableaux dynamiques -%%(freebasic) -Dim myArray(2, 10) as Integer -%% +

    Les tableaux décrits ci-dessus sont des tableaux statiques; la taille du tableau ne peut pas changer au cours de l'exécution du programme. Vous pouvez également créer des tableaux dynamiques qui peuvent changer de taille au cours de l'exécution. Les tableaux dynamiques sont utiles pour créer des structures de données telles que les piles ou les files d'attente.

    Les tableaux statiques, ceux décrits ci-dessus, sont conservés sur le tas (heap), alors que les tableaux dynamiques sont attribuées partir du stock (pool) de mémoire de l'ordinateur. Le compilateur alloue dynamiquement la mémoire pour le tableau sur la base des dimensions demandées par le tableau.

    Vous spécifiez un tableau dynamique en utilisant le mot-clef ##**ReDim**##.

    %%(freebasic) +ReDim myArray(1 To 5, 1 To 5) As Integer
    +##

    Si vous ne connaissez pas les limites du tableau nécessaires au début de l'exécution du programme, vous pouvez définir un tableau avec des des indices vides.

    %%(freebasic) -The first dimension defines the number of rows in the array, while the second dimension defines the number of columns in each row. In this example, the array has 3 rows, numbered 0 to 2, and each row has 11 columns, numbered 0 to 10. +Dim myArray() As Integer
    -You can also define the lower and upper bounds of the array. +##

    Dans ce cas, le compilateur définit une valeur par défaut de 0 pour la taille du tableau. Vous pouvez ensuite utiliser le mot-clef ##**ReDim**## à un moment donné dans le programme pour définir les limites de tableau.

    ReDim et ReDim Preserve -%%(freebasic) -Dim myArray(1 to 2, 1 to 10) as Integer -%% +

    Les tableaux dynamiques peuvent changer de taille pendant l'exécution. ##**ReDim**## efface le contenu du tableau avec les valeurs par défaut du type de données, alors que ##**ReDim Preserve**## conservera intact le contenu existant, à moins que la taille du tableau ne soit plus petite que la taille précédente.

    Fonctions sur les tableaux +

    Il ya un certain nombre de [[CatPgArray fonctions]] que vous pouvez utiliser avec des tableaux.

    Tableaux de Types composites +

    Les définitions de ##**Type**## vous permettent de regrouper des données liées en une seule entité, et souvent vous aurez besoin de plus d'une instance d'un ##**Type**## pour exprimer pleinement vos données. Des tableaux de ##**Type**## vous permettent de créer plusieurs instances d'une définition de ##**Type**## qui peuvent être facilement gérées à l'aide des fonctions tableaux. Un exemple de cet usage peut être un système d'inventaire pour votre RPG (Role Playing Game = Jeu de rôles), une série de descriptions de documents dans un éditeur et un ensemble de fiches d'employés d'une base de données à accès aléatoire.

    Vous créez des tableaux de ##**Type**##s comme vous le feriez avec n'importe quel type de données intrinsèques. L'extrait de code suivant illustre la syntaxe.

    %%(freebasic) -This definition would set the number of rows to 2, numbered 1 to 2 and the number of columns to 10, numbered 1 to 10. +Type myPoint
    row As Integer
    col As Integer
    End Type

    Type myLine
    p1 As myPoint
    p2 As myPoint
    char As String * 1
    End Type

    Dim myLineSet (1 To 3) As myLine
    -=== Two-Dimensional Array Indexes === +##

    Le code définit un ensemble de 3 lignes, avec les points d'extrémités ##**p1**## et ##**p2**##, où chaque point d'extrémité se situe à ##**row**## et ##**col**##. Vous pouvez accéder aux éléments du tableau en utilisant une combinaison d'indice de tableau et d'opérateur point.

    %%(freebasic) -To access the array elements of a two-dimensional array, you would use two indexes. The first index selects the row, and the second index selects a column within that row. +myLineSet(1).p1.row = 1
    myLineSet(1).p1.col = 1
    myLineSet(1).p2.row = 10
    myLineSet(1).p2.col = 10
    myLineSet(1).char = Chr(219)
    -%%(freebasic) -myArray(1, 5) = 7 -%% +##

    Les tableaux dans les ##**Type**##s +

    Non seulement vous pouvez créer un tableau de ##**Type**## composite, vous pouvez avoir un tableau comme champ dans un ##**Type**## composite. L'exemple ci-dessus peut être écrit de manière plus efficace en remplaçant ##**p1**## et ##**p2**## avec un tableau.

    %%(freebasic) +Type myPoint
    row As Integer
    col As Integer
    End Type

    Type myLine
    pts(1 To 2) As myPoint
    char As String * 1
    End Type

    Dim myLineSet (1 To 3) As myLine
    -This code would set column 5 in row 1 to 7. +##

    Ici ##**pts**## est un tableau de ##**myPoint**##. Pour accéder à cette structure vous pouvez utiliser une combinaison d'indices et d'opérateurs points.

    %%(freebasic) -%%(freebasic) -myInt = myArray(1, 5) -%% +myLineSet(1).pts(1).row = 1
    myLineSet(1).pts(1).col = 1
    myLineSet(1).pts(2).row = 10
    myLineSet(1).pts(2).col = 10
    myLineSet(1).char = Chr(219)
    +##

    ##**myLineSet**## est un tableau, donc vous utilisez une valeur d'indice. ##**pts**## est un élément du ##**Type**##, donc vous devez le qualifier avec l'opérateur point. Cependant, ##**pts**## est aussi un tableau, donc vous devez utiliser un indice pour sélectionner chaque élément ##**pts**## du tableau. ##**Row**## et ##**col**## sont des éléments du ##**Type**## "##**myPoint**##" et sont accessibles avec l'opérateur point.

    Utiliser un tableau pour les points de terminaison vous permet d'étendre facilement la définition de la ligne pour supporter autre chose que des lignes, par exemple des triangles et des carrés. L'extrait de code suivant montre une définition possible.

    %%(freebasic) +Type myObj
    objid As Integer
    Union
    myLine(1 To 2) As myPoint
    myTriangle(1 To 3) As myPoint
    mySquare(1 To 4) As myPoint
    End Union
    char As String * 1
    End Type
    -This code would set myInt to the current value contained within column 5 of row 1 of the array. +##

    Le champ ##**objid**## indique quel ##**Type**## d'objet est contenu dans la définition de l'##**Union**##. C'est à dire qu' un 1 peut indiquer une ligne, un 2 un triangle et un 3 un carré. Puisque la définition définit un objet unique, une ##**Union**## est utilisée pour inclure les tableaux des points d'extrémités pour maximiser l'utilisation de la mémoire.

    Pour afficher l'objet à l'écran, examiner ##**objid**## puis utiliser ##**objid**## et ##**Ubound**## de la définition appropriée du tableau des points-extrémités, afficher le nombre de lignes qui correspondent au type d'objet.

    L'une des améliorations supplémentaires que vous pouvez apporter à ce programme est d'ajouter un pointeur de fonction vers la définition de type puis écrire des routines d'affichage qui correspondent au type d'objet affiché. Cette technique vous permettra d'étendre encore l'utilité du code en simplifiant le processus d'ajout de nouveaux objets à la définition de type.

    Par exemple, si vous avez besoin de décrire un cube, vous pouvez tout simplement ajouter un nouveau tableau à l'##**Union**##, ajouter une fonction d'affichage de cube, et la définition du type serait en mesure d'afficher un cube en ajoutant simplement quelques lignes de code, tout en conservant la fonctionnalité d'origine intacte.

    Initialisation de tableau -=== Multi-Dimensional Arrays === +

    Vous pouvez initialiser un tableau avec des valeurs en utilisant la déclaration ##**Dim**## d'une manière similaire à l'initialisation de tous les autres types de données intrinsèques et de définitions de type. L'extrait de code suivant illustre la syntaxe en utilisant un tableau uni-dimensionnel.

    %%(freebasic) -For arrays of three or more dimensions, you would use the same format as listed above, taking into account the progression of the array dimensions. For a three-dimensional array, the first dimension would be the row, the second the column, the third would be the z-order, or depth, of each column. +Dim aArray(1 To 5) As Integer => {1, 2, 3, 4, 5}
    -For example, to define a cube in space, you would use the y,x,z format, where y defines the vertical axis, x defines the horizontal axis and z defines the depth axis. To create an array in this format you could define the array as: +##

    Cet extrait de code dimensionne un tableau d'entiers avec 5 éléments, puis définit les éléments avec la liste contenue dans les accolades. L'opérateur flèche, ##**=>**## indique au compilateur que la liste qui suit l'instruction ##**Dim**## doit être utilisée pour initialiser le tableau.

    Vous pouvez également dimensionner des tableaux multi-dimensionnels de la même manière, en spécifiant des blocs de données figurant dans des accolades comme l'extrait de code suivant l'illustre.

    %%(freebasic) -%%(freebasic) -Dim myCube(y, x, z) as Integer. -%% +Dim bArray(1 To 2, 1 To 5) As Integer => {{1, 2, 3, 4, 5},{6, 7, 8, 9, 10}}
    +##

    Dans cet exemple, le premier bloc, ##**{1, 2, 3, 4, 5}**##, correspond à la ligne 1, et le deuxième bloc, ##**{6, 7, 8, 9, 10}**##, correspond à la ligne 2. Rappelez-vous que les tableaux FreeBasic sont "ligne-majeur", ainsi la ligne est spécifiée avant la colonne. Lorsque vous initialisez un tableau de cette manière, vous devez être sûr que le nombre d'éléments définis s'intégrera dans le tableau.

    Initialisation de tableau de ##**Type**## +

    Non seulement vous pouvez initialiser un tableau de ##**Type**##s de données simples, Vous pouvez également initialiser un tableau avec des ##**Type**##s composites. L'extrait de code suivant illustre un tableau de ##**Type**##s qui contient lui-même un tableau comme un élément.

    %%(freebasic) -##MyCube(10, 10, 10)## would create a cube with 11 vertical units, 0 to 10, 11 horizontal units, 0 to 10 and 10 depth units, 0 to 10. To access the center of the cube, you would use ##iCenter = myCube(5, 5, 5)##. +Type aType
    a As Integer
    b As Byte
    c(1 To 2) As String * 10
    End Type

    Dim As aType myType(1 To 2) => { (1234, 12, {"Hello", "World"}), (5678, 24, {"From", "Freebasic"})}
    -You will probably never need to use arrays of more than three dimensions, unless you are doing some advanced mathematical calculations. However, if you need to use higher-dimensional arrays, the same principles apply. +##

    Les accolades signifient qu'il s'agit d'une initialisation de tableau, tandis que les parenthèses indiquent l'initialisation d'un ##**Type**##. Comme le ##**Type**## contient un tableau, vous pouvez utiliser les accolades pour charger les données dans ce tableau incorporé, comme vous le feriez avec un tableau autonome. Si le tableau incorporé est un tableau multi-dimensionnel, vous aurez alors besoin d'envelopper chaque ligne avec ##**{**## et ##**}**## comme vous le feriez pour un tableau autonome.

    Utilisation du commutateur de compilation -exx -=== Dynamic Arrays === +

    Le commutateur de compilation ##**-exx**## permettra le contrôle des erreurs et la vérification des limites de tableau au sein de votre programme. Si vous allez à l'extérieur des limites d'un tableau dans votre programme, le compilateur génère une erreur "##**out of bounds**##" lorsque le programme est en cours d'exécution.

    Ceci est une grande aide dans le débogage de votre programme et pour trouver des problèmes liés aux tableaux. ##**-exx**## vous informera également des assignations de pointeur NULL, il est donc aussi très utile lorsque vous travaillez avec des pointeurs.

    Utiliser ##**-exx**## ajoute un peu de code supplémentaire à votre programme, donc une fois que votre programme fonctionne correctement, compilez-le sans ##**-exx**##. The arrays described above are static arrays; the array size cannot change during program execution. You can also create dynamic arrays that can change size during execution. Dynamic arrays are useful for creating data structures such as stacks or queues. @@ -228,7 +228,7 @@ The curly brackets signify that this is an array initialization, while the paren === Using the -exx Compiler Switch === -The -exx compiler switch will enable error and bounds checking within your program. If you go outside the bounds of an array within your program, the compiler will generate an out of bounds error while the program is running. +The -exx compiler switch will enable error and bounds checking within your program. If you go outside the bounds of an array within your program, the compiler will generate an "out of bounds" error while the program is running. This is a great help in debugging your program, and finding problems associated with arrays. -exx will also inform of you of Null pointer assignments, so it is quite useful when working with pointers as well. diff --git a/fbdocs/manual/cache/TutIntroExtType.wakka b/fbdocs/manual/cache/TutIntroExtType.wakka index 734af45505..0ea11d9a2b 100644 --- a/fbdocs/manual/cache/TutIntroExtType.wakka +++ b/fbdocs/manual/cache/TutIntroExtType.wakka @@ -1,47 +1,47 @@ {{fbdoc item="title" value="Introduction to the Extended Type"}}---- //Written by [[WikiRick rdc]]// -=== Introduction=== +
    Introduction -FreeBasic is moving towards implementing Object Oriented programming. While classes have not yet been added to the language, the Type definition has been extended to include some Object Oriented constructs as a first step towards full class support. This article introduces some of the concepts of Object Oriented design and explains some of the extended type constructs. +FreeBASIC s'oriente vers la mise en oeuvre de la Programmation Orientée Objet (POO). Alors que les classes n'ont pas encore été ajoutées au langage, la définition de type a été élargie pour inclure certaines constructions orientées objet comme une première étape vers le soutien complet de la classe. Cet article présente quelques-uns des concepts de conception orientée objet et explique certaines des constructions de type étendu. -=== Object Oriented Programming=== +
    Programmation Orientée Objet (POO) -Object Oriented Programming, usually shortened to OOP, is a methodology that enables the programmer to build code units called objects. An object is a thing; it is a unit of code that represents something that needs to be manipulated in a program. You can think of an object as a noun: a person, place or thing. An object could be a sprite, a drawing primitive or something more elaborate like a tank in a game. Any concrete entity that has a set of characteristics and actions can be represented as an object. +La Programmation Orientée Objet, habituellement abrégée POO, est une méthodologie qui permet au programmeur de construire des unités de code appelés objets. Un objet est une chose; il s'agit d'une unité de code qui représente quelque chose qui doit être manipulé dans un programme. Vous pouvez penser à un objet comme un substantif: une personne, un lieu ou une chose. Un objet peut être un "sprite", une primitive de dessin ou quelque chose de plus élaboré comme un tank dans un jeu. Toute entité concrète qui a un ensemble de caractéristiques et d'actions peuvt être représentée comme un objet. -An object contains both the data needed by the object, and the methods (subroutines and functions) that act on the data. This grouping of data and methods into a single entity is called encapsulation. Encapsulation allows you to create modular units that can be reused in multiple programs. This idea of code reuse was the main motivation in the creation of the OOP paradigm. +Un objet contient à la fois les données nécessaires pour l'objet et les méthodes (des sous-programmes et fonctions) qui agissent sur les données. Ce regroupement de données et méthodes en une seule entité est appelée encapsulation. L'encapsulation permet de créer des unités modulaires qui peuvent être réutilisées dans plusieurs programmes. Cette idée de la réutilisation du code a été la principale motivation de la création du paradigme de la POO. -Another beneficial consequence of encapsulation is information hiding. The data inside the object is shielded from the outside world so that unwanted changes to the data cannot occur. Instead of accessing a variable directly, the object has a public interface that the external program should use to access and change data members. By using an interface, you can control how the object behaves and ensure that its operation is consistent across many programs. +Une autre conséquence bénéfique de l'encapsulation est de cacher l'information. Les données à l'intérieur de l'objet sont à l'abri du monde extérieur afin que des modifications indésirables des données ne puissent pas se produire. Au lieu d'accéder directement à une variable, l'objet a une interface publique que le programme externe doit utiliser pour accéder et modifier les données membres. En utilisant une interface, vous pouvez contrôler la façon dont l'objet se comporte et vous assurer que son fonctionnement est cohérent à travers de nombreux programmes. -The interface also allows you to make internal changes to the code, without changing the way the object is accessed. As long as you dont change the published interface, that is change any existing public methods, you can improve the object without breaking any existing code that relies on the object. In the cases where a program my need an improved method, you can leave the old method in place to maintain compatibility, and just add a new method with the improved functionality. New programs can use the new method, while old programs can still use the old method. +L'interface vous permet également de faire des changements internes du code, sans changer la façon dont l'objet est accessible. Tant que vous ne changez pas l'interface publiée, c'est à dire de modifier les méthodes publiques existantes, vous pouvez améliorer l'objet sans casser tout le code existant qui repose sur l'objet. Dans le cas où un de vos programmes a besoin d'une méthode améliorée, vous pouvez laisser l'ancienne méthode en place pour maintenir la compatibilité, et il suffit d'ajouter une nouvelle méthode avec la fonctionnalité améliorée. Les nouveaux programmes peuvent utiliser la nouvelle méthode, tandis que les anciens programmes peuvent toujours utiliser l'ancienne méthode. -Another advantage of using a public interface is so that other programmers can use your object without worrying about the internal details of the object. As long as the published interface is stable and well documented, anyone should be able to use your object, even beginners. +Un autre avantage d'utiliser une interface publique est que d'autres programmeurs peuvent utiliser votre objet sans se soucier des détails internes de l'objet. Tant que l'interface publiée est stable et bien documentée, n'importe qui devrait être en mesure d'utiliser votre objet, même des débutants. -=== The Published Contract=== +
    Le contrat de publication -As already stated, OOP was designed to enable code reuse among programmers. In order for code reuse to be helpful, the published interface must remain stable. That is, once an object has been released and is being used in programs, the published interface should not change so that programs that use the object continue to work correctly. There is an implicit contract between you as the author of the object and the end-user of your object that you will maintain the published interface across changes that may need to be made to the object. This implicit contract between author and user is the main strength of the OOP paradigm, and is the main reason that OOP has become such a powerful programming methodology. +Comme déjà indiqué, la POO a été conçue pour permettre la réutilisation du code entre les programmeurs. De façon à ce que la réutilisation du code soit utile, l'interface publiée doit rester stable. Ceci dit, une fois qu'un objet a été libéré et est utilisé dans les programmes, l'interface publiée ne devrait pas changer afin que les programmes qui utilisent l'objet continuent à travailler correctement. Il y a un contrat implicite entre vous en tant qu'auteur de l'objet et l'utilisateur final de votre objet que vous maintiendrez l'interface publiée à travers les changements qui peuvent être nécessaires à l'objet. Ce contrat implicite entre l'auteur et l'utilisateur est la principale force du paradigme POO, et c'est la raison principale pour laquelle la POO est devenue une telle méthodologie de programmation puissante. -=== The Characteristics of an Object=== +
    Les caractéristiques d'un objet -As already mentioned, an object contains both data and methods. The data describes the properties of an object, while the methods describe what the object can do. A simple, and not-really-useful example will illustrate this concept. +Comme déjà mentionné, un objet contient à la fois des données et des méthodes. Les données décrivent les propriétés d'un objet, tandis que les méthodes de décrivent ce que l'objet peut faire. Un exemple simple et pas vraiment utile pour illustrer ce concept. -Suppose you want to create an object that draws a rectangle on the screen. A rectangle can have several properties that would be contained within the data members of the object. A rectangle has an origin on the screen, normally the top left corner, which can be represented by x and y data members. A rectangle has a width and a height, so the object would have width and height data members. A rectangle can either be outlined or filled, so a filled flag data member can be added to the object. Of course, if you are going to draw a rectangle, you will want to draw it in a particular color, so the object will need to have a color data member, and to have the object be a bit more flexible, you can add a color member for the outline and a different color member for the fill. Of course you will need a method to actually draw the rectangle on the screen, so you can add a draw routine to the object definition. +Supposons que vous voulez créer un objet qui dessine un rectangle sur l'écran. Un rectangle peut avoir plusieurs propriétés qui seront contenues dans les données membres de l'objet. Un rectangle a une origine sur l'écran, normalement dans le coin supérieur gauche, qui peut être représenté par les données membres x et y. Un rectangle a une largeur et une hauteur, donc l'objet aura des données membres largeur et la hauteur. Un rectangle peut être vide ou rempli, donc un membre de donnée "drapeau de remplissage" peut être ajouté à l'objet. Bien sûr, si vous dessinez un rectangle, vous voudrez le dessiner dans une couleur particulière, donc l'objet aura besoin d'avoir un membre de données de couleur, et pour avoir un objet qui soit un peu plus flexible, vous pouvez ajouter un membre pour la couleur du contour et un membre de couleur différente pour le remplissage. Bien sûr, vous aurez besoin d'une méthode pour dessiner le rectangle réellement sur l'écran, ainsi vous pouvez ajouter une routine qui le dessinera dans la définition d'objet. -So our rectangle object has the following preliminary properties and methods: +Donc, pour commencer, notre objet rectangle a les propriétés et méthodes suivantes: -~- Property: x and y origin -~- Property: width -~- Property: height -~- Property: filled -~- Property: outline color -~- Property: fill color -~- Method: DrawRectangle +Propriété: origine x et y +Propriété: largeur +Propriété: hauteur +Propriété: rempli +Propriété: la couleur du contour +Propriété: la couleur de remplissage +Méthode: tracé du rectangle This list is called the object definition. In FreeBasic you define an object using the extended Type definition. The extended Type is similar to the standard Type, with some added language constructs that implements a subset of OOP features. -=== A Rectangle Type Definition=== +
    A Rectangle Type Definition -The following code snippet is a partial rectangle definition: +Le code suivant est une définition partielle du rectangle: %%(freebasic) Type myRect Private: @@ -56,9 +56,9 @@ Type myRect Declare Sub DrawRect() End Type %% -As you can see, the extended Type looks much like a standard Type except for the Private: and Public: keywords and the sub declaration. The Private: keyword tells the compiler that the data members that follow are private to the type, that is cannot be accessed outside of the type. The private state extends to all object members until a new qualifier is encountered, which in this case is the Public: qualifier just above the Sub declaration. All of the data members are hidden from the outside world and cannot be changed from outside the scope of the Type, a process called information hiding. The underscore appended to the private variables is the common way to define private variables. +Comme vous pouvez le voir, le type étendu ressemble beaucoup à un Type standard, sauf pour Private: et Public: les mots clés et la déclaration de la Sub. Le mot-clé Private: indique au compilateur que les membres de données qui suivent sont du type "privé", et qu'elles ne peuvent pas être accédées en dehors de ce type. L'état "privé" s'étend à tous les membres de l'objet jusqu'à ce qu'un qualificatif nouveau soit rencontré, qui dans ce cas est Public: qualificatif juste au-dessus de la déclaration de la Sub. Tous les membres de données sont cachées du monde extérieur et ne peuvent être changés de l'extérieur de la portée de ce type, un processus appelé "le masquage des information". Le trait de soulignement ajouté aux variables privées est la voie commune pour définir des variables privées. -Information hiding is a way to maintain the integrity of the object. You should never allow an outside process to directly access a data member. All data access should be through the use of Property members so that you can control what is being passed to your object. Strict control over your objects data will help prevent many errors that may occur when a programmer uses your object. +Le masquage d'information est un moyen de maintenir l'intégrité de l'objet. Vous ne devriez jamais permettre à un processus externe d'accéder directement à un membre de données. Tous les accès aux données doivent se faire par l'utilisation de la propriété des membres de sorte que vous pouvez contrôler ce qui est transmis à votre objet. Un contrôle strict sur les données de votre Object va aider à prévenir de nombreuses erreurs qui peuvent survenir quand un programmeur utilise votre objet. %%(freebasic) Type myRect Private: @@ -87,15 +87,15 @@ Type myRect Declare Property FillColor() As Integer End Type %% -The Declare statements following the Public: qualifier comprises the public interface to your object. Since the variables of the type are defined with the Private: keyword, the only way to access the variables is through the Property members maintaining the integrity of the object. Since you define the code in each Property member, you have full control over what is being put into your object. A common example of this is to put range checking code in your property members so that the object does not contain invalid data. +Les instructions Declare suivant le qualificatif Public: forment l'interface publique de votre objet. Comme les variables de ce type sont définies avec mot-clé Private:, la seule façon d'accéder à des variables se fait par les membres Property pour maintenir l'intégrité de l'objet. Puisque vous de définissez le code de chaque "Property membre", vous avez le plein contrôle sur ce qui est mis dans votre objet. Un exemple courant de ceci est de mettre une gamme de code de vérification dans votre les "Property membres" de sorte que l'objet ne contienne pas de données invalides. -In this example, the variables can be both written and read. The compiler distinguishes between a read Property and a write Property by the type of the method. A subroutine-formatted Property is a write property since you are passing a value that will be saved in a private variable. A function-formatted Property is a read property since a private variable will be returned to the caller. You can create read-only Properties by adding just a function-formatted Property or write-only Properties by just adding a subroutine-formatted Property. +Dans cet exemple, les variables peuvent être à la fois lues et écrites. Le compilateur fait la distinction entre une "Property en lecture" et une "Property en écriture" d'après le type de la méthode. Une "Property formatée Sub" est une "Property en écriture" puisque vous passez une valeur qui sera enregistrée dans une variable privée. Une "Property formatée Function" est une "Property en lecture" puisqu'une variable privée sera retournée à l'appelant. Vous pouvez créer des "Property en lecture seule" en ajoutant seulement une "Property formatée Function" ou une "Property en écriture seule" en ajoutant seulement une "Property formatée Sub" -=== Creating Well-Behaved Objects=== +
    Création d'objets au comportement correct -The definition looks complete at this point, but there is a problem. What would happen if some or all of the variables were not initialized? The object would not perform correctly and potentially generate a runtime error. It would be better to have a set of default values for the object variables just in case one or more variables did not get initialized. You can initialize the object at the moment of creation by using a Constructor. +La définition semble complète à ce stade, mais il y a un problème. Que se passera-t-il si une partie ou l'ensemble des variables n'ont pas été initialisées? L'objet ne fonctionnera pas correctement et générera potentiellement une erreur d'exécution. Il serait préférable d'avoir un ensemble de valeurs par défaut pour les variables de l'objet, juste au cas où une ou plusieurs variables ne soient pas initialisées. Vous pouvez initialiser l'objet au moment de la création en utilisant un constructeur (Constructor) -A Constructor is a subroutine that is called when the object is created using the Dim (or New) statement. Constructors are useful for initializing an object, either with default values, or values you pass to the Constructor. The updated type definition now looks like the following: +Un constructeur est une fonction qui est appelée lorsque l'objet est créé en utilisant l'instruction Dim (ou New). Les constructeurs sont utiles pour initialiser un objet, soit avec des valeurs par défaut, soit par les valeurs que vous passez au constructeur. La définition du type mise à jour ressemble maintenant à ceci: %%(freebasic) Type myRect Private: @@ -121,26 +121,27 @@ Type myRect Declare Property Otlncolor(Byval oc_ As Integer) Declare Property Otlncolor() As Integer Declare Property FillColor(Byval fc_ As Integer) - Declare Property FillColor() As Integer Declare Constructor() - Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ + Declare Property FillColor() As Integer + Declare Constructor() + Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ h_ As Integer, f_ As Integer, oc_ As Integer, _ - fc_ As Integer) +fc_ As Integer) End Type %% -You will notice in the definition that we have two Constructors, one that takes a set of parameters and one that doesnt. This is called overloading and can be used not only with Constructors but also with other subroutines and functions. Overloading is useful for situations where you need to handle different parameter types with a single method call. The compiler will determine which method to call based on the parameters passed to the method. You can overload as many methods as you want, as long as the number and type of parameters for each method is unique. -In this instance, if the Constructor is not passed any parameter values, it will initialize the variables to a set of default values. If the Constructor is called with parameters, then it will use the passed values to initialize the objects variables. +Vous remarquerez dans la définition que nous avons deux constructeurs, un qui prend un ensemble de paramètres et l'autre non. C'est ce qu'on appelle la surcharge et peut être utilisé non seulement avec les constructeurs, mais aussi avec d'autres sous-programmes et fonctions. La surcharge est utile dans les situations où vous avez besoin de gérer différents types de paramètres avec un seul appel de méthode. Le compilateur détermine la méthode à appeler en fonction des paramètres transmis à la méthode. Vous pouvez surcharger autant de méthodes que vous le souhaitez, tant que le nombre et le type des paramètres de chaque méthode est unique. -There is also a Destructor method that is called when the object is destroyed. You can use the Destructor to perform any cleanup tasks that must be carried out before the object is released from memory. If the object created any pointer references, or opened any files, then you would clean up those references in the Destructor. Since the Rectangle object doesnt create any outside references, a Destructor is not needed. +Dans ce cas, si le constructeur n'est pas passé des valeurs aux paramètres, il va initialiser les variables à un ensemble de valeurs par défaut. Si le constructeur est appelé avec les paramètres, alors il utilisera les valeurs passées pour initialiser les variables de l' objet. -=== Filling in the Object Methods=== +Il y a aussi une méthode Destructor (destructeur) qui est appelée lorsque l'objet est détruit. Vous pouvez utiliser le destructeur pour effectuer les tâches de nettoyage qui doivent être effectuées avant que l'objet ne éliminé de la mémoire. Si l'objet créé des références pointeur ou ouvre des fichiers, vous pourrez alors nettoyer ces références dans le destructeur. Puisque l'objet Rectangle ne crée pas de références à l'extérieur, un destructeur n'est pas nécessaire. -The type definition is a template for the object type and tells the compiler how to set up the object in memory. However, in order to actually use the object, you need to create the actual method calls, which is shown in the next listing. -%%(freebasic) +
    Remplir les méthodes objet +La définition du type est un modèle pour le type d'objet et indique au compilateur comment mettre en place l'objet en mémoire. Toutefois, afin d'utiliser effectivement l'objet, vous devez créer les appels de méthode réelle, ce qui est indiqué dans la liste suivante. Type myRect - Private: + Type myRect + Private: X_ As Integer Y_ As Integer Width_ As Integer @@ -150,120 +151,120 @@ Type myRect Fillcolor_ As Integer Public: Declare Sub DrawRect() - Declare Property X(Byval xx_ As Integer) + Declare Property X(ByVal xx_ As Integer) Declare Property X() As Integer - Declare Property Y(Byval yy_ As Integer) + Declare Property Y(ByVal yy_ As Integer) Declare Property Y() As Integer - Declare Property Width(Byval w_ As Integer) + Declare Property Width(ByVal w_ As Integer) Declare Property Width() As Integer - Declare Property Height(Byval h_ As Integer) + Declare Property Height(ByVal h_ As Integer) Declare Property Height() As Integer - Declare Property Filled(Byval f_ As Integer) + Declare Property Filled(ByVal f_ As Integer) Declare Property Filled() As Integer - Declare Property Otlncolor(Byval oc_ As Integer) + Declare Property Otlncolor(ByVal oc_ As Integer) Declare Property Otlncolor() As Integer - Declare Property FillColor(Byval fc_ As Integer) + Declare Property FillColor(ByVal fc_ As Integer) Declare Property FillColor() As Integer Declare Constructor() - Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ + Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ h_ As Integer, f_ As Integer, oc_ As Integer, _ - fc_ As Integer) -End Type +fc_ As Integer) -Sub myRect.DrawRect() +End Type + Sub myRect.DrawRect() Line (this.x_, this.y_)-(this.x_ + Width - 1, this.y_ + this.height_ - 1), this.Otlncolor_, B - If this.Filled_ <> 0 Then - Paint (this.x_ + 1, this.y_ + 1), this.Fillcolor_, this.Otlncolor_ - End If + If this.Filled_ <> 0 Then + Paint (this.x_ + 1, this.y_ + 1), this.Fillcolor_, this.Otlncolor_ +End If + End Sub + Property myRect.x(ByVal xx_ As Integer) +this.X_ = xx_ -Property myRect.x(Byval xx_ As Integer) - this.X_ = xx_ End Property + Property myRect.x() As Integer +Return this.X_ -Property myRect.x() As Integer - Return this.X_ End Property + Property myRect.y(ByVal yy_ As Integer) +this.Y_ = yy_ -Property myRect.y(Byval yy_ As Integer) - this.Y_ = yy_ End Property + Property myRect.y() As Integer +Return this.y_ -Property myRect.y() As Integer - Return this.y_ End Property + Property myRect.Width(ByVal w_ As Integer) +this.Width_ = w_ -Property myRect.Width(Byval w_ As Integer) - this.Width_ = w_ End Property + Property myRect.Width() As Integer +Return this.Width_ -Property myRect.Width() As Integer - Return this.Width_ End Property + Property myRect.Height(ByVal h_ As Integer) +this.Height_ = h_ -Property myRect.Height(Byval h_ As Integer) - this.Height_ = h_ End Property + Property myRect.Height() As Integer +Return this.Height_ -Property myRect.Height() As Integer - Return this.Height_ End Property + Property myRect.Filled(ByVal f_ As Integer) +this.Filled_ = f_ -Property myRect.Filled(Byval f_ As Integer) - this.Filled_ = f_ End Property + Property myRect.Filled() As Integer +Return this.Filled_ -Property myRect.Filled() As Integer - Return this.Filled_ End Property + Property myRect.Otlncolor(ByVal oc_ As Integer) +this.Otlncolor_ = oc_ -Property myRect.Otlncolor(Byval oc_ As Integer) - this.Otlncolor_ = oc_ End Property + Property myRect.Otlncolor() As Integer +Return this.Otlncolor_ -Property myRect.Otlncolor() As Integer - Return this.Otlncolor_ End Property + Property myRect.FillColor(ByVal fc_ As Integer) +this.Fillcolor_ = fc_ -Property myRect.FillColor(Byval fc_ As Integer) - this.Fillcolor_ = fc_ End Property + Property myRect.FillColor() As Integer +Return this.Fillcolor_ -Property myRect.FillColor() As Integer - Return this.Fillcolor_ End Property - -Constructor myRect + Constructor myRect this.X_ = 0 this.Y_ = 0 this.Width_ = 10 this.Height_ = 10 this.Filled_ = 0 this.Otlncolor_ = 15 - this.Fillcolor_ = 7 -End Constructor +this.Fillcolor_ = 7 -Constructor MyRect (xx_ As Integer, yy_ As Integer, w_ As Integer, _ +End Constructor + Constructor MyRect (xx_ As Integer, yy_ As Integer, w_ As Integer, _ h_ As Integer, f_ As Integer, oc_ As Integer, _ - fc_ As Integer) + fc_ As Integer) this.X_ = xx_ this.Y_ = yy_ this.Width_ = w_ this.Height_ = h_ this.Filled_ = f_ this.Otlncolor_ = oc_ - this.Fillcolor_ = fc_ +this.Fillcolor_ = fc_ End Constructor %% -The Methods and Properties are defined using the Sub/Function/Property methodname.TypeName syntax. This tells the compiler how to match up methods with the proper type definition. The Constructors are defined with the type name for the same reason. The //this// identifier is a hidden parameter that is passed to the methods that refers to the defined type. You use the //this// identifier to specify that you want to access the type constructs. -=== Using Your Object=== +Les méthodes et propriétés sont définies en utilisant la syntaxe "Sub/Function/Propriété nom de méthode.TypeName". Cela indique au compilateur comment faire correspondre aux méthodes à la définition du type approprié. Pour la même raison, les constructeurs sont définis avec le nom du type. L'identifiant //this// est un paramètre caché qui est passé aux méthodes qui se réfèrent au type défini. Vous utilisez l'identifiant //this// pour spécifier que vous voulez accéder à des constructions du type. -The object is now complete can be used in a program which is listed below. -%%(freebasic) +
    Utilisation de votre objet +L'objet maintenant complet peut être utilisé dans le programme ci-dessous. Type myRect - Private: + Type myRect + Private: X_ As Integer Y_ As Integer Width_ As Integer @@ -273,136 +274,135 @@ Type myRect Fillcolor_ As Integer Public: Declare Sub DrawRect() - Declare Property X(Byval xx_ As Integer) + Declare Property X(ByVal xx_ As Integer) Declare Property X() As Integer - Declare Property Y(Byval yy_ As Integer) + Declare Property Y(ByVal yy_ As Integer) Declare Property Y() As Integer - Declare Property Width(Byval w_ As Integer) + Declare Property Width(ByVal w_ As Integer) Declare Property Width() As Integer - Declare Property Height(Byval h_ As Integer) + Declare Property Height(ByVal h_ As Integer) Declare Property Height() As Integer - Declare Property Filled(Byval f_ As Integer) + Declare Property Filled(ByVal f_ As Integer) Declare Property Filled() As Integer - Declare Property Otlncolor(Byval oc_ As Integer) + Declare Property Otlncolor(ByVal oc_ As Integer) Declare Property Otlncolor() As Integer - Declare Property FillColor(Byval fc_ As Integer) + Declare Property FillColor(ByVal fc_ As Integer) Declare Property FillColor() As Integer Declare Constructor() - Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ + Declare Constructor(xx_ As Integer, yy_ As Integer, w_ As Integer, _ h_ As Integer, f_ As Integer, oc_ As Integer, _ - fc_ As Integer) -End Type +fc_ As Integer) -Sub myRect.DrawRect() +End Type + Sub myRect.DrawRect() Line (this.x_, this.y_)-(this.x_ + this.Width_ - 1, this.y_ + this.height_ - 1), this.Otlncolor_, B - If this.Filled_ <> 0 Then - Paint (this.x_ + 1, this.y_ + 1), this.Fillcolor_, this.Otlncolor_ - End If + If this.Filled_ <> 0 Then + Paint (this.x_ + 1, this.y_ + 1), this.Fillcolor_, this.Otlncolor_ +End If + End Sub + Property myRect.x(ByVal xx_ As Integer) +this.X_ = xx_ -Property myRect.x(Byval xx_ As Integer) - this.X_ = xx_ End Property + Property myRect.x() As Integer +Return this.X_ -Property myRect.x() As Integer - Return this.X_ End Property + Property myRect.y(ByVal yy_ As Integer) +this.Y_ = yy_ -Property myRect.y(Byval yy_ As Integer) - this.Y_ = yy_ End Property + Property myRect.y() As Integer +Return this.y_ -Property myRect.y() As Integer - Return this.y_ End Property + Property myRect.Width(ByVal w_ As Integer) +this.Width_ = w_ -Property myRect.Width(Byval w_ As Integer) - this.Width_ = w_ End Property + Property myRect.Width() As Integer +Return this.Width_ -Property myRect.Width() As Integer - Return this.Width_ End Property + Property myRect.Height(ByVal h_ As Integer) +this.Height_ = h_ -Property myRect.Height(Byval h_ As Integer) - this.Height_ = h_ End Property + Property myRect.Height() As Integer +Return this.Height_ -Property myRect.Height() As Integer - Return this.Height_ End Property + Property myRect.Filled(ByVal f_ As Integer) +this.Filled_ = f_ -Property myRect.Filled(Byval f_ As Integer) - this.Filled_ = f_ End Property + Property myRect.Filled() As Integer +Return this.Filled_ -Property myRect.Filled() As Integer - Return this.Filled_ End Property + Property myRect.Otlncolor(ByVal oc_ As Integer) +this.Otlncolor_ = oc_ -Property myRect.Otlncolor(Byval oc_ As Integer) - this.Otlncolor_ = oc_ End Property + Property myRect.Otlncolor() As Integer +Return this.Otlncolor_ -Property myRect.Otlncolor() As Integer - Return this.Otlncolor_ End Property + Property myRect.FillColor(ByVal fc_ As Integer) +this.Fillcolor_ = fc_ -Property myRect.FillColor(Byval fc_ As Integer) - this.Fillcolor_ = fc_ End Property + Property myRect.FillColor() As Integer +Return this.Fillcolor_ -Property myRect.FillColor() As Integer - Return this.Fillcolor_ End Property - -Constructor myRect + Constructor myRect this.X_ = 0 this.Y_ = 0 this.Width_ = 10 this.Height_ = 10 this.Filled_ = 0 this.Otlncolor_ = 15 - this.Fillcolor_ = 7 -End Constructor +this.Fillcolor_ = 7 -Constructor MyRect (xx_ As Integer, yy_ As Integer, w_ As Integer, _ +End Constructor + Constructor MyRect (xx_ As Integer, yy_ As Integer, w_ As Integer, _ h_ As Integer, f_ As Integer, oc_ As Integer, _ - fc_ As Integer) + fc_ As Integer) this.X_ = xx_ this.Y_ = yy_ this.Width_ = w_ this.Height_ = h_ this.Filled_ = f_ this.Otlncolor_ = oc_ - this.Fillcolor_ = fc_ -End Constructor +this.Fillcolor_ = fc_ +End Constructor 'Create a graphic screen -Screen 18 +Screen 18 'Create an object using the default constrcutor Dim aRect As myRect 'Create an object by explicitly setting the constructor values -Dim bRect As myRect = myRect(200, 200, 200, 100, 1, 15, 9) +Dim bRect As myRect = myRect(200, 200, 200, 100, 1, 15, 9) 'Draw the rectangles on the screen aRect.DrawRect -bRect.DrawRect +bRect.DrawRect 'Update aRect properties aRect.X = 90 aRect.Y = 20 aRect.Filled = 1 -aRect.FillColor = 15 +aRect.FillColor = 15 'Draw new rect aRect.DrawRect Sleep End -%% -To initialize the object using the default Constructor, you simply Dim the extended Type just as you would the standard type. If the Constructor only takes a single value then you can use the Dim var as Typename = value syntax. To initialize the object with a set of values, you Dim the type and then use the = typename(par1m parm1) syntax. You can see that accessing the members of the object is just like accessing the member of a standard type. +%% -Thanks to cha0s at the FreeBasic forums for the information regarding Properties. +Pour initialiser l'objet avec le constructeur par défaut, il vous suffit de //Dim//ensionner le type étendu comme vous le feriez avec un type standard. Si le constructeur ne prend qu'une seule valeur, alors vous pouvez utiliser la syntaxe //Dim var As TypeName = valeur//. Pour initialiser l'objet avec un ensemble de valeurs, vous //Dim//ensionner le type et ensuite vous utilisez la syntaxe //= typename (par1m parm1 ...)//. Vous pouvez voir que l'accès aux membres de l'objet est identique à l'accès au membre d'un type standard. diff --git a/fbdocs/manual/cache/TutIntroScope.wakka b/fbdocs/manual/cache/TutIntroScope.wakka index c371721da9..7bf08c0a8f 100644 --- a/fbdocs/manual/cache/TutIntroScope.wakka +++ b/fbdocs/manual/cache/TutIntroScope.wakka @@ -1,98 +1,98 @@ {{fbdoc item="title" value="Introduction to Variable Scope"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -=== Variable Scope === +
    Variable Scope -Scope refers to the visibility of a variable, where you can access a variable within a program. Before you can understand the different levels of scope, you need to understand the structure of a program in FreeBasic. +##**Scope = portée**## fait référence à la visibilité d'une variable, où vous pouvez accéder à une variable dans un programme. Avant de pouvoir comprendre les différents niveaux de portée, vous devez comprendre la structure d'un programme en FreeBasic. -== Program Structure == +** Structure d'un programme ** -A complete program is composed of one or more .bas files, called modules. Each module can contain both module level code, and code contained within subroutines and functions. Module level code is code that is //not// contained within a subroutine or function. The following snippet illustrates the various parts of a module. +Un programme complet est composé d'un ou plusieurs fichiers **.bas**, appelés modules. Chaque module peut contenir, à la fois, du code de niveau module et du code contenu dans les sous-routines et fonctions. Du code de niveau module est du code qui //**n'est pas**// contenu dans une sous-routine ou une fonction. L'extrait suivant illustre les différentes parties d'un module. %%(freebasic) -Dim aInt as Integer 'Variable declared at module level +Dim aInt As Integer 'Variable déclarée au niveau module Sub DoSomething - Dim aInt as Integer 'Variable declared at sub level + Dim aInt As Integer 'Variable déclarée au niveau sous-routine - ... 'This code is local to sub + ... 'Ce code est local à Sub End Sub Function DoSomethingElse() as Integer - Dim aInt as Integer 'Variable declared at func level + Dim aInt As Integer 'Variable déclarée au niveau fonction - ... 'This code is local to func + ... 'Ce code est local à Function End Function -'Module level code +'Code niveau module aInt = 5 DoSomething aInt = DoSomethingElse() %% -== Local Variables == +** Variables locales ** -If you define a variable at the module level (and not using ##Shared##), the variable is said to have local module level scope. It is visible to the module level code, but not to any subroutine or function within the module. In the example above the module variable ##aInt## is only visible to the module level code. +Si vous définissez une variable au niveau du module (et n'utilisez pas ##**Shared**##), la variable est dite avoir une portée au niveau du module local. Elle est visible par le code au niveau du module, mais pas des sous-routines ou fonctions au sein du module. Dans l'exemple ci-dessus la variable du module ##**aInt**## est visible uniquement pour le code de niveau module. -Variables defined within a subroutine or function are local to the subroutine or function and are not visible to module level code or any other subroutine or function. +Les variables définies dans une sous-routine ou une fonction sont locales à la sous-routine ou fonction et ne sont pas visibles du code de niveau module ou de toute autre sous-programme ou fonction. -== Variables Defined Within Control Structures == +** Variables définies au sein de structures de contrôle ** -Variables that are defined within If, For-Next, While-Wend and Do-Loop constructs are local to the control structure block code. That is, they are not visible outside the bounds of the begin and end of the control block, just like a variable declared within a subroutine or function. +Les variables qui sont définies dans des constructions ##**If**##, ##**For-Next**##, ##**While-Wend**## et ##**Do-Loop**## sont locales au code de la structure du bloc de contrôle. Autrement dit, ils ne sont pas visibles à l'extérieur des limites du début et de fin du bloc de contrôle, tout comme une variable déclarée dans une sous-routine ou une fonction. -== Shared Variables == +** Les variables partagées (Shared) ** -In the example, if you wanted ##aInt## to be visible within the subroutine or function, you would need to declare the variable as ##Shared## and then not declare a variable with the same name within any subroutine, function or control block. ##Shared## variables are visible to module level code, subroutine or function level code and within control structure blocks. +Dans l'exemple, si vous voulez que ##**aInt**## soit visible au sein de la sous-routine ou de la fonction, vous devez déclarer la variable comme étant ##**Shared**## et ensuite ne pas déclarer une variable avec le même nom dans des sous-routine, fonction ou bloc de contrôle. Les variables ##**Shared**## sont visibles par le code de niveau module, celui de niveau sous-routines ou fonctions et au sein des structures de contrôle. -== Scope Conflicts == +** Les conflits de portée** -In the code snippet above, if ##aInt## were declared as ##Shared##, and each subroutine and function declared ##aInt##, there would be a scope conflict, since there is one variable name used for different levels of scope. +Dans l'extrait de code ci-dessus, si ##**aInt**## est déclarée ##**Shared**## et que chaque sous-routine et fonction déclare ##**aInt**##, il y aurait un conflit une portée, car il y aurait même un nom de variable utilisé pour différents niveaux de portée. -The compiler resolves this by taking the current scope into account and mapping the variable within that scope. Since subroutines and functions have a lower level of scope than the module, ##aInt## would refer to the variable declared within the sub or func, and not the one declared at the module level, even though it is declared as a shared variable. +Le compilateur résout cela en prenant la portée courante en compte et planifie la variable avec cette portée. Comme les sous-routines et fonctions ont un niveau de portée inférieur à celui d'un module, ##**aInt**## fait référence soit à la variable déclarée dans la sous-routine ou la fonction, et non pas à celle qui a été déclarée au niveau d'un module, même si elle a été déclarée comme une variable partagée. -== Multiple Modules == +** Plusieurs modules ** -Scope is limited to a single module, that is a single .bas file. However, it is sometimes necessary to extend the scope from one module to another. You would use the ##Common## statement when you declare a variable that needs to be shared among modules. +La portée est limitée à un seul module, c'est à dire un unique fichier ##**.bas**##. Cependant, il est parfois nécessaire d'étendre la portée d'un module à un autre. Vous devez utiliser la déclaration ##**Common**## lorsque vous déclarez une variable qui doit être partagée entre plusieurs modules. -Each module must have the same ##Common## declaration in order for the compiler to match up the common variables. If you declare a variable in module1 as ##Common aInt as Integer## then module2 must also have ##Common aInt as Integer##. Without the common declaration ##aInt## would not be visible within module2. +Chaque d'un module doit avoir la même déclaration ##**Common**## pour que le compilateur de fasse correspondre les variables communes. Si vous déclarez une variable ##**Common aInt as Integer**## dans module1 alors le module2 doit aussi avoir ##**Common aInt as Integer**##. Sans cette déclaration commune ##**aInt**## ne serait pas visible dans le module2. -You can add the ##Shared## attribute to ##Common##, that is ##Common Shared## to not only extend scope to multiple modules, but to extend scope within a module. ##Common Shared## operates the same as ##Shared## within a single module. As with ##Common##, you need to have matching declarations in each module that needs access to the variable. +Vous pouvez ajouter l'attribut ##**Shared**## à ##**Common**##, c'est à dire ##**Common Shared**## non seulement pour étendre la portée à plusieurs modules, mais pour étendre la portée au sein d'un module. ##**Common Shared**## fonctionne comme ##**Shared**## dans un seul module. Comme avec ##**Common**##, vous avez besoin d'apparier les déclarations dans chaque module qui doit avoir accès à la variable. -=== Scope...End Scope === +
    Scope...End Scope -You can create a temporary scope block by using the ##Scope##, ##End Scope## keywords. The scope block is very useful when creating multi-line macros where you may need to create some temporary working variables but do not want to introduce name conflicts in the program. The following snippet illustrates how to create a scope block. +Vous pouvez créer un bloc de portée temporaire en utilisant les mots-clés ##**Scope**## et ##**End Scope**##. Le bloc de portée est très utile lors de la création de macros multi-ligne où vous pouvez avoir besoin de créer des variables de travail temporaires mais en évitant de créer des conflits de nom dans le programme. L'extrait suivant montre comment créer un bloc de portée. %%(freebasic) Scope Dim tmp as Integer - ... 'Some code + ... 'Du code End Scope %% -The scope of any variable created within a scope block is limited to the block itself. However, the scope block inherits the visibility of the surrounding scope so that variables created at the same scope as the scope block are visible within the block. +La portée d'une variable créée dans un bloc de portée est limitée au bloc lui-même. Cependant, le bloc de portée hérite de la visibilité de la portée environnante, afin que les variables créées avec la même portée que le bloc de portée soient visibles dans le bloc. -For example, if you have aInt which is at module level scope, and the scope block is at module level scope, then ##aInt## would be visible inside the scope block. Unless of course there is a scope conflict, in which case the variable inside the scope block would override the variable with the same name outside the scope block. +Par exemple, si vous avez ##**aInt**## qui est de portée niveau module et le bloc de portée qui est de portée niveau module, alors ##**aInt**##serait visible à l'intérieur du bloc de portée. À moins bien sûr qu'il n'y ait un conflit de portée, auquel cas la variable à l'intérieur du bloc de portée aurait préséance sur la variable avec le même nom mais en dehors du bloc portée. -=== Variable Lifetime === +
    Durée de vie d'une variable -Not only does scope set the visibility of a variable, it also determines the lifetime of a variable. A variable goes through several stages in its lifetime; creation, initialization, access and destruction. When this occurs depends on the scope of a variable, that is, where the variable has been defined within the program. +La portée ne définit pas seulement la visibilité d'une variable, elle détermine également sa durée de vie. Une variable passe par plusieurs étapes dans sa vie; création, initialisation, accès et destruction. La portée d'une variable dépend du moment où cela se produit, c'est à dire, où la variable a été définie dans le programme. -== Module Level Variables == +** Variables de niveau module ** -Module level variables exist for the life of a program, since they are declared within the main body of the program. Module level code is the main executing code of the program, and terminates when the program ends. +Les variables au niveau du module existent pour la durée de vie d'un programme, puisqu'elles sont déclarées dans le corps principal du programme. Le code de niveau module est le code d'exécution principal du programme et se termine lorsque le programme se termine.. -== Subroutine and Function Level Variables == +** Les variables de niveau sous-routine et fonction ** -Variables declared within a subroutine and function exist as long as the program is within the body of the subroutine and function. On entering the sub/func, the variable is created, initialized and can be accessed within the sub/func. Once the subroutine or function exits, the variable is destroyed. +Les variables déclarées dans un sous-programme ou une fonction existent aussi longtemps que le programme est dans le corps du sous-programme ou de la fonction. A l'entrée dans la ##**Sub/Function**##, la variable est créée, initialisée et est accessible dans ##**Sub/Function**##. Dès la sortie de ##**Sub/Function**##, la variable est détruite. -== Static Variables == +** Les variables statiques ** -One exception to the declared sub/func variable is the ##Static## variable. ##Static## variables maintain their value between calls to the subroutine or function and so have a module level lifespan. +Une exception aux variables déclarées dans ##**Sub/Function**## c'est la variable ##**Static**##. Les variables ##Static## conservent leur valeur entre les appels à ##**Sub/Function**## et ont donc une durée de vie niveau module. -== Control Block Variables == +** Les variables de blocs de contrôle ** -Variables declared within a control block, such as a For-Next, exist as long as the control block is executing. Upon leaving the control block, the variables are destroyed. +Les variables déclarées dans un bloc de contrôle, comme un ##**For-Next**## existent tant que le bloc de contrôle est exécuté. Au moment de quitter le bloc de contrôle, les variables soient détruites. -== Scope...End Scope Variables == +** Variables Scope...End Scope ** -Variables declared within a scope block exist as long as the the scope block exists. Once the program leaves the scope block, any variables created within the scope block are destroyed. \ No newline at end of file +Les variables déclarées dans un bloc ##**Scope...End Scope**## existent aussi longtemps que le bloc existe. Dès que le programme quitte le bloc toutes les variables créées dans le bloc sont détruites. \ No newline at end of file diff --git a/fbdocs/manual/cache/TutIntroTypeDef.wakka b/fbdocs/manual/cache/TutIntroTypeDef.wakka index 892dcd2f33..3b1b7b734f 100644 --- a/fbdocs/manual/cache/TutIntroTypeDef.wakka +++ b/fbdocs/manual/cache/TutIntroTypeDef.wakka @@ -1,83 +1,83 @@ -{{fbdoc item="title" value="Introduction to the Type Def"}}---- -//Written by [[WikiRick rdc]]// +{{fbdoc item="title" value="Introduction to the Type Def"}}----
    +//Ecrit par [[WikiRick rdc]]//

    Il y a des moments, lors de la création d'un programme, où l'on souhaite définir une structure globale comme un enregistrement personnel ou un ennemi dans un jeu. Alors que vous pouvez faire cela en utilisant des types de données individuelles, cela est difficile à gérer dans un programme. Les types de données composites vous permettent de grouper des éléments de données connexes dans une structure unique qui peut être manipulée comme une seule entité. FreeBasic offre deux types de données composites, ##**Type**## et ##**Union**##.

    Types -There are times when creating a program that you may want to define an aggregate structure such as a personnel record, or an enemy in a game. While you can do this using individual data types, it is hard to manage within a program. Composite data types allow you to group together related data items into a single structure that can be manipulated as a single entity. FreeBasic offers two composite data types, the Type and Union. +

    FreeBasic vous permet de grouper plusieurs types de données dans une structure unifiée appelée une définition de ##**Type**## que vous pouvez utiliser pour décrire ces structures de données agrégées.

    La structure de base d'une définition de ##**Type**## est:

    %%(freebasic) -==== Types ==== +Type typename
    Var definition
    Var definition
    ...
    End Type
    -FreeBasic allows you to group several data types into a unified structure called a Type definition which you can use to describe these aggregate data structures. +##

    Le bloc ##**Type ... Type-End**## définit la portée de la définition. Vous définissez les éléments de la structure ##**Type**## de la même manière que vous utilisez le mot clé ##**Dim**##, sans utiliser ##**Dim**##. L'extrait de code suivant montre comment construire un ##**Type**## d'##//Employee//##.

    %%(freebasic) -The basic structure of a type definition is: +Type EmployeeType
    fname As String * 10
    lname As String * 10
    empid As Integer
    dept As Integer
    End Type
    -%%(freebasic) -Type typename - var definition - var definition - ... -End Type -%% +##

    Vous pouvez utiliser n'importe quel type de données comme élément de données, y compris des pointeurs et d'autres définitions de ##**Type**##. Lorsque vous créez la définition d'un ##**Type**##, comme dans l'exemple ci-dessus, vous êtes juste en train de créer un modèle pour le compilateur. Afin d'utiliser la définition du ##**Type**##, vous devez créer une variable de ce ##**Type**##, comme le montre l'extrait de code suivant.

    %%(freebasic) +Dim Employee As EmployeeType
    + ##

    Lorsque vous avez créé une variable de ce ##**Type**##, vous pouvez accéder à chaque élément dans le ##**Type**## l'aide de la notation pointée ##//var_name.field_name//##.

    En utilisant l'exemple ci-dessus, pour accéder au champ ##//fname//## vous pouvez utiliser:

    %%(freebasic) + Employee.fname = "Susan"
    + ##

    Utiliser With +

    Pour accéder à des champs multiples au même moment, vous pouvez utiliser le bloc ##**With-End With**##. Le code suivant montre comment utiliser le bloc ##**With**## avec l'exemple ci-dessus.

    %%(freebasic) +With Employee
    .fname = "Susan"
    .lname = "Jones"
    .empid = 1001
    .dept = 24
    End With
    -The Type-End Type block defines the scope of the definition. You define the elements of the type structure in the same manner as using the Dim keyword, without using Dim. The following code snippet shows how to build an employee type. +##

    Le compilateur lie automatiquement la variable ##//Employee//## avec les éléments de données individuels du bloc. Non seulement cela signifie que vous n'avez pas à écrire beaucoup plus, mais la structure est optimisée et un peu plus rapide que l'utilisation de la notation pointée complète.

    Transmission de Types aux sous-routines et fonctions -%%(freebasic) -Type EmployeeType - fname As String * 10 - lname As String * 10 - empid As Integer - dept As Integer -End Type -%% +

    Un avantage de l'utilisation de ##**Type**## dans votre programme est que vous pouvez passer la structure à un sous-programme ou une fonction et opérer sur la structure dans son ensemble. Le fragment de code suivant montre une définition partielle de sous-routine.

    %%(freebasic) +Sub UpdateEmployeeDept(ByRef Emp As EmployeeType)
    .
    .
    .
    End Sub
    + ##

    Notez que le paramètre est qualifié avec ##**Byref**##. Ceci est important puisque vous voulez mettre à jour ce ##**Type**## dans la sous-routine. Il existe deux modes de passage de paramètres en FreeBasic: ##**ByRef**## et ##**Byval**##.

    ** Byref et Byval: Présentation rapide **

    ##**ByRef**## et ##**Byval**## indiquent au compilateur comment passer une référence à une sous-routine ou une fonction. Lorsque vous utilisez ##**ByRef**##, ou //Par Référence//, vous passez un pointeur de référence au paramètre et toutes les modifications que vous apportez au paramètre à l'intérieur de ##**Sub**## ou ##**Function**## sera reflétée dans la variable réelle qui a été passée. En d'autres termes, le paramètre ##**ByRef**## pointe sur la variable réelle dans la mémoire.

    ##**Byval**##, ou //Par Valeur//, d'autre part fait une copie du paramètre et toutes les modifications apportées à l'intérieur de ##**Sub**## ou ##**Function**## sont locales et ne seront pas reflétées dans la variable réelle qui a été passée. Le paramètre ##**Byval**## pointe sur une copie de la variable et non sur la variable réelle, elle-même.

    Par défaut FreeBasic .17 passe les paramètres en utilisant ##**Byval**##. Pour modifier un paramètre passé, vous devez à spécifier le qualificatif ##**ByRef**##. Dans cet exemple, la sous-routine met à jour le //department id// du //Type employee//, donc le paramètre est qualifié par ##**ByRef**## pour que la sous-routine puisse mettre à jour le champ //dept// de la variable.

    En revanche vous n'avez pas besoin de mettre à jour le ##**Type**## comme dans le fragment de code suivant.

    %%(freebasic) + Sub PrintEmployeeRecord(Emp As EmployeeType)
    .
    .
    .
    End Sub
    + ##

    Dans cette sous-routine on affiche seulement l'enregistrement de //employee// à l'écran ou on l'envoie vers l'imprimante et on n'a pas a changé quoi que ce soit dans la variable ##**Type**##. Ici c'est ##**Byval**## par défaut qui est utilisé pour passer une copie de l'enregistrement de //employee// à la sous-routine au lieu d'une référence vers la variable. En utilisant ##**Byval**##, dans ce cas, vous évitez de changer quelque chose accidentellement dans la variable ##**Type**##, ce que vous ne désiriez pas.

    Vous ne devez utiliser ##**Byref**## que si vous avez l'intention de modifier les données des paramètres. Il est beaucoup plus plus sûr d'utiliser ##**Byval**## dans les cas où vous devez avoir les données des paramètres, mais que vous souhaitez éviter toute modification accidentelle de ces données. Ces modifications accidentelles génèrent des bugs difficiles à trouver dans les programmes.

    Types dans les Types +

    En plus des types de données intrinsèques, un champ de Type peut également être basé sur une définition de Type. Pourquoi vouloir faire cela? Une des raisons est l'abstraction de données. Plus vos structures de données seront générales, plus vous pourrez en réutiliser le code dans d'autres parties de votre programme. Moins vous avez à écrire de code, moins les erreurs auront de chance de trouver le chemin de vos programmes.

    En utilisant l'exemple d'##//Employee//##, supposons un instant que vous ayez besoin de plus d'informations ##//dept//## que seulement ##//department id//##. Vous pourriez avoir besoin de garder une trace de ##//department manager//##, l'emplacement du département, comme le ##//floor//## (étage) ou le bâtiment ou le numéro de téléphone principal du département. En mettant ces informations dans une définition de ##**Type**## distincte, vous pouvez utiliser cette information par elle-même ou comme partie d'une autre définition de ##**Type**## comme ##//Employee//##. En généralisant vos structures de données, votre programme sera plus petit et beaucoup plus robuste.

    L'utilisation d'un ##**Type**## dans un ##**Type**## est identique à celle de l'un des types de données intrinsèques. Les extraits de code suivant illustrent un ##**Type**## ##//department//## étendu et un ##**Type**## ##//employee//## mis à jour.

    %%(freebasic) +Type DepartmentType
    id As Integer
    managerid As Integer
    floor As Integer
    End Type

    Type EmployeeType
    fname As String * 10
    lname As String * 10
    empid As Integer
    dept As DepartmentType
    End Type

    Dim Employee As EmployeeType
    +##

    Notez que dans la définition de ##//Employee//## le champ ##//dept//## est défini comme ##//DepartmentType//## au lieu d'un des types de données intrinsèques. Pour accéder à l'information ##//department//## dans le ##**Type**## ##//Employee//##, on utilise la notation pointée composée pour accéder aux champs de ##//dept//##:

    %%(freebasic) -You can use any of the supported data types as data elements, including pointers and other type definitions. When you create the type definition, such as in the example above, you are just creating a template for the compiler. In order to use the type definition, you need to create a variable of the type, as the following code snippet illustrates. +Employee.dept.id = 24
    Employee.dept.managerid = 1012
    Employee.dept.floor = 13
    -%%(freebasic) -Dim Employee As EmployeeType -%% +##

    Le plus haut niveau de la définition du ##**Type**## est ##//Employee//##, donc sa référence vient en premier. Comme ##//dept//## est maintenant une définition de ##**Type**##, vous devez utiliser l'identifieur de ##//dept//## pour accéder aux champs individuels de ##//DepartmentType//##. ##//Employee//## se réfère au ##**Type**## ##//employee//##, ##//dept//## se réfère au ##**Type**## ##//department//## et ##//id//##, ##//managerid//## et ##//floor//## sont des champs du ##**Type**## ##//department//##.

    Vous pouvez même faire davantage, notamment avec un ##**Type**## dans un ##**Type**## dans un ##**Type**##. Vous utiliserez simplement la notation pointée du niveau de type supplémentaires au besoin. Bien qu'il n'y ait pas de limite au niveau des définitions de types imbriqués, cela devient un peu lourd lors de l'utilisation de nombreux niveaux.

    With et les Types imbriqués +

    Vous pouvez aussi utiliser un bloc ##**With-End With**## avec des ##**Type**##s imbriqués, en imbriquant le bloc ##**With**##, comme illustré dans l'exemple ci-dessous.

    %%(freebasic) +With Employee
    .fname = "Susan"
    .lname = "Jones"
    .empid = 1001
    With .dept
    .id = 24
    .managerid = 1012
    .floor = 13
    End With
    End With
    -Once you have created a variable of the type, you can access each element within the type using the dot notation //var_name.field_name//. +##

    Notez que le second ##**With**## utilise la notation pointée, ##//.dept//##, pour spécifier le niveau suivant de définition de ##**Type**##. Quand vous utilisez des blocs ##**With**## imbriqués, assurez-vous que toutes les déclarations ##**End With**## correspondent correctement à une déclaration ##**With**## sinon il y aura un message d'erreur lors de la compilation.

    Affectations de Type -Using the above example, to access the fname field you would use: +

    Pour aller plus loin dans l'extension de l'idée d'abstraction des données, il serait intéressant de séparer l'initialisation du ##**Type**## ##//department//## de celle du ##**Type**## ##//employee//##. En séparant les deux fonctions, vous pouvez facilement ajouter des informations supplémentaires à ##//department//## en fonction de vos besoins. C'est là que vous pouvez utiliser des assignations de ##**Type**##.

    Tout comme vous pouvez affecter un type intrinsèque des données à un autre, vous pouvez affecter une variable de ##**Type**## à une autre variable de ##**Type**##, à condition qu'elles aient la même définition de ##**Type**##.

    Les extraits de code suivants résument la fonction d'initialisation de ##//department//## et attribue le résultat au ##**Type**## ##//department//## dans le ##**Type**## ##//Employee//##.

    %%(freebasic) -%%(freebasic) -Employee.fname = Susan -%% +'This function will init the dept type and return it to caller
    Function InitDept(deptid As Integer) As DepartmentType
    Dim tmpDpt As DepartmentType

    Select Case deptid
    Case 24 'dept 24
    With tmpDpt
    .id = deptid
    .managerid = 1012
    .floor = 13
    End With
    Case 48 'dept 48
    With tmpDpt
    .id = deptid
    .managerid = 1024
    .floor = 12
    End With
    Case Else 'In case a bad department id was passed
    With tmpDpt
    .id = 0
    .managerid = 0
    .floor = 0
    End With
    End Select

    'Return the dept info
    Return tmpDpt
    End Function

    'Create an instance of the type
    Dim Employee As EmployeeType

    'Initialize the Employee type
    With Employee
    .fname = "Susan"
    .lname = "Jones"
    .empid = 1001
    .dept = InitDept(24) 'get dept info
    End With
    +##

    Comme vous pouvez le voir dans l'extrait ci-dessus, le champ ##//dept//## du ##**Type**## ##//employee//## est initialisé par un appel à une fonction. La fonction ##//InitDept//## retourne un ##//DepartmentType//## et le compilateur affectera ce ##**Type**## au champ de l'enregistrement ##//Employee//##.

    Par le simple ajout d'une fonction au programme, vous avez rendu le programme plus facile à maintenir. Si un nouveau ##//department//## est créé, vous pouvez simplement mettre à jour la fonction ##//InitDept//## avec le nouveeau ##//department//##, recompiler et le programme est prêt à redémarrer.

    Champs de bits +

    Il y a encore un autre ##**Type**## de données qui peuvent être utilisés dans les définitions de ##**Type**##, le champ de bits. Les champs de bits sont définis ainsi ##//variable_name: bits As DataType//##.Le nom de la variable doit être suivi de deux-points (:), le nombre de bits, suivi par le type de données. Seuls les données de ##**Type**## entier sont autorisées dans un champ de bits. Les champs de bits sont utiles lorsque vous avez besoin de garder une trace d'informations de type booléen. Un bit peut avoir les valeurs 0 ou 1, ce qui peut représenter Oui ou Non, Marche ou Arrêt ou même Noir et Blanc.

    L'extrait de code suivant illustre la définition d'un champ de bits.

    %%(freebasic) -=== Using With === +Type BitType
    b1: 1 As Integer
    b2: 4 As Integer
    End Type
    -To access multiple fields at a time, you can use the With-End With block. The following code snippet shows how to use the With block with the above example. +##

    b1 est défini comme bit unique et b2 comme ayant quatre bits. Vous initialisez les champs de bits en passant les bits individuels aux champs du ##**Type**##.

    %%(freebasic) -%%(freebasic) -With Employee - .fname = "Susan" - .lname = "Jones" - .empid = 1001 - .dept = 24 -End With -%% +myBitType.b1 = 1
    myBitType.b2 = 1101
    +##

    Le type de données du champ de bits détermine le nombre de bits que vous pouvez déclarer, dans un champ de bits. Puisqu' un entier à une longueur de 32 bits, vous pouvez déclarer jusqu'à 32 bits dans le champ. Cependant, dans la plupart des cas, vous allez déclarer un seul bit pour chaque champ et utiliser un certain nombre de champs afin de définir le masque de bits que vous souhaitez utiliser. Utiliser un bit unique simplifie le codage que vous devez éléborer pour déterminer si un bit est activé ou désactivé et vous permet d'identifier facilement ce qu'un bit signifie dans la définition du ##**Type**##.

    La propriété Field +

    Lorsque vous créez une variable d'un ##**Type**## défini, le ##**Type**## est ##//bourré//## en mémoire. Le ##//bourrage//## permet un accès plus rapide des membres de ##**Type**## puisque ses champs sont alignés dans les limites d'un ##//Word//## de 4 octets. Cependant, cela peut causer des problèmes lorsque vous essayez de lire un enregistrement de ##**Type**## à partir d'un fichier qui n'est pas ##//bourré//##. Vous pouvez utiliser la propriété ##**Field**## d'un champ pour changer le stockage en mémoire de la définition du ##**Type**##.

    Le mot-clef ##**Field**## est utilisé juste à droite du nom du ##**Type**## et peut avoir les valeurs 1, pour un alignement sur 1 octet (sans bourrage), 2 un alignement sur 2 octets et 4 un alignement sur 4 octets. Pour définir un ##**Type**## sans ##//bourrage//## vous utiliserez la syntaxe suivante.

    %%(freebasic) + Type myType Field = 1
    v1 As Integer
    v2 As Byte
    End Type
    + ##

    Pour un alignement sur 2 octets utilisez ##**Field**## = 2. Si aucune propriété ##**Field =**## n'est attribuée, le ##//bourrage//## est alors de 4 octets. Si vous lisez une définition de ##**Type**## créée sous FreeBasic en utilisant l'alignement par défaut, vous n'avez pas besoin, dans ce cas, d'utiliser la propriété ##**Field**##.

    {{table columns="" cellpadding="2" cells=" Si vous lisez un enregistrement Quick Basic d'un ##**Type**##, alors vous devez utiliser ##**Field**## = 1, car QB utilisait l'alignement des octets par défaut.;
    +

    Initialisation de Type +

    Vous pouvez initialiser une définition de ##**Type**## lorsque vous dimensionnez le ##**Type**## comme vous le feriez avec une variable intrinsèque. L'extrait de code suivant illustre la syntaxe.

    %%(freebasic) +Type aType
    a As Integer
    b As Byte
    c As String * 10
    End Type

    Dim myType As aType => (12345, 12, "Hello")
    -The compiler will automatically bind the variable Employee to the individual data elements within the With block. Not only does mean that you don't have as much typing, but the structure is optimized and is a bit faster than using the full dot notation. +##

    Dans l'instruction ##**Dim**##, l'opérateur flèche //+>// est utilisé pour indiquer au compilateur que vous initialisez la variable ##**Type**##. Les valeurs des éléments de ##**Type**## doivent être placés entre parenthèses et séparés par des virgules. L'ordre de la liste de valeurs correspond à l'ordre des éléments de ##**Type**##, où ##**a**## sera mis à 12345, ##**b**## à 12 et ##**c**## à “Hello”.

    {{table columns="" cellpadding="2" cells=" Vous ne pouvez pas initialiser une chaîne dynamique au sein d'une définition de ##**Type**## en utilisant cette méthode. La chaîne doit être de longueur fixe.;
    -=== Passing Types to Subroutines and Functions === +

    L'initialisation d'une définition de ##**Type**## dans une instruction ##**Dim**## est utile lorsque vous devez disposer d'un ensemble de valeurs initiales pour un ##**Type**##, ou de valeurs qui ne changent pas au cours de l'exécution du programme. Comme les valeurs sont connues au moment de la compilation, le compilateur n'a pas à perdre des cycles de chargement des valeurs pendant l'exécution.

    Unions -One advantage to using types in your program is that you can pass the structure to a subroutine or function and operate on the structure as a whole. The following code fragment shows a partial subroutine definition. +

    Les ##**Union**##s sont similaires aux ##**Type**##s dans leur définition.

    %%(freebasic) -%%(freebasic) -Sub UpdateEmployeeDept(Byref Emp as EmployeeType) - . - . - . -End Sub -%% +Union aUnion
    b As Byte
    s As Short
    i As Integer
    End Union
    +##

    S'il s'agissait d'un ##**Type**##, vous pourriez accéder à chaque champ de la définition. Pour une ##**Union**## cependant, vous ne pouvez accéder qu'à un seul champ à un moment donné; tous les champs au sein d'une ##**Union**## occupent le même segment de mémoire et la taille de l'##**Union**## est la taille du membre le plus important.

    Dans ce cas, l'Union occupe quatre octets, la taille d'un ##**Integer**##, avec le champ //b// occupant 1 octet, le champ //s// occupant 2 octets et le champ //i// occupant complètement les 4 octets. Chaque champ commence au premier octet, de sorte que le champ //s// inclurait les champs //b//, et le champ //i// inclurait les deux champs //b// et //s//.

    Des Types dans des Unions +

    Un bon exemple d'utilisation d'une définition de ##**Type**## dans une ##**Union**## est la définition de ##//Large_Integer//## dans ##//winnt.bi//##. Le type de donnée ##//Large_Integer//## est utilisé dans de nombreuses fonctions Windows au sein de la bibliothèque C Runtime. L'extrait de code suivant montre la définition de ##//Large_Integer//##.

    %%(freebasic) + Union LARGE_INTEGER
    Type
    LowPart As DWORD
    HighPart As Long
    End Type
    QuadPart As LONGLONG
    End Union
    + ##

    Le type de données ##//Dword//## est défini dans ##//windef.bi//## comme un ##//Uinteger//## FreeBasic et le type ##//Longlong//## est défini comme un ##//Longint//##. Un ##//Long//## est seulement un alias pour le type de données ##//Integer//##. Souvenez-vous qu'un type occupe des emplacements de mémoire contigus, de sorte que le champ ##//HighPart//## suit le champ ##//LowPart//## en mémoire. Comme il s'agit d'une ##**Union**##, le type occupe le même segment de mémoire même que le champ.

    Lorsque vous mettez une grande valeur entière dans ##//QuardPart//##, vous définissez aussi en même temps les valeurs des champs du ##**Type**##, que vous pouvez ensuite extraire comme ##//LowPart//## et ##//HighPart//##. Vous pouvez aussi faire l'inverse; en définissant ##//LowPart//## et ##//HighPart//## du ##**Type**##, vous définissez aussi la valeur du champ ##//QuardPart//##.

    Comme vous pouvez le voir, utiliser un ##**Type**## dans une ##**Union**## est un moyen facile de définir ou de récupérer des valeurs individuelles d'un composant ##**Type**## de données sans avoir recours à beaucoup de code de conversion. La disposition des segments de mémoire effectue la conversion pour vous, à condition que les segments de mémoire aient un sens dans le contexte du composant ##**Type**##.

    Dans le cas de ##//Large_Integer//##, ##//LowPart//## et ##//HighPart//## ont été définis pour renvoyer les valeurs appropriées du composant. L'utilisation de valeurs autres que ##//Dword//## et ##//Long//## ne retournera pas de valeurs correctes pour ##//LowPart//## et ##//HighPart//##. Vous devez vous assurer que lorsque vous définissez un ##**Type**## dans une ##**Union**## que vous segmentez correctement la mémoire du segment ##**Union**## dans la définition du ##**Type**##.

    Unions dans les Types +

    Une ##**Union**## dans une définition de ##**Type**## est un moyen efficace pour gérer les données quand un champ dans un ##**Type**## ne peut avoir qu'une seule de plusieurs valeurs. L'exemple le plus courant est le type de données ##//Variant//## dans d'autres langages de programmation.

    {{table columns="" cellpadding="2" cells="FreeBasic n'a pas de type de données ##//Variant//## natif pour le moment. Cependant, en utilisant la syntaxe étendue de ##**Type**##, vous pouvez créer un type de données ##//Variant//## pour l'utiliser dans vos programmes.;
    +

    Lorsque vous utilisez une ##**Union**## dans un ##**Type**##, une pratique courante est de créer un champ ##//id//## dans le ##**Type**## qui indique ce que l'##**Union**## contient à un moment donné. L'extrait de code suivant illustre ce concept.

    %%(freebasic) -Notice that the parameter is qualified with Byref. This is important since you want to update the type within the subroutine. There are two parameter passing modes in FreeBasic: ByRef and Byval. +'Union field ids
    #define vInteger 0
    #define vDouble 1

    'Define type def with variable data fields
    Type vType
    vt_id As Integer
    Union
    d As Double
    i As Integer
    End Union
    End Type
    -== Byref and Byval: A Quick Introduction == +##

    La définition de l'##**Union**## ici est appelée une ##**Union**## anonyme car elle n'est pas définie avec un nom. Le champ //vt_id// de la définition du ##**Type**## indique la valeur de l'##**Union**##. Pour initialiser le type vous devez utiliser le code suivant:

    %%(freebasic) -Byref and Byval tell the compiler how to pass a reference to the subroutine or function. When you use Byref, or //By Reference//, you are passing a pointer reference to the parameter, and any changes you make to the parameter inside the sub or func will be reflected in the actual variable that was passed. In other words, the Byref parameter points to the actual variable in memory. +Dim myVarianti As vType
    Dim myVariantd As vType

    myVarianti.vt_id = vInteger
    myVarianti.i = 300

    myVariantd.vt_id = vDouble
    myVariantd.d = 356.56
    -Byval, or //By Value//, on the other hand makes a copy of the parameter, and any changes you make inside the sub or func are local and will not be reflected in the actual variable that was passed. The Byval parameter points to a copy of the variable not the actual variable itself. +##

    //myVarianti// contient une valeur entière donc l'//id// est mis à //vInteger//. //myVariantd// contient une valeur //double// donc l'//id// est mis à //vDouble//. Si vous créez une sous-routine qui a un paramètre //vType//, vous pouvez examiner le champ //vt_type// pour déterminer si c'est un nombre entier ou double qui a été passé à la sous-routine.

    {{table columns="" cellpadding="2" cells=" Vous ne pouvez pas utiliser des chaînes de dynamiques au sein d'une ##**Union**##.;
    -The default for FreeBasic .17 is to pass parameters using Byval. In order to change a passed parameter, you need to specify the Byref qualifier. In this example, the subroutine updates the the department id of the employee type, so the parameter is qualified as Byref so that the subroutine can update the dept field of the type variable. +

    Utiliser une combinaison d'##**Union**##s et de ##**Type**##s dans un programme vous permet de concevoir des types de données qui ont beaucoup de souplesse, mais il faut veiller à utiliser correctement les données construites. Une mauvaise utilisation de ces types de données peut entraîner des bogues très difficiles à trouver. Les avantages toutefois, l'emportent sur les risques et une fois maîtrisés, ce sont des outils de programmation puissants.
    On the other hand you may not need to update the type as in the following code fragment. @@ -89,15 +89,15 @@ Sub PrintEmployeeRecord(Emp as EmployeeType) End Sub %% -In this sub you are just printing the employee record to the screen or a printer and do not need to change anything in the type variable. Here the default Byval is used which passes a copy of the employee record to the sub rather than a reference to the variable. By using Byval in this case, you won't accidentally change something in the type variable that you didn't intend to change. +In this sub you are just printing the employee record to the screen or a printer and do not need to change anything in the type variable. Here the default ##Byval## is used which passes a copy of the employee record to the sub rather than a reference to the variable. By using ##Byval## in this case, you won't accidentally change something in the type variable that you didn't intend to change. -You should only use Byref if you intend to change the parameter data. It is much safer to use Byval in cases where you need to have the parameter data, but want to prevent accidental changes to the data. These accidental changes generate hard-to-find bugs in your program. +You should only use ##Byref## if you intend to change the parameter data. It is much safer to use ##Byval## in cases where you need to have the parameter data, but want to prevent accidental changes to the data. These accidental changes generate hard-to-find bugs in your program. === Types Within Types === In addition to the intrinsic data types, type fields can also be based on a type definition. Why would you want to do this? One reason is data abstraction. The more general your data structures, the more you can reuse the code in other parts of your program. The less code you have to write, the less chance of errors finding their way into your program. -Using the Employee example, suppose for a moment that you needed to track more dept information than just the department id. You might need to keep track of the department manager, the location of the department, such as the floor or the building, or the main telephone number of the department. By putting this information into a separate type definition, you could use this information by itself, or as part of another type definition such as the Employee type. By generalizing your data structures, your program will be smaller, and much more robust. +Using the ##//Employee//## example, suppose for a moment that you needed to track more dept information than just the department id. You might need to keep track of the department manager, the location of the department, such as the floor or the building, or the main telephone number of the department. By putting this information into a separate type definition, you could use this information by itself, or as part of another type definition such as the Employee type. By generalizing your data structures, your program will be smaller, and much more robust. Using a type within a type is the same as using one of the intrinsic data types. The following code snippets illustrates an expanded department type and an updated employee type. @@ -118,7 +118,7 @@ End Type Dim Employee As EmployeeType %% -Notice that in the Employee definition the dept field is defined as DepartmentType rather than as one of the intrinsic data types. To access the department information within the Employee type, you use the compound dot notation to access the dept fields. +Notice that in the Employee definition the dept field is defined as ##//""DepartmentType""//## rather than as one of the intrinsic data types. To access the department information within the ##//Employee//## type, you use the compound dot notation to access the dept fields. %%(freebasic) Employee.dept.id = 24 @@ -126,13 +126,13 @@ Employee.dept.managerid = 1012 Employee.dept.floor = 13 %% -The top level of the type definition is Employee, so that reference comes first. Since dept is now a type definition as well, you need to use the dept identifier to access the individual fields within the DepartmentType. Employee refers to the employee type, dept refers to the department type and id, managerid and floor are fields within the department type. +The top level of the type definition is ##//Employee//##, so that reference comes first. Since dept is now a type definition as well, you need to use the dept identifier to access the individual fields within the ##//""DepartmentType""//##. ##//Employee//## refers to the ##//employee//## type, ##//dept//## refers to the department type and ##//id//##, ##//managerid//## and ##//floor//## are fields within the ##//department//## type. You can even carry this further, by including a type within a type within a type. You would simply use the dot notation of the additional type level as needed. While there is no limit on the levels of nested type definitions, it gets to be a bit unwieldy when used with several levels. === With and Nested Types === -You can also use the With-End With block with nested types, by nesting the With block, as illustrated in the following code snippet. +You can also use the ##With##-##End With## block with nested types, by nesting the ##With## block, as illustrated in the following code snippet. %%(freebasic) With Employee @@ -147,7 +147,7 @@ With Employee End With %% -Notice that the second With uses the dot notation, .dept, to specify the next level of type definitions. When using nested With blocks, be sure that you match all the End With statements with their correct With statements to avoid a compile error. +Notice that the second ##With## uses the dot notation, ##.//dept//##, to specify the next level of type definitions. When using nested ##With## blocks, be sure that you match all the ##End With## statements with their correct ##With## statements to avoid a compile error. === Type Assignments === @@ -155,7 +155,7 @@ Extending the idea of data abstraction further, it would be nice to be able to s Just as you can assign one intrinsic data type to another, you can assign one type variable to another type variable, providing they share the same type definition. -The following code snippet abstracts the department initialization function and assigns the result to the department type within the Employee type. +The following code snippet abstracts the department initialization function and assigns the result to the department type within the ##//Employee//## type. %%(freebasic) 'This function will init the dept type and return it to caller @@ -199,13 +199,13 @@ With Employee End With %% -As you can see in the snippet, the dept field of the employee type is initialized with a function call. The InitDept function returns a DepartmentType and the compiler will assign that type to the dept field of the Employee record. +As you can see in the snippet, the dept field of the ##//employee//## type is initialized with a function call. The ##//""InitDept""//## function returns a ##//""DepartmentType""//## and the compiler will assign that type to the dept field of the ##//Employee//## record. -By just adding a simple function to the program, you have made the program easier to maintain. If a new department is created, you can simply update the InitDept function with the new department information, recompile and the program is ready to go. +By just adding a simple function to the program, you have made the program easier to maintain. If a new department is created, you can simply update the ##//""InitDept""//## function with the new department information, recompile and the program is ready to go. === Bit Fields === -There is yet another data type that can be used in type definitions, the bit field. Bit fields are defined as //variable_name: bits As DataType//. The variable name must be followed with a colon, the number of bits, followed by the data type. Only integer data types are allowed within a bit field. Bit fields are useful when you need to keep track of boolean type information. A bit can be either 0 or 1, which may represent Yes or No, On or Off or even Black and White. +There is yet another data type that can be used in type definitions, the bit field. Bit fields are defined as ##//variable_name//: bits As //""DataType""//##. The variable name must be followed with a colon, the number of bits, followed by the data type. Only integer data types are allowed within a bit field. Bit fields are useful when you need to keep track of boolean type information. A bit can be either ##0## or ##1##, which may represent Yes or No, On or Off or even Black and White. The following code snippet illustrates a bit field definition. @@ -216,20 +216,20 @@ Type BitType End Type %% -b1 is defined as a single bit, and b2 is defined as four bits. You initialize the bitfields by passing the individual bits to the type fields. +##//b1//## is defined as a single bit, and ##//b2//## is defined as four bits. You initialize the bitfields by passing the individual bits to the type fields. %%(freebasic) myBitType.b1 = 1 myBitType.b2 = 1101 %% -The data type of the bit field determines how many bits you can declare in a bit field. Since an integer is 32 bits long, you could declare up to 32 bits in the field. However, in most cases you would declare a single bit for each field, and use a number of fields to define the bit masking that you wish to use. Using a single bit simplifies the coding you need to do to determine if a bit is set or cleared and allows you to easily identify what a bit means within the type definition. +The data type of the bit field determines how many bits you can declare in a bit field. Since an ##integer## is 32 bits long, you could declare up to 32 bits in the field. However, in most cases you would declare a single bit for each field, and use a number of fields to define the bit masking that you wish to use. Using a single bit simplifies the coding you need to do to determine if a bit is set or cleared and allows you to easily identify what a bit means within the type definition. === The Field Property === -When you create a variable of a type definition, the type is padded in memory. The padding allows for faster access of the type members since the type fields are aligned on a 4 byte or Word boundary. However, this can cause problems when trying to read a type record from a file that is not padded. You can use the use field property to change the padding of a type definition. +When you create a variable of a type definition, the type is padded in memory. The padding allows for faster access of the type members since the type fields are aligned on a 4 byte or Word boundary. However, this can cause problems when trying to read a type record from a file that is not padded. You can use the use ##field## property to change the padding of a type definition. -The field keyword is used right after the type name and can have the values 1, for 1 byte alignment (no padding), 2 for 2 byte alignment and 4 for 4 byte alignment. To define a type with no padding you would use the following syntax. +The ##field## keyword is used right after the type name and can have the values ##1##, for 1 byte alignment (no padding), ##2## for 2 byte alignment and ##4## for 4 byte alignment. To define a type with no padding you would use the following syntax. %%(freebasic) Type myType field = 1 @@ -238,9 +238,9 @@ Type myType field = 1 End Type %% -For 2 byte alignment you would use field = 2. If no field = property is assigned, then the padding will be 4 bytes. If you are reading a type definition created by FreeBasic using the default alignment, then you do not need to use the field property. +For 2 byte alignment you would use ##field = 2##. If no ##field = //property//## is assigned, then the padding will be ##4## bytes. If you are reading a type definition created by ""FreeBASIC"" using the default alignment, then you do not need to use the ##field## property. -{{table columns="1" cellpadding="2" cells=" If you are reading a Quick Basic type record, then you will need to use field = 1, as QB used byte alignment by default."}} +{{table columns="1" cellpadding="2" cells=" If you are reading a ""Quick Basic"" type record, then you will need to use ##field = 1##, as QB used byte alignment by default."}} === Type Initialization === @@ -256,11 +256,11 @@ End Type Dim myType As aType => (12345, 12, "Hello") %% -In the Dim statement, the arrow operator //+>// is used to tell the compiler that you are initializing the type variable. The type element values must be enclosed in parenthesis, and separated by commas. The order of the value list corresponds to the order of the type elements, where a will be set to 12345, b to 12 and c to Hello. +In the ##Dim## statement, the arrow operator ##=>## is used to tell the compiler that you are initializing the type variable. The type element values must be enclosed in parenthesis, and separated by commas. The order of the value list corresponds to the order of the type elements, where ##//a//## will be set to ##12345##, ##//b//## to ##12## and ##//c//## to ##"Hello"##. {{table columns="1" cellpadding="2" cells=" You cannot initialize a dynamic string within a type definition using this method. The string must be fixed length."}} -Initializing a type definition in a Dim statement is useful when you need to have a set of initial values for a type, or values that will not change during program execution. Since the values are known at compile time, the compiler can doesn't have to spend cycles loading the values during runtime. +Initializing a type definition in a ##Dim## statement is useful when you need to have a set of initial values for a type, or values that will not change during program execution. Since the values are known at compile time, the compiler can doesn't have to spend cycles loading the values during runtime. ==== Unions ==== @@ -274,13 +274,13 @@ Union aUnion End Union %% -If this were a Type, you could access each field within the definition. For a Union however, you can only access one field at any given time; all the fields within a Union occupy the same memory segment, and the size of the Union is the size of the largest member. +If this were a ##Type##, you could access each field within the definition. For a ##Union## however, you can only access one field at any given time; all the fields within a ##Union## occupy the same memory segment, and the size of the ##Union## is the size of the largest member. -In this case, the Union would occupy four bytes, the size of an Integer, with the //b// field occupying 1 byte, the //s// field occupying 2 bytes, and the //i// occupying the full 4 bytes. Each field starts at the first byte, so the //s// field would include the //b// field, and the //i// field would include both the //b// and //s// fields. +In this case, the ##Union## would occupy four bytes, the size of an ##Integer##, with the ##//b//## field occupying 1 byte, the ##//s//## field occupying 2 bytes, and the ##//i//## occupying the full 4 bytes. Each field starts at the first byte, so the ##//s//## field would include the ##//b//## field, and the ##//i//## field would include both the ##//b//## and ##//s//## fields. === Types in Unions === -A good example of using a type definition in a union is the Large_Integer definition found in winnt.bi. The Large_Integer data type is used in a number of Windows functions within the C Runtime Library. The following code snippet shows the Large_Integer definition. +A good example of using a type definition in a union is the ##//Large_Integer//## definition found in ##winnt.bi##. The ##//Large_Integer//## data type is used in a number of Windows functions within the C Runtime Library. The following code snippet shows the ##//Large_Integer//## definition. %%(freebasic) union LARGE_INTEGER @@ -292,21 +292,21 @@ union LARGE_INTEGER end union %% -The Dword data type is defined in windef.bi as a FreeBasic Uinteger, and the Longlong type is defined as a Longint. A Long is just an alias for the integer data type. Remember that a type occupies contiguous memory locations, so the HighPart field follows the LowPart part field in memory. Since this is a union, the type occupies the same memory segment as the QuadPart field. +The ##//Dword//## data type is defined in ##windef.bi## as a ""FreeBASIC"" ##Uinteger##, and the ##//Longlong//## type is defined as a ##//Longint//##. A Long is just an alias for the integer data type. Remember that a type occupies contiguous memory locations, so the ##//""HighPart""//## field follows the ##//""LowPart""//## part field in memory. Since this is a union, the type occupies the same memory segment as the ##//""QuadPart""//## field. -When you set QuardPart to a large integer value, you are also setting the values of the type fields, which you can then extract as the LowPart and HighPart. You can also do the reverse; that is by setting the LowPart and HighPart of the type, you are setting the value of the QuadPart field. +When you set ##//""QuardPart""//## to a large integer value, you are also setting the values of the type fields, which you can then extract as the ##//""LowPart""//##and ##//""HighPart""//##. You can also do the reverse; that is by setting the ##//""LowPart""//## and ##//""HighPart""//## of the type, you are setting the value of the ##//""QuadPart""//## field. As you can see, using a type within a union is an easy way to set or retrieve individual values of a component data type without resorting to a lot of conversion code. The layout of the memory segments does the conversion for you, providing that the memory segments make sense within the context of the component type. -In the Large_Integer case, the LowPart and HighPart have been defined to return the appropriate component values. Using values other than Dword and Long would not return correct values for LowPart and HighPart. You need to make sure when defining a type within a union, you are segmenting the union memory segment correctly within the type definition. +In the ##//Large_Integer case//##, the ##//""LowPart""//## and ##//""HighPart""//## have been defined to return the appropriate component values. Using values other than ##//Dword//## and ##//Long//## would not return correct values for ##//""LowPart""//## and ##//""HighPart""//##. You need to make sure when defining a type within a union, you are segmenting the union memory segment correctly within the type definition. === Unions in Types === A union within a type definition is an efficient way to manage data when one field within a type can only one of several values. The most common example of this is the Variant data type found in other programing languages. -{{table columns="1" cellpadding="2" cells=" FreeBasic does not have a native Variant data type at this time. However, by using the extended Type syntax, you could create a Variant data type for use in your program."}} +{{table columns="1" cellpadding="2" cells=" FreeBASIC does not have a native Variant data type at this time. However, by using the extended Type syntax, you could create a Variant data type for use in your program."}} -When using a Union within a type it is common practice to create an id field within the type that indicates what the union contains at any given moment. The following code snippet illustrates this concept. +When using a ##Union## within a type it is common practice to create an ##//id//## field within the type that indicates what the union contains at any given moment. The following code snippet illustrates this concept. %%(freebasic) 'Union field ids @@ -323,7 +323,7 @@ Type vType End Type %% -The union definition here is called an anonymous union since it isn't defined with a name. The //vt_id// field of the type definition indicates the value of the union. To initialize the type you would use code like the following. +The union definition here is called an anonymous union since it isn't defined with a name. The ##//vt_id//## field of the type definition indicates the value of the union. To initialize the type you would use code like the following. %%(freebasic) Dim myVarianti As vType @@ -336,8 +336,8 @@ myVariantd.vt_id = vDouble myVariantd.d = 356.56 %% -//myVarianti// contains an integer value so the id is set to vInteger. //myVariantd// contains a double so the id is set to vDouble. If you were to create a subroutine that had a vType parameter, you could examine the //vt_type// field to determine whether an integer or double had been passed to the subroutine. +##//myVarianti//## contains an ##integer## value so the ##//id//## is set to ##//""vInteger""//##. ##//""myVariantd""//## contains a ##double## so the id is set to ##//""vDouble""//##. If you were to create a subroutine that had a ##//""vType""//## parameter, you could examine the ##//vt_type//## field to determine whether an ##//integer//## or ##//double//## had been passed to the subroutine. {{table columns="1" cellpadding="2" cells=" You cannot use dynamic strings within a union."}} -Using a combination of unions and types within a program allows you to design custom data types that have a lot of flexibility, but care must be taken to ensure that you are using the data constructs correctly. Improper use of these data types can lead to hard-to-find bugs. The benefits however, out-weigh the risks and once mastered, are a powerful programming tool. +Using a combination of ##//unions//## and ##//type//##s within a program allows you to design custom data types that have a lot of flexibility, but care must be taken to ensure that you are using the data constructs correctly. Improper use of these data types can lead to hard-to-find bugs. The benefits however, out-weigh the risks and once mastered, are a powerful programming tool. diff --git a/fbdocs/manual/cache/TutLinkedLists.wakka b/fbdocs/manual/cache/TutLinkedLists.wakka index 1f789cc24e..06c84d898a 100644 --- a/fbdocs/manual/cache/TutLinkedLists.wakka +++ b/fbdocs/manual/cache/TutLinkedLists.wakka @@ -1,10 +1,10 @@ {{fbdoc item="title" value="Linked Lists"}}---- -A linked list is a structure that is easily expandable by using a single function, and it comes in very useful when you need an array of something but you have no idea how many. The concept behind a linked list is that each node structure has a pointer to the next and previous node structure. This is called a double linked list, as it links to two different nodes. By using a pointer to a structure, you can specify a null pointer if there is no next or previous node, and since the pointer stores a memory address, the amount of nodes you can store is limited only by memory. +Une liste chaînée est une structure qui est facilement extensible en utilisant une seule fonction et qui devient dans très utile lorsque vous avez besoin d'un tableau de quelque chose, mais dont vous n'avez aucune idée de combien. Le concept derrière une liste chaînée est que chaque structure de noeud a un pointeur vers la structure de noeud suivante et précédente. C'est ce qu'on appelle une double liste chaînée, car il relie deux noeuds différents. En utilisant un pointeur sur une structure, vous pouvez spécifier un pointeur nul si il n'y a pas de noeud suivant ou précédent, et puisque le pointeur stocke une adresse mémoire, le montant des noeuds, vous pouvez stocker est limité uniquement par la mémoire. -The only downside to using a linked list is that in order to store say an integer, you have to allocate space not only for that integer, but also a structure that contains a pointer to the integer and a pointer to the surrounding nodes. This doesn't make much of a difference on today's computers however, unless you are storing millions of nodes. +Le seul inconvénient de l'utilisation d'une liste chaînée est que dans le but de stocker par exemple un entier, vous devez allouer de l'espace non seulement pour ce nombre entier, mais aussi pour une structure qui contient un pointeur vers l'entier et un pointeur vers les noeuds environnants. Cependant, cela n'a pas beaucoup d'importance sur les ordinateurs modernes, sauf si vous stockez des millions de noeuds. -The basic structure of the linked list is the node. The declaration is this: +La structure de base de la liste chaînée est le noeud. La déclaration est la suivante: %%(freebasic) type listnode as any ptr pData @@ -12,14 +12,14 @@ type listnode as listnode ptr pPrev end type %% -As a side note, if whoever has access to these scripts would like to update it so it contains the keywords new to ""FreeBASIC"" (such as ptr), feel free to :) Also, LIST doesn't appear to be an FB keyword (correct me if I'm wrong). +Une petite remarque, si quelqu'un qui a accès à ces scripts désire les mettre à jour car ils contiennent des mots-clefs nouveaux pour FreeBASIC (comme ptr), il est libre de le faire :) Aussi, LIST n'apparaît pas comme un mot-clef FB keyword (corrigez-moi si je me trompe). -This structure contains three pointers. The first is a pointer to anything (Any Ptr), that means that you can store strings, integers, characters, even user defined types and unions. But it also means that you must pass a pointer. You can obtain a pointer by using the Allocate (or CAllocate) function. -The next two pointers are pointers to listnodes, that is, you are technically allowed to do this: +Cette structure contient trois pointeurs. Le premier est un pointeur sur quelque chose (Any Ptr), ce qui signifie que vous pouvez stocker des chaînes, des entiers, des caractères, même des types définis par l'utilisateur et des unions. Mais cela signifie aussi que vous devez passer un pointeur. Vous pouvez obtenir un pointeur en utilisant la fonction Allocate (ou CAllocate). +Les deux pointeurs suivants sont des pointeurs vers des //listnode//s, ceci dit, vous êtes techniquement autorisé à faire cela: Print node->pNext->pNext->pNext->pNext->pNext... -since each node contains a pointer to another node. The problem with the above syntax is that you are limited to how many nodes you can access and the code gets hard to understand. You can use the ""ListGetNext"" function for this purpose, and loop with a While loop. +puisque chaque noeud contient un pointeur vers un autre noeud. Le problème avec la syntaxe ci-dessus est que vous êtes limité par la quantité de noeuds auxquels vous pouvez accéder et le code est difficile à comprendre. Vous pouvez utiliser la fonction de //ListGetNext// à cet effet et une boucle avec //While//. -Before we go any further, let's see all the declarations for using linked lists. Note that every function has a prefix of "List". +Avant d'aller plus loin, voyons toutes les déclarations pour l'utilisation de listes chaînées. Notez que chaque fonction a un préfixe "List". %%(freebasic) declare function ListCreate() as listnode ptr @@ -31,358 +31,354 @@ declare function ListGetNext(list as listnode ptr) as listnode ptr declare function ListGetPrev(list as listnode ptr) as listnode ptr declare function ListGetData(list as listnode ptr) as any ptr declare function ListRemove(list as listnode ptr, bDelete as integer = 0) as listnode ptr -declare function ListRemoveAll(list as listnode ptr, bDelete as integer = 0) +Declare Function ListRemoveAll(list As listnode Ptr, bDelete As Integer = 0) %% -Edit: Hmm, it doesn't seem to like my use of "Rem" in a function. It compiles fine though. +Hmm, il semble qu'il n'aime pas mon utilisation de "Rem" dans une fonction. Mais il le compile quand même. -You can see that there is a function to create a linked list, to add an item, to get various nodes, get data, and to remove nodes. Currently we'll focus on the ""ListCreate"" function. It takes no parameters and returns a listnode pointer. The structure that it creates has no data filled out. The whole structure is null, but it is still a structure. If you add a node, the pNext member will change and point to the new item, so it won't stay as a null node, since there would be no purpose of that. However, the value returned by ""ListCreate"" won't have any data stored in it and it won't have a previous node. +Vous pouvez voir qu'il y a une fonction pour créer une liste chaînée, ajouter un élément, obtenir différents noeuds, obtenir des données et supprimer des noeuds. Actuellement, nous allons nous concentrer sur la fonction "ListCreate". Elle n'a aucun paramètre et renvoie un pointeur "listnode" La structure qu'elle crée ne contient pas de données. La structure entière est nulle, mais c'est quand même une structure. Si vous ajoutez un noeud, le membre pNext va changer et pointer vers le nouvel élément, de sorte qu'il ne restera pas comme un noeud nul, car cela n'aurait pas de sens. Toutefois, la valeur retournée par "ListCreate" ne stockera pas toutes les données et n'aura pas un noeud précédent. -The function ""ListCreate"" looks like this: -%%(freebasic) +La fonction "ListCreate" ressemble à ceci:br \>%%(freebasic) ' CREATE -function ListCreate() as any ptr - dim as listnode ptr pTemp - pTemp = callocate(len(listnode)) +Function ListCreate() As Any Ptr +Dim As listnode Ptr pTemp + pTemp = CAllocate(Len(listnode)) ' CAllocate automatically zeroes memory. + Return pTemp - return pTemp -end function + End Function %% -I prefer to use the Return instruction to return a value from a function, but FUNCTION = pTemp and ""ListCreate"" = pTemp are also allowed, although they don't immediately exit the function. +Je préfère utiliser l'instruction Return pour renvoyer une valeur à partir d'une fonction, mais FUNCTION = pTemp et ListCreate = pTemp sont aussi permis, bien qu'ils ne fassent pas quitter immédiatement la fonction. +Le but de cette fonction est facile à voir, un noeud est alloué et retourné. Le commentaire dit que la fonction CAllocate remplit automatiquement la mémoire de zéros. Si vous avez utilisé la fonction "Allocate", la mémoire ne serait pas remplie automatiquement de zéros et vous auriez à le faire vous-même. -The point of this function is easy to see, a node is allocated and returned. The comment says that the CAllocate function automatically zeroes memory. If you used the Allocate function, the memory would not be zeroed automatically and you would have to do that on your own. +Les fonctions suivantes, ListAdd et ListAddHead, ajoutent un noeud à la liste. ListAdd ajoute un noeud à la fin de la liste (la queue), tandis que ListAddHead met un noeud tout en haut (la tête). The next functions, ""ListAdd"" and ""ListAddHead"", add a node to the list. ""ListAdd"" appends a node to the end of the list (the tail), while ""ListAddHead"" puts a node at the very top (the head). -%%(freebasic) ' ADD, ADDHEAD +Function ListAdd(list As listnode Ptr, item As Any Ptr) As Any Ptr -function ListAdd(list as listnode ptr, item as any ptr) as any ptr - dim as listnode ptr pTemp - - if (list = 0) then return item +Dim As listnode Ptr pTemp + If (list = 0) Then Return item pTemp = ListGetLast(list) - pTemp->pNext = callocate(len(listnode)) + pTemp->pNext = CAllocate(Len(listnode)) + pTemp->pNext->pPrev = pTemp pTemp->pNext->pData = item + Return item - return item -end function + End Function +Function ListAddHead(list As listnode Ptr, item As Any Ptr) As Any Ptr -function ListAddHead(list as listnode ptr, item as any ptr) as any ptr - dim as listnode ptr pTemp - - if (list = 0) then return item +Dim As listnode Ptr pTemp + If (list = 0) Then Return item pTemp = list->pNext - list->pNext = callocate(len(listnode)) + list->pNext = CAllocate(Len(listnode)) list->pNext->pPrev = list + list->pNext->pData = item list->pNext->pNext = pTemp + If (pTemp <> 0) Then - if (pTemp <> 0) then - pTemp->pPrev = list->pNext - end if + pTemp->pPrev = list->pNext + End If + Return item - return item -end function + End Function %% -You can see that ""ListAdd"" makes a reference to a function not shown yet, ""ListGetLast"". For now all you have to know is that it returns a pointer to the last node in the list. It will be covered later. +Vous pouvez voir que ListeAdd fait référence à une fonction qui n'est pas encore prête, ListGetLast. Pour l'instant tout ce que vous devez savoir est qu'elle retourne un pointeur sur le dernier noeud de la liste. Elle sera traîtée plus tard. +ListeAdd récupère le dernier noeud et définit son pointeur "pNext" vers une nouvelle structure "listnode". Cela ne provoquera pas de perte de mémoire puisque le dernier noeud a un "pNext" de valeur nulle et vient après. Une fois que notre noeud est ajouté, nous pouvons y accéder en utilisant l'opérateur ->. La ligne -""ListAdd"" retrieves the last node and sets its pNext pointer to a new listnode structure. This won't cause memory loss since the last node has a null pNext value because nothing comes after it. Once our node is added, we can access it using the -> operator. The line -pTemp->pNext->pPrev = pTemp -is the whole basis of linked lists, the linking part. What this says is that we have a reference to a node. That node knows where the next node is, and now we're telling the node after that next one where the previous one is. It may look a little redundant at first, but the compiler doesn't know where the nodes are until you set them. Once you've done this, you can step through the linked list. +pTemp->pNext->pPrev = pTemp
    est toute la base de listes chaînées, la pièce de liaison. Ce qui est dit c'est que nous avons une référence à un noeud. Ce noeud sait où se trouve le noeud suivant, et maintenant nous pouvons dire que le noeud après ce suivant est là où le précédent est. Cela peut sembler un peu redondant au premier abord, mais le compilateur ne sait pas où sont les noeuds jusqu'à ce que vous les définissiez. Une fois que vous avez fait cela, vous pouvez parcourir la liste chaînée. +La fonction "ListAddHead" est un peu plus compliquée, puisque nous insérons sommes un noeud entre le premier noeud actuel et le noeud nul de "ListCreate". Ce qu'il fait essentiellement est d'allouer de l'espace pour contenir le noeud courant d'abord, créer un nouveau noeud là et les lier tous ensemble. Si vous regardez d'un peu plus près, cela devrait vous sembler beaucoup plus clair. L'instruction "If" à la fin est tout simplement là pour éviter un accès à de la mémoire qui n'existe pas (NULL->pPrev). Si pTemp n'est pas dans les fait égal à zéro, alors le membre pPrev sera assigné. Sinon, il n'y a aucune raison de s'inquiéter à ce sujet. +Les fonctions suivantes sont ListGetFirst et ListGetLast. Je les ai mises en oeuvre car "ListGetLast" a été référencée dans une fonction précédemment. The ""ListAddHead"" function is a little more complicated, since we're actually inserting a node between the current first node and the null node from ""ListCreate"". What it does basically is allocates space to hold the current first node, creates a new node there, and links them all together. If you study it a little, it should seem a lot clearer. The If statement at the end just makes sure that we're not trying to access memory that doesn't exist (NULL->pPrev). If pTemp does not in fact equal zero, then its pPrev member will be assigned. Otherwise, there is no reason to worry about it. -The next functions are ""ListGetFirst"" and ""ListGetLast"". I implemented them next because ""ListGetLast"" was referenced in an above function. - -%%(freebasic) ' GETFIRST, GETLAST -function ListGetFirst(list as listnode ptr) as any ptr - if (list = 0) then return 0 - - return list->pNext -end function +Function ListGetFirst(list As listnode Ptr) As Any Ptr +If (list = 0) Then Return 0 -function ListGetLast(list as listnode ptr) as any ptr - dim as listnode ptr pTemp +Return list->pNext + End Function - if (list = 0) then return 0 + Function ListGetLast(list As listnode Ptr) As Any Ptr +Dim As listnode Ptr pTemp +If (list = 0) Then Return 0 pTemp = list - while (pTemp->pNext <> 0) - pTemp = pTemp->pNext - wend - return pTemp -end function -%% + While (pTemp->pNext <> 0) -The first function is probably the shortest and easiest function to understand, although it relies on the fact that you are holding a pointer to the node returned by ""ListCreate"". If you don't do this, it could return any random node. All it does is return a pointer to the first node, or the node that comes right after the null node. + pTemp = pTemp->pNext + Wend + Return pTemp + End Function -The second function, ""ListGetLast"", loops through the list until it finds a null node. The reason I check if pTemp->pNext = 0 instead of pTemp = 0 is that I don't want to return zero. I want to return the last node, which is the node that has its pNext value set to zero. Once that node is found, ""ListGetLast"" returns it. + %% +La première fonction est probablement la fonction la plus courte et la plus facile à comprendre, même si elle repose sur le fait que vous détenez un pointeur vers le noeud retourné par "ListCreate". Si vous ne le faites pas, elle pourrait retourner n'importe quel noeud aléatoire. Tout ce qu'elle fait est de retourner un pointeur vers le premier noeud ou le noeud qui vient juste après le noeud nul. +La seconde fonction, "ListGetLast", boucle à travers la liste jusqu'à ce qu'elle trouve un noeud nul. La raison pour laquelle je vérifie si "pTemp->pNext = 0" au lieu de "pTemp = 0", c'est que je ne veux pas qu'elle retourne zéro. Je veux retourner le dernier noeud, qui est le noeud qui a sa valeur pNext mise à zéro. Une fois que le noeud est trouvé, ListGetLast le renvoie . -The next 3 functions are just helper functions, and could be easily accomplished with one line of code. They really exist because the original implementation not written by me had a ""ListGetNext"" function. +Les trois prochaines fonctions sont simplement des fonctions d'aide et pourraient être facilement réalisées avec une ligne de code. Elles existent réellement, car l'implémentation initiale qui n'a pas été écrite par moi, avait une fonction "ListGetNext". + +The second function, ""ListGetLast"", loops through the list until it finds a null node. The reason I check if pTemp->pNext = 0 instead of pTemp = 0 is that I don't want to return zero. I want to return the last node, which is the node that has its pNext value set to zero. Once that node is found, ""ListGetLast"" returns it. -%%(freebasic) ' GETNEXT, GETPREV -function ListGetNext(list as listnode ptr) as any ptr - if (list = 0) then return 0 +Function ListGetNext(list As listnode Ptr) As Any Ptr +If (list = 0) Then Return 0 + +Return list->pNext + End Function - return list->pNext -end function + Function ListGetPrev(list As listnode Ptr) As Any Ptr +' can't do anything to a null list -function ListGetPrev(list as listnode ptr) as any ptr - ' can't do anything to a null list - if (list = 0) then return 0 +If (list = 0) Then Return 0 ' this is needed for below - if (list->pPrev = 0) then return 0 + If (list->pPrev = 0) Then Return 0 ' since the list starts with a null node (pPrev and pData = 0), ' the first should be the one right after the real first. - if (list->pPrev->pPrev = 0) then return 0 + If (list->pPrev->pPrev = 0) Then Return 0 + Return list->pPrev + End Function - return list->pPrev -end function + ' GETDATA +Function ListGetData(list As listnode Ptr) As Any Ptr -' GETDATA +If (list = 0) Then Return 0 -function ListGetData(list as listnode ptr) as any ptr - if (list = 0) then return 0 +Return list->pData + End Function - return list->pData -end function -%% + %% +La première fonction, ListGetNext, est exactement la même que "ListGetFirst", mais elle se différencie par le point de vue. Bien que vous puissiez utiliser ListGetFirst sur ôôune valeur noeud dans cette implémentation, ce n'est pas une bonne idée parce que certains d'autres implémentations peuvent boucler sur le début de la liste afin de trouver le premier noeud, auquel cas vous seriez coincé dans une boucle infinie. +La fonction "ListGetPrev" est un peu plus complexe, car je ne veux pas retourner de noeud nul. La première ligne de code et la troisième (et non les commentaires) sont celles qui sont réellement nécessaires, mais la seconde assure que nous n'accédons pas à de la mémoire nulle. La troisième ligne dit que si le noeud, deux noeuds au-dessus, est nul, nous devrions retourner zéro. Cela signifie que si vous êtes au niveau du noeud le plus haut (pas le noeud nul), il n'y a pas de noeud précédent avec lequel vous pourriez faire n'importe quoi, bien qu'il y existe un noeud précédent et on devrait retourner zéro. La dernière ligne traite le cas par défaut, où il existe en fait un noeud précédent qui doit donc être retourné. -The first function, ""ListGetNext"", is the exact same as ""ListGetFirst"", but the difference is in your point of view. Although you could use ""ListGetFirst"" on a node value in this implementation, it isn't a smart idea because some other implementations may loop to the beginning of the list in order to find the first node, in which case you'd be stuck in an infinite loop. +La fonction "ListGetData" est aussi simple et brève comme les fonctions "ListGetFirst" et "ListGetNext". Elle renvoie simplement un pointeur sur les données du noeud. -The ""ListGetPrev"" function is a little more complicated, since I don't want to return the null node. The first and third line of code (not comments) are the ones that are actually needed, but the second one ensures that we're not accessing null memory. The third line says that if two nodes up is null, we should return zero. That means that if you are at the top node (not the null node), there is no previous node that you can do anything with, although there does exist a previous node, and it should return zero. The last line handles the default case, where there is in fact a previous node, and it should be returned. +Les deux dernières fonctions suppriment des noeuds de la liste. The ""ListGetData"" function is as easy and brief as the ""ListGetFirst"" and ""ListGetNext"" functions. It just returns a pointer to the node's data. -The final two functions remove nodes from the list. -%%(freebasic) ' REMOVE, REMOVEALL +Function ListRemove(list As listnode Ptr, bDelete As Integer = 0) As Any Ptr +Dim As listnode Ptr pPrev -function ListRemove(list as listnode ptr, bDelete as integer = 0) as any ptr - dim as listnode ptr pPrev - dim as listnode ptr pNext - - if (list = 0) then return 0 - +Dim As listnode Ptr pNext + If (list = 0) Then Return 0 pPrev = list->pPrev + pNext = list->pNext - if ((list->pData <> 0) and (bDelete <> 0)) then deallocate list->pData + If ((list->pData <> 0) And (bDelete <> 0)) Then Deallocate list->pData + Deallocate list - deallocate list + If (pPrev <> 0) Then - if (pPrev <> 0) then - pPrev->pNext = pNext - end if - if (pNext <> 0) then - pNext->pPrev = pPrev - end if + pPrev->pNext = pNext - return pNext -end function + End If + If (pNext <> 0) Then + pNext->pPrev = pPrev + End If + Return pNext + End Function -function ListRemoveAll(list as listnode ptr, bDelete as integer = 0) - dim as listnode ptr node + Function ListRemoveAll(list As listnode Ptr, bDelete As Integer = 0) +Dim As listnode Ptr node - node = list - if (list = 0) then return 0 +node = list + If (list = 0) Then Return 0 - while (node <> 0) - if ((node->pData <> 0) and (bDelete <> 0)) then deallocate node->pData - node = ListRemove(node) - wend + While (node <> 0) + If ((node->pData <> 0) And (bDelete <> 0)) Then Deallocate node->pData - return -end function + node = ListRemove(node) + Wend + Return + End Function %% +La fonction "ListRemove" a deux utilités: supprimer le noeud spécifié et relier ensemble les deux noeuds environnants. Vous pouvez voir que pour ce faire elle stocke le pointeur précédent et le suivant. Le paramètre optionnel, "bdelete", spécifie si l'élément de données devrait être supprimé. Si vous stockez seulement des entiers, ou même des structures sans pointeurs à l'intérieur, vous pouvez passer 1 à ce paramètre et l'élément sera supprimé pour vous. Mais si vous avez une structure contenant des pointeurs, la meilleure idée est de supprimer toutes les données vous-même et laisser "ListRemove" gérer seulement la partie liste pour s'assurer qu'il n'y a pas de perte de mémoire. Le pointeur "listnode" est désalloué indépendamment quel que soit la valeur du paramètre. -The ""ListRemove"" function has two jobs: To remove the node you specified, and to link the two surrounding nodes together. You can see that it stores a previous and next pointer to do this. The optional parameter, bDelete, specifies if the data item should be deleted. If you are just storing integers, or even structures with no pointers in them, you can pass 1 for this parameter and the item will be deleted for you. But if you have a structure with pointers in it, the best idea is to delete all the data yourself and have ""ListRemove"" only handle the list part to ensure that there is no memory loss. The listnode pointer is deallocated regardless of whether or not you told it to delete the data. +"ListRemoveAll" s'appuie sur la fonction "ListRemove" pour supprimer les noeuds. Elle boucle simplement à travers la liste en utilisant une "boucle while" et supprime tous les noeuds. Le code original utilisait une "boucle For", mais FB ne semble pas faire comme mon -""ListRemoveAll"" relies on the ""ListRemove"" function to delete the nodes. It simply loops through the list using a While loop and deletes every node. The original code used a For loop, but FB doesn't seem to like my doing -For node = list To 0 Step ""ListRemove""(node) -so it has been changed. +For node = list To 0 Step ListRemove(node) +donc il a été changé +Ça y est, voici le fichier complet qui inclut un exemple dans le haut de façon à les utiliser. Ceci est la première fois que j'écris un tutoriel, alors n'hésitez pas à laisser des commentaires sur les points que je pourrais améliorer. Aussi, si vous trouvez un bug dans mon code (j'ai trouvé un certain nombre pendant la rédaction de ce tuto), s'il vous plaît faites le moi savoir. N'hésitez pas à modifier le bug, mais je voudrais être tenu au courant. That's it, here's the whole file that includes a sample at the top of how to use them. This is my first time writing a tutorial, so feel free to leave comments on ways I could improve. Also, if you catch a bug in my code (I found a couple while writing this), please let me know. Feel free to edit the bug out also, but I'd like to know about it too. -%%(freebasic) -type listnode - as any ptr pData - as listnode ptr pNext - as listnode ptr pPrev -end type - -declare function ListCreate() as listnode ptr -declare function ListAdd(list as listnode ptr, item as any ptr) as any ptr -declare function ListAddHead(list as listnode ptr, item as any ptr) as any ptr -declare function ListGetFirst(list as listnode ptr) as listnode ptr -declare function ListGetLast(list as listnode ptr) as listnode ptr -declare function ListGetNext(list as listnode ptr) as listnode ptr -declare function ListGetPrev(list as listnode ptr) as listnode ptr -declare function ListGetData(list as listnode ptr) as any ptr -declare function ListRemove(list as listnode ptr, bDelete as integer = 0) as listnode ptr -declare function ListRemoveAll(list as listnode ptr, bDelete as integer = 0) - -dim as listnode ptr list, node -dim as integer ptr item +Type listnode +As Any Ptr pData + As listnode Ptr pNext + As listnode Ptr pPrev + End Type +Declare Function ListCreate() As listnode Ptr + +Declare Function ListAdd(list As listnode Ptr, item As Any Ptr) As Any Ptr +Declare Function ListAddHead(list As listnode Ptr, item As Any Ptr) As Any Ptr +Declare Function ListGetFirst(list As listnode Ptr) As listnode Ptr +Declare Function ListGetLast(list As listnode Ptr) As listnode Ptr +Declare Function ListGetNext(list As listnode Ptr) As listnode Ptr +Declare Function ListGetPrev(list As listnode Ptr) As listnode Ptr +Declare Function ListGetData(list As listnode Ptr) As Any Ptr +Declare Function ListRemove(list As listnode Ptr, bDelete As Integer = 0) As listnode Ptr +Declare Function ListRemoveAll(list As listnode Ptr, bDelete As Integer = 0) +Dim As listnode Ptr list, node + +Dim As Integer Ptr item list = ListCreate() -item = ListAdd(list, callocate(len(integer))) +item = ListAdd(list, CAllocate(Len(Integer))) *item = 4 -item = ListAdd(list, callocate(len(integer))) +item = ListAdd(list, CAllocate(Len(Integer))) *item = 44 item = 0 ' just to show it works node = ListGetFirst(list) +While node <> 0 -while node <> 0 - print "found item" +Print "found item" item = ListGetData(node) - print *item + Print *item node = ListRemove(node,1) -wend - -while inkey$ = "" : wend + Wend +While Inkey$ = "" : Wend ' CREATE -function ListCreate() as any ptr - dim as listnode ptr pTemp - pTemp = callocate(len(listnode)) - ' CAllocate automatically zeroes memory. - return pTemp -end function +Function ListCreate() As Any Ptr +Dim As listnode Ptr pTemp + pTemp = CAllocate(Len(listnode)) + ' CAllocate automatically zeroes memory. + Return pTemp + End Function ' ADD, ADDHEAD -function ListAdd(list as listnode ptr, item as any ptr) as any ptr - dim as listnode ptr pTemp +Function ListAdd(list As listnode Ptr, item As Any Ptr) As Any Ptr - if (list = 0) then return item +Dim As listnode Ptr pTemp + If (list = 0) Then Return item pTemp = ListGetLast(list) - pTemp->pNext = callocate(len(listnode)) + pTemp->pNext = CAllocate(Len(listnode)) + pTemp->pNext->pPrev = pTemp pTemp->pNext->pData = item + Return item - return item -end function - -function ListAddHead(list as listnode ptr, item as any ptr) as any ptr - dim as listnode ptr pTemp + End Function +Function ListAddHead(list As listnode Ptr, item As Any Ptr) As Any Ptr - if (list = 0) then return item +Dim As listnode Ptr pTemp + If (list = 0) Then Return item pTemp = list->pNext - list->pNext = callocate(len(listnode)) + list->pNext = CAllocate(Len(listnode)) list->pNext->pPrev = list + list->pNext->pData = item list->pNext->pNext = pTemp + If (pTemp <> 0) Then - if (pTemp <> 0) then - pTemp->pPrev = list->pNext - end if - - return item -end function + pTemp->pPrev = list->pNext + End If + Return item + End Function ' GETFIRST, GETLAST -function ListGetFirst(list as listnode ptr) as any ptr - if (list = 0) then return 0 +Function ListGetFirst(list As listnode Ptr) As Any Ptr - return list->pNext -end function +If (list = 0) Then Return 0 + Return list->pNext -function ListGetLast(list as listnode ptr) as any ptr - dim as listnode ptr pTemp + End Function +Function ListGetLast(list As listnode Ptr) As Any Ptr - if (list = 0) then return 0 +Dim As listnode Ptr pTemp + If (list = 0) Then Return 0 pTemp = list - while (pTemp->pNext <> 0) - pTemp = pTemp->pNext - wend - return pTemp -end function + While (pTemp->pNext <> 0) + pTemp = pTemp->pNext + Wend + Return pTemp + End Function ' GETNEXT, GETPREV -function ListGetNext(list as listnode ptr) as any ptr - if (list = 0) then return 0 +Function ListGetNext(list As listnode Ptr) As Any Ptr + +If (list = 0) Then Return 0 + Return list->pNext - return list->pNext -end function + End Function +Function ListGetPrev(list As listnode Ptr) As Any Ptr -function ListGetPrev(list as listnode ptr) as any ptr - ' can't do anything to a null list - if (list = 0) then return 0 +' can't do anything to a null list + If (list = 0) Then Return 0 ' this is needed for below - if (list->pPrev = 0) then return 0 + If (list->pPrev = 0) Then Return 0 ' since the list starts with a null node (pPrev and pData = 0), ' the first should be the one right after the real first. - if (list->pPrev->pPrev = 0) then return 0 - - return list->pPrev -end function + If (list->pPrev->pPrev = 0) Then Return 0 + Return list->pPrev + End Function ' GETDATA -function ListGetData(list as listnode ptr) as any ptr - if (list = 0) then return 0 +Function ListGetData(list As listnode Ptr) As Any Ptr - return list->pData -end function +If (list = 0) Then Return 0 + Return list->pData + End Function ' REMOVE, REMOVEALL -function ListRemove(list as listnode ptr, bDelete as integer = 0) as any ptr - dim as listnode ptr pPrev - dim as listnode ptr pNext +Function ListRemove(list As listnode Ptr, bDelete As Integer = 0) As Any Ptr - if (list = 0) then return 0 +Dim As listnode Ptr pPrev + Dim As listnode Ptr pNext + If (list = 0) Then Return 0 pPrev = list->pPrev - pNext = list->pNext - if ((list->pData <> 0) and (bDelete <> 0)) then deallocate list->pData + pNext = list->pNext + If ((list->pData <> 0) And (bDelete <> 0)) Then Deallocate list->pData - deallocate list + Deallocate list - if (pPrev <> 0) then - pPrev->pNext = pNext - end if - if (pNext <> 0) then - pNext->pPrev = pPrev - end if + If (pPrev <> 0) Then - return pNext -end function + pPrev->pNext = pNext + End If + If (pNext <> 0) Then + pNext->pPrev = pPrev + End If + Return pNext -function ListRemoveAll(list as listnode ptr, bDelete as integer = 0) - dim as listnode ptr node + End Function +Function ListRemoveAll(list As listnode Ptr, bDelete As Integer = 0) +Dim As listnode Ptr node node = list - if (list = 0) then return 0 - while (node <> 0) - if ((node->pData <> 0) and (bDelete <> 0)) then deallocate node->pData - node = ListRemove(node) - wend + If (list = 0) Then Return 0 + While (node <> 0) - return -end function + If ((node->pData <> 0) And (bDelete <> 0)) Then Deallocate node->pData + node = ListRemove(node) + Wend + Return +End Function %% -If you haven't noticed already, ""ListAdd"" and ""ListAddHead"" return a pointer to the data you inputted. The sample code (see above) shows how to use this functionality. ""ListRemove"" returns a pointer to next node. That's how ""ListRemoveAll"" removes the nodes. ""ListRemoveAll"" is the only function that doesn't return anything. There is no need, since the whole list will be empty after you have called it. \ No newline at end of file +Si vous ne l'avez pas déjà remarqué, "ListeAdd" et "ListAddHead" renvoient un pointeur sur les données que vous entrez. L'exemple de code (voir ci-dessus) montre comment utiliser cette fonctionnalité. "ListRemove" renvoie un pointeur vers le noeud suivant. Voilà comment "ListRemoveAll" supprime les noeuds. "ListRemoveAll" est la seule fonction qui ne renvoie rien. Ce n'est pas nécessaire, puisque toute la liste sera vide après l'avoir appelée. \ No newline at end of file diff --git a/fbdocs/manual/cache/TutMathAngles.wakka b/fbdocs/manual/cache/TutMathAngles.wakka index 0e53c9fbc4..ee1c133c0d 100644 --- a/fbdocs/manual/cache/TutMathAngles.wakka +++ b/fbdocs/manual/cache/TutMathAngles.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="Different ways angles are measured"}}---- -//Written by RandyKeeling// +//Ecrit par RandyKeeling// -This very simple tutorial assumes that you know what an angle is. +Ce tutoriel très simple suppose que vous savez ce qu'est un angle. -There are three commonly used ways to measure the size of an angle: +Il ya trois façons couramment utilisés pour mesurer la taille d'un angle: - - Degrees (deg) + - Degrées (deg) - Radians (rad) - - Gradients (grad) + - Grades (grad) -**Degrees** +**Degrés** -Most people are familiar with angles measured in degrees. A full circle measures 360?. Parts of a degree are often measured two different ways, degrees decimal and DMS (degree, minute, second). +La plupart des gens sont familiarisés avec les angles mesurés en degrés. Un cercle complet mesure 360º. Les divisions d'un dégré sont souvent mesurées de deux façons différentes, en degrés décimaux et DMS (degrés, minutes, secondes). -We can always show a degree as we would any decimal number by showing its whole units followed by its fractional portion. For example, 75.23? means that we have 75 degrees and twenty-three hundredths of a degree. +Nous pouvons toujours présenter un degré par un nombre décimal en montrant toutes ses unités suivies par sa partie fractionnaire. Par exemple, 75,23º signifie que nous avons 75 degrés et vingt-trois centièmes de degré. -In the DMS system, each degree is made up of 60 minutes (or arcminutes) and is marked with a ` . Each minute is made up of 60 seconds (or arcseconds) and is marked with a `` . So a degree measure might look like this 36? 14` 52``. This is read as 36 degrees, 14 minutes, 52 seconds. +Dans le système DMS, chaque degré se compose de 60 minutes (ou minutes d'arc) et est marqué par un '. Chaque minute est composée de 60 secondes (ou secondes d'arc) et est marqué par un ''. Ainsi, une mesure en degrés pourrait ressembler à ceci 36º 14' 52''. Ce qui se lit 36 degrés, 14 minutes, 52 secondes. -To convert DMS to decimal degrees you can use the following code. +Pour convertir les DMS en degrés décimaux vous pouvez utiliser le code suivant. ##%%(freebasic) DIM D AS INTEGER @@ -26,41 +26,41 @@ DIM S AS INTEGER DIM DD AS SINGLE '' Convert to degree decimal -DD = D + M / 60 + S / 3600 '' 3600 comes from 1/60 * 1/60 -%%## +DD = D + M / 60 + S / 3600 '' 3600 comes from 1/60 * 1/60 +%% -**Radians** +## -Radians are more common in computer programming and mathematics. To understand radians, you must understand the constant Pi (often given the symbol of the lowercase Greek letter pi). Pi is an irrational and transcendental number (its decimal notation never ends) and is the circumference of any circle divided by that circle's diameter. An approximate value (to 20 decimal places) is Pi = 3.1415926535897932385. The value of Pi can also be found using this code. +**Radians** +Les Radians sont plus communs dans la programmation informatique et en mathématiques. Pour comprendre les radians, vous devez comprendre la constante Pi (souvent représentée le symbole de la lettre grecque pi minuscule). Pi est un nombre irrationnel et transcendant (sa notation décimale ne se termine jamais) et correspond à la circonférence d'un cercle divisée par le diamètre de ce cercle. Une valeur approximative (à 20 décimales) est Pi = 3,1415926535897932385. La valeur de Pi peut également être déterminée en utilisant ce code. ##%%(freebasic) -Pi = 4 * ATN ( 1 ) -%%## +Pi = 4 * Atn ( 1 ) -With the radian system, a full circle has 2*Pi (6.2831853071795864770) radians. Unlike degrees, radians are ****not**** marked with any form of a symbol. FreeBASIC, like most programming languages, accepts angle measurements in radians and ****not**** degrees. +%% -To convert between radians and degrees (decimal) you can use the following code. +## + +Avec le système en radians, un cercle complet a 2 * Pi (6,2831853071795864770) radians. Contrairement aux degrés, les radians **//ne sont pas//** indiqués par une forme de symbole. FreeBASIC, comme la plupart des langages de programmation, accepte des mesures d'angle en radians et **//non//** en degrés. +Pour une conversion entre radians et degrés (décimal), vous pouvez utiliser le code suivant. ##%%(freebasic) -CONST PI AS DOUBLE = 3.1415926535897932 +Const PI As Double = 3.1415926535897932 -DIM D AS DOUBLE -DIM R AS DOUBLE +Dim D As Double +Dim R As Double +R = D * PI / 180 '' A full circle has 360 degrees, and a full circle has 2*PI Radians -R = D * PI / 180 '' A full circle has 360 degrees, and a full circle has 2*PI Radians D = R * 180 / PI -%%## - -The value of PI is used so often, it is not uncommon to find it defined in libraries and commonly used routines. The following are useful constants. +%% +## +La valeur de PI est très souvent utilisée, donc il n'est pas rare de la trouver définie dans les bibliothèques et les routines couramment utilisées. Les éléments suivants sont des constantes utiles. ##%%(freebasic) -CONST PI AS DOUBLE = 3.1415926535897932 -CONST TWO_PI AS DOUBLE = 6.283185307179586 -CONST HALF_PI AS DOUBLE = 1.570796326794896 -CONST DegToRAD AS DOUBLE = 0.01745329251994330 '' PI/180 -CONST RADToDeg AS DOUBLE = 57.29577951308233 '' 180/PI -%%## +Const PI As Double = 3.1415926535897932 +Const TWO_PI As Double = 6.283185307179586 +Const HALF_PI As Double = 1.570796326794896 -**Gradients** +Const DegToRAD As Double = 0.01745329251994330 '' PI/180 -Gradients are used mainly in some forms of engineering. Within the gradient system a circle has 400 grads. +Const RADToDeg As Double = 57.29577951308233 '' 180/PI diff --git a/fbdocs/manual/cache/TutMathIntroTrig.wakka b/fbdocs/manual/cache/TutMathIntroTrig.wakka index 8ad571feb5..e8f877c758 100644 --- a/fbdocs/manual/cache/TutMathIntroTrig.wakka +++ b/fbdocs/manual/cache/TutMathIntroTrig.wakka @@ -1,22 +1,22 @@ {{fbdoc item="title" value="A Brief Introduction To Trigonometry"}}---- -//Written by RandyKeeling// +//Ecrit par RandyKeeling// -This tutorial includes: +Ce tutoriel comprend: - - Right Triangles - - Pythagoras' Theorem - - Trigonometric Functions - - Applying Trigonometric functions - - Inverse Trigonometric functions - - Other Trigonometric functions - - Law of Sines, Law of Cosines, and other relationships + - Les triangles rectangles + - Le théorème de Pythagore + - Les fonctions trigonomètriques + - L'application des fonctions trigonomètriques + - Les fonctions trigonomètriques inverses + - Les autres fonctions trigonomètriques + - Les lois des sinus, des cosinus et autres relations -Trigonometry can be thought of as the study of triangles. There is more to it than that, but this will suffice for this tutorial. While this may seem to be of limited use, many problems in both the real and virtual worlds can be solved by creative application of triangles. +La trigonométrie peut être considérée comme l'étude des triangles. C'est plus compliqué que cela, mais cela suffira pour ce tutoriel. Bien que cela semble être d'une utilité limitée, de nombreux problèmes dans les mondes réel et virtuel peuvent être résolus par l'application créative de triangles. -A triangle has three sides and in 'normal' (i.e. Euclidean) space has three angles whose measurements add to be exactly 180 degrees (or Pi radians). For this tutorial we will deal only with 'normal' triangles (for those interested in other spaces, search for non-Euclidean triangles or non-Euclidean geometry). +Un triangle a trois côtés et dans l'espace "normal" (c.a.d-euclidien) a trois angles dont la somme des mesures est exactement 180 degrés (ou Pi radians). Pour ce tutoriel, nous allons traiter uniquement avec des triangles "normaux" (pour ceux qui s'intéressent à d'autres espaces, faites une recherche sur les triangles non-euclidiens ou la géométrie non-euclidienne). -**Right Triangles** -To begin with, we will deal with a special class of triangles known as right triangles. A right triangle has one angle that measures 90 degrees. Because the angles of a triangles must be exactly 180 degrees, there can be only one 90 degree angle in a triangle (and it is the largest angle in a right triangle). Below is FreeBASIC code to draw an image of a right triangle. (This image will be referred to throughout the tutorial.) In this image, uppercase letters denote sides, and their corresponding lowercase letters denote the angle opposite of the side. For example, angle y is the angle opposite side Y. +**Les triangles rectangles** +Pour commencer, nous allons faire face à une classe spéciale de triangles: les triangles rectangles. Un triangle rectangle a un angle qui mesure 90 degrés (angle droit). Comme la somme des angles d'un triangle doit être exactement de 180 degrés, il ne peut y avoir qu'un seul angle de 90 degrés dans un triangle (et c'est le plus grand angle dans un triangle rectangle). Ci-dessous vous avez le code FreeBASIC pour dessiner une image d'un triangle rectangle. (Cette image sera reprise dans tout le tutoriel.) Dans cette image, les lettres majuscules nomment les côtés et leurs correspondances en lettres minuscules nomment l'angle opposé de ce côté. Par exemple, l'angle y est opposé au côté Y. ##%%(freebasic) SCREENRES 640,480,8 @@ -49,109 +49,109 @@ LOCATE 45, 40 PRINT "X" SLEEP -%%## +%% -The box in the lower right hand corner means that it is a right angle (measures 90 degrees). The side opposite of that angle (side Z) is called the hypotenuse and is the longest side in a right triangle. +## -**Pythagoras' Theorem** +
    -Perhaps the first bit of trigonometry that most people learn is the relationship commonly known as Pythagoras' Theorem. It simply states that the square of the hypotenuse of a right triangle is equal to the sum of the square of the other two sides. It is easier to understand in equation form. +
    La boîte dans le coin inférieur gauche signifie que c'est un angle droit (il mesure 90 degrés). Le côté opposé de cet angle (côté Z) est appelé l'hypoténuse et c'est le côté le plus long dans un triangle rectangle. -Z^2 = X^2 + Y^2 +**Le théorème de Pythagore** -A trivial example application of this law might be the following. +Peut-être que le premier élément de la trigonométrie que la plupart des gens apprennent est la relation communément appelée Théorème de Pythagore. Il indique simplement que le carré de l'hypoténuse d'un triangle rectangle est égal à la somme des carrés des deux autres côtés. Il est plus facile à comprendre sous forme d'équation. -If player one is 100 meters due east of a marked location (the origin) and player two is 150 meters due north of the same location, how far apart are they? +Z^2 = X^2 + Y^2 -D = SQR(100^2 + 150^2) +a des fonctions pour ces fonctions trigonométriques et d'autres. -**Trigonometric Functions** +Un exemple trivial d'application de cette loi pourrait être le suivant. -Long ago people discovered that regardless of the size of the triangle, certain ratios were always the same. For example, in the image of the triangle above, if the measure of angle y is 45 degrees, then regardless of the size of the triangle, the ratio Y/X will always be the same. Collections of these ratios are trigonometric functions. +Si le joueur est de 100 mètres à l'est d'un emplacement marqué (l'origine) et deux joueurs sont à 150 mètres au nord du même endroit, à quelle distance sont-ils? -The three primary functions are Sine ({{fbdoc item="keyword" value="KeyPgSin|SIN"}}), Cosine ({{fbdoc item="keyword" value="KeyPgCos|COS"}}), and Tangent (TAN). There are many different ways to define these three functions. One way is with relationships between sides of a right triangle. +D = SQR(100^2 + 150^2) - -Sine ({{fbdoc item="keyword" value="KeyPgSin|SIN"}}) is the ratio of the side opposite the angle in question to the hypotenuse. In the above triangle, the sine of the angle y (written as SIN(y)) is the length of side Y divided by the length of side Z. - -Cosine ({{fbdoc item="keyword" value="KeyPgCos|COS"}}) is the ratio of the side adjacent to the angle in question to the hypotenuse. In the above triangle, the cosine of angle y (written COS(y)) is the length of Side X divided by the length of side Z. - -Tangent ({{fbdoc item="keyword" value="KeyPgTan|TAN"}}) is the ratio of the side opposite to the angle in question to the side adjacent to the angle in question. In the above triangle, the tangent of angle y (written as {{fbdoc item="keyword" value="KeyPgTan|TAN"}}(y)) is the length of side Y divided by the length of side X. + **Les fonctions trigonomètriques** + Depuis longtemps, des personnes ont découvert que, indépendamment de la taille du triangle, certains ratios étaient toujours les mêmes. Par exemple, dans l'image du triangle ci-dessus, si la mesure de l'angle y est de 45 degrés, alors indépendamment de la taille du triangle, le ratio Y/X sera toujours le même. Les collections de ces ratios constituent les fonctions trigonométriques. + Les trois principales fonctions sont Sinus ([[KeyPgSin Sin ]]), Cosinus ([[KeyPgCos Cos ]]), et tangente (TAN). Il y a plusieurs manières de définir ces trois fonctions. L'une correspond aux relations entre les côtés d'un triangle rectangle. -Many people remember these relationships with the mnemonic device SOHCAHTOA (pronounced Sow Cah Toe-a) which is of course {{fbdoc item="keyword" value="KeyPgSin|SIN"}} = opposite/hypotenuse, {{fbdoc item="keyword" value="KeyPgCos|COS"}} = adjacent/hypotenuse, and {{fbdoc item="keyword" value="KeyPgTan|TAN"}} = opposite/adjacent. +
  • Sinus ([[KeyPgSin Sin]]) est le rapport entre le côté opposé à l'angle en question et l'hypoténuse. Dans le triangle ci-dessus, le sinus de l'angle y (écrit SIN(y)) est la longueur du côté Y divisé par la longueur du côté Z. -FreeBASIC has functions for these trigonometric functions and others. +
  • Cosinus ([[KeyPgCos Cos]]) est le rapport entre le côté adjacent à l'angle en question et l'hypoténuse. Dans le triangle ci-dessus, le cosinus de l'angle y (écrit COS(y)) est la longueur du côté X divisé par la longueur du côté Z. -**Applying Trigonometric functions** +
  • Tangente ([[KeyPgTan Tan]]) est le rapport entre le côté opposé à l'angle en question et le côté adjacent à l'angle en question. Dans le triangle ci-dessus, la tangente de l'angle y (écrit [[KeyPgTan Tan]](y)) est la longueur du côté Y divisé par la longueur du côté X. -Referring again to the triangle image above, let's say that player one is on the ground at the point near angle y and player two is at the point near angle x (off of the ground). If player one knows how far he or she is from the side Y (let's say 25.2 meters) and can measure the value of angle y (let's say 31.5 degrees) how far off the ground is player two? How far away is player one from player two? +De nombreuses personnes se souviennent de ces relations avec le moyen mnémotechnique SOHCAHTOA (prononcer Sow Cah Toe-a) qui correspond à [[KeyPgSin Sin]] = opposé/hypoténuse, [[KeyPgCos Cos]] = adjacent/hypoténuse, and [[KeyPgTan Tan]] = opposé/adjacent. -To solve this we look at what pieces of information we know. We know the adjacent side to angle y (25.2 meters) and the measure of angle y (31.5 degrees). This is enough information to use the tangent function. {{fbdoc item="keyword" value="KeyPgTan|TAN"}} ( y ) = Opposite/adjacent, or TAN(31.5 degrees) = Opposite/25.2 meters. Using a little algebra to rearrange this we get opposite = {{fbdoc item="keyword" value="KeyPgTan|TAN"}}(31.5 degrees) * 25.2 meters. To find the distance between the players we could use Pythagoras's Theorem now that we know the two non-hypotenuse sides of the triangle or we could use the cosine. Using cosine would give {{fbdoc item="keyword" value="KeyPgCos|COS"}} ( y ) = adjacent/hypotenuse. With some algebra we get, hypotenuse = 25.2/{{fbdoc item="keyword" value="KeyPgCos|COS"}}(31.5 degrees). +Le FreeBASIC a des fonctions pour ces fonctions trigonométriques et d'autres. -Before we can write a program to solve this, we must remember that FreeBASIC, like most programming languages, works with radians, not degrees (see [[TutMathAngles Angles]] ). +**L'application des fonctions trigonomètriques** -In FreeBASIC we could get the answer with this code. +En se référant à nouveau à l'image ci-dessus du triangle, disons que le joueur 1 est, sur le sol, en un point près de l'angle y et le joueur 2 est en un point près de l'angle x (au-dessus du sol). Si le joueur 1 sait à quelle distance il (ou elle) est du côté Y (disons 25,2 mètres) et peut mesurer la valeur de l'angle Y (disons 31,5 degrés) à quelle distance de la terre se trouve le joueurs 2? À quelle distance est le joueur 1 du joueur 2?Referring again to the triangle image above, let's say that player one is on the ground at the point near angle y and player two is at the point near angle x (off of the ground). If player one knows how far he or she is from the side Y (let's say 25.2 meters) and can measure the value of angle y (let's say 31.5 degrees) how far off the ground is player two? How far away is player one from player two? +Pour résoudre ce problème, examinons les éléments d'information que nous connaissons. Nous connaissons le côté adjacent à l'angle Y (25,2 mètres) et la mesure de l'angle Y (31,5 degrés). Cette information est suffisante pour utiliser la fonction tangente. [[KeyPgTan Tan ]] (y) = opposé/adjacent, ou TAN (31,5 degrés) = Opposé/25.2 mètres. En utilisant un peu d'algèbre pour réorganiser tout cela, nous obtenons Opposé = [[KeyPgTan Tan ]] (31,5 degrés) * 25,2 mètres. Pour trouver la distance entre les joueurs nous pouvons utiliser le théorème de Pythagore, maintenant que nous connaissons la mesure des deux côtés différents de l'hypoténuse du triangle ou nous pouvons utiliser le cosinus. L'utilisation du cosinus donne [[KeyPgCos Cos ]] (y) = adjacent/hypoténuse. Avec un peu d'algèbre nous obtenons, l'hypoténuse = 25,2 / [[KeyPgCos Cos ]] (31,5 degrés). +Avant que nous puissions écrire un programme pour résoudre ce problème, il faut rappeler que FreeBASIC, comme la plupart des langages de programmation, travaille en radians, pas en degrés (voir Mesure des angles [[TutMathAngles Angles]]). +Avec FreeBASIC nous pouvons obtenir la réponse avec le code suivant. ##%%(freebasic) -CONST PI AS DOUBLE = 3.1415926535897932 -DIM Opposite AS DOUBLE -DIM Hypotenuse AS DOUBLE -DIM Angle As DOUBLE +Const PI As Double = 3.1415926535897932 -Angle = 31.5 * Pi / 180 +Dim Opposite As Double -Opposite = TAN ( Angle ) * 25.2 -Hypotenuse = 25.2 / COS ( Angle ) +Dim Hypotenuse As Double +Dim Angle As Double -PRINT Opposite -PRINT Hypotenuse +Angle = 31.5 * Pi / 180 +Opposite = Tan ( Angle ) * 25.2 -SLEEP -%%## +Hypotenuse = 25.2 / Cos ( Angle ) +Print Opposite -The above code tells us that player two is about 15.4 meters off the ground and around 29.5 meters away (along the hypotenuse). +Print Hypotenuse -**Inverse Trigonometric functions** +Sleep -But what if you know the sides of a triangle and need to find the angle? You would then use the inverse trigonometric functions. +%% - - Arc********Sine (or Inverse Sine) - - Arc********Cosine (or Inverse Cosine) - - Arc********Tangent (or Inverse Tangent) + ## + Le code ci-dessus nous indique que le joueur 2 est à environ 15,4 mètres du sol et autour de 29,5 mètres (le long de l'hypoténuse). + **Les fonctions trigonomètriques inverses** -For example, using the above set-up, if player two was 30 meters off the ground and 50 meters away from player one (along the hypotenuse) what is the measure of angle y? Looking at our trigonometric functions it looks like we have need of the sine function (an opposite and a hypotenuse). {{fbdoc item="keyword" value="KeyPgSin|SIN"}} ( y ) = opposite/hypotenuse, Arc********Sine (opposite/hypotenuse) = y. +Mais que faire si vous connaissez les côtés d'un triangle et avez besoin de trouver la valeur de l'angle? Vous pouvez alors utiliser les fonctions trigonométriques inverses. -##%%(freebasic) -PRINT ASIN (30/50) -%%## -This gives an angle of about 0.6435 radians, or around 36.9 degrees. The FreeBASIC command for each of these inverse functions are: +- **Arc****Sine** (or Sinus Inverse) +- **Arc****Cosine** (or Cosinus Inverse) +- **Arc****Tangent** (or Tangente Inverse) +Par exemple, en utilisant la configuration ci-dessus, si le joueur 2 était à 30 mètres du sol et 50 mètres du joueur 1 (le long de l'hypoténuse) quelle est la mesure de l'angle y? En regardant nos fonctions trigonométriques il semble que nous avons besoin de la fonction sinus (opposé et hypoténuse). [[KeyPgSin Sin ]] (y) = opposé/hypoténuse, **Arc****Sine** (opposé/hypoténuse) = y. - - {{fbdoc item="keyword" value="KeyPgAsin|ASIN"}} (arcsine) - - {{fbdoc item="keyword" value="KeyPgCos|ACOS"}} (arccosine) - - {{fbdoc item="keyword" value="KeyPgAtn|ATN"}} (arctan, there is also {{fbdoc item="keyword" value="KeyPgAtan2|ATAN2"}} which takes the opposite and adjacent sides of the triangle, not their ratio) + ##%%(freebasic) + Print Asin (30/50) + %% -**Other Trigonometric functions** +## -There are other trigonometric functions that are defined in terms of the above functions. Although none of the below are defined in FreeBASIC. +Cela donne un angle d'environ 0,6435 radians, soit environ 36,9 degrés. Les commandes FreeBASIC pour chacune de ces fonctions inverses sont: - -Secant (sec(y)) is 1/{{fbdoc item="keyword" value="KeyPgCos|COS"}}(y) - -Cosecant (csc(y)) is 1/{{fbdoc item="keyword" value="KeyPgSin|SIN"}}(y) - -Cotangent (cot(y)) is 1/{{fbdoc item="keyword" value="KeyPgTan|TAN"}}(y) + - [[KeyPgAsin Asin]] (arcsine) + - [[KeyPgCos Acos]] (arccosine) + - [[KeyPgAtn Atn]] (arctan, il y a aussi [[KeyPgAtan2 Atan2]] qui prend les côtés opposé et adjacent du triangle, et non pas leur rapport) -Each of these has an inverse (or arc) functions as well. +**Les autres fonctions trigonomètriques** -**Law of Sines, Law of Cosines, and other relationships** -All of the above has assumed a right triangle, but this was an aid in explaining the basic trigonometric functions. The following does not rely on right triangles; these identities are valid for any triangle. +Il existe d'autres fonctions trigonométriques qui sont définis en termes dans les fonctions ci-dessus. Bien qu'aucune des fonctions ci-dessous ne soient définies dans FreeBASIC. +
  • Secant (sec(y)) is 1/[[KeyPgCos Cos]](y) -Law of Sines -{{fbdoc item="keyword" value="KeyPgSin|SIN"}} (y)/Y = {{fbdoc item="keyword" value="KeyPgSin|SIN"}} (x)/X = {{fbdoc item="keyword" value="KeyPgSin|SIN"}} (z)/Z +
  • Cosecant (csc(y)) is 1/[[KeyPgSin Sin]](y) +
  • Cotangent (cot(y)) is 1/[[KeyPgTan Tan]](y) -Law of Cosines -Z^2 = X^2 + Y^2 - 2*X*Y*{{fbdoc item="keyword" value="KeyPgCos|COS"}}(z) +Chacune d'elles a aussi une fonction inverse (ou arc). +**Les lois des sinus, des cosinus et autres relations** -Other Identities +Tout ce qui précède a démontré dans un triangle rectangle, mais ce n'est qu'une aide pour expliquer les fonctions trigonométriques de base. Ce qui suit ne repose pas sur des triangles rectangles; ces identités sont valables pour n'importe quel triangle. -{{fbdoc item="keyword" value="KeyPgSin|SIN"}}^2(y) + {{fbdoc item="keyword" value="KeyPgCos|COS"}}^2(y) = 1 -This means the same as {{fbdoc item="keyword" value="KeyPgSin|SIN"}}(y)*{{fbdoc item="keyword" value="KeyPgSin|SIN"}}(y) + {{fbdoc item="keyword" value="KeyPgCos|COS"}}(y)*{{fbdoc item="keyword" value="KeyPgCos|COS"}}(y) = 1 +Loi des sinus +[[KeyPgSin Sin]] (y)/Y = [[KeyPgSin Sin]] (x)/X = [[KeyPgSin Sin]] (z)/Z -{{fbdoc item="keyword" value="KeyPgTan|TAN"}}(y) = {{fbdoc item="keyword" value="KeyPgSin|SIN"}}((y)/{{fbdoc item="keyword" value="KeyPgCos|COS"}}(y) +Loi des cosinus -There are several more useful identities out there. Search for trigonometric identities or consult any higher mathematical reference. \ No newline at end of file +Z^2 = X^2 + Y^2 - 2*X*Y*[[KeyPgCos Cos]](z) \ No newline at end of file diff --git a/fbdocs/manual/cache/TutMessageIntro.wakka b/fbdocs/manual/cache/TutMessageIntro.wakka index 92b45680d5..3bb7c6d5e8 100644 --- a/fbdocs/manual/cache/TutMessageIntro.wakka +++ b/fbdocs/manual/cache/TutMessageIntro.wakka @@ -185,92 +185,92 @@ function WinMain ( byval hInstance as HINSTANCE, _ function = wMsg.wParam end function -%%## +%% + +## If you have successfully compiled and run the program, you will see a standard window with a message printed on the form. If you click the form, a message box will be displayed, and if you press the Escape key, the program will close. Take a moment to examine the window. You will see that the form has the max, min and restore buttons, a system menu and can be resized. Now look at the code above. There isnt any code needed to handle the mentioned window properties, the OS handles all that for you. It also only takes a single line of code to display the messagebox, which in itself, is a rather complex object. The ratio of result to amount of code, is quite remarkable. If you were to try and recreate this simple program using FreeBasics standard graphical commands, the program would be a hundred times larger. -The first thing you should notice about the code listed above is the format. This is the basic format of any FreeBasic Windows program. Every Windows program, no matter how simple or complex, will follow this same basic format. The two key ingredients of this program are the **""WinMain""** and **""WinProc""** procedures. +The first thing you should notice about the code listed above is the format. This is the basic format of any FreeBasic Windows program. Every Windows program, no matter how simple or complex, will follow this same basic format. The two key ingredients of this program are the **WinMain** and **WinProc** procedures. -The ""WinMain"" procedure is the procedure Windows calls when a program is started. It is the entry point of a Windows program. In ""WinMain"", you build and register the main program window and then enter into the message loop to process messages. Once the program enters the message loop, it will start processing messages with the ""WinProc"" procedure. Since this article is about the message model in a Windows program, we will only discuss the message loop in ""WinMain"" and the ""WinProc"" procedure. +The WinMain procedure is the procedure Windows calls when a program is started. It is the entry point of a Windows program. In WinMain, you build and register the main program window and then enter into the message loop to process messages. Once the program enters the message loop, it will start processing messages with the WinProc procedure. Since this article is about the message model in a Windows program, we will only discuss the message loop in WinMain and the WinProc procedure. -When the Windows operating system is running, there are messages being generated all the time. When a Windows program is running, the OS will send messages to the program, when something happens that the OS thinks the program should know about. Some of these program specific messages are sent directly to the ""WinProc"" (or similar) procedure, and others, primarily user-generated messages, are placed into a message queue. Since most of a program is concerned with user interaction, it is important to understand the message queue. +When the Windows operating system is running, there are messages being generated all the time. When a Windows program is running, the OS will send messages to the program, when something happens that the OS thinks the program should know about. Some of these program specific messages are sent directly to the WinProc (or similar) procedure, and others, primarily user-generated messages, are placed into a message queue. Since most of a program is concerned with user interaction, it is important to understand the message queue. A queue is a data structure where data in added to the back of the queue and removed from the front. This is called a First-In-First-Out, or FIFO stack. If you have ever stood in line to buy movie tickets, you have experienced a queue. -For a program, the message queue will hold one or more messages, lined up like the folks in a movie ticket line. The idle loop of a Windows program sits and waits for messages to arrive and then translates and dispatches the messages to the program. This message loop is contained within the following code excerpt from ""WinMain"". - -##%%(freebasic) +For a program, the message queue will hold one or more messages, lined up like the folks in a movie ticket line. The idle loop of a Windows program sits and waits for messages to arrive and then translates and dispatches the messages to the program. This message loop is contained within the following code excerpt from WinMain. + ##%%(freebasic) '' '' Process windows messages '' - while( GetMessage( @wMsg, NULL, 0, 0 ) <> FALSE ) + While( GetMessage( @wMsg, NULL, 0, 0 ) <> FALSE ) TranslateMessage( @wMsg ) - DispatchMessage( @wMsg ) - wend -%%## + DispatchMessage( @wMsg ) +Wend -The **""GetMessage""** procedure retrieves a message from the queue via the **wMsg** parameter. The wMsg parameter is a MSG type-def that contains the necessary information related to a particular message. Here is the definition of the MSG type-def. +%% +## +The **GetMessage** procedure retrieves a message from the queue via the **wMsg** parameter. The wMsg parameter is a MSG type-def that contains the necessary information related to a particular message. Here is the definition of the MSG type-def. ##%%(freebasic) -type MSG -hwnd as HWND - message as UINT - wParam as WPARAM - lParam as LPARAM - time as DWORD - pt as POINT -end type -%%## - -**hwnd** is the handle of the window that needs to process the message. This message will be processed by that windows ""WinProc"" procedure. + Type MSG + hwnd As HWND + message As UINT + wParam As WPARAM + lParam As LPARAM +Time As DWORD +pt As Point -**Message** is the message identifier. This could be, for example, WM_CREATE, which signals that a window has been created, but not yet shown. +End Type -**wParam** and **lParam** both specify additional information based on the message type. For example, when a key is pressed, you can retrieve the key code by using the lobyte of wParam. +%% -**time** specifies the time that the message was posted and **pt** is a structure that contains the position of the cursor when the message was posted. +## -**""TranslateMessage""** converts virtual key messages to character messages, and then puts them back into the queue so that the key can processed if desired. Any program that uses the keyboard will need this procedure. The **""DispatchMethod""** then sends a message to the windows ""WinProc"" (or similar) procedure associated with the window identified by the **hWnd** parameter. +**hwnd** is the handle of the window that needs to process the message. This message will be processed by that windows WinProc procedure. -To summarize the actions here, a user generated message will be placed into the back of the message queue. ""GetMessage"" retrieves the first waiting message, passes it to ""TranslateMessage"" which converts the message if necessary, and puts it back into the queue. The message is then passed onto ""DispatchMessage"", which examines the message to see which window should get the message, and then passes the message onto the windows handler procedure, which in our example, is ""WinProc"". +**Message** is the message identifier. This could be, for example, WM_CREATE, which signals that a window has been created, but not yet shown. -Before we discuss the ""WinProc"" procedure however, we need to ask a question: What happens if there is more than one window in a program? How does ""WinMain"" know what procedure to use? The answer is contained within the **WNDCLASS** structure. In our example, **wcls** is defined as WNDCLASS in the ""WinMain"" procedure. +**wParam** and **lParam** both specify additional information based on the message type. For example, when a key is pressed, you can retrieve the key code by using the lobyte of wParam. -##%%(freebasic) - with wcls - .style = CS_HREDRAW or CS_VREDRAW +**time** specifies the time that the message was posted and **pt** is a structure that contains the position of the cursor when the message was posted. + +**TranslateMessage** converts virtual key messages to character messages, and then puts them back into the queue so that the key can processed if desired. Any program that uses the keyboard will need this procedure. The **DispatchMethod** then sends a message to the windows WinProc (or similar) procedure associated with the window identified by the **hWnd** parameter. + To summarize the actions here, a user generated message will be placed into the back of the message queue. GetMessage retrieves the first waiting message, passes it to TranslateMessage which converts the message if necessary, and puts it back into the queue. The message is then passed onto DispatchMessage, which examines the message to see which window should get the message, and then passes the message onto the windows handler procedure, which in our example, is WinProc. + Before we discuss the WinProc procedure however, we need to ask a question: What happens if there is more than one window in a program? How does WinMain know what procedure to use? The answer is contained within the **WNDCLASS** structure. In our example, **wcls** is defined as WNDCLASS in the WinMain procedure. + ##%%(freebasic) + With wcls + .style = CS_HREDRAW Or CS_VREDRAW .lpfnWndProc = @WndProc .cbClsExtra = 0 .cbWndExtra = 0 .hInstance = hInstance .hIcon = LoadIcon( NULL, IDI_APPLICATION ) .hCursor = LoadCursor( NULL, IDC_ARROW ) - .hbrBackground = GetStockObject( WHITE_BRUSH ) - .lpszMenuName = NULL - .lpszClassName = strptr( szAppName ) - end with -%%## + .hbrBackground = GetStockObject( WHITE_BRUSH ) +.lpszMenuName = NULL -As you can see, the WNDCLASS structure holds all of the information pertaining to a particular window. In relation to messages, the important item is the **.lpfnWndProc** field. This field holds the address of our message handler for this window. The @ operator in FreeBasic returns the address of an object, in this case the address of our ""WinProc"" procedure. Once this window is registered using the **""RegisterClass""** method, Windows will know what procedure to use to process messages. +.lpszClassName = StrPtr( szAppName ) -As you can see, there is no special significance to the name ""WinProc"". ""WinProc"" could be called ""MyWinProc"", or ""WinHandler"". The actual SDK name is ""WindowProc"", which is just a placeholder for the user defined message handler name. The important piece of information is that whatever you call it, the message handler has to have the same parameters as we have defined in our ""WinProc"", and the address of that procedure has to be stored in .lpfnWndProc. +End With -All messages, whether user generated or system generated pass through the defined message handler, which in our example, is ""WinProc"". Looking at the parameter list of ""WinProc"" we see that we have most of the components of the message structure retrieved by ""GetMessage"". The hwnd is the windows handle, message is the message id and wParam and lParam hold additional message information. Once a message has been passed to ""WinProc"", we then must decide if we are interested in the message. +%% -This is usually done with a select case where we examine the message parameter to see if we want to handle the message. For example, if the message were WM_PAINT, then we would put our drawing code under the WM_PAINT message so that our window would be updated each time all or part of the window is redrawn. If we dont care about a message, then we simply pass the message on to the **""DefWindowProc""** message to be handled by the default message handler. +## -The action here is quite straightforward. ""WinMain"" or Windows sends us messages, and we respond to those messages of interest. As messages come into the message queue, they are processed and sent to ""WinProc"", where they may be further processed, and then passed along to ""DefWindowProc"" to be processed by the operating system. This loop continues for the life of program, until the WM_QUIT message is received, at which point the window is destroyed and the program is terminated. +As you can see, the WNDCLASS structure holds all of the information pertaining to a particular window. In relation to messages, the important item is the **.lpfnWndProc** field. This field holds the address of our message handler for this window. The @ operator in FreeBasic returns the address of an object, in this case the address of our WinProc procedure. Once this window is registered using the **RegisterClass** method, Windows will know what procedure to use to process messages. -In our example, program we are only concerned with the three messages, WM_LBUTTONUP, WM_PAINT and WM_KEYDOWN. The WM_CREATE and WM_DESTROY are basically boilerplate that you would find any windows program. Since we are only interested in these three messages, we only need to write code for these three messages. The rest of the messages we might receive do not concern us, so we dont even bother looking for them. +As you can see, there is no special significance to the name WinProc. WinProc could be called MyWinProc, or WinHandler. The actual SDK name is WindowProc, which is just a placeholder for the user defined message handler name. The important piece of information is that whatever you call it, the message handler has to have the same parameters as we have defined in our WinProc, and the address of that procedure has to be stored in .lpfnWndProc. -In a message-based language, you are writing code to handle an event that has occurred. We know that an event has taken place because we received a message describing the event. If we are interested in that event, then we write code to respond to it. Instead of writing huge amounts of code to handle every aspect of the program like we must do in a procedural language, we only need to write code for certain events, and we let the operating system handle everything else. +All messages, whether user generated or system generated pass through the defined message handler, which in our example, is WinProc. Looking at the parameter list of WinProc we see that we have most of the components of the message structure retrieved by GetMessage. The hwnd is the windows handle, message is the message id and wParam and lParam hold additional message information. Once a message has been passed to WinProc, we then must decide if we are interested in the message. -Now of course, you have to write code to create a window and controls, but this is mostly boilerplate type of code. You simply follow the API and pass along the appropriate parameters to the ""CreateWindow"" function. Once you understand the boilerplate, it is simply a matter of plugging that code into your program when needed. The real action occurs in the ""WinProc"" function when you interact with the window or controls. +This is usually done with a select case where we examine the message parameter to see if we want to handle the message. For example, if the message were WM_PAINT, then we would put our drawing code under the WM_PAINT message so that our window would be updated each time all or part of the window is redrawn. If we dont care about a message, then we simply pass the message on to the **DefWindowProc** message to be handled by the default message handler. -Message-based programming requires a different mind-set than procedural programming. In a procedural language, the user must respond to the program; the programmer is in charge. In a GUI program, the program must respond to the user and the user is in charge. To write effective GUI programs, the programmer has to relinquish control over the program, and work in cooperation with the operating system and the user. +The action here is quite straightforward. WinMain or Windows sends us messages, and we respond to those messages of interest. As messages come into the message queue, they are processed and sent to WinProc, where they may be further processed, and then passed along to DefWindowProc to be processed by the operating system. This loop continues for the life of program, until the WM_QUIT message is received, at which point the window is destroyed and the program is terminated. -When you design a GUI program, you have to ask yourself, How do I want my program to respond to the user? For example, when the application is minimized, should the program ignore the event, or should it do something like put itself in the system tray? This is the essence of message-based programming. Defining what events are important, and then writing individual routines that handle each event. A message-based program is simply a collection of specific routines written in response to specific messages. +In our example, program we are only concerned with the three messages, WM_LBUTTONUP, WM_PAINT and WM_KEYDOWN. The WM_CREATE and WM_DESTROY are basically boilerplate that you would find any windows program. Since we are only interested in these three messages, we only need to write code for these three messages. The rest of the messages we might receive do not concern us, so we dont even bother looking for them. -Despite the reputation of the SDK, the basic concept of message-based programming is quite simple. You are writing a collection of routines to handle messages. This is the core task. All the other stuff like creating a window, or when to repaint the window is done by the operating system. It is the scope of the SDK that gets to most people. There is a lot in there. However, like the clich says, the best way to eat an elephant is one bite and a time. The best way to master the SDK is to simply understand the concept of message-based programming and learn the boilerplate code. Once that is done, creating sophisticated Windows programs isnt all that hard. +In a message-based language, you are writing code to handle an event that has occurred. We know that an event has taken place because we received a message describing the event. If we are interested in that event, then we write code to respond to it. Instead of writing huge amounts of code to handle every aspect of the program like we must do in a procedural language, we only need to write code for certain events, and we let the operating system handle everything else. diff --git a/fbdocs/manual/cache/TutMngAHiScrTbl.wakka b/fbdocs/manual/cache/TutMngAHiScrTbl.wakka index 1f52c5a082..d12739ee4e 100644 --- a/fbdocs/manual/cache/TutMngAHiScrTbl.wakka +++ b/fbdocs/manual/cache/TutMngAHiScrTbl.wakka @@ -1,19 +1,19 @@ {{fbdoc item="title" value="So Biff wants to have a high score table in his game "}}---- -Written by Lachie Dazdarian (September, 2007) +Ecrit par Lachie Dazdarian (Septembre, 2007) -==Introduction== +**Introduction** -On more than one occasion I was inquired by a programming newbie about a set of routines that load a high score table from an external file, input a new high score properly, and then save the modified high scores table. -Using the same set of routines for high scores since the days of Ball Blazing Fantasy, I decided to write a tutorial on them and implement some lacking flexibility (plus few fixes) there, something that was long needed to be done but wasn't due the fact the routines did their job perfectly. -The tutorial will also point you out to some useful (for high scores table managing) additional routines, like the name inputting and file encryption ones, not written by me. +À plus d'une occasion, des novices en programmation m'ont interrogé sur un ensemble de routines qui chargent un tableau des meilleurs scores à partir d'un fichier externe, entrent correctement un nouveau meilleur score, puis enregistrent le tableau modifié des scores les plus élevés. +Utilisant le même ensemble de routines pour les scores les plus élevés depuis la création de "Ball Blazing Fantasy", j'ai décidé d'écrire un tutoriel sur cela et de mettre en oeuvre une certaine souplesse manquante (ainsi que quelques corrections), quelque chose qui avait besoin d'être fait depuis longtemps, mais parce que ces routines ne faisaient pas leur travail parfaitement. +Le tutoriel vous rappellera un certain nombre des routines supplémentaires utiles (pour la gestion de la table des scores les plus élevés), comme la saisie du nom et le cryptage de fichiers, mais que je n'ai pas écrites moi-même. -==Let's do it!== +**Faisons-le!** -It's fairly obvious we'll need two separate subroutines, one for loading/reading our high score table, and one for writing/modifying it. -We'll start with loading/reading of a high score table, as that part is easier and a logical start. -The subroutine for reading a high score table should work relatively simple. It will open a file which contains name and score entries, storing them in appropriate variables and then printing them on the screen, this part being most dependent on the developer's wishes and needs (the method of printing, position of the high score table, its formatting, etc.). -First, we should create a text file containing our name and score entries. Create a file named 'high_scores.dat', open it with Notepad and input this: +Il est assez évident que nous aurons besoin de deux sous-programmes distincts, un pour le chargement/la lecture et un autre pour l'écriture/la modification de notre tableau des meilleurs scores. +Nous allons commencer avec le chargement/la lecture d'un tableau de scores élevés, car cette partie est la plus facile et un départ logique. +Le sous-programme pour lire un tableau des meilleurs scores devraient fonctionner relativement simplement. Il va ouvrir un fichier qui contient les entrées de noms et le score, les stocker dans des variables appropriées et ensuite les afficher sur l'écran, cette partie étant plus dépendante des souhaits du développeur et des besoins (la méthode d'affichage, la position de la table des scores élevés, son formatage, etc.) +Premièrement, nous devons créer un fichier texte contenant notre nom et les entrées de score. Créez un fichier nommé 'high_scores.dat', ouvrez-le avec "Notepad" et entrez ce qui suit: %%(freebasic) FRED @@ -38,11 +38,11 @@ GEORGE 1000 %% -It contains 10 high score entries, formatted with name followed by the accompanying score. I find this formatting the most suitable for editing, although you can pick one where all the names all listed first, and then followed by all the scores. Still, no important benefits from any type of these two formattings, so we'll work with the one I stared with. +Il contient 10 entrées de scores élevés, formaté avec le nom suivi par le score correspondant. Je trouve cette mise en forme la plus adaptée pour l'édition, même si vous pouvez en choisir un où tous les noms sont répertoriés en premier, puis suivis de tous les scores. Cependant, aucun de ces deux types de formatage n'a d'avantages plus importants, nous allons donc travailler sur celui avec lequel j'ai commencé. -This file will be used with the following ""'ReadHighScore'"" subroutine. +Ce fichier sera utilisé avec le sous-programme "ReadHighScore" suivant. -Let's start our main program with some needed initiation statements: +Commençons notre programme principal avec quelques déclarations d'initialisation nécessaires: %%(freebasic) #include "fbgfx.bi" @@ -51,251 +51,251 @@ Using FB const num_of_entries = 10 %% -'num_of_entries' will flag the number of score entries (names or scores in the high score table), and should correspond with the number of entries in the 'high_score.dat' file (not lines, but high score ENTRIES!). +"num_of_entries" sera le nombre d'entrées score (noms ou des scores dans le tableau des meilleurs scores), et doit correspondre au nombre d'entrées dans le fichier "high_score.dat" (pas les lignes, mais les ENTREES de score élevé!). -We should now declare our subroutine with: +Nous devons maintenant déclarer notre sous-programme avec: %%(freebasic) DECLARE SUB ReadHighScore (highscore_file AS STRING) %% -The 'highscore_file' variable will flag the file you want for the ""'ReadHighScore'"" subroutine to open. Not necessary to declare the subroutine like this, but this adds some flexibility to it. +La variable "highscore_file" indiquera le nom du fichier que le sous-programme "ReadHighScore" ouvrira. Il n'est pas nécessaire de déclarer le sous-programme de cette façon, mais cela ajoute une certaine souplesse d'utilisation. -After this, we should declare the following variables: +Après cela, nous devons déclarer les variables suivantes: %%(freebasic)DIM SHARED workpage AS INTEGER -DIM SHARED hname(num_of_entries) AS STRING -DIM SHARED hscore(num_of_entries) AS STRING -%% +Dim Shared workpage As Integer +Dim Shared hname(num_of_entries) As String +Dim Shared hscore(num_of_entries) As String -'workpage' variable is not related to this tutorial and will be used to swap screen work pages inside the loop where the high score table will be drawn. 'hname' array will hold the name entries, while 'hscore' array will hold the score entries from the high score table. +%% -Finally, let's initialize our screen and work/visible pages with: +La variable "workpage" n'est pas liée à ce tutoriel et sera utilisée pour échanger des pages d'écran de travail à l'intérieur de la boucle où le tableau des meilleurs scores sera affiché. Le tableau "hname" contiendra les entrées nom, tandis que le tableau "hscore" contiendra les entrées de la table de pointage score élevé. -%%(freebasic) +Enfin, nous allons initialiser notre écran et les pages de travail/visibles avec: SCREENRES 640, 480, 32, 2, GFX_ALPHA_PRIMITIVES+GFX_WINDOWED -SCREENSET 1, 0 -%% +ScreenRes 640, 480, 32, 2, GFX_ALPHA_PRIMITIVES+GFX_WINDOWED +ScreenSet 1, 0 -Following this code we should place this: +%% -%%(freebasic) +Suite à ce code, il faut placer celui-ci: +ReadHighScore "high_scores.dat" ReadHighScore "high_scores.dat" -END -SUB ReadHighScore (highscore_file AS STRING) +End -END SUB -%% +Sub ReadHighScore (highscore_file As String) +End Sub -You can compile this code, but nothing will happen as the ""'ReadHighScore'"" subroutine is empty. Let's fill it up! -We need to start it by opening the 'high_scores.dat' file and reading the needed data from it. Please refer to FreeBASIC's OPEN statement for info on file opening in FreeBASIC if not familiar with it. +%% +Vous pouvez compiler ce code, mais rien ne se passera car le sous-programme "ReadHighScore" est vide. Remplissons-le! -As we want to open the file using a FREE file handle, we need to dimension a variable that will hold this information and pass it into it. Use this code: +Nous le démarrons en ouvrant le fichier "high_scores.dat" et en y lisant les données nécessaires. S'il vous plaît référez-vous à l'instruction OPEN de FreeBasic pour des infos sur l'ouverture de fichiers dans FreeBasic si cela ne vous est pas familier. -%%(freebasic) +Comme nous voulons ouvrir le fichier en utilisant un identificateur de fichier FREE, nous avons besoin de dimensionner une variable qui va contenir cette information et la transmettre. Utilisez ce code: DIM free_filehandle AS INTEGER +Dim free_filehandle As Integer free_filehandle = FreeFile -%% -We should now open the high score file with: +%% -%%(freebasic) +Nous devons maintenant ouvrir le fichier de scores élevés avec: OPEN highscore_file FOR INPUT AS #free_filehandle -%% +Open highscore_file For Input As #free_filehandle -After the file is opened for reading (FOR INPUT), let's use a for loop to retrieve all the data from it and store it in our 'hname' and 'hscore' variables: +%% -%%(freebasic) +Une fois le fichier ouvert en lecture (FOR INPUT), nous allons utiliser une boucle pour récupérer toutes les données qu'il contient et les stocker dans nos variables "hname" et "hscore": FOR count_entry AS INTEGER = 1 TO num_of_entries -INPUT #free_filehandle, hname(count_entry) -INPUT #free_filehandle, hscore(count_entry) +For count_entry As Integer = 1 To num_of_entries +Input #free_filehandle, hname(count_entry) +Input #free_filehandle, hscore(count_entry) ' If the end of file is reached, exit the FOR loop. -IF EOF(free_filehandle) THEN EXIT FOR -NEXT count_entry -%% +If EOF(free_filehandle) Then Exit For +Next count_entry -Note how the 'count_entry' variable is used and how for each entry the name is stored FOLLOWED by the accompanying score. 'hname(1)' will flag the name with the top score, while 'hscore(1)' the top score. 'hname(num_of_entries)' will flag the name with the lowest score, while 'hscore(num_of_entries)' the lowest score in the high score table. +%% -Don't forget now to close the file with: +Notez comment la variable "count_entry" est utilisée et comment pour chaque entrée le nom est stocké SUIVI du score correspondant. "hname(1)" correspondra au nom avec le meilleur score et "hscore(1)" au plus haut score. "hname(num_of_entries)" correspondra au nom avec le score le plus bas et "hscore(num_of_entries)" le plus petit score dans le tableau des meilleurs scores. -%%(freebasic) +N'oubliez pas maintenant de fermer le dossier avec: CLOSE #free_filehandle -%% +Close #free_filehandle -All we need now is a loop that will display all these names and scores, nicely arranged in a table. +%% -%%(freebasic) +Tout ce dont nous avons besoin maintenant c'est d'une boucle qui permettra d'afficher tous ces noms et scores, joliment disposés dans un tableau. DO -screenlock -screenset workpage, workpage xor 1 +Do +ScreenLock -LINE (0,0)-(639,479), RGBA(0, 0, 0, 255), BF +ScreenSet workpage, workpage Xor 1 -Draw String (285, 120), "TOP SCORES", RGBA(255,255, 255, 255) +Line (0,0)-(639,479), RGBA(0, 0, 0, 255), BF -FOR count_entry AS INTEGER = 1 TO num_of_entries +Draw String (285, 120), "TOP SCORES", RGBA(255,255, 255, 255) +For count_entry As Integer = 1 To num_of_entries Draw String (270, 140 + count_entry * 12), hname(count_entry), RGBA(255,255, 255, 250-count_entry*10) Draw String (340, 140 + (count_entry) * 12), hscore(count_entry), RGBA(255,255, 255, 250-count_entry*10) -NEXT count_entry + +Next count_entry Draw String (245, 400), "Press ESCAPE to exit", RGBA(255,255, 255, 220) +workpage Xor = 1 -workpage xor = 1 -screenunlock +ScreenUnlock -SLEEP 10 +Sleep 10 +Loop Until MultiKey(SC_ESCAPE) -LOOP UNTIL MULTIKEY(SC_ESCAPE) %% +Une simple boucle DO...LOOP qui se terminera quand l'utilisateur appuiera sur ESCAPE. -A simple DO...LOOP that ends when the user pushes ESCAPE. -I used Draw String to print the names and the scores. Another FOR loop is used to loop through the name and score entries, and to display them lower score under the next higher one (note how the Y position of the text to display is connected with the 'count_entry' variable - increase 12 to get more space between scores vertically). I also used a small trick to display each next score with lower translucency (last parameter in the RGBA function). +J'ai utilisé "Draw String" pour afficher les noms et les scores. Une autre boucle FOR est utilisée pour parcourir les entrées noms et scores et de les afficher en plaçant le score le plus faible en-dessous de celui qui lui est immédiatement supérieur (Notez comment la position Y du texte à afficher est liée à la variable "count_entry" augmentée de 12 pour obtenir plus d'espace entre les scores verticalement). J'ai aussi utilisé une petite astuce pour afficher chaque résultat suivant avec moins translucidité (dernier paramètre dans la fonction RGBA). -After placing all this code in the ""'ReadHighScore'"" subroutine, you can compile it and the desired result will appear on the screen. +Après avoir placé tout ce code dans le sous-programme "ReadHighScore", vous pouvez le compiler et le résultat souhaité s'affichera sur l'écran. -Now when we are done with the easy part of the problem, let's move onto writing new entries into our high score table. +Maintenant, quand nous avons fini avec la partie facile du problème, nous allons passer à l'écriture de nouvelles entrées dans notre tableau des meilleurs scores. -I constructed the ""'WriteHighScore'"" subroutine like this: - -%%(freebasic) +J'ai construit le sous-programme "WriteHighScore" comme ceci: SUB WriteHighScore (highscore_file AS STRING, users_score AS INTEGER) -%% +Sub WriteHighScore (highscore_file As String, users_score As Integer) -Which means it will be called with a high scores table file and a score we want to input. If this score evaluates to be lower that the lowest in the high score table, no code will be executed. +%% -This subroutine should start with the following code: +Ce qui signifie qu'il sera appelé avec un fichier de table des scores élevés et un score que nous voulons entrer. Si ce score est évalué comme étant inférieur au plus faible dans le tableau des meilleurs scores, aucun code sera exécuté. -%%(freebasic) +Ce sous-programme devrait commencer par le code suivant: DIM free_filehandle AS INTEGER -DIM startwrite AS INTEGER +Dim free_filehandle As Integer -free_filehandle = FreeFile +Dim startwrite As Integer -OPEN highscore_file FOR INPUT AS #free_filehandle +free_filehandle = FreeFile -FOR count_entry AS INTEGER = 1 TO num_of_entries -INPUT #free_filehandle, hname(count_entry) -INPUT #free_filehandle, hscore(count_entry) +Open highscore_file For Input As #free_filehandle +For count_entry As Integer = 1 To num_of_entries +Input #free_filehandle, hname(count_entry) +Input #free_filehandle, hscore(count_entry) ' If the end of file is reached, exit the FOR loop. -IF EOF(free_filehandle) THEN EXIT FOR -NEXT count_entry +If EOF(free_filehandle) Then Exit For -CLOSE #free_filehandle -%% +Next count_entry +Close #free_filehandle -As you see it starts as the ""'ReadHighScore'"" subroutine. In order to evaluate the user's score and alter the very high score table we need to open the file containing our high score entries and store them in appropriated variables. 'startwrite' variable will flag where the new entry is to be placed inside the high score table (on which position). -The code that follows should be opened with an IF clause that will execute the code inside it only if the user's score is higher than the lowest score in the high score table (naturally): +%% +Comme vous le voyez il commence par le sous-programme "ReadHighScore". Afin d'évaluer le score de l'utilisateur et de modifier le tableau des meilleurs scores, nous devons ouvrir le fichier contenant nos entrées des scores les plus élevés et les stocker dans des variables appropriées. La variable "startwrite" indiquera où la nouvelle entrée doit être placée à l'intérieur du tableau des meilleurs scores (à quelle position). -%%(freebasic) +Le code qui suit doit être ouvert avec une clause IF qui va exécuter le code à l'intérieur seulement si le score de l'utilisateur est plus élevé que le plus petit score dans le tableau des meilleurs scores (naturellement): IF users_score > hscore(num_of_entries) THEN -FOR check_score AS INTEGER = 1 TO num_of_entries +If users_score > hscore(num_of_entries) Then -IF users_score > hscore(check_score) THEN +For check_score As Integer = 1 To num_of_entries +If users_score > hscore(check_score) Then InputName ' Record the position where the new score is ' to placed and exit FOR loop. startwrite = check_score -EXIT FOR -END IF +Exit For -NEXT check_score -%% +End If +Next check_score -The FOR loop 'goes' through the high score entries from the highest to the lowest, and when an entry with a lower score is found this is the place (flagged with 'startwrite' and 'check_score') where our new entry will be recorded. For example, in the first loop the program checks for 'hscore(1)' - the top score in the high score table. If the user's score ends up being higher than it, it's obvious the user's score is the new top score and 'startwrite' needs to be 1. ""'InputName'"" is a subroutine we'll create later, and inside it the user will be...inputting his name. :P +%% -What follows is the 'nexus' of our routine, the code that places the new high score entry on the proper position, and bumps all the lower ones one position down. +La boucle FOR passe en revue les entrées scores les plus élevés de la plus elevée à la plus faible, et quand on trouve une entrée avec un score inférieur elle correspond à la position recherchée (marqué avec "startwrite" et "check_score" ) où notre nouvelle entrée sera enregistrée. Par exemple, dans la première boucle, le programme vérifie pour "hscore(1)" - le plus haut score dans le tableau des meilleurs scores. Si le score de l'utilisateur finit par être plus élevé que lui, il est évident que le score de l'utilisateur est le nouveau score supérieur et "startwrite" doit être 1. "InputName" est un sous-programme, que nous créerons plus tard, et à l'intérieur, l'utilisateur saisiera ... son nom. :P -Check the following code: +Ce qui suit est le "nexus" de notre sous-programme, le code qui place l'entrée nouveau meilleur score sur la position appropriée, et pousse toutes les plus basses d'une position vers le bas. -%%(freebasic) +Vérifiez le code suivant: IF startwrite = num_of_entries THEN +If startwrite = num_of_entries Then hscore(startwrite) = users_score hname(startwrite) = playername -ELSE -FOR write_pos AS INTEGER = (num_of_entries - 1) TO startwrite STEP -1 +Else +For write_pos As Integer = (num_of_entries - 1) To startwrite Step -1 hscore(write_pos + 1) = hscore(write_pos) hname(write_pos + 1) = hname(write_pos) -NEXT write_pos +Next write_pos hscore(startwrite) = users_score hname(startwrite) = playername -END IF +End If + %% +La première condition vérifie si la nouvelle entrée est la plus basse (dernière) dans le tableau des meilleurs scores. Si c'est le cas, nous n'avons pas besoin d'examiner vers le bas toutes les entrées avec un score inférieur car il n'en existe pas, il suffit donc de remplacer l'entrée score le plus bas avec la nouvelle. -First condition checks if the new entry is the lowest (last) in the high score table. If this is the case, we don't need to bump down any entries with a lower score as there are none, but only replace the lowest score entry with the new one. -If this is NOT the case, a FOR loop is executed which loops from the lowest high score entry to the new high score entry (flagged with 'startwrite'), meaning, from bottom to top. +Si ce N'EST PAS le cas, une boucle FOR est exécutée, qui boucle à partir de l'entrée du plus faible score jusqu'à la nouvelle entrée (marquée par "startwrite"), ce qui signifie, du bas vers le haut. -For example, if our high score table has 10 entries and the new entry needs to be placed on position 5, the loop goes from 9 to 5. When "write_pos" is 9, values from 'hscore(9)' and 'hname(9)' are passed to 'hscore(9+1)' and 'hname(9+1)'. When 'write_pos' is 8, values from 'hscore(8)' and 'hname(8)' are passed to 'hscore(8+1)' and 'hname(8+1)'. And so on. +Par exemple, si notre tableau des meilleurs scores a 10 entrées et que la nouvelle entrée doit être placée sur la position 5, la boucle va de 9 à 5. Quand "write_pos" est de 9, les valeurs de "hscore(9)" et "hname(9)" sont passées à "hscore(9+1)" et "hname(9+1)". Lorsque "write_pos" est de 8, les valeurs de "hscore(8)" et "hname(8)" sont passées à "hscore(8+1)" et "hname(8+1)". Et ainsi de suite. -After the FOR loop we need to input the new entry on its appropriate position (flagged with 'startwrite'), new entry being set with 'users_score' and 'playername', where 'playername' will be inputted inside the 'InputName' sub. +Après la boucle FOR nous devons saisir la nouvelle entrée sur sa position appropriée (pointée par "startwrite"), la nouvelle entrée étant fixée par "users_score" et "nomdujoueur", où "nomdujoueur" sera saisia à l'intérieur du sous-programme "InputName". -The last thing in the ""'WriteHighScore'"" sub we need to do is to store the new high score entries back to file: +La dernière chose que nous devons faire sous "WriteHighScore" est de stocker à nouveau les nouvelles entrées scores élevés dans le fichier: +free_filehandle = FreeFile -%%(freebasic) free_filehandle = FreeFile +Open highscore_file For Output As free_filehandle +For count_entry As Integer = 1 To num_of_entries +Print #free_filehandle, hname(count_entry) +Print #free_filehandle, hscore(count_entry) +Next count_entry +Close free_filehandle -OPEN highscore_file FOR OUTPUT AS free_filehandle -FOR count_entry AS INTEGER = 1 TO num_of_entries -PRINT #free_filehandle, hname(count_entry) -PRINT #free_filehandle, hscore(count_entry) -NEXT count_entry -CLOSE free_filehandle %% +Notez comment FOR OUTPUT est utilisé et PRINT pour écrire des données dans des fichiers externes. +Après cela, j'ai mis un appel à "ReadHighScore" et fermée avec END IF car je pense que la table des scores doit être affichée après une nouvelle entrée. -Note how FOR OUTPUT is used and PRINT for writing data into external files. -After this I placed a ""'ReadHighScore'"" call and closed with END IF as I find it good that a new high score table should display after a new entry has been inputted in it. -All we need now is to create the ""'InputName'"" sub like this: - -%%(freebasic) +Ce dont nous avons besoin maintenant est de créer le sous-programme "InputName": SUB InputName -screenset workpage, workpage xor 1 -SCREENSET 0,0 -LINE (0,0)-(639,479), RGBA(0, 0, 0, 255), BF -LOCATE 12, 17 -INPUT ; "Please input your name: ", playername +Sub InputName +ScreenSet workpage, workpage Xor 1 +ScreenSet 0,0 +Line (0,0)-(639,479), RGBA(0, 0, 0, 255), BF +Locate 12, 17 -END SUB -%% +Input ; "Please input your name: ", playername +End Sub -Of course, this will look totally different in your game. Perhaps you'll ask the player to input his/her name on a different place in the game (like when he/she starts a new game). Just have in mind you need one. +%% -To test the routines just place... +Bien sûr, cela va un "look" totalement différent dans votre jeu. Peut-être que vous demanderez au joueur d'entrer son nom à un emplacement différent dans le jeu (comme quand il/elle commence une nouvelle partie). Ayez à l'esprit que vous en avez besoin. -%%(freebasic) +Pour tester les sous-programmes, placez simplement... +ReadHighScore "high_scores.dat" ReadHighScore "high_scores.dat" WriteHighScore "high_scores.dat", 4500 -END -%% +End -...after first SCREENSET (outside subroutines). Change the second parameter with ""'WriteHighScore'"" call to input different scores on different locations in the high score table. I'm sure you are aware that when calling ""'WriteHighScore'"" the second parameter mustn't be hard-coded with a static number, but with a variable in which you'll store player's score, whatever that may be in your case (ie. 'Player.Score'). +%% -==What's next?== +...après le premier SCREENSET (sous-programmes externes). Changer le deuxième paramètre à l'appel de "WriteHighScore" pour entrer des scores différents à différents endroits dans la table des meilleurs scores.Je suis sûr que vous savez que lorsque vous appelez "WriteHighScore" le second paramètre ne doit pas être codé en dur avec un nombre statique, mais avec une variable dans laquelle vous allez stocker le score du joueur, quoi qu'il en soit dans votre cas (c'est à dire "Player.Score"). -The only other things I wish to share regarding this issue is related to high score encryption and better name inputting routine. As both routines I'm using are not by me, I will only brush off them and provide them in an example program you can easily use for your own needs. -Encryption is done using two functions, ""'neoENCpass'"" and ""'neodeENCpass'"". One for encryption and one for decryption. They are called with a string (high score entry string in our case) and password, password being any string you choose and the same must be used for encrypting and decrypting (of course). -Just after you retrieve an string entry from a file you decrypt it like this: +**Et ensuite?** +Les seules autres choses que je souhaite partager sur cette question sont liées à un cryptage du score le plus élevé et un meilleur sous-programme de saisie du nom. Comme les deux routines utilisées ne sont pas de moi, je ne peux que donner des explications sur elles et de les donner dans un exemple de programme que vous pourrez facilement utiliser pour vos propres besoins. +Le cryptage est réalisé en utilisant deux fonctions, "neoENCpass" et "neodeENCpass". Une pour le chiffrement et l'autre pour le déchiffrement. Elles sont appelées avec une chaîne de caractères (dans notre cas, une chaîne du score le plus élevé) et un mot de passe qui est une chaîne de caractères que vous choisissez; et c'est la même chaîne de caractères qui doit être utilisée pour chiffrer et déchiffrer (bien sûr). -%%(freebasic) +Après récupération d'une chaîne à partir d'un fichier, vous la décryptez comme ceci: INPUT #free_filehandle, hname(count_entry) -neoENCdepass SADD(hname(count_entry)), LEN(hname(count_entry)), "yourpass" -%% +Input #free_filehandle, hname(count_entry) +neoENCdepass SAdd(hname(count_entry)), Len(hname(count_entry)), "yourpass" -With 'hscore' variables, being INTEGER, we need to use a temporary STRING variable which has to be decrypted and then pass its value to 'hscore'. -The only annoying feature of this method is the fact you need a separate source code to encrypt/decrypt your high score files, as the routines inside a project will work only if the high score file is previously encrypted. I provided a small program which does this encrypting for you. It is recommended you keep a backup of your high score file in a separate folder (I also provided this in the zip downloads), even if not encrypting it. -Instead of encryption you can use BINARY files, which I don't know how to use at this moment (dont have time to learn; Im submitting the tutorial in the nick of time), and which also AREN'T the same as ENCRYPTION. Encrypted files using these routines people can only decrypt if they know the password (well, most people), while BINARIES can be read by anyone having your source. Ah yes, when providing your source code to public be sure to change the encryption passwords inside it. -Anyway, you might not need or prefer encryption at all. But I personally like having my high score/script files encrypted so than not every Dick and Tom can change/read them with Notepad. Unencrypted high scores might kill the challenge to beat them with some players. -Name inputting routine I won't go describing as that's irrelevant. You have to code, read it. It's much better than plain INPUT (you can use it with custom font printing libraries) and allows you to limit the number of characters in the name. The routine was done by 'Ryan Szrama', and all thanks go to him. -Download the extended example (with encryption and better name inputting): [[http://lachie.phatcode.net/Downloads/Managing_A_High_Score_Table.zip]] +%% +Avec les variables "hscore", qui sont des INTEGERs (ENTIERs), nous devons utiliser une variable temporaire STRING qui sera décryptée et sa valeur passée à "hscore". +Le seul élément gênant de cette méthode réside dans le fait que vous devez avoir un code source distinct pour crypter/décrypter vos fichiers scores élevés, car les routines à l'intérieur d'un projet ne fonctionneront que si le fichier scores élevés est préalablement crypté. Je fournis un petit programme qui fait ce cryptage pour vous. Il est recommandé de garder une sauvegarde de votre fichier scores élevés dans un dossier séparé (Je l'ai également fourni dans le présent téléchargement zip), même s'il n'est pas chiffré. +Au lieu du cryptage vous pouvez utiliser des fichiers BINARY (binaires), mais je ne sais pas comment les utiliser à l'heure actuelle (je n'ai pas le temps d'apprendre; soumettant ce tutoriel dans la précipitation), et ce N'EST PAS équivalent pas au CRYPTAGE. Les fichiers cryptés qui utilisent ces routines ne peuvent être décryptés que si les personnes ont le mot de passe (ainsi pour la plupart), tandis que les fichiers binaires peuvent être lus par n'importe qui ayant votre source. Ah oui, en fournissant votre code source au public n'oubliez pas de changer les mots de passe de cryptage à l'intérieur. +Quoi qu'il en soit, en fin de compte, vous n'avez pas forcément besoin/préfèrer le cryptage. Mais personnellement, j'aime avoir mes fichiers de scores élevés/script cryptés de sorte que tous les Dick et Tom ne puissent pas les changer/lire avec "Notepad". Des scores élevés non-chiffrés pourraient tuer le défi de se battre avec certains joueurs. +Je ne vais pas décrire la routine de saisie du nom, car c'est sans rapport avec le sujet. Vous avez le code, liez-le. C'est beaucoup mieux qu'un simple INPUT (vous pouvez l'utiliser avec vos propres bibliothèques d'affichage de police) et vous permet de limiter le nombre de caractères dans le nom. La routine a été écrite par Ryan Szrama, et l'en remercions. -And that's it for this tutorial. -Until next time, have fun! +Téléchargez l'exemple étendu (avec cryptage et meilleure saisie du nom): http://lachie.phatcode.net/Downloads/Managing_A_High_Score_Table.zip +Et c'est tout pour ce tutoriel. -A tutorial written by Lachie D. (mailto CHR$(58) lachie13 CHR$(64) yahoo CHR$(46) com ; [[http://lachie.phatcode.net]] - The Maker Of Stuff) +Jusqu'à la prochaine fois, amusez-vous bien! diff --git a/fbdocs/manual/cache/TutNewToProg.wakka b/fbdocs/manual/cache/TutNewToProg.wakka index 2f8c6724ce..ffa61a57b6 100644 --- a/fbdocs/manual/cache/TutNewToProg.wakka +++ b/fbdocs/manual/cache/TutNewToProg.wakka @@ -1,189 +1,189 @@ {{fbdoc item="title" value="New to Programming?"}}---- -If you're new to programming in general, you should probably learn what some basic concepts are: +Si vous êtes nouveau à la programmation en général, vous devriez probablement apprendre ce que sont certains concepts de base: -**How Your Program Is Run** - -What a Compiler Is - -Syntax - -Program Flow +**Comment votre programme est exécuté** +
  • Qu'est-ce qu'un compilateur? +
  • Syntaxe +
  • Déroulement du programme **Variables** - -Basic DataTypes -**Input/Output (IO)** +
  • Types de données de base +**Entrée/Sortie (E/S)** -The above being the most important programming concepts for an absolute beginner to programming to learn. I will go over how these concepts work in FreeBASIC. It is also important to learn how to use the manual, located at www.freebasic.net/wiki Most programming communities and language will have manuals with both descriptions and demonstrations. ALWAYS refer to the manual before looking elsewhere. Chances are the information you want is in the manual, and if it's not, it can be added. +Ci-dessus vous avez les concepts de programmation les plus importants pour un débutant absolu qui veut apprendre la programmation. Je vais expliquer comment ces concepts fonctionnent en FreeBASIC. Il est également important d'apprendre à utiliser le manuel, situé à www.freebasic.net/wiki. La plupart des communautés de programmation et les langages ont des manuels avec des descriptions et des démonstrations. TOUJOURS consulter le manuel avant d'aller voir ailleurs. Il y a des chances que les informations que vous cherchez soient dans le manuel, et si elles n'y sont pas, elles peuvent être ajoutées. -This tutorial's on Version 1.0. Don't care for the revision number ^^;; +Ce tutoriel concerne la version 1.0. Ne vous souciez pas pour le numéro de révision ^^;; -===How Your Program is Run=== +
    Comment votre programme est exécuté -==What a Compiler Is== +**Qu'est-ce qu'un compilateur?** -FreeBASIC is a compiled programming language, rather than interpreted. What this means, is that FreeBASIC takes the code that you type in, such as "PRINT" or "SLEEP" and translates that directly into Assembly or Machine Code. Assembler and Machine Code are what the computer understands. In general, you will never code in Machine Code, no matter how "low level" (how close you are to programming machine code) you go. +FreeBasic est un langage de programmation compilé, plutôt qu'interprété. Ce que cela signifie, c'est que FreeBASIC prend le code que vous tapez, comme "PRINT" ou "SLEEP" et le transforme directement en code "Assembleur" ou "Machine". Les codes "Assembleur" et "Machine" sont compris par les ordinateurs. En général, vous ne coderez jamais en code "Machine", quel que soit le "niveau bas" (low level) (la façon dont vous êtes proche du code machine de programmation) où vous irez. -FreeBASIC is a High Level programming language. FreeBASIC makes it so the programmer has to do less work to get more done. With higher level programming, you don't have to worry about the more complex areas of programming. In programming languages such as C and ASM, which are lower level, the programmer has the advantage of manipulating the computer on a more precise and less human level, with the disadvantage of having to know more about internals. +FreeBASIC est un langage de programmation de haut niveau. FreeBASIC fait en sorte que le programmeur ait à faire moins de travail possible. Avec une programmation de haut niveau, vous n'avez pas à vous soucier des domaines les plus complexes de la programmation. Dans les langages de programmation tels que C et ASM, qui sont de bas niveau, le programmeur a l'avantage de la manipulation de l'ordinateur sur un plan plus précis et moins humain, avec l'inconvénient d'avoir à en savoir plus sur ce qui se passe en interne. -Your compiler of choice will depend on your situation. If you want complete control over every action being taken by your computer, you may wish to code in ASM or C. However, as computers and compilers have progressed, you no longer have to worry as much about the speed and lower level details of your code. In many ways, the entire purpose of higher level programming is to make sure you don't have to worry about those things. FreeBASIC handles many optimizations and improvements that you would normally have to do by hand for you, while still allowing you to access lower level areas of control if you wish. One problem with this, however, which is a common problem in most higher level forms of programming, is the high levels of implicit actions being taken by the compiler. If you want to work with lower level code in a higher level language, you need to know how to explicitly control certain aspects of your code. +Le choix de votre compilateur dépendra de la situation. Si vous désirez un contrôle complet sur chaque action entreprise par votre ordinateur, vous choisirez de coder en ASM ou C. Cependant, comme les ordinateurs et les compilateurs ont progressé, vous n'avez plus à vous soucier autant de la vitesse et les détails de niveau inférieur de votre code. À bien des égards, tout l'objet de la programmation de niveau supérieur est de s'assurer que vous n'aurez pas à vous soucier des ces choses. FreeBASIC gère de nombreuses optimisations et améliorations que vous auriez normalement eu à faire vous-même, tout en vous permettant d'accéder aux zones de niveau inférieur de contrôle si vous le souhaitez. Un problème par rapport à cela, cependant, qui est un problème commun à la plupart des formes de plus haut niveau de la programmation, est le niveau élevé des actions implicites prises par le compilateur. Si vous voulez travailler avec le code de niveau inférieur dans un langage de haut niveau, vous avez besoin de savoir comment contrôler explicitement certains aspects de votre code. -==Syntax== +**Syntaxe** -Syntax is how words and commands are grouped together in programming. The order that they are in, what commands are allowed where, and if consistent, will lay down rules as to how you will structure your program. +La syntaxe est la façon dont les mots et commandes sont regroupées dans la programmation, l'ordre dans lequel ils se trouvent, quelles commandes sont autorisées et où, et si cela est compatible, fixe des règles sur la façon dont vous structurez votre programme. -For example, in programming, you will come across the task of calling commands, and giving those commands something to do. Your syntax rules will tell you how you can call this command, and what is or isn't allowed. They will help you call the command intelligently, and help prevent possible errors that could occur in a more "syntax free" (what is essentially impossible in most forms of programming) environment. +Par exemple, dans la programmation, vous aurez la tâche d'appeler des commandes et de leur donner l'ordre de faire quelque chose. Les règles de syntaxe vous diront comment vous pouvez appeler cette commande et ce qui est ou n'est pas autorisé. Elles vous aideront à appeler cette commande intelligemment, et vous aideront à prévenir d'éventuelles erreurs qui pourraient survenir dans un environnement avec une "syntaxe plus laxiste" (ce qui est pratiquement impossible dans la plupart des formes de la programmation). -The syntax for FreeBASIC generally goes as follows: ""CommandName"" ""[""Argument,""]"" ""[""Another Argument""]"" +La syntaxe du FreeBASIC est généralement comme suit: NomCommande [Argument,] [Un autre Argument] -While the above may look confusing at first, it's actually very simple. All that says is that you give the compiler a command, and then give your arguments after the command. The comma is what separates the arguments from one another. An example command could be: Draw Circle, 10. We can assume that Draw will draw something, Circle will be the shape that it draws, and 10 will be the radius of the circle being drawn. In that case, the syntax rules for that command may look something like this: Draw ""[""Shape,""]"" ""[""Size""]"" +Si ce qui précède peut sembler déroutant au premier abord, c'est en fait très simple. Tout cela signifie que vous donnez au compilateur une commande, puis vous donnez vos arguments après la commande. Les arguments sont séparés les uns des autres par des virgules. Un exemple de commande pourrait être: ##//Draw Circle, 10//##. On peut supposer que ##//Draw//## dessinera quelque chose, ##//Circle//## sera la forme dessinée et 10 le rayon du cercle. Dans ce cas, les règles de syntaxe pour cette commande pourraient ressembler à: ##//Draw [Shape,] [Size]//## -FreeBASIC is *not* case sensitive. Calling a command '""DRaW""' is the same as calling the command 'draw'. +Le code de FreeBASIC n'est *pas* sensible à la casse. Appeler la commande "DRaW" est identique à appeler la commande "draw". -==Program Flow== +**Déroulement du programme** -FreeBASIC's code is read from the TOP of the code, to the BOTTOM, one line at a time. When the line of code is read by the compiler, or the compiled code for that line is read by the computer, the command that's on the line will be executed (it will be ran, it will happen, your computer will do what the code tells it to). Example code can be: +Le code FreeBASIC est lu depuis le HAUT du code, jusqu'au BAS, une ligne à la fois. Lorsque la ligne de code est lue par le compilateur, ou que le code compilé pour cette ligne est lu par l'ordinateur, la commande qui se trouve sur la ligne sera exécutée (elle sera exécutée, ce qui se produira, votre ordinateur fera ce que le code lui dit de faire). Un exemple de code peut être: %%(freebasic) PRINT "HI" SLEEP %% -Since the code PRINT is on the line above SLEEP, PRINT will be run first. SLEEP is the next line and will be executed after PRINT is finished executing. +Puisque le code PRINT est sur une ligne avant SLEEP, PRINT sera exécuté en premier. SLEEP est sur la ligne suivante et sera exécutée après que l'exécution de PRINT soit terminée. -Comments can be made in FreeBASIC, which are ignored, and will not become a part of your program. Comments can take up a full line if you begin them with ', or can be multiple line comments if you begin them with /' and end them with '/. Here's an example of using comments. Notice how none of the code or characters within the comments are even noticed by the compiler. +Des commentaires peuvent être faits en FreeBasic, qui seront ignorés et ne deviendront pas une partie de votre programme. Des commentaires peuvent prendre jusqu'à une ligne complète si vous les commencez par ##**'**## ou peuvent être des commentaires sur plusieurs lignes si vous les commencez par ##**/**## et les terminez par ##**/**##. Voici un exemple d'utilisation des commentaires. Remarquez comment aucun des codes ou caractères dans les commentaires ne sont utilisés par le compilateur. %%(freebasic) ' ABLASHD -' PRINT "HI!" ' This line of code will never even be printed, because it's commented. -Print "This is not a comment. This event will occur." ' Print that it's not a comment onto the screen. -sleep ' pause the program until the user hits a key. +' PRINT "HI!" ' Cette ligne de code ne sera jamais affichée, car elle est commentée. +Print "Ceci n'est pas un commentaire. Cet événement aura lieu." ' Affiche que ceci n'est pas uncommentaire. +Sleep ' Met en pause le programme jusqu'à l'appui sur une touche. %% -===Variables=== +
    Variables -What are variables? They're the most important part of programming, that's what. Any time you do anything useful in programming, you're going to store information in variables. +Que sont les variables? Elles sont la partie la plus importante de la programmation, voici pourquoi. Chaque fois que vous faites quelque chose d'utile dans la programmation, vous allez stocker des informations dans des variables. -Do you recall doing algebra or using letters in math, in school? An example might be something like: x = 4, 1 + x = 5. When programming, variables are exactly that. They are words or letters that hold values in programming. These values may store important data such as a name, how much health your main character in your video game has, or even something as simple as the color of one pixel. When you make a variable, you actually are storing the data it holds small piece of the computer's memory. In FreeBASIC, and most programming languages, you will work with variables a lot. +Vous souvenez-vous fait algèbre ou avoir utilisé des lettres en mathématiques, à l'école? Un exemple pourrait ressembler à: ##//x = 4, 1 + x = 5//##. En programmation, les variables correspondent exactement à cela. Ce sont des mots ou des lettres qui contiennent des valeurs dans la programmation. Ces valeurs peuvent stocker des données importantes comme un nom, à combien s'élève la santé de votre personnage principal dans votre jeu vidéo ou même quelque chose d'aussi simple que la couleur d'un pixel. Lorsque vous créez une variable, en réalité vous stockez les données qu'elle contient dans un petit morceau de la mémoire de l'ordinateur. En FreeBASIC et la plupart des langages de programmation, vous travaillerez beaucoup avec des variables. -To create variables in FreeBASIC, we use the DIM command. What does DIM stand for? I'm not sure, but it could stand for DIMENSION, where programmers would define the "size" of their variable. DIM is used to tell FreeBASIC that we're creating a new variable in our program. The command is described in high detail on [[KeyPgDim this page]], but we're going to explain it in less detail here. +Pour créer des variables en FreeBASIC, utilisez la commande DIM. De quoi DIM est-il l'abréviation? Je ne sais pas, mais il pourrait être l'abréviation de DIMENSION, où les programmeurs définissent la "taille" de leur variable. DIM est utilisé pour dire FreeBasic que nous créons une nouvelle variable dans notre programme. La commande est décrite plus en détail sur la page [[KeyPgDim Dim]], mais nous allons l'expliquer moins en détail ici. -The most simple syntax for DIM is: DIM [""VariableName""] AS [""DataType""] [="[""Value""] ] +La syntaxe la plus simple pour les DIM est: ##**DIM [NomDeVariable] AS [TypeDeDonnée] [= [Valeur] ]**## -What this does, is it tells FreeBASIC: -- We're making a variable, because we typed in the command DIM -- We're naming the variable [""VariableName""] (Where ""VariableName"" is the name of the variable you want to make. A variable can be named X, Y, AlexPritchard, BLahblh, Foo, etc.) -- We're specifying the type of variable, because we typed in AS after ""VariableName"" -- We're making the variable of the type [""DataType""] (Datatype can be something that holds numbers, letters, or a whole bunch of stuff!) -- We can also assign the value of the variable by putting EQUALS (=) after our variable creation. +Que fait cela, il dit à FreeBASIC: +- Nous créons une variable, parce que nous avons tapé la commande DIM +- Nous nommons la variable [NomDeVariable] (où "NomDeVariable" est le nom de la variable que nous voulons céer. Une variable peut être nommée X, Y, AlexPritchard, BLahblh, Foo, etc.) +- Nous spécifions le type de la variable, car nous avons tapé AS après "NomDeVariable" +- Nous créons une variable du type [TypeDeDonnée] (Le type de donnée peut être quelque chose qui contient chiffres, des lettres, ou tout un tas de choses!) +- On peut aussi assigner la valeur de la variable par EQUALS (=) après sa création. -Example: +Exemple: %%(freebasic) DIM foo AS INTEGER = 5 PRINT foo SLEEP %% -In our program, we created foo. FOO was created as an INTEGER (A [[CatPgStdDataTypes datatype]] which holds numbers) We gave foo the value of 5. We then call the command PRINT, which PRINTS information on our screen. We PRINT foo, so the number 5 should be PRINTed on the screen. We then SLEEP, which pauses our program until we hit a key. +Dans notre programme, on créé ##//foo//##. FOO est créé comme un INTEGER (Un [[CatPgStdDataTypes type de données]] qui peut contenir des nombres). Nous avons donné à ##//foo//## la valeur de 5. Puis nous appelons la commande PRINT, qui PRINT (AFFICHE) l'information à l'écran. Nous PRINTons ##//foo//##, donc le nombre 5 sera PRINTé à l'écran. Puis nous SLEEPons, ce qui met notre programme en pause jusqu'à ce qu'on appuie sur une touche. -==Basic ""DataTypes""== +**Les types de données de base** -Variables are a tough subject, I think, to begin with in programming. There's a lot of different types of variables! The type of variable is the data type. 'The kind of data that's held in this type of variable', and you wondered why they shortened it to datatype? ^^;; For starters, we'll get you familiar with these types of variables: +Les variables sont un sujet difficile, je pense, pour débuter dans la programmation. Il y a beaucoup de différents types de variables! Le type de variable est le type de données. "Le type de donnée qui est détenue dans ce type de variable" et vous vous demandez pourquoi il a été ramené à un type de données? ^^;; Pour les débutants, on va vous familiariser avec ces types de variables: -Integer - Hold numbers WITHOUT DECIMAL PLACES. Will generally be the size of your computer's registry, which is not a topic I will be going over. -Double - Holds numbers WITH DECIMAL PLACES. Holds very large and small numbers, with high levels of precision (how close to any value you give the variable it's actual value will be) -String - A nice feature in FreeBASIC. STRING is a datatype which holds letters and numbers for you. Built for storing information such as your name, and cool information to put on the screen, such as cooking directions. +Integer (Entier)- Contient des nombres SANS PARTIE DECIMALE. Sera généralement de la taille d'un registre de votre ordinateur, ce qui n'est pas un sujet que je vais développer. +Double - Contient des nombres AVEC PARTIE DECIMALE. Contient aussi bien de très grans comme de très petits nombres, avec des niveaux élevés de précision (une manière pour donner exactement à une variable toute valeur que vous désirez lui attribuer) +String (Chaîne) - Une fonctionnalité intéressante de FreeBASIC. STRING est un type de données qui contient des lettres et des chiffres pour vous. Construit pour stocker des informations telles que votre nom et des informations intéressantes à afficher à l'écran, telles que les Instructions de cuisson. -Remember, follow the proper DIM syntax. DIM variablename as INTEGER will make an INTEGER called variablename, which you can use in your program. You can replace INTEGER with DOUBLE, or STRING. BE CAREFUL! Data Types are *NOT* always compatible with each other! You can not give a STRING the value of 5! You can however, give it the value of "5" (quotes specify string characters in FB). You can not have an integer or double equal "5", as "5" is a string, and not a number. +Souvenez-vous, suivez la syntaxe correcte de DIM. DIM "nomdevariable" AS INTEGER créera un INTEGER appelé "nomdevariable", que vous pourrez utiliser dans votre programme. Vous pouvez remplacer INTEGER par DOUBLE ou STRING. ATTENTION! Les types de données ne sont *pas* toujours compatibles les uns avec les autres! Vous ne pouvez pas donner à une STRING la valeur 5! Vous pouvez cependant lui donner la valeur de "5" (les guillemets spécifient des caractères de chaîne dans FB). Vous ne pouvez pas avoir un nombre entier ou double égal à "5", car "5" est une chaîne et pas un nombre. -Here is a really cool example, which demonstrates how you can use variables to store your name. +Voici un exemple vraiment "cool", qui montre comment vous pouvez utiliser des variables pour stocker votre nom. %%(freebasic) -'' Create the variable MyName. Assign it's value to be 'Alex' +'' Crée la variable MyName. Lui affecte la valeur 'Alex' DIM as STRING MyName = "Alex" -'' Print The MyName variable +'' Affiche la variable MyName Print MyName -'' pause the program until the user hits a key. +'' met le programme en pause jusqu'à l'appui sur une touche. Sleep %% -===Input/Output=== +
    Entrée/Sortie (E/S) -Input is the receiving of information. When your get input on something, someone or something else is giving it to you. You are getting their ouput. (GETTING SOMETHING, Retrieving Something) +L'##**Entrée**## est de la réception de l'information. Lorsque vous demandez une ##**Entrée**## sur quelque chose, quelqu'un ou quelque chose vous est donné. Vous obtenez une ##**Sortie**## de leur part. (DEMANDER QUELQUE CHOSE, Récupérer quelque chose) -Output is the sending of information. When you ouput to something, you're the one giving input to them. (GIVING SOMETHING, Sending Something) +La ##**Sortie**## est l'envoi d'informations. Quand vous effectuez une ##**Sortie**## vers quelqu'un, vous êtes celui qui lui donne une ##**Entrée**##. (DONNER QUELQUE CHOSE, Envoyer quelque chose) -Input and Output are often put together, and are shortened as I/O, or IO. +Input (Entrée) et Output (Sortie) sont souvent rassemblés et abrégés I/O (E/S) ou IO (ES). -FreeBASIC has MANY methods of input and output. For a beginner, most of these could end up confusing you, because they generally require better knowledge of variables and more complex forms of programming. We're going to study the very basics of I/O. +FreeBASIC possède de NOMBREUSES méthodes d'##**Entrée**## et de ##**Sortie**##. Pour un débutant, la plupart d'entre elles pourraient finir par vous dérouter, car elles nécessitent généralement une meilleure connaissance des variables et de formes plus complexes de la programmation. Nous allons étudier les bases même des E/S. -You remember the command PRINT in the above examples? That's OUTPUT. PRINT OUTPUTS to the computer screen. PRINT is a very basic form of output, and it's easy to learn, too! You just call the command PRINT, then tell it what you want it to print. If you want to Print words, you put those enclosed in Double-Quotes. If you want to print variables, you just give PRINT the name of the variable you want to print. +Vous vous souvenez de la commande PRINT dans les exemples ci-dessus? C'est une ##**Sortie**##. PRINT effectue une ##**Sortie**## vers l'écran de l'ordinateur. PRINT est une forme très basique de ##**Sortie**## et elle est également facile à étudier! Il vous suffit d'appeler la commande PRINT, puis lui dire ce que vous voulez afficher. Si vous voulez PRINT des mots, vous les donnez entre des guillemets doubles. Si vous souhaitez afficher une variable, il suffit de donner à PRINT le nom de la variable que vous désirez afficher. -Print [""WhatToPrint""] -Example: +Print [CeQuiEstàAfficher] +Exemple: %%(freebasic) -'' Print the words, HI! to the screen +'' Affiche le mot HI! à l'écran Print "HI!" -'' create a new integer and name it foo. Give it the value of 10. +'' Crée un nouvel entier et le nomme foo. Lui donne la valeur de 10. Dim as Integer foo = 10 -'' Print the value of foo. +'' Affiche la valeur de foo. Print foo sleep %% -INPUT isn't much harder, either. However, whenever you input, you have to get that input and put it into something. Just how like in order to give output, we have to give the PRINT command something to output. We already know variables, right? We will use our variables to store information that the user inputs. +INPUT n'est pas beaucoup plus compliqué. Cependant, chaque fois que vous utilisez INPUT, vous devez récupérer ce que vous avez obtenu d'INPUT et le mettre dans quelque chose. Exactement comme pour une sortie, nous devons donner quelque chose à la commande PRINT pour qu'elle le sorte. Nous connaissez déjà des variables, n'est-ce pas? Nous allons utiliser nos des variables pour stocker les informations entrées par l'utilisateur. -1) We need a variable to store that information in. -2) We need to call a command to get input. -3) We need to print the input to make sure we stored the information correctly. +1) Nous avons besoin d'une variable pour stocker ces informations dedans. +2) Nous avons besoin d'appeler une commande pour obtenir une entrée. +3) Nous avons besoin d'imprimer l'entrée pour s'assurer que nous avons stocké correctement l'information. -I know how to do 1 and 3, but what about 2? We're going to learn a new command for this. Can you guess it's name? INPUT! Yup ^^;; To get INPUT, we will use the command, INPUT. +Je sais comment faire 1 et 3, mais que faire pour le 2? Nous allons apprendre une nouvelle commande pour cela. Pouvez-vous deviner son nom? INPUT! Ouaip ^^;; Pour obtenir INPUT (ENTREE), nous allons utiliser la commande, INPUT. -Input's syntax is as follows: INPUT [""VariableToInputTo""] +La syntaxe d'INPUT est la suivante: INPUT [VariableAEntrer] -You can also use input like so: INPUT [""Output String To Tell User What to Input"",] [""VariableToInputTo""] +You can also use input like so: INPUT [Chaîne à Afficher Pour Demander à l'Utilisateur ce qu'il doit Entrer,] [VariableAEntrer] -The first version of INPUT will let you get input, and put it right into the variable. The second version OUTPUTS your message to the screen before asking for input. This way, the user will know what to input! Alternatively, you can just use the PRINT command before INPUT to send the user a message, but sometimes being able to put related code on one line is a convenience. +La première version d'INPUT vous permettra de recueillir l'ENTREE et la placera dans la variable. La seconde version OUTPUT (AFFICHE) votre message à l'écran avant de demander pour l'ENTREE. De cette façon, l'utilisateur saura ce qu'il doit entrer! En variante, vous pouvez simplement utiliser la commande PRINT avant qu'INPUT envoie un message, mais parfois pouvoir mettre le code relatif sur une seule ligne est plus commode. -Example: +Exemple: %%(freebasic) -'' Create a string. We will hold the user's name in the string! +'' Crée une chaîne. Nous chargerons le nom utilisateur dans une chaîne! Dim as STRING MyName -'' Get the user's name! +'' Obtient le nom utilisateur! '' The message Please Enter Your Name is posted on the screen, '' and then the user has a chance to enter in their name! -Input "Please enter your name!", MyName +Input "SVP, entrez votre nom!", MyName -'' Print the user's name that we just got. -'' Just like input, we can print several messages or -'' execute different types of commands by separating them by commas. -Print "Your Name Is: ", MyName +'' Affiche nom utilisateur obtenu à l'instant. +'' Comme input, nous pouvons afficher plusieurs messages ou +'' exécuter different types de commandes en les séparant par des virgules. +Print "Votre Nom est: ", MyName -'' pause the program until the user hits a key +'' met le programme en pause jusqu'à un appui sur une touche sleep %% -That demonstrates both INPUT and OUTPUT! Both are essential in programming, or at least graphical programming. OUTPUT can be many different things, as well as INPUT. You might be getting input from a robotic arm's sensors rather than from the user's keyboard. You might be outputting to a power drill rather than a monitor. It really depends on the hardware and the purpose of your program. +Cela illustre INPUT et OUTPUT! Les deux sont essentiels dans la programmation, ou au moins la programmation graphique. OUTPUT peut faire beaucoup de choses différentes, ainsi que INPUT. Vous pourriez obtenir entrée de capteurs d'un bras robotique plutôt que par le clavier de l'utilisateur. Vous avez peut-être la sortie sur une perceuse électrique plutôt que sur un moniteur. Cela dépend réellement du matériel et le but de votre programme. -At the time, and in most cases, you don't have to worry so much about where the input comes from, or where it's going to when dealing with your standard I/O functions. More advanced methods of I/O let you decide where it's coming from (which input to get) and where it's going to (where to send output to). +A ce moment-là, et dans la plupart des cas, vous n'avez pas à trop à vous inquiéter d'où vient l'entrée ou où elle va relativement à vos fonctions standard d'E/S. Des méthodes plus avancées d'E / S vous permettent de décider d'où elle vient (de quelle entrée) et où elle va (où envoyer la sortie). -===Programming Definitions=== +
    Définitions de programmation -Argument: See Parameter +Argument: Voir paramètre -ASM: The lowest level code that a human will want to read. This can be compiled directly into machine code. +ASM: Le code de niveau le plus bas que l'homme peut lire. Il peut être compilé directement en code machine. -Compiling: The process of turning text in one language to another. Ex: BASIC in FreeBASIC compiles into ASM. That ASM compiles into machine code. +Compilation: Le processus de transformation du texte d'un langage à l'autre. Ex: BASIC en FreeBASIC compilé en ASM. Cet ASM compilé en code machine. -Machine Code: 0's and 1's. This is *the* code that your computer will understand. +Code Machine: Des 0 et des 1. C'est *le* code que votre ordinateur comprendra. -Parameter: Data that you pass to a command you call in programming. Parameters being passed allow commands to be directed as to HOW they will do something, or what they will do. Passing a parameter 'Rectangle' to a command 'Draw', it would make sense if that drew a rectangle onto your screen. +Paramètre: Les données que vous passez à une commande que vous appelez dans la programmation. Les paramètres passés permettent aux commandes de savoir COMMENT elles devront faire quelque chose ou ce qu'elles devront faire. Passé lea paramètre 'Rectangle' à la commade 'Draw', serait logique si cela dessinait un rectangle sur votre écran. -Pixel: One 'dot' on your monitor. Monitors are made up of thousands of tiny dots which are lit up of different colors. The color depends on the value of the pixel variable that the monitor receives. Believe it or not, even your hardware will use variables, in many ways. +Pixel: Un 'point' sur votre moniteur. Les moniteurs sont constitués de milliers de petits points qui sont éclairés de différentes couleurs. La couleur dépend de la valeur de la variable pixel que le moniteur reçoit. Croyez-le ou non, même votre matériel utilise des variables, de nombreuses façons. -Syntax: How words are grouped together. Your syntax in programming are sets of rules that tell you what code can be placed where. It makes sure that only logical code is allowed. Ex: Print "Hi". PRINT is the COMMAND, "Hi" is what the command will PRINT. Make sense? +Syntaxe: Comment les mots sont regroupés. Votre syntaxe dans la programmation sont des ensembles de règles qui vous disent quel où code peut être placé. Elle veille à ce que seul le code logique soit autorisé. Ex: Print "Hi". PRINT est la COMMANDE, "Hi" est ce que la commande PRINT va utiliser. Est-ce logique? -Variable: A word that holds data in programming. You assign these words values, and with those values, you can save information on your program. \ No newline at end of file +Variable: Un mot qui contient des données dans la programmation. Vous attribuez des valeurs à ces mots et avec ces valeurs, vous pouvez sauvegarder les informations de votre programme. \ No newline at end of file diff --git a/fbdocs/manual/cache/TutOOPInNonOOPLanguages.wakka b/fbdocs/manual/cache/TutOOPInNonOOPLanguages.wakka index 2c179e7fe8..d90e433079 100644 --- a/fbdocs/manual/cache/TutOOPInNonOOPLanguages.wakka +++ b/fbdocs/manual/cache/TutOOPInNonOOPLanguages.wakka @@ -1,111 +1,111 @@ {{fbdoc item="title" value="OOP In Non-OOP Languages"}}---- -Contrary to popular belief object oriented programming does not require an OO language. +Contrairement à la croyance populaire, la programmation orientée objet ne nécessite pas un langage orienté objet. -What you get with an OO language is a set of built in constructs that assist you in writing OO programs but in many cases they are unnecessary and sometimes they are counterproductive. +Ce que vous obtenez avec un langage OO est un ensemble de constructions qui vous aident à écrire des programmes OO, mais dans de nombreux cas ils sont inutiles et parfois elles sont contreproductives. -Anyway, this isn't a rant against OO languages but rather a rant against the unquestioning acceptance of the idea that a specifically OO language is necessary to write object oriented programs. +Quoi qu'il en soit, ce n'est pas une diatribe contre les langages OO, mais plutôt une diatribe contre l'acceptation aveugle de l'idée qu'un langage spécifiquement OO est nécessaire pour écrire des programmes orientés objets. -In order to demonstrate that it is not necessary to have an OO language this example presents a technique that is usually presented as an example of class based programming; and so it is but you won't find the word class in this example. +Afin de démontrer qu'il n'est pas nécessaire d'avoir un langage OO cet exemple présente une technique qui est généralement présentée comme un exemple de programmation basée classe; et c'est ainsi, mais vous ne trouverez pas le mot "class" dans cet exemple. -The code was tested using FB 0.16 for win32. +Le code a été testé en utilisant FB 0.16 pour win32. -If you have to concatenate a lot of strings in most Basics you usually find that it is a time consuming process. Actually FreeBasic string operations are remarkably quick but you can still do better using a string builder. +Si vous avez à concaténer un grand nombre de chaînes dans la plupart des BASICs, vous trouverez généralement que c'est un processus coûteux en temps. En fait, les opérations de chaîne FreeBASIC sont remarquablement rapides, mais vous pouvez faire encore mieux en utilisant un constructeur de chaînes. -A string builder is simply a class that maintains a string buffer in such a way as to avoid repeated calls to the memory allocation function because this is a relatively expensive operation. The methods of the class provide ways of manipulating the buffer and converting between it and the native string type. +Un constructeur chaîne est tout simplement une classe qui gère un tampon de chaîne de telle manière à éviter les appels répétés à la fonction d'allocation mémoire, car cela est une opération relativement coûteuse en temps. Les méthodes de la classe fournissent des moyens de manipulation le tampon et de conversion entre elle et le type de chaîne d'origine. -The trick that makes it faster than the built type for large strings and large numbers of appends is that the string is held in a heap allocated buffer that is always larger than the actual length of the string. This means that appending to the end of the string usually simply means copying the contents of the new string to the memory location following the last character of the current string. In this implementation the buffer is a ZString so it is easy to convert it to an ordinary dynamic string. +Le truc qui le rend plus rapide que le type construit pour les grandes chaînes et les grands nombres d'ajouts est que la chaîne est stockée dans un tamponémoire alloué qui est toujours plus grand que la longueur réelle de la chaîne. Cela signifie que l'ajout à la fin de la chaîne signifie en général de simplement copier le contenu de la nouvelle chaîne à l'emplacement de la mémoire après le dernier caractère de la chaîne actuelle. Dans cette implémentation, le tampon est une ZString ainsi il est donc facile de la convertir en une chaîne ordinaire dynamique. -The FreeBasic module encapsulates a type definition for a struct. Instances of this struct hold the attributes of the object. The methods are simply normal FreeBasic public functions and subs defined in the same module. When you want to call a method you use the normal FreeBasic syntax: +Le module FreeBASIC encapsule une définition de type pour une structure. Les instances de cette structure organisent les attributs de l'objet. Les méthodes sont tout simplement les fonctions publiques normales du FreeBASIC et les sous-programmes définis dans le même module. Lorsque vous voulez appeler une méthode vous utilisez la syntaxe normale FreeBASIC: %%(freebasic) s = StringB_ToString(AStringBInstance)%% -By convention all methods names begin with the name of the class and an underscore and the first argument is always the instance of the type. This argument should always be passed by reference to ensure that changes to the state are permanent and also to avoid unnecessary, time-consuming, copying. +s = StringB_ToString(AStringBInstance)%% -To add a new method you simply add a new function or sub following those rules. +Par convention tous les noms de méthodes commencent par le nom de la classe et un trait de soulignement et le premier argument est toujours l'instance du type. Cet argument doit toujours être passé par référence pour assurer des changements d'état permanents et aussi pour éviter d'inutiles perte temps de copie. -You can easily implement composition of objects but inheritance in the usually expected ways can't be done. You can extend classes simply by defining new functions elsewhere that take arguments of the class type. If the original class defines all of its methods as overloaded you can even create new methods of the same name so long as they have different signatures. +Pour ajouter une nouvelle méthode il vous suffit d'ajouter une nouvelle fonction ou un sous-programme suivant ces règles. -Here is the example code: -%%(freebasic) +Vous pouvez facilement mettre en oeuvre la composition des objets, mais l'héritage ne peut être obtenu de manière habituelle. Vous pouvez étendre les classes simplement en définissant de nouvelles fonctions qui prennent d'ailleurs des arguments de type de classe. Si la classe originale définit l'ensemble de ses méthodes comme surchargées, vous pouvez même créer de nouvelles méthodes de même nom tant qu'elles ont des signatures différentes. +Voici un exemple de code: +'----------------------------------------------------------------------------- '----------------------------------------------------------------------------- -' Classes without built in oop. +' Classes without built in oop. ' Define a struct for the properties and a sub or function for each + ' method. Pass the struct as the first argument in all calls. ' By convention the argument will be Me as in VB Classic - ' Strings in FB are so fast that a string builder class is ' not needed most of the time but if you are concatenating -' thousands of strings to build web pages for instance this might be useful. +' thousands of strings to build web pages for instance this might be useful. ' And please don't start complaining about the lack of inheritance; that ' is not a requirement for the use of objects. There is no legal definition of ' Object Oriented Programming but the most important part of any definition -' is the close association between the data and the code that manipulates it. +' is the close association between the data and the code that manipulates it. 'You can easily extend this class to provide more methods. -'----------------------------------------------------------------------------- -type StringB - len as integer ' used length - allocated as integer - s as zstring ptr ' buffer of at least len characters -end type +'----------------------------------------------------------------------------- + Type StringB + Len As Integer ' used length + allocated As Integer +s As ZString Ptr ' buffer of at least len characters +End Type '----------------------------------------------------------------------------- ' Create a new StringB by calling one of these constructors. '----------------------------------------------------------------------------- -public function StringB_New overload (byval InitialSize as integer) as StringB - dim sb as StringB + Public Function StringB_New Overload (ByVal InitialSize As Integer) As StringB + Dim sb As StringB sb.allocated = InitialSize - sb.s = allocate(InitialSize) + sb.s = Allocate(InitialSize) *sb.s = "" - StringB_New = sb -end function +StringB_New = sb -public function StringB_New(byref InitialValue as string) as StringB - dim sb as StringB - sb = StringB_New(len(InitialValue)) +End Function + Public Function StringB_New(ByRef InitialValue As String) As StringB + Dim sb As StringB + sb = StringB_New(Len(InitialValue)) *sb.s = InitialValue - sb.len = len(InitialValue) - StringB_New = sb -end function + sb.len = Len(InitialValue) +StringB_New = sb -public sub StringB_Dispose(byref Me as StringB) - deallocate Me.s -end sub +End Function + Public Sub StringB_Dispose(ByRef Me As StringB) +Deallocate Me.s -public function StringB_ToString(byref Me as StringB) as string - StringB_ToString = *Me.s -end function +End Sub + Public Function StringB_ToString(ByRef Me As StringB) As String +StringB_ToString = *Me.s -sub StringB_Append overload(byref Me as StringB, byref s as string) +End Function - dim i as integer = Me.len - Me.len += len(s) - if Me.len >= Me.allocated then + Sub StringB_Append Overload(ByRef Me As StringB, ByRef s As String) + Dim i As Integer = Me.len + Me.len += Len(s) + If Me.len >= Me.allocated Then Me.allocated = 2*Me.len - dim as zstring ptr p = reallocate(Me.s, Me.allocated ) - if p=0 then + Dim As ZString Ptr p = Reallocate(Me.s, Me.allocated ) + If p=0 Then ' failed to reallocate - print "StringB_Append failed to reallocate", Me.allocated - return - end if - Me.s = p - end if - *(Me.s + i) = s + Print "StringB_Append failed to reallocate", Me.allocated + Return + End If + Me.s = p + End If -end sub +*(Me.s + i) = s -sub StringB_Append(byref Me as StringB, byref other as StringB) - StringB_Append Me, StringB_ToString(other) -end sub -%% \ No newline at end of file +End Sub + Sub StringB_Append(ByRef Me As StringB, ByRef other As StringB) +StringB_Append Me, StringB_ToString(other) +End Sub \ No newline at end of file diff --git a/fbdocs/manual/cache/TutPointers.wakka b/fbdocs/manual/cache/TutPointers.wakka index 93be1345e2..e60da1f991 100644 --- a/fbdocs/manual/cache/TutPointers.wakka +++ b/fbdocs/manual/cache/TutPointers.wakka @@ -1,139 +1,139 @@ {{fbdoc item="title" value="Introduction to Pointers"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -**What is a Pointer?** +**Qu'est ce qu'un pointeur?** -A pointer is a 4-byte data type that holds an address to a memory location. A pointer doesn't contain data, it points to data once it has been initialized. An uninitialized pointer points to nothing and is undefined. +Un pointeur est un type de donnée de 4 octets qui contient l"adresse d'un emplacement mémoire. Un pointeur ne contient pas de donnée, il pointe vers une donnée lorsqu'il a été initialisé. Un pointeur non-initialisé ne pointe vers rien du tout et est indéfini. -To understand pointers, think of an egg carton that has numbers 1 through 12 printed on the bottom of each "hole" (where you put the eggs). These holes are like memory locations in a computer; each hole, or memory location, has an address, in this example, 1 through 12. If an egg represents a data item, then an egg in hole 1 has an address of 1. +Pour comprendre les pointeurs, imaginez un carton à oeufs qui aurait les numéros de 1 à 12 inscrit au fond de chaque "trou" (où vous posez les oeufs). Ces "trous" sont comme les emplacements mémoire de l'ordinateur; chaque case, ou emplacement mémoire, a une adresse, dans cet exemple, de 1 à 12. Si un oeuf représente un élément de donnée, alors un oeuf dans le "trou" 1 a une adresse de 1. -Normally, you would access the data directly through the use of variables. When you DIMension a variable of a particular type, you are setting aside storage space for the data. You do not need to know, or care, where the data resides since you can access the data directly through the variable. This is like reaching out and picking up the egg in hole 1 (reading the data) or putting an egg in hole 1 (setting the data) without looking at the numbers written on the bottom of the hole. +Normalement, vous accédez aux données directement par l'intermédiaire de variables. Quand vous DIMensionnez une variable d'un type particulier, vous réservez un espace de stockage pour cette donnée. Vous n'avez pas besoin de connaître ou de vous soucier de savoir où la donnée réside en mémoire car vous pouvez accéder directement à celle-ci en utilisant le nom de la variable. C'est comme tendre la main et prendre un oeuf dans la case 1 (lecture de la donnée) ou placer un oeuf dans la case 1 (initialiser la donnée) sans lire le numéro inscrit au fond de la case. -Using pointers is a bit different. Imagine you have a little scrap of paper that will represent our pointer. Right now it is blank and doesn't point to anything. This undefined pointer can't be used until it is initialized. To initialize the pointer, write a 1 on it. Now our pointer is "pointing" to hole 1 in our egg carton. To put data (an egg) in hole 1, we look at our scrap of paper, match it to hole 1 and place the egg in the hole. To retrieve the egg we do just the opposite. We match our slip of paper to hole 1 and then grab the egg. All the putting and getting of the egg has to be done through the slip of paper and is called dereferencing the pointer. That is, we get to the data through the reference contained in the pointer, the number 1. The pointer doesn't contain the data; it contains a reference to the data. +Utiliser des pointeurs est légèrement différent. Imaginez que vous avez un petit bout de papier qui représente notre pointeur. Pour le moment il est vierge et ne pointe nulle part. Ce pointeur non-défini ne peut être utilisé tant qu'il n'est pas initialisé. Pour l'initialiser, écrivez 1 dessus. Maintenant notre pointeur "pointe" vers la case 1 de notre carton à oeufs. Pour placer une donnée (un oeuf) dans la case 1, nous consultons notre bout de papier, il indique la case 1 et nous plaçons l'oeuf dans cette case. Pour récupérer l'oeuf nous effectuons la manoeuvre oposée. Nous faisons correspondre notre bout de papier au trou 1 et ensuite récupérons l'oeuf. La mise en place de l'oeuf et sa récupération se réalisent par l'intermédiaire de notre bout de papier et est appelé déréférencer le pointeur. C'est à dire que nous récupérons la donnée par l'intermédiaire de la référence contenue dans le pointeur, le numéro 1. Le pointeur ne contient pas la donnée; il contient une référence vers cette donnée. -In FreeBasic we define a pointer using the [[KeyPgDim Dim]] and [[KeyPgPtr Ptr]] statements: +Dans FreeBasic nous définissons un pointeur en utilisant les instructions [[KeyPgDim Dim]] et [[KeyPgPtr Ptr]]: ##%%(freebasic) dim aptr as integer ptr -%%## +%% -This statement corresponds to our blank piece of paper in the above example. The pointer doesn't point to anything and is undefined. If we tried to use the pointer right now, more than likely the program would crash. +## -In order for a pointer to be useful, it must be initialized: +Cette déclaration correspond à notre bout de papier blanc de l'exemple précédent. Le pointeur ne pointe vers rien et n'est pas défini. Si vous essayez de l'utiliser ainsi, il est plus que probable que le programme se plante! +Pour qu'un pointeur soit utilisable, il doit être initialisé: ##%%(freebasic) -dim aptr as integer ptr -aptr = allocate(sizeof(integer)) -%%## +Dim aptr As Integer Ptr +aptr = Allocate(SizeOf(Integer)) -Here we are using [[KeyPgAllocate Allocate]] to set aside enough space in memory for an [[KeyPgInteger Integer]] and loading the address of that space into aptr. The [[KeyPgSizeof sizeof]] macro returns the size in bytes of the passed data type. You could use len instead of [[KeyPgSizeof Sizeof]] (since .13b) if you prefer. +%% -Once we have initialized the pointer, we can now use it: +## +Nous avons utilisé [[KeyPgAllocate Allocate]] de façon à reserver assez d'espace mémoire pour un [[KeyPgInteger Integer]] et avons l'adresse de cet espace dans ##//aptr//##. La macro [[KeyPgSizeof SizeOf]] renvoie la taille en octets du type de la donnée qui est passée. Si vous préférez, vous pouvez utilisez ##**Len**## au lieu de [[KeyPgSizeof SizeOf]] (depuis .13b). +Une fois le pointeur initialisé, nous pouvons maintenant l'utiliser: ##%%(freebasic) *aptr = 5 -print "aptr: "; *aptr -%%## -Notice the ***** prefix on aptr. The * is the reference operator. This is like matching the number on the slip of paper to the number on the hole in the egg carton. By using the * operator, we are able to get at the data (egg) contained in the hole pointed at by aptr. +Print "aptr: "; *aptr -Here is a complete example program: +%% -##%%(freebasic) -option explicit +## +Notez le préfixe ***** devant ##//aptr//##. Le ***** est l'opérateur de référence. C'est comme faire correspondre le numéro sur le bout de papier au numéro de la case du carton à oeufs. En utilisant l'opérateur *****, nous pouvons accéder à la donnée (l'oeuf) contenu dans la case pointée par ##//aptr//##. -dim aptr as integer ptr +Voici un exemple complet de programme: -aptr = allocate(sizeof(integer)) +##%%(freebasic) +Option Explicit +Dim aptr As Integer Ptr +aptr = Allocate(SizeOf(Integer)) *aptr = 5 -print "aptr: "; *aptr -deallocate aptr -sleep -%%## +Print "aptr: "; *aptr + +Deallocate aptr -The [[KeyPgDeallocate deallocate]] function frees the memory pointed at by aptr, and makes aptr undefined once again. This is like erasing the number on our slip of paper. If we were to use aptr after deallocating it, the program would crash. +Sleep -**What Good are Pointers?** +%% -A major reason for adding pointers to FreeBasic is that many external libraries require pointers to type structures and pointers to strings. For example, the Win32 API has many structures that must be filled out and then passed to a function through a pointer. +## -Another use of a pointer is in a [[KeyPgType Type]] definition. [[KeyPgType Type]] defs in FreeBasic can only contain fixed length strings, but what if you don't know the length of a string until the program is running? A pointer can serve this purpose. +La fonction [[KeyPgDeallocate Deallocate]] libère la mémoire pointée par ##//aptr//## et ainsi ##//aptr//## est de nouveau non-défini. C'est comme effacer le numéro sur votre bout de papier. Si nous utilisions ##//aptr//## après désallocation, le programme se planerait. -(It should be stated that the Type definitions can now support variable length strings.) +**A quoi servent les pointeurs?** +Une des principales raisons pour ajouter des pointeurs à FreeBasic est que beaucoup de bibliothèques externes nécessitent des pointeurs vers des structures et des pointeurs vers des chaînes. Par exemple, l'API Win32 a de nombreuses structures qui doivent être remplies et transmises à une fonction via un pointeur. +Une autre utilisation d'un pointeur se trouve dans la définition d'un [[KeyPgType Type]]. Dans FreeBasic, les définitions de [[KeyPgType Type]] ne peuvent contenir que des chaînes de longueur définie, mais que faire si vous ne connaissez pas la longueur de la chaîne avant le fonctionnement du programme? Un pointeur peut être utile dans ce cas. + (Il convient de préciser que les définitions de [[KeyPgType Type]] peuvent désormais prendre en charge les chaînes de longueur variable.) ##%%(freebasic) -option explicit +Option Explicit +Type mytptr +sptr As ZString Ptr +End Type -type mytptr - sptr as zstring ptr -end type 'This function will allocate space for the passed string 'and load it into a memory location, returning the -'pointer to the string. -declare function pSetString(byval s as string) as zstring ptr +'pointer to the string. +Declare Function pSetString(ByVal s As String) As ZString Ptr 'type var -dim mytype as mytptr - +Dim mytype As mytptr 'Set a variable string into the type def mytype.sptr = pSetString("Hello World From FreeBasic!") -print "aptr: "; *mytype.sptr -deallocate(mytype.sptr) -sleep -end -function pSetString(byval s as string) as zstring ptr - dim sz as zstring ptr +Print "aptr: "; *mytype.sptr + Deallocate(mytype.sptr) + Sleep + End + Function pSetString(ByVal s As String) As ZString Ptr + Dim sz As ZString Ptr 'allocate some space + 1 for the chr(0) - sz = allocate(len(s) + 1) - 'load the string into the memory location - *sz = s - 'return the pointer - return sz -end function -%%## + sz = Allocate(Len(s) + 1) +'load the string into the memory location +*sz = s -Here we define our type with a field sptr as [[KeyPgZstring zstring]] [[KeyPgPtr ptr]]. Zstrings are null terminated strings and are used by many external libraries and are designed for dynamic allocations. Once we define our type we create an instance of it with the [[KeyPgDim dim]] statement: +'return the pointer -##%%(freebasic) -dim mytype as mytptr -%%## +Return sz +End Function +%% -We then call our function pSetString to get the address of the variable length string we want in our [[KeyPgType type]] def. +## +Ici nous définisons notre [[KeyPgType Type]] avec un champ ##**sptr**## comme [[KeyPgZstring ZString]] [[KeyPgPtr Ptr]]. Les [[KeyPgZstring ZString]]s sont des chaînes terminées par un indicateur nul qui sont utilisées par de nombreuses bibliothèques externes et sont conçues pour l'allocation dynamique. Dès que nous avons créé notre [[KeyPgType Type]] nous en créons une instance avec l'instruction [[KeyPgDim Dim]]: ##%%(freebasic) -mytype.sptr = pSetString("Hello World From FreeBasic!") -%%## +Dim mytype As mytptr -Remember sptr is defined as a pointer, not a string variable, so pSetString is returning a pointer (memory address) to the string not the string itself. In other words, if the string is in hole #1, pSetString returns 1. +%% -The function pSetString uses a temporary [[KeyPgZstring zstring]] sz, to [[KeyPgAllocate allocate]] space for the passed string parameter s. Because a [[KeyPgZstring zstring]] is a null terminated string, we must add 1 to the length of s for the null terminator in the [[KeyPgAllocate allocate]] function. +## +Nous appelons ensuite notre fonction pSetString pour obtenir l'adresse de la chaîne de longueur variable que nous voulons dans notre définition de [[KeyPgType Type]]. ##%%(freebasic) -'allocate some space + 1 for the chr(0) -sz = allocate(len(s) + 1) -%%## +mytype.sptr = pSetString("Hello World From FreeBasic!") +%% -Once we have allocated space for the string, we use the reference operator * to load the data into the memory location. +## +Souvenez-vous que sptr est défini comme un pointeur, non une variable chaîne, donc pSetString retourne un pointeur (adresse mémoire) vers la chaîne, non la chaîne elle-même. En d'autres termes, si la chaîne est en #1, pSetString retourne 1. +La fonction pSetString une [[KeyPgZstring ZString]] temporaire "sz", pour [[KeyPgAllocate Allocate]] de l'espace pour le paramètre chaîne "s" qui est passé. Comme une [[KeyPgZstring ZString]] est une chaîne terminée par "null", nous devons ajouter 1 à la longueur de "s" pour le "null terminator" (incateur de fin nul) dans la fonction [[KeyPgAllocate Allocate]] . ##%%(freebasic) -'load the string into the memory location -*sz = s -%%## +'allocate some space + 1 for the chr(0) -We then return a pointer (the address of the string) back to our type, which is saved in mytype.sptr. +sz = Allocate(Len(s) + 1) +%% +## +Une fois que nous avons alloué un espace pour la chaîne, nous utilisons l'opérateur de référence * pour charger les données dans l'emplacement mémoire. ##%%(freebasic) -'return the pointer -return sz -%%## -We can now reference the string in our type using the reference operator. +'load the string into the memory location -##%%(freebasic) -print "aptr: "; *mytype.sptr -%%## +*sz = s +%% +## -Pointers can be confusing for the uninitiated, however they need not be if it is kept in mind that the pointer doesn't contain data, it simply points to some data. The pointer is a memory address, and you manipulate that data through the reference operator *. It really isn't much different than a normal variable. \ No newline at end of file +Ensuite, nous retournons un pointeur (l'adresse de la chaîne) vers notre type, qui est enregistré dans mytype.sptr. \ No newline at end of file diff --git a/fbdocs/manual/cache/TutPointersData.wakka b/fbdocs/manual/cache/TutPointersData.wakka index 29f5250cb8..d1f4ad344d 100644 --- a/fbdocs/manual/cache/TutPointersData.wakka +++ b/fbdocs/manual/cache/TutPointersData.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="Pointers, Data Types and Memory"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -If you read the article [[TutPointers Introduction to Pointers]] you know that pointers contain memory location addresses. You can manipulate the data in these memory locations using the reference operator *. Using pointers with single data item isn?t a problem, but what if you need to store multiple data items together and manipulate them using a pointer? It can get a bit tricky unless you understand how data is stored in memory. +Si vous lisez l'article [[TutPointers Introduction aux pointeurs]] vous savez que les pointeurs contiennent des adresses d'emplacements mémoire. Vous pouvez manipuler les données de ces emplacements mémoire en utilisant l'opérateur de référence *. L'utilisation de pointeurs avec un seul item de données unique n'est pas un problème, mais que faire si vous avez besoin de stocker de multiples éléments de données et de les manipuler à l'aide d'un pointeur? C'est peut être un peu plus difficile à moins de comprendre comment les données sont stockées en mémoire. -A single memory location in a computer is 1 byte long. Big enough to hold a single ANSI character (as opposed to Unicode characters, which are wide characters and are two bytes. We won?t be discussing Unicode characters in this article.) However, all data types are not a single byte in width. Here is a simple program that displays the length in bytes of each data type. +Un emplacement mémoire dans un ordinateur a une longueur de 1 octet. Assez grand pour contenir un caractère ANSI (par opposition aux caractères Unicode, qui sont des caractères larges et occupent deux octets. Nous ne discuterons pas de caractères Unicode dans cet article.) Cependant, tous les types de données n'ont pas un seul octet de longueur. Voici un programme simple qui affiche la longueur en octets de chaque type de données. ##%%(freebasic) dim a as byte @@ -47,19 +47,20 @@ print "ZString: ";len(*s3) deallocate s3 sleep -%%## +%% -The output is: +## +Affiche à l'écran: ##%%(freebasic) Byte: 1 Short: 2 Integer: 4 -Longint: 8 +LongInt: 8 UByte: 1 UShort: 2 UInteger: 4 -ULongint: 8 +ULongInt: 8 Single: 4 Double: 8 Integer Pointer: 4 @@ -67,47 +68,46 @@ Byte Pointer: 4 Fixed String: 10 Variable String: 27 ZString: 27 -%%## -Notice that the length of a pointer is always 4 bytes long (the same as an integer), regardless of the data being pointed to, since a pointer contains a memory address and not data. +%% -Looking at the length of the different data types, you can see that if you were to [[KeyPgAllocate allocate]] enough space for 10 integers, it would take 40 bytes of memory. Each integer takes up 4 bytes. So the question is, how do you access each integer value from the memory buffer? The answer, pointer math. Take a look at the following program. +## -##%%(freebasic) -option explicit +Notez que la longueur d'un pointeur est toujours de 4 octets (la même que celle d'un entier), indépendamment des données pointées, puisque un pointeur contient une adresse mémoire et non les données. +En regardant la longueur des différents types de données, vous voyez que pour [[KeyPgAllocate Allocate]] suffisamment d'espace pour 10 entiers, il faut 40 octets de mémoire. Chaque entier prend 4 octets. Donc la question est, comment accéder à chaque valeur entière de la mémoire tampon? La réponse, l'arithmétique des pointeurs. Jetez un oeil au programme suivant. -dim a as integer -dim aptr as integer ptr +##%%(freebasic) +Option Explicit +Dim a As Integer +Dim aptr As Integer Ptr 'Allocate enough space for 2 integers -aptr = allocate(len(a) * 2) +aptr = Allocate(Len(a) * 2) 'Load our first integer *aptr = 1 -print "Int #1: ";*aptr +Print "Int #1: ";*aptr 'Move the pointer to the next integer position 'aptr + 4 + *(aptr + 4) = 2 -print "Int #2: ";*(aptr + 4) +Print "Int #2: ";*(aptr + 4) +Deallocate aptr +Sleep -deallocate aptr -sleep -end -%%## +End -In this program we dimension two variables, an [[KeyPgInteger integer]] and an [[KeyPgInteger integer]] [[KeyPgPointer pointer]], aptr. Aptr will point to our memory buffer that will contain two integers. The [[KeyPgAllocate allocate]] function requires the size of the buffer we need, so we multiply the size of an [[KeyPgInteger integer]] by 2 to reserve 8 bytes of memory (each integer will take 4 bytes of space). +%% -After the allocation process, aptr contains the address of the first byte of our memory buffer. Storing the first integer is simply a matter of using the reference operator and setting the value to 1. To print out the value, we again just use *aptr. +## -Now, le me ask you a question: How does the compiler know that the value 1 requires 4 bytes and not 1 or 2 bytes? Because we dimensioned aptr as an //integer ptr//. The compiler knows that an integer takes 4 bytes and so loads the data into four bytes of memory. This is why when we print out the value we get 1 and not some strange number. +Dans ce programme nous dimensionnons deux variables, un [[KeyPgInteger Integer]] et un [[KeyPgInteger Integer]] [[KeyPgPointer Pointer]], aptr. Aptr pointera sur notre tampon mémoire qui contiendra deux entiers. La fonction [[KeyPgAllocate Allocate]] requiert la taille du tampon mémoire dont nous avons besoin, donc nous multiplions la taille d'un [[KeyPgInteger Integer]] par 2 pour réserver 8 octets de mémoire (chaque entier prendra 4 octets d'espace). -To load the second value into our buffer, we use: +Après le processus d'allocation, aptr contient l'adresse du premier octet de notre tampon mémoire. Stocker le premier entier consiste tout simplement à utiliser la référence de l'opérateur et de lui donner la valeur à 1. Pour afficher sa valeur, nous utilisons simplement *aptr. +Maintenant, laissez-moi vous poser une question: Comment le compilateur sait que la valeur 1 requiert 4 octets, et non pas 1 ou 2 octets? Parce que nous avons dimensionné aptr comme un //integer ptr//. Le compilateur sait qu'un entier occupe 4 octets et donc il charge les données dans quatre octets de mémoire. C'est pourquoi, lorsque nous affichons la valeur nous obtenons 1 et non pas un nombre étrange. +Pour charger la deuxième valeur dans notre tampon, nous utilisons: ##%%(freebasic) -*(aptr + 4) = 2 -%%## - -This may look a little strange at first glance. Aptr points to the first byte in our memory buffer. An integer is 4 bytes long, so to get to the next integer byte position, we must add 4 to aptr. We need the parenthesis around the add operation because the reference operator * has a higher precedence than +. The parenthesis ensure that we perform the add operation first, and then apply the indirection operator. -Notice that we didn?t increment aptr directly. If we did, aptr would no longer point to the start of the memory buffer and the program would crash when we deallocated the buffer since it would [[KeyPgDeallocate deallocate]] memory outside the memory buffer. If the need arises to directly increment a pointer, then create a temporary pointer variable and increment that, rather than the pointer used in the original allocation. +*(aptr + 4) = 2 -Memory buffers and pointers are a powerful way to store and manipulate data in memory. Care must be taken though to ensure that you are accessing the data correctly according to the type of data being stored in the buffer. \ No newline at end of file +%% \ No newline at end of file diff --git a/fbdocs/manual/cache/TutPortingFromQB.wakka b/fbdocs/manual/cache/TutPortingFromQB.wakka index 08737a043d..da88ef6af5 100644 --- a/fbdocs/manual/cache/TutPortingFromQB.wakka +++ b/fbdocs/manual/cache/TutPortingFromQB.wakka @@ -1,111 +1,111 @@ {{fbdoc item="title" value="Compiling a Big QB program in FB"}}---- -Let's try to compile a big (4000+ lines) graphical QB program in FreeBasic, to see how compatible FB is with QB. -As an example I will use Jark's TCRay a great raytracer with quadric, cubic and quadratic shapes, perlin noise programmed in 2004. You can get TCRay.zip from +Essayons de compiler un grand (4000 + lignes) programme QB graphique dans FreeBasic, pour voir comment FB est compatible avec QB. +AComme exemple je vais utiliser TCRay de Jark un raytraceur puissant, programmé en 2004, avec quadrique, formes cubiques et quadratiques, bruit "perlin". Vous pouvez télécharger TCRay.zip depuis http://www.mandelbrot-dazibao.com/Programs/Programs.htm -Notice TCRay is a QB4.5 interpreted program, Jark never had the patience to compile his work, -he just tested it interpreted and went on adding features. +Notez que TCRay est un programme interprété QB4.5, Jark n'a jamais eu la patience de compiler son travail, +il a juste testé une version interprétée et a ajouté des fonctionnalités. -The program is made of has 3 files: +Le programme est composé de 3 fichiers: - ""TcRay21C.bas"" - The Main file. - ""TcLib17L.bas"" - The SVGA graphics library. - ""Tclib17.bi"" - The include file for the library. + TcRay21C.bas - Le fichier Main. + TcLib17L.bas - La bibliothèque graphique SVGA. + Tclib17.bi - Le fichier à inclure pour la bibliothèque. -==Porting ""TCLib17.bas""== +**Portage de TCLib17.bas** -**In ""TCLib17.bas""** -It is a "pure QB" SVGA library. Most of its functions are obsoleted by FB as they are implemented as QB-style keywords. I had my share in developing that lib so you can trust me for this part ;) +**Dans TCLib17.bas** +Il s'agit d'une bibliothèque SVGA "pure QB". La plupart de ses fonctions sont rendues obsolètes par FB car elles sont mises en oeuvre comme mots-clés de style QB. J'ai eu ma part dans le développement de ces bibliothèques de sorte que vous pouvez me faire confiance pour cette partie ;) -Comment out the contents of the ClearScreen sub and add this +Commentez le contenu du sous-programme ClearScreen et ajoutez ceci: ##CLS## -Comment out the contents of the Point24 sub and add this: +Commentez le contenu du sous-programme Point24 et ajoutez ceci: ##a& = Point(x%,y%) red% = a& Shr 16 green% = (a& Shr 8) And 255 blue% = a& And 255## -Comment out the contents of the Pset24 sub and add this: +Commentez le contenu du sous-programme Pset24 et ajoutez ceci: ##PSet (x%,y%), red% Shl 16 Or green Shl 8 Or blue## -Comment out the contents of the Screenshot sub and add this: +Commentez le contenu du sous-programme Screenshot et ajoutez ceci: ##BSave Name$+".bmp"## -Comment out the contents of the ""SelectVga"" sub, we will work with a fixed size most pc's will support. Comment out the contents of the ""SetText sub"", we are able to output text in HiRes graphics so mode switching is not required. +Commentez le contenu du sous-programme SelectVga, nous allons fonctionner avec une taille fixe supportée par la plupart des PC. Commentez le contenu du sous-programme SetText, nous sommes capables d'afficher du texte en mode de haute résolution (HiRes) donc la commutation de mode n'est pas nécessaire. -Comment out the contents of the ""SetVGA"" Sub excluding the Powers of two calculation at the end and add these four lines: +Commentez le contenu du sous-programme SetVGA en excluant le calcul des puissances de deux à la fin et ajouter ces quatre lignes: ##Screen 20,32 '1024x768, 32 bits scrheight=768 scrwidth=1024 Fullscreen## -**In TCRay17.bas** -Add a ""SetSVGA"" as the first line in the Menu sub (we are not switching modes so mode must be set before outputting text), +**Dans TCRay17.bas** +Ajouter SetSVGA comme première ligne du sous-programme Menu (nous ne commutatons pas les modes de sorte que cela doit être réglé avant la sortie de texte, -==Compiling== -Ok, stop trusting me, now you can start trying to compile. You'll receive some errors. +**Compilation** +Ok, arrêtez de me faire confiance, vous pouvez maintenant commencer à essayer de compiler. Vous aurez quelques erreurs. -Compile with: //fbc -s gui -w 1 -lang qb ""TcRay21C.bas"" ""TcLib17L.bas""// +Compilez avec: //fbc -s gui -w 1 -lang qb TcRay21C.bas TcLib17L.bas// -I warn you all changes required except two come from a couple of (wise) limitations in the FB syntax: - - A variable name can't be a keyword plus a type suffix - - A simple variable can't have the same name as an array +Je vous préviens que tous les changements nécessaires, sauf deux viennent d'un couple de (sages) limitations dans la syntaxe FB: + - Un nom de variable ne peut pas être un mot-clé plus un suffixe de type +
  • Une simple variable ne peut pas avoir le même nom qu'un tableau -**""In TCLib17.bi""** -ERROR: Duplicated definition, found 'RGB' ([[KeyPgRgb RGB]] is a keyword in FB) -Add: +**In TCLib17.bi** +ERROR: Duplicated definition, found 'RGB' ([[KeyPgRgb RGB]] est un mot-clé de FB) +Ajoutez: ## #undefine RGB## -Before the line giving the error. +Avant la ligne qui a donné l'erreur. -ERROR: Duplicated definition, found 'ScreenRes' ([[KeyPgScreenres ScreenRes]] is a keyword in FB) -Add: -## #undefine ""ScreenRes""## -Before the line giving the error. +ERROR: Duplicated definition, found 'ScreenRes' ([[KeyPgScreenres ScreenRes]] est un mot-clé de FB) +Ajoutez: +## #undefine ScreenRes## +Avant la ligne qui a donné l'erreur. -ERROR: Duplicated definition, found 'Name' ([[KeyPgName Name]] is a keyword in QB) -Add +ERROR: Duplicated definition, found 'Name' ([[KeyPgName Name]] est un mot-clé de QB) +Ajoutez ## #undefine Name## -Before the line giving the error. +Avant la ligne qui a donné l'erreur. -**""In TCRay17.bas""** -ERROR: Duplicated definition, found 'Acos' ([[KeyPgAcos Acos]] is a keyword in QB) -Add +**In TCRay17.bas** +ERROR: Duplicated definition, found 'Acos' ([[KeyPgAcos Acos]] est un mot-clé de QB) +Ajoutez ## #undefine Acos## -Before the line giving the error. +Avant la ligne qui a donné l'erreur. -ERROR: Argument count mismatch Clear ([[KeyPgClear CLEAR]] is not required in FB, the keyword has been reused (not a clever decision?)) -'comment out CLEAR +ERROR: Argument count mismatch Clear ([[KeyPgClear Clear]] n'est pas nécessaire dans FB, le mot-clé a été réutilisé (non une décision intelligente?)) +'commenter CLEAR -ERROR: Illegal specification, at parameter 2 (Type) of Init.Cubic() ([[KeyPgType Type]] is a keyword in QB) -We can undefine it so search and replace ##type$## to ##_type$## +ERROR: Illegal specification, at parameter 2 (Type) of Init.Cubic() ([[KeyPgType Type]] est un mot-clé de QB) +Nous pouvons annuler sa définition pour cela rechercher et remplacer ##type$## par ##_type$## ERROR: Expected 'END IF', found 'END' END FUNCTION -This is an error caused by a quirk introduced in FB. Single line [[KeyPgIfthen IF]]'s having a colon after THEN require an ENDIF, it has to do with macros... What reason had Jark to put colons past his THEN's escapes me. QB does not require them at all and FB behaves as expected without them. Remove all colons after THEN keywords. Search and Replace //THEN :// to //THEN// +Ceci est une erreur provoquée par une bizarrerie introduite dans FB. Une unique ligne [[KeyPgIfthen If]] terminée par deux-points (:) après le THEN nécessite un ENDIF, il a à faire avec des macros... Quelle raison avait Jark de mettre deux points après son THEN m'échappe. QB n'en a pas besoin du tout et FB se comporte comme prévu sans eux. Retirez tous les deux-points après les mots-clés THEN. Recherchez et remplacez //THEN :// par //THEN// ERROR: Array access, index expected, before '=' xn = x * x - y * y + zx0 -We have an array names xn, and a variable named xn. Substitute xn with _xn in the lines which error when you try to compile. +Nous avons un tableau et une variable nommés xn. Remplacez xn par _xn dans les lignes qui provoquent une erreur lorsque vous essayez de compiler. -The same error with x0, we have an array called x0. -Substitute xo with _xo in the lines which error when you try to compile. +Même erreur avec x0, nous avons un tableau nommé x0. +Remplacez xo par _xo dans les lignes qui provoquent une erreur lorsque vous essayez de compiler. ERROR: Array access, index expected, before '*' dadY = Amplitude * dAdR * drdY. Same problem with Amplitude. -Substitute Amplitude with _Amplitude in the lines which error when you try to compile. +Remplacez Amplitude par _Amplitude dans les lignes qui provoquent une erreur lorsque vous essayez de compiler. -Ok. At this point all modules compile. We're now going to fix a few linker errors. +Ok. A ce stade, tous les modules se compilent. Nous allons maintenant corriger quelques erreurs de l'éditeur de liens. -**Linker Errors** -After compiling the linker ties together all the modules with a runtime library, finds the final addresses of every sub/function and substitutes the labels in the calls with these addresses. If a sub/function is called in the code and its nowhere to be found, the linker complains and gives us the name of the offending function. It can't give us the line numbers (the linker doesn't work with the source) so we will have to do a text search to find where the problem occurs. Notice the linker gives us "mangled" function names (an ampersand and the size of the parameters passed is added to the end), just ignore the ampersand and what's after. +**Erreurs de l'éditeur de liens** +Après compilation l'éditeur de liens lie ensemble tous les modules avec une bibliothèque d'exécution, détermine l'adresse finale de tous les sous-programmes et fonctions (sub/function) et remplace les étiquettes des appels par ces adresses. Si un/une sous-programme/fonction est appelé(e) dans le code et est introuvable, l'éditeur de liens se plaint et nous donne le nom de la fonction incriminée. Il ne peut pas nous donner les numéros de ligne ( l'éditeur de liens ne trvaille pas avec le source) nous aurons donc à faire une recherche de texte pour trouver où le problème est apparu. Notez que l'éditeur de liens nous donne des noms de fonction modifiés (un esperluette (&) et la taille des paramètres passés sont ajoutés à la fin), ignorez simplement l'esperluette et ce qui est après. -""TcRay21C.o:fake:(.text+0x174d):"" undefined reference to `LINE24@20' -A call to an undefined Line24 sub is made in the program, you can find this call inside Draw.Axis, in ""TCRay21.bas"", a sub that's it's never called (you can do a search to confirrm it) -Probably the QB4.5 compiler would complain too about this. (Remember: this program never compiled in QB4.5) Just comment out the contents of the sub Draw.Axis +TcRay21C.o:fake:(.text+0x174d): undefined reference to `LINE24@20' +Un appel à un sous-programme indéfini Line24 a lieu dans le programme, vous pouvez trouver cet appel à l'intérieur de Draw.Axis, dans TCRay21.bas, un sous-programme qui n'est jamais appelé (vous pouvez faire une recherche pour le confirmer) +Probablement que le compilateur QB4.5 se plaindrait aussi à ce sujet. (Rappelez-vous: ce programme n'a jamais été compilé en QB4.5) Commentez simplement le contenu de Draw.Axis -""TcRay21C.o:fake:(.text+0x181b3):"" undefined reference to `FFIX@0' -Ffix was that useful v1ctor's floating point patch for QB 4.5. It's not needed in FreeBASIC. Just comment out the line calling it just after the declarations in tcray21c.bas +TcRay21C.o:fake:(.text+0x181b3): undefined reference to `FFIX@0' +Ffix était ce patch v1ctor virgule flottante pour QB 4.5. Il n'est pas nécessaire avec FreeBASIC. Commentez simplement les lignes qui l'appellent juste après les déclarations dans tcray21c.bas -And that's all, the program compiles and works. Not a lot of changes for 4000+ lines... -Enjoy! +Et c'est tout, le programme se compile et fonctionne. Pas beaucoup de changements pour + de 4000 lignes... +Amusez-vous! diff --git a/fbdocs/manual/cache/TutPterDataType.wakka b/fbdocs/manual/cache/TutPterDataType.wakka index 49009e7bb0..53aa8eabfb 100644 --- a/fbdocs/manual/cache/TutPterDataType.wakka +++ b/fbdocs/manual/cache/TutPterDataType.wakka @@ -1,107 +1,107 @@ {{fbdoc item="title" value="The Pointer Data Type"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -The pointer data type is unique among the FreeBasic numeric data types. Instead of containing data, like the other numeric types, a pointer contains the memory address of data. +Le type pointeur de données est unique parmi les types données numériques de FreeBASIC. Au lieu de contenir des données, comme les autres types numériques, un pointeur contient l'adresse mémoire de données. -On a 32-bit system, the pointer data type is 4 bytes. FreeBasic uses pointers for a number of functions such as ImageCreate, and pointers are used heavily in external libraries such as the Windows API. Pointers are also quite fast, since the compiler can directly access the memory location that a pointer points to. A proper understanding of pointers is essential to effective programming in FreeBasic. +Sur un système 32 bits, le type pointeurde données occupe 4 octets. FreeBASIC utilise des pointeurs pour un certain nombre de fonctions telles que ImageCreate, et ils sont utilisés massivement dans des bibliothèques externes telles que l'API Windows. Les pointeurs sont aussi assez rapides, car le compilateur peut accéder directement à l'emplacement mémoire pointé par le pointeur. Une bonne compréhension des pointeurs est essentielle pour une programmation efficace sous FreeBASIC. -For many beginning programmers, pointers seem like a strange and mysterious beast. However, if you keep one rule in mind, you should not have any problems using pointers in your program. The rule is very simple: a pointer contains an address, not data. If you keep this simple rule in mind, you should have no problems using pointers. +Pour de nombreux programmeurs débutants les pointeurs semblent comme une bête étrange et mystérieuse. Toutefois, si vous gardez à l'esprit une règle, vous ne devriez avoir aucun problème en utilisant des pointeurs dans votre programme. La règle est très simple: un pointeur contient une adresse, pas de données. Si vous gardez cette règle simple à l'esprit, vous devriez avoir aucun problème en utilisant des pointeurs. -=== Pointers and Memory === +
    Pointeurs et mémoire -You can think of the memory in your computer as a set of post office boxes (P.O. Box) at your local post office. When you go in to rent a P.O. Box, the clerk will give you a number, such as 100. This is the address of your P.O. Box. You decide to write the number down an a slip of paper and put it in your wallet. The next day you go to the post office and pull out the slip of paper. You locate box 100 and look inside the box and find a nice stack of junk mail. Of course, you want to toss the junk mail, but there isn't a trash can handy, so you decide to just put the mail back in the box and toss it later. Working with pointers in FreeBasic is very similar to using a P.O. Box. +Vous pouvez imaginer la mémoire de votre ordinateur comme un ensemble de boîtes postales (PO Box) de votre bureau de poste local. Quand vous y allez pour louer une boîte postale, le greffier vous donnera un numéro, le 100 par exemple. C'est l'adresse de votre boîte postale. Vous écrivez le nombre sur un feuillet de papier et vous le mettez dans votre portefeuille. Le lendemain, vous allez à la poste et sortez le bout de papier. Vous localisez la boîte 100, regardez à l'intérieur de la boîte et trouvez une bonne pile de courrier indésirable. Bien sûr, vous voulez jeter le courrier indésirable, mais il n'y a pas de poubelle à portée de main, alors vous décidez simplement de remettre le courrier dans la boîte et de le jeter plus tard. Travailler avec des pointeurs sous FreeBASIC est très similaire à l'utilisation d'une boîte postale. -When you declare a pointer, it isn't pointing to anything which is analogous to the blank slip of paper. In order to use a pointer, it must be initialized to a memory address, which is the same as writing down the number 100 on the slip of paper. Once you have the address, find the right P.O. Box, you can dereference the pointer, open the mail box, to add or retrieve data from the pointed-to memory location. As you can see there are three basic steps to using pointers. +Lorsque vous déclarez un pointeur, il ne pointe pas vers quelque chose ceci est analogue au morceau de papier blanc. Afin d'utiliser un pointeur, il doit être initialisé avec une adresse mémoire, ce qui est identique à l'écriture du numéro 100 sur le bout de papier. Une fois que vous avez l'adresse, trouvez la bonne boîte postale, vous pouvez déréférencer le pointeur, ouvrir la boîte aux lettres, ajouter ou récupérer des données pointées par l'emplacement mémoire. Comme vous pouvez le voir il y a trois étapes de base pour utiliser des pointeurs. -~1) Declare a pointer variable. -~1) Initialize the pointer to a memory address. -~1) Dereference the pointer to manipulate the data at the pointed-to memory location. +Déclarer une variable pointeur. +Initialiser le pointeur vers une adresse mémoire. +Déréférencement du pointeur pour manipuler les données à l'emplacement mémoire pointé. -This isn't really any different than using a standard variable, and you use pointers in much the same way as standard variables. The only real difference between the two is that in a standard variable, you can access the data directly, and with a pointer you must dereference the pointer to interact with the data. +Ce n'est pas vraiment différent de l'utilisation d'une variable standard et vous utiliserez les pointeurs en grande partie de la même manière que les variables standard. La seule vraie différence entre les deux est que dans une variable standard, vous pouvez accéder directement aux données, et avec un pointeur, vous devez le déréférencer pour interagir avec les données. -=== Typed and Untyped Pointers === +
    Pointeurs typés et non typés -FreeBasic has two types of pointers, typed and untyped. A typed pointer is declared with an asscoaited data type. +FreeBASIC a deux types de pointeurs: typés et non typés. Un pointeur typé est déclaré en association avec un type de données. %%(freebasic) Dim myPointer as Integer Ptr %% -This tells the compiler that this pointer will be used for integer data. Using typed pointers allows the compiler to do type checking to make sure that you are not using the wrong type of data with the pointer, and simplifies pointer arithmetic. +Cela indique au compilateur que ce pointeur sera utilisé pour des données nombres entiers. L'utilisation de pointeurs typés permet au compilateur de faire la vérification du type pour s'assurer que vous n'utilisez pas le mauvais type de données avec le pointeur et simplifie l'arithmétique des pointeurs. -Untyped pointers are declared using the Any keyword. +Les pointeurs non typés sont déclarés en utilisant le mot-clé "Any". %%(freebasic) Dim myPointer as Any Ptr %% -Untyped pointers have no type checking and default to size of byte. Untyped pointers are used in the C Runtime Library and many third party libraries, such as the Win32 API, to accommodate the void pointer type in C. Unless you specifically need an untyped pointer, you should use typed pointers so that the compiler can check the pointer assignments. +Les pointeurs non typés n'ont aucune vérification de type et par défaut la taille d'un octet. Les pointeurs non typés sont utilisés dans la bibliothèque d'exécution C et de nombreuses librairies tierces, telles que l'API Win32, pour accueillir le type pointeur void en C. Sauf si vous avez spécifiquement besoin d'un pointeur non typé, vous devriez utiliser des pointeurs typés afin que le compilateur peut vérifier les affectations pointeur. -=== Pointer Operators === +
    Les opérateurs pointeur -FreeBasic has the following [[CatPgOperators pointer operators]]. +FreeBASIC a les [[CatPgOpPoint opérateurs pointeur]] suivants. -You will notice that the addressof operator not only returns the memory address of a variable, but it can also return the address of a subroutine or function. You would use the address of a subroutine or function to create a callback function such as used in the CRT QSort function. +Vous remarquerez que l'opérateur @ (Adresse de) non seulement renvoie l'adresse mémoire d'une variable, mais il peut aussi renvoyer l'adresse d'un sous-programme ou d'une fonction. Vous pourriez utiliser l'adresse d'un sous-programme ou d'une fonction pour créer une fonction de rappel telle que celle utilisée dans la fonction CRT qsort. -=== Memory Functions === +
    Fonctions mémoire -FreeBasic also has a number of [[CatPgMemory memory functions]] that are used with pointers. +FreeBASIC a également un certain nombre de [[CatPgMemory fonctions mémoire]] qui sont utilisées avec des pointeurs. -These functions are useful for creating a number of dynamic structures such as linked lists, ragged or dynamic arrays and buffers used with third party libraries. +Ces fonctions sont utiles pour créer un certain nombre de structures dynamiques comme les listes chaînées, tableaux non-rectangulaires (ragged) ou dynamiques et les tampons utilisés avec des librairies tierces. -When using the Allocate function you must specify the storage size based on the data type using the equation number_of_elements * Sizeof(datatype). To allocate space for 10 integers your code would look like this: myPointer = Allocate(10 * Sizeof(Integer)). An integer is 4 bytes so allocating 10 integers will set aside 40 bytes of memory. Allocate does not clear the memory segment, so any data in the segment will be random, meaningless data until it is initialized. +Lorsque vous utilisez la fonction "Allocate" vous devez spécifier la taille de stockage basée sur le type de données en utilisant l'équation nombre_d_elements * sizeof (type de données). Pour allouer de l'espace pour 10 entiers votre code devrait ressembler à ceci: myPointer = Allocate (10 * sizeof (Integer)). Un entier occupe 4 octets donc pour allouer 10 entiers 40 octets seront mis de côté en mémoire. "Allocate" n'efface pas le segment de mémoire, donc les données dans le segment seront aléatoires, données sans aucun sens jusqu'à l'initialisation. -Callocate works in the same fashion, except that the calculation is done internally. To allocate the same 10 integers using Callocate your code would look like this: myPointer = Callocate(10, Sizeof(Integer)). Unlike Allocate, Callocate will clear the memory segment. +"Callocate" fonctionne de la même façon, sauf que le calcul est fait en interne. Pour allouer les 10 mêmes entiers en utilisant "Callocate" votre code ressemblera à cela: myPointer = Callocate(10, Sizeof(Integer)). Contrairement à "Allocate", "Callocate" va effacer le segment de mémoire. -Reallocate will change the size of an existing memory segment, making it larger or smaller as needed. If the new segment is larger than the existing segment, then the data in the existing segment will be preserved. If the new segment is smaller than the existing segment, the data in the existing segment will be truncated. Reallocate does not clear the added memory or change any existing data. +"Reallocate" change la taille d'un segment existant en mémoire, le rendant plus ou moins grand selon les besoins. Si le nouveau segment est plus grand que le segment existant, alors les données dans le segment existant seront conservées. Si le nouveau segment est plus petit que le segment existant, les données existantes dans le segment seront tronquées. "Reallocate" n'efface pas la mémoire ajoutée ou modifie toutes les données existantes. -All of these functions will return a memory address if successful. If the functions cannot allocate the memory segment, then a NULL pointer (0) is returned. You should check the return value each time you use these functions to be sure that the memory segment was successfully created. Trying to use a bad pointer will result in undesirable behavior or system crashes. +Toutes ces fonctions renvoient une adresse mémoire en cas de succès. Si les fonctions ne peuvent pas allouer le segment de mémoire, alors un pointeur NULL (0) est retourné. Vous devriez vérifier la valeur retournée chaque fois que vous utilisez ces fonctions pour être sûr que le segment de mémoire a été créé correctement. Tenter d'utiliser un mauvais pointeur se traduira par un comportement indésirable ou plantage du système. -{{table columns="1" cellpadding="2" cells=" There is no intrinsic method for determining the size of an allocation. You must keep track of this information yourself."}} +{{table columns="" cellpadding="2" cells=" Il n'y a pas de méthode intrinsèque pour déterminer la taille d'une allocation. Vous devez garder une trace de cette information vous-même.;
    -{{table columns="1" cellpadding="2" cells=" Be careful not to use the same pointer variable to allocate two or more memory segments. Reusing a pointer without first deallocating the segment it points to will result in the memory segment being lost causing a memory leak."}} +{{table columns="" cellpadding="2" cells="Attention à ne pas utiliser la même variable pointeur pour allouer deux ou plusieurs segments de mémoire. Réutiliser un pointeur, sans premièrement le désallouer, se traduira par la perte du segment de mémoire précédent, provoquant une perte de mémoire.;
    -=== Pointer Arithmetic and Pointer Indexing === +
    Arithmétique des pointeurs et d'indexation de pointeur -When you create a memory segment using the allocation functions, you will need a way to access the data contained within the segment. In FreeBasic there are two methods for accessing data in the segment; using the indirection operator with pointer arithmetic, and pointer indexing. +Lorsque vous créez un segment de mémoire en utilisant les fonctions d'allocation, vous aurez besoin d'un moyen pour accéder aux données contenues dans le segment. En FreeBASIC, il existe deux méthodes pour accéder aux données dans le segment; utiliser l'opérateur d'indirection avec l'arithmétique des pointeurs et l'indexation du pointeur. -Pointer arithmetic, as the name suggests, adds and subtracts values to a pointer to access individual elements within a memory segment. When you create a typed pointer such as Dim myPointer as Integer ptr, the compiler knows that the data being used with this pointer is of size Integer or 4 bytes. The pointer, when initialized, points to the first element of the segment. You can express this as *(myPtr + 0). To access the second element, you need to add 1 to the pointer, which can be expressed as *(myPtr + 1). +L'arithmétique des pointeurs, comme son nom l'indique, ajoute et soustrait des valeurs à un pointeur pour accéder aux éléments individuels au sein d'un segment de mémoire. Lorsque vous créez un pointeur typé comme "Dim myPointer as Integer ptr", le compilateur sait que les données utilisées avec ce pointeur ont la taille d'un entier ou 4 octets. Le pointeur, quand il est initialisé, pointe sur le premier élément du segment. Vous pouvez exprimer ceci ainsi *(myPtr+0). Pour accéder au deuxième élément, vous devez ajouter 1 au pointeur, ce qui peut être exprimé *(myPtr+1). -Since the compiler knows that the pointer is an Integer pointer, adding 1 to the pointer reference will actually increment the address contained in myPtr by 4, the size of an Integer. This is why using typed pointers is preferable over untyped pointers. The compiler does much of the work for you in accessing the data in the memory segment. +Comme le compilateur sait que le pointeur est un pointeur d'entier, ajouter 1 à la référence pointeur consistera effectivement à incrémenter l'adresse contenue dans "myPtr" de 4 (de la taille d'un Entier). C'est pourquoi l'utilisation de pointeurs typés est préférable à celle des pointeurs non typés. Le compilateur effectue une grande partie du travail pour vous dans l'accès aux données dans le segment de mémoire. -Notice that the construct is *(myPtr + 1) and not *myPtr + 1. The * operator has higher precedence than +, so *myPtr + 1 will actually increment the contents myPtr points to, and not the pointer address. +Notez que la construction est *(myPtr+1) et non *myPtr+1. L'opérateur * est plus prioritaire que +, donc *myPtr+1 incrémentera effectivement le contenu de l'adresse pointée par myPtr, et non l'adresse du pointeur. -~-myPtr will be evaluated first, which returns the contents of the memory location and then +1 will be evaluated, adding 1 to the memory location. By wrapping myPtr + 1 within parenthesis, you force the compiler to evaluate myPtr + 1 first, which increments the pointer address, and then the * is applied to return the contents of the new address. +myPtr sera évalué en premier, il renverra le contenu de l'emplacement mémoire, puis +1 sera évalué, ajoutant 1 à l'emplacement de la mémoire. En encapsulant myPtr+1 entre parenthèses, vous forcez le compilateur à évaluer myPtr+1 d'abord, ce qui incrémente l'adresse du pointeur, puis le * est appliqué pour retourner le contenu de la nouvelle adresse. -Pointer indexing works the same way as pointer arithmetic, but the details are handled by the compiler. *(myPtr + 1) is equivalent to myPtr[1]. Again, since the compiler knows that myPtr is an integer pointer, it can calculate the correct memory offsets to return the proper values using the index. Which format you use if up to you, but the index method resembles the standard array access method and visually is easier to understand than the indirection operator. +L'indexation de pointeurs fonctionne de la même manière que l'arithmétique des pointeurs, mais les détails sont traîtés par le compilateur. *(myPtr+1) est équivalent à myPtr[1]. Encore une fois, puisque le compilateur sait que myPtr est un pointeur d'entier, il peut calculer les décalages mémoire corrects pour retourner les valeurs correctes à l'aide de l'indice. Quel est le format que vous utiliserez, la réponse vous appartient, mais la méthode avec indice ressemble à la méthode standard d'accès aux tableau et est visuellement plus facile à comprendre que l'opérateur d'indirection. -=== Pointer Functions === +
    Fonctions pointeur -Freebasic has a set of pointer functions to complement the pointer operators. +FreeBASIC a un ensemble de fonctions pointeur pour compléter les opérateurs pointeur. -~- [[KeyPgCptr Cptr]] Converts expression to a data_type pointer. Expression can be another pointer or an integer. -~- [[KeyPgPeek Peek]] Peek returns the contents of memory location pointer to by pointer. Data_type specifies the type of expected data. -~- [[KeyPgPoke Poke]] Puts the value of expression into the memory location pointed to by pointer. The data_type specifies the type of data being placed into the memory location. -~- [[KeyPgSadd Sadd]] Returns the location in memory where the string data in a dynamic string is located. -~- [[KeyPgOpStrptr Strptr]] The same as Sadd. -~- [[KeyPgOpProcptr Procptr]] Returns the address of a function. This works the same way as the addressof operator @. -~- [[KeyPgOpVarptr Varptr]] This function works the same way as the addressof operator @. +[[KeyPgCptr CPtr]] Convertit une expression en un pointeur data_type. L'expression peut être un autre pointeur ou un entier. +[[KeyPgPeek Peek]] Peek retourne le contenu de l'emplacement mémoire pointé par le pointeur. Data_type spécifie le type de données attendues. +[[KeyPgPoke Poke]] Met la valeur de l'expression dans l'emplacement mémoire pointé par le pointeur. data_type spécifie le type de données à placer dans l'emplacement mémoire. +[[KeyPgSadd SAdd]] Renvoie l'emplacement mémoire où les données de la chaîne d'une chaîne dynamique sont situées. +[[KeyPgOpStrptr StrPtr]] Comme Sadd. +[[KeyPgOpProcptr ProcPtr]] Renvoie l'adresse d'une fonction. Fnctionne de la même manière que l'opérateur @ (adresse de). +[[KeyPgOpVarptr VarPtr]] Cette fonction fonctionne de la même manière que l'opérateur @ (adresse de). -The Sadd and Strptr functions work with the string data types to return the address of the string data. The Peek and Poke functions have been added for the purposes of supporting legacy code. Procptr and Varptr both work just like the address of operator @, but Proptr only works on subroutines and functions and Varptr only works on variables. Cptr is useful for casting an untyped pointer to a typed pointer, such as a return value from a third party library. +Les fonctions Sadd et StrPtr travaillent avec les données des types chaînes pour retourner l'adresse de données de la chaîne. Les fonctions Peek et Poke ont été ajoutées aux fins de soutenir le code hérité. Procptr et Varptr fonctionnent toutes les deux exactement comme l'opérateur @ (adresse de), mais Proptr fonctionnent seulement sur les sous-programmes et fonctions et Varptr seulement sur les variables. Cptr est utile pour changer (cast) un pointeur non typé en un pointeur typé, comme la valeur retournée d'une bibliothèque tierce partie. -=== Subroutine and Function Pointers === +
    Pointeurs de sous-programmes et de fonctions -Subroutines and functions, like variables, reside in memory and have an address associated with their entry point. You can use these addresses to create events in your programs, to create pseudo-objects and are used in callback functions. You create a sub or function pointer just like any other pointer except you declare your variable as a pointer to a subroutine or function rather than as a pointer to a data type. +Les sous-programmes et fonctions, comme les variables, résident en mémoire et ont une adresse associée à leur point d'entrée. Vous pouvez utiliser ces adresses pour créer des événements dans vos programmes, pour créer des pseudo-objets et sont utilisés dans des fonctions de rappel. Vous créez un pointeur de sous-programme ou de fonction comme tout autre pointeur, sauf vous déclarez votre variable comme un pointeur vers un sous-programme ou une fonction, plutôt que comme un pointeur vers un type de données. -Before using a function pointer, it must be initialized to the address of a subroutine or function using Procptr or @. Once initialized, you use the pointer in the same manner as calling the original subroutine or function. +Avant d'utiliser un pointeur de fonction, il doit être initialisé à l'adresse d'un sous-programme ou d'une fonction en utilisant "Procptr" ou @. Une fois initialisé, vous utilisez le pointeur de la même manière que pour appeler le sous-programme ou la fonction original. -You declare a function pointer using the anonymous declaration syntax. +Vous déclarez un pointeur de fonction en utilisant la syntaxe de déclaration anonyme. %%(freebasic) Dim FuncPtr As Function(x As Integer, y As Integer) As Integer %% -You then need to asscoate this function pointer with an actual subroutine or function within your code. +Vous devez ensuite associer ce pointeur de fonction avec un sous-programme ou une fonction réel au sein de votre code. %%(freebasic) Function Power(number As Integer, pwr As Integer) As Integer @@ -112,45 +112,45 @@ FuncPtr = @Power %% -You can then call the function pointer much like you would call the real function. +Vous pouvez alors appeler le pointeur de fonction un peu comme vous appelez la fonction réelle. %%(freebasic) FuncPtr(2, 4) %% -While this may not be useful at first glance, you can use this technique to implement polymorphic functions where a single variable instance can point to one of several different subroutine or functions. +Même si cela peut ne pas être utile à première vue, vous pouvez utiliser cette technique pour mettre en oeuvre des fonctions polymorphes, où une seule instance variable peut pointer vers l'un des sous-programmes ou l'une des fonctions choisi(e)s parmi une série de sous-programmes ou de fonctions différent(e)s. -For example, suppose you have a dog and cat object. Both objects need a Speak method. By defining Speak as a function pointer and associate Speak with a Bark subroutine for a dog and a Meow subroutine for a cat, you can make Speak either issue a "Woof!" or "Meow!" depending on the object type. +Par exemple, supposons que vous avez des objets chien et de chat. Les deux objets ont besoin d'une méthode Speak. En définissant Speak comme un pointeur de fonction et en associant Speak avec un sous-programme Bark (aboyer) pour un chien et un sous-programme Meow (miauler) pour un chat, vous pouvez faire parler et émettre un "Woof!" ou "Miaou!" selon le type d'objet. -=== Creating a Callback Function === +
    Création d'une fonction de rappel (callback) -One of the primary uses for function pointers is to create callback functions. A callback function is a function that you have created in your program that is called by another function or subroutine either in your own code space or in an external library. Windows uses callback functions to enumerate through Window objects like fonts, printers and forms. +Une des utilisations principales pour les pointeurs de fonction est de créer des fonctions de rappel (callback). Une fonction de rappel (callback) est une fonction que vous avez créée dans votre programme qui est appelée par une autre fonction ou un sous-programme, soit dans votre propre espace de code ou dans une bibliothèque externe. Windows utilise des fonctions de rappel (callback) pour dénombrer des objets Windows comme les polices, les imprimantes et les formes. -The qsort, function contained within the C Runtime Library sorts the elements of an array using a callback function to determine the sort order. The prototype for the qsort function is contained in stdlib.bi: +La fonction qsort contenue dans la Bibliothèque C Runtime trie les éléments d'un tableau en utilisant une fonction de rappel (callback) pour déterminer l'ordre de tri. Le prototype de la fonction qsort est contenu dans stdlib.bi: %%(freebasic) declare sub qsort cdecl alias "qsort" (byval as any ptr, byval as size_t, byval as size_t, byval as function cdecl(byval as any ptr, byval as any ptr) as integer) %% -The following lists the parameter information for the qsort subroutine. +La liste suivante énumère les informations sur les paramètres du sous-programme qsort. -~1) The first parameter is the address to the first element of the array. The easiest way to pass this information to qsort is to append the address of operator to the first element index: @myArray(0). -~1) The second parameter is the number of elements in the array, that is the array count. -~1) The third parameter is the size of each element in bytes. For an array of integers, the element size would be 4 bytes. -~1) The fourth parameter is a function pointer to the user created compare function. The function must be declared using the Cdecl passing model, as shown in this parameter. +Le premier paramètre est l'adresse du premier élément du tableau. La meilleure façon de transmettre cette information à qsort est d'ajouter l'opérateur "adresse de" à l'indice du premier élément: @myArray(0). +Le deuxième paramètre est le nombre d'éléments dans le tableau, c'est le compte des éléments du tableau. +Le troisième paramètre est la taille de chaque élément en octets. Pour un tableau d'entiers, la taille de l'élément serait de 4 octets. +Le quatrième paramètre est un pointeur de fonction vers la fonction de comparaison créé par l'utilisateur. La fonction doit être déclarée avec le modèle de pasage Cdecl, comme indiqué dans ce paramètre. -Using this information, you can see how qsort works. By passing the address of the first element along with the count of elements, and the size of each element, qsort can iterate through the array using pointer arithmetic. +En utilisant cette information, vous pouvez voir comment qsort fonctionne. En passant l'adresse du premier élément avec le compte des éléments et la taille de chaque élément, qsort peut parcourir le tableau en utilisant l'arithmétique des pointeurs. -Qsort will take two array elements, pass them to your user defined compare function and use the compare function's return value to sort the array elements. It does this repeatedly until each array element is in sorted order. +Qsort prend deux éléments du tableau, les transmet à votre fonction de comparaison et utilise de valeur de retour de la fonction de comparaison pour trier les éléments du tableau. Elle répète cela jusqu'à ce que chaque élément du tableau soit dans l'ordre. -You need to declare the function prototype as Cdecl which ensures that the parameters are passed in the correct order. +Vous devez déclarer le prototype de fonction Cdecl qui garantit la transmission des paramètres dans le bon ordre. %%(freebasic) Declare Function QCompare Cdecl (Byval e1 As Any Ptr, Byval e2 As Any Ptr) As Integer %% -You would then define the function like the following. +Vous pouvez ensuite définir la fonction comme ceci. %%(freebasic) 'The qsort function expects three numbers @@ -180,30 +180,30 @@ End If End Function %% -You would then call the QSort function passing the address of the callback function. +Vous pouvez ensuite appeler la fonction qsort en passant l'adresse de la fonction de rappel (callback). %%(freebasic) qsort @myArray(0), 10, Sizeof(Integer), @QCompare %% -=== Pointer to Pointer === +
    Pointeur vers un pointeur -In FreeBasic you can create a pointer to any of the supported data types, including the pointer data type. A pointer to a pointer is useful in situations where you need to return a pointer to a function or in creating specialized data structures such as linked-lists and ragged arrays. A pointer to a pointer is called multi-level indirection. +En FreeBASIC vous pouvez créer un pointeur vers un des types de données pris en charge, y compris le type de données pointeur. Un pointeur vers un pointeur est utile dans les situations où vous devez retourner un pointeur vers une fonction ou dans la création de structures spécialisées de données tels que les listes liées et des tableaux non-rectangulaires. Un pointeur vers un pointeur est appelé indirection multi-niveau. -One application of a pointer to pointer is the creation of a memory segment that behaves just like an array. For example, suppose you want to create a memory segment to hold an unknown number of integers. You can create a dynamic memory segment that you can resize as needed during runtime to handle as many integers as you need. You would start by creating a pointer-to-pointer variable. +Une application d'un pointeur vers un pointeur est la création d'un segment de mémoire qui se comporte exactement comme un tableau. Par exemple, supposons que vous voulez créer un segment de mémoire pour contenir un nombre inconnu d'entiers. Vous pouvez créer un segment de mémoire dynamique que vous pouvez redimensionner si nécessaire en cours d'exécution pour traiter autant d'entiers que nécessaire. Vous commencez par créer une variable pointeur-vers-pointeur. %%(freebasic) Dim myMemArray As Integer Ptr Ptr %% -You would then initialize the pointer reference by using Allocate or Callocate. +Vous pouvez ensuite initialiser la référence pointeur en utilisant Allocate ou Callocate. %%(freebasic) 'Create 10 rows of integer pointers myMemArray = Callocate(10, Sizeof(Integer Ptr)) %% -Notice that the variable is initialized to an //Integer Ptr// since this list is going to point to another list; this is the pointer that points to another pointer. You can then initialize the individual pointer references just created to point to the needed memory segments. +Notez que la variable est initialisée ave un //Integer Ptr// car cette liste va pointer vers une autre liste; c'est le pointeur qui pointe vers un autre pointeur. Vous pouvez ensuite initialiser les références individuelles des pointeurs qui viennent d'être créés pour pointer vers les segments de mémoire nécessaires. %%(freebasic) 'Add 10 columns of integers to each row @@ -212,7 +212,7 @@ myMemArray[i] = Callocate(10, Sizeof(Integer)) Next %% -In this code snippet, the individual pointers in the list are initialized to 10 memory segments that will contain the actual integer data. +Dans cet extrait de code, les pointeurs individuels de la liste sont initialisés à 10 segments de mémoire qui contiendront des données entières réelles. %%(freebasic) 'Add some data to the memory segment @@ -223,9 +223,9 @@ Next Next %% -This code snippet uses the index method to load the actual data into the memory segments. Notice that this looks and acts just like a two-dimensional array. While this may not seem useful within this context, you could use this code to create a dynamic array within a type definition. Since you cannot have a standard dynamic array within a type, this allows you get the same functionality. +Cet extrait de code utilise la méthode de l'indice pour charger les données réelles dans les segments de mémoire. Remarquez que cela ressemble et agit comme un tableau à deux dimensions. Tout cela ne semble pas utile dans ce contexte, vous pouvez utiliser ce code pour créer un tableau dynamique dans une définition de type. Puisque vous ne pouvez pas avoir un tableau standard dynamique au sein d'un type, ceci vous permet d'obtenir la même fonctionnalité. -One thing you need to be aware of is how to deallocate a structure such as this. The rule is to just do the reverse of the allocation operations. Since the last allocate operation initialized the data memory segments, you deallocate these memory segments first and then you can deallocate the base pointer. +Une chose dont vous devez être conscient est de savoir comment libérer une telle structure. La règle est de simplement faire l'inverse des opérations d'allocation. Depuis la dernière opération d'allocation qui a initialisé les segments de mémoire de données, vous désallouez d'abord ces segments de mémoire, puis vous pouvez désallouer le pointeur de base. %%(freebasic) 'Free memory segment @@ -237,4 +237,4 @@ Next Deallocate myMemArray %% -You need to be sure that you deallocate in the right order, otherwise you will end up with memory segments that are not freed, but inaccessible. These are memory leaks and can cause a whole host of problems in your program. +Vous devez être sûr que la désallocation se fait dans le bon ordre, sinon vous allez vous retrouver avec des segments de mémoire qui ne seront pas libérés, mais inaccessibles. Ce seront des fuites de mémoire et pourront causer une multitude de problèmes dans votre programme. diff --git a/fbdocs/manual/cache/TutSelectStatement.wakka b/fbdocs/manual/cache/TutSelectStatement.wakka index 1868e6b59e..c9bd9e8eb8 100644 --- a/fbdocs/manual/cache/TutSelectStatement.wakka +++ b/fbdocs/manual/cache/TutSelectStatement.wakka @@ -1,9 +1,9 @@ {{fbdoc item="title" value="The Select Case Statement"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -The Select Case block can be viewed as an optimized If-ElseIf ladder, and works in much the same way. The standard Select Case can use any of the standard data types for and the specialized Select Case As Const format is optimized for integer values. +Le bloc **Select Case** peut être considérée comme une série If-ElseIf optimisée et fonctionne de la même manière. Le format standard de **Select Case** peut utiliser n'importe lequel des types de données standard pour et le format **Select Case As Const** est optimisé pour les valeurs entières. -This code snippet shows the syntax of the standard select case. Expression is usually a variable which can be of any of the standard data types, or individual elements of a Type or array. +Cet extrait de code montre la syntaxe de **Select Case**e standard. L'expression est généralement une variable qui peut être de l'un des types de données standard ou des éléments individuels d'un type ou d'un tableau. %%(freebasic) Select Case @@ -18,15 +18,15 @@ Select Case End Select %% -The clause of the Case statement can be any of the following formats. +La clause de l'instruction **Case** peut avoir n'importe lequel des formats suivants. -~- Case : Value is one of the supported data types or an enumeration. -~- Case To : Specifies a range of values. -~- Case Is : Operator is any of the logical operators. -~- Case , , ...: List of values separated with commas. -~- Case : A variable that contains a value. +Case : Value est l'un des types de données pris en charge ou une énumération. +Case To : Spécifie une plage de valeurs. +Case Is : L'opérateur est l'un des opérateurs logiques. +Case , , ...: Liste de valeurs séparées par des virgules. +Case : Une variable qui contient une valeur. -The following snippet illustrates how these different formats may be used in a program. +L'extrait suivant illustre comment ces différents formats peuvent être utilisés dans un programme. %%(freebasic) Case 47 @@ -40,7 +40,7 @@ Case 47, 48, 53 Case keycode %% -The Select Case As Const is a faster version of the Select statement designed to work with integer expressions in the range of 0 to 4097. +**Select Case As Const** est une version plus rapide de la déclaration **Select** visant à travailler avec des expressions entières dans la plage de 0 à 4097. %%(freebasic) Select Case As Const @@ -55,9 +55,9 @@ Select Case As Const End Select %% -The statement formats for the Select Case As Const are limited to values or enumerations of values. That is, the operator expressions are not allowed within a Case As Const. +La des formats de déclaration pour **Select Case As Const** sont limités à des valeurs ou des énumérations de valeurs. Autrement dit, les expressions opérateurs sont pas autorisés dans un cas **As Const**. -When a Case block is executed, the statements following the Case keyword up to the next Case keyword (or End Select) will be executed. Only one block of statements within a Case will execute at any one time. If a Case Else is present, then the statements within the Else block will execute if no Case matches the portion of the Select statement. The following program illustrates using the Select Case statement block. +Quand un bloc **Case** est exécuté, les instructions suivant le mot-clé **Case** jusqu'au mot-clé **Case** (ou End Select) suivant seront exécutées. Un seul bloc d'instructions dans un **Case** sera exécuté à un moment donné. Si un **Case Else** est présent, alors les instructions dans le bloc **Else** seront exécutées si aucun **Case** ne correspond à la portion de la déclaration **Select**. Le programme suivant illustre l'utilisation du bloc **Select Case**. %%(freebasic) 'Ascii code of key press @@ -80,11 +80,11 @@ Loop Until keycode = 27 '27 is the ascii code for Escape End %% -In the program, when you press a key, the value is translated to a number using the Asc function. Since this will always be an integer value that is less than 4097 (since ascii character codes range from 0 to 255), the Select Case as Const format is used. +Dans le programme, lorsque vous appuyez sur une touche, la valeur est traduite en un nombre en utilisant la fonction Asc. Puisque ce sera toujours une valeur entière inférieure à 4097 (car les codes de caractères ascii vont de 0 à 255), le format utilisé est **Select Case As Const**. -The compiler will check the value of keycode against the Case ranges to see if the block should execute. If keycode falls within a particular range, the Print statement will execute, and then the flow of the program will continue with the next line following the End Select. If keycode doesn't match any Case range, then the program will continue with the next line following the End Select. +Le compilateur dcompare la valeur de code de touche avec chacun des **Case** pour voir si le bloc doit s'exécuter. Si le code de touche se situe dans une fourchette particulière, la déclaration d'affichage va exécuter, puis le flux du programme se poursuivra avec la ligne qui suit **End Select**. S'il ne correspond à aucun des **Case**, alors le programme se poursuivra avec la ligne qui suit **End Select**. -A Select Case can usually be translated from an If-Elseif ladder. To illustrate this, the previous program is shown below as an If-ElseIf ladder. +Un bloc **Select Case** est généralement la traduction d'un bloc si-ElseIf. Pour illustrer cela, le programme précédent est transformé ci-dessous en bloc **If-ElseIf**. %%(freebasic) 'Ascii code of key press @@ -106,4 +106,4 @@ Loop Until keycode = 27 '27 is the ascii code for Escape End %% -If you compare the two programs, you can see that the logic is quite similar, however the Select Case is much more readable and understandable than the If-ElseIf ladder. +Si vous comparez les deux programmes, vous pouvez voir que la logique est assez similaire, mais le **Select Case** est beaucoup plus lisible et plus compréhensible que le bloc **If-ElseIf**. diff --git a/fbdocs/manual/cache/TutSimPolymorphism.wakka b/fbdocs/manual/cache/TutSimPolymorphism.wakka index 438633b87f..4b05cfb744 100644 --- a/fbdocs/manual/cache/TutSimPolymorphism.wakka +++ b/fbdocs/manual/cache/TutSimPolymorphism.wakka @@ -1,15 +1,15 @@ {{fbdoc item="title" value="Simulating Polymorphism"}}---- -//Written by [[WikiRick rdc]]// +//Ecrit par [[WikiRick rdc]]// -=== Introduction=== +
    Introduction -Polymorphism is a powerful tool in object-oriented program. A polymorphic method (Sub or Function) behaves differently depending on the definition of the object. For example, an animal object may have a speak method that will issue a bark for a dog and a meow for a cat. FreeBasic doesnt yet support true polymorphism; this will be added when classes are implemented. However, you can simulate polymorphic methods using method pointers. +Le polymorphisme est un outil puissant dans les programmes orientés-objet. Une méthode polymorphe (Sub ou Function) se comporte différemment selon la définition de l'objet. Par exemple, un objet "animal" peut avoir une méthode "parler" qui émettra un aboiement pour un chien et un miaulement d'un chat. FreeBASIC ne supporte pas encore le vrai polymorphisme, il sera ajouté lorsque les classes seront implémentées. Cependant, vous pouvez simuler les méthodes polymorphes en utilisant les méthodes pointeurs. -=== Polymorphism=== +
    Polymorphisme -Polymorphic methods are subroutines or functions that have the same type and parameter list, but behave differently when bound to different objects. An animal object may have a Speak method that will issue a bark for a dog and a meow for a cat. Since FreeBasic doesnt yet have classes, you cannot implement true polymorphic methods, but you can simulate the behavior by using method pointers. +Les méthodes polymorphes sont des "Sub" ou des "Function" qui ont le type et la même liste des paramètres, mais qui se comportent différemment lorsqu'elles sont liées à des objets différents. Un objet "animal" peut avoir une méthode "parler" qui émettra un aboiement pour un chien et un miaulement d'un chat.Comme FreeBASIC ne connaît pas encore les classes, vous ne pouvez implémenter de vraies méthodes polymorphes, you cannot implement true polymorphic methods, mais vous pouvez simuler leur comportement en utilisant des méthodes pointeurs. -The following listing shows a couple of defines and an extended type declaration: +Le listing suivant montre un couple de "#define" et une déclaration de type étendu: %%(freebasic) #define isdog 1 #define iscat 2 @@ -20,7 +20,7 @@ Type animal Declare Constructor (anid As Integer) End Type %% -The #defines are passed to the Constructor to signal what type of object is being created. The speak As Sub()definition defines the method pointer. As you will see, the address of two different subroutines will be passed to the speak method pointer. The following listing shows the different speak subroutines and the Constructor method: +Les "#define" sont passés au constructeur (Constructor) pour lui signaler quel type d'objet sera créé. La définition "speak As Sub()" définit la méthode pointeur. Comme vousle voyez, l'adresse de deux sous-programmes différents sera passée à la méthode pointeur "speak". Le listing suivant montre les sous-programmes speak différents et la méthode Constructor: %%(freebasic) 'Speak method for dog object Sub Bark() @@ -28,7 +28,7 @@ Sub Bark() End Sub 'Speak method for cat object -Sub Meow() +Sub Meow() Print "Meow!" End Sub @@ -41,19 +41,19 @@ Constructor animal(anid As Integer) End If End Constructor %% -The Bark subroutine will be called if the object is a dog and the Meow subroutine will be called if the object is a cat. You may be wondering why you cant just overload the method? For overloaded methods, the type and parameter list must be unique, where in a polymorphic method, the type and parameter list must be the same. Since Bark and Meow have the same parameter list, that is no parameters, you cannot overload the method. +Le sous-programmes "Bark" sera appelé si l'objet est un chien et "Meow" si c'est un chat. Vous vous demandez pourquoi on n'a pas surchargé la méthode? Pour surcharger une méthode, le type et la liste de paramètres doivent être uniques, où dans une méthode polymorphe, le type et le paramètre doivent être le même. Comme "Bark" et "Meow" ont la même liste de paramètres, c'est à dire aucun paramètre, vous ne pouvez pas surcharger cette méthode. -The Constructor code is where the program decides what method call to use. If anid is equal to isdog, then the Speak method pointer will be set to the address of the Bark subroutine. If anid is equal to iscat then Speak will be set to the address of the Meow subroutine. The addressof operator @ is used to pass the address of Bark and Meow to the Speak pointer. +C'est dans le code du Constructor que se décide quelle méthode à appeler pour l'utiliser. Si "anid" est égal à "isdog", alors la méthode pointeur "Speak" sera fixée sur l'adresse du sous-programme "Bark". Si "anid" est égal à "iscat", alors la méthode pointeur "Speak" sera fixée sur l'adresse du sous-programme "Meow". L'opérateur @ (adresse de) est utilisé pour passer l'adresse de "Bark" et "Meow" au pointeur "Speak". -The //this// object reference is a hidden parameter that is passed to the Constructor that references the type, which in this case is animal. You can use this to reference the internal variables within the type. +La référence objet //this// est un paramètre caché qui est passé au constructeur et qui fait référence au type, qui dans ce cas est "animal". Vous pouvez l'utiliser pour référencer les variables internes au sein du type. -The only thing left to do is to create and initialize the object: +La seule chose qui reste à faire est de créer et d'initialiser l'objet: %%(freebasic) 'Create a dog and cat object Dim myDog As animal = isdog Dim mycat As animal = iscat %% -Here myDog and myCat are created with the appropriate flags passed to the Constructor so that the proper references can be set up. Once the object are created you can call the speak method of each object. +Ici "myDog" et "myCat" sont créés avec les indicateurs appropriés passés au constructeur ainsi les références appropriées peuvent être mises en place. Dès que les objets sont créés vous pouvez appeler la méthode "speak" de chaque objet. %%(freebasic) 'Have the animals speak Print "My dog says "; @@ -61,14 +61,14 @@ myDog.speak() Print "My cat says "; myCat.speak() %% -Notice that you are calling the same speak method, yet the output is different: +Notez que vous appelez la même méthode "speak", cependant les réponses sont différentes: %%(freebasic) My dog says Woof! My cat says Meow! %% -This is the essence of polymorphic methods. +C'est l'essence même des méthodes polymorphes. -Here is the complete program listing: +Voici le listing du programme complet: %%(freebasic) 'Simulated Polymorphism Using Method Pointers 'Richard D. Clark @@ -116,4 +116,4 @@ myCat.speak() Sleep End -%% +## diff --git a/fbdocs/manual/cache/TutUsingLibrariesWithGCC.wakka b/fbdocs/manual/cache/TutUsingLibrariesWithGCC.wakka index b0327b4160..9870e833d0 100644 --- a/fbdocs/manual/cache/TutUsingLibrariesWithGCC.wakka +++ b/fbdocs/manual/cache/TutUsingLibrariesWithGCC.wakka @@ -1,23 +1,23 @@ {{fbdoc item="title" value="Using FreeBASIC Built Libraries with GCC"}}---- -//by Jeff Marshall// +//par Jeff Marshall// -Shows how to create a static library with FreeBASIC and then call it from a C program using GCC as the compiler. +Montre comment créer une bibliothèque statique avec FreeBASIC puis l'appeler à partir d'un programme C en utilisant GCC comme compilateur. - & //Minimum fbc version tested is v0.18.2b// + - //Testé avec la version mimimum fbc v0.18.2b// -This article shows Windows usage throughout, but application to FreeBASIC on other platforms is similiar. +Cet article montre l'utilisation sous Windows, mais l'application à FreeBASIC sur d'autres plates-formes est similaire. -{{fbdoc item="section" value="In this tutorial:"}} - {{anchor name="S1|A Simple Test"}} - {{anchor name="S2|FreeBASIC Library With Dependencies"}} - {{anchor name="S3|Using FreeBASIC as a Smart Linker"}} +**Dans ce tutoriel:** + [[#S1">Un simple test]] + [[#S2">Bibliothèque FreeBASIC avec dépendances]] + [[#S3">Utiliser FreeBASIC comme un "Linker" intelligent]] -{{anchor name="S1"}}{{fbdoc item="section" value="A Simple Test"}} +**Un simple test** -For this simple test we are going to create a FreeBASIC static library, one without any dependencies. This will make it easier the first time around, and will allow us to check that the basics are working: +Pour ce test simple, nous allons créer une bibliothèque statique FreeBASIC, une sans aucune dépendance. Pour la première fois cela rendra les choses plus faciles et va nous permettre de vérifier que les bases sont fonctionnelles: -First we need a library, and for for this it will be just a single trivial function that will add two integers together and return the result. Notice the use of ##**cdecl**## and ##Alias## in our procedure definition. By default, C uses the ##**cdecl**## calling convention. Using ##**alias**## in the FreeBASIC declaration makes matching case sensitivity between FreeBASIC and C easier. //C is case sensitive, whereas FreeBASIC normally is not.// +Nous avons d'abord besoin d'une bibliothèque et ce sera juste une seule fonction triviale qui va ajouter deux entiers ensemble et retourner le résultat. Notez l'utilisation de ##**cdecl**## et ##**Alias**## dans notre définition de la procédure. Par défaut, C utilise la convention d'appel ##**cdecl**##. Utiliser ##**Alias**## dans la déclaration FreeBASIC rend plus facile la correspondance de sensibilité à la casse entre FreeBASIC et C. //C est sensible à la casse, alors que FreeBASIC ne l'est normalement pas.// %%(freebasic) '' mylib1.bas @@ -33,11 +33,11 @@ function Add2Numbers cdecl alias "Add2Numbers" _ end function %% -Create a file called ##mylib1.bas## as above and compile it with: +Créer un fichier appelé ##mylib1.bas## comme ci-dessus et le compiler avec: ##fbc -lib mylib1.bas##. -This will create our static library ##libmylib1.a##. Next we need a C program that is going to call the library we just made. We must add a prototype that exactly matches the function we have in the FreeBASIC library. The C listing below is our main entry point, will set up a couple of variables to call ##""Add2Numbers()""##, and print the results. +Cela va créer notre bibliothèque statique ##libmylib1.a##. Ensuite nous avons besoin d'un programme C qui va appeler la bibliothèque que nous venons de créer. Nous devons ajouter un prototype qui correspond exactement à la fonction que nous avons dans la bibliothèque FreeBASIC. Le listing C ci-dessous est notre principal point d'entrée, il met en place un couple de variables pour appeler ##Add2Numbers()## et afficher les résultats. %%(c) /* test1.c */ @@ -61,16 +61,16 @@ int main () } %% -To compile this C program using the FreeBASIC library we just made we need to compile ##test1.c## as we normally would but also tell it which libraries are needed. In our case, it is ##libmylib1.a##. +Pour compiler ce programme C utilisant la bibliothèque FreeBASIC que nous venons juste de créer, nous devons compiler ##test1.c## comme nous l'aurions fait normalement, mais il faut aussi lui dire quelles bibliothèques sont nécessaires. Dans notre cas c'est ##libmylib1.a##. ##gcc test1.c -L . -l mylib1 -o test1.exe## -The '-L .' option tells the linker to search in the current directory for libraries, and the '-l mylib1' indicates that we want to link with the library we just created. This is the simplest case becase the libmylib1.a library has no dependencies. If mylib1.bas needed other libraries, for example the FreeBASIC run-time library libfb.a, we would need to specify that as well to gcc. +L'option '-L .' indique à l'éditeur de liens de chercher les bibliothèques dans le répertoire courant, et '-l mylib1' indique que nous voulons lier avec la bibliothèque que nous avons céée. C'est la cas le plus simple car la bibliothèque libmylib1.a n'a pas de dépendances. Si mylib1.bas nécessite d'autres bibliothèques, par exemple la bibliothèque FreeBASIC d'exécution libfb.a, nous devrions le spécifier aussi à gcc. -{{anchor name="S2"}}{{fbdoc item="section" value="FreeBASIC Library With Dependencies"}} +**Bibliothèque FreeBASIC avec dépendances** -Here we create a FreeBASIC library that uses some features from the FreeBASIC runtime and graphics library. In this case we will have to specify any additional needed libraries to GCC. +Ici, nous créons une bibliothèque FreeBASIC qui utilise certaines fonctionnalités des bibliothèques d'exécution et graphique de FreeBASIC. Dans ce cas, nous aurons à préciser toutes les bibliothèques supplémentaires nécessaires pour GCC. %%(freebasic) '' mylib2.bas @@ -86,11 +86,11 @@ sub TestGfx cdecl alias "TestGfx" () end sub %% -Create a file called ##mylib2.bas## with the listing above and compile it with: +Créez un fichier appelé ##mylib2.bas## avec le listing ci-dessus et le compiler avec: ##fbc -lib mylib2.bas##. -This will create our static library ##libmylib2.a##. Next we need a C program that is going to call the library we just made. We must add a prototype that exactly matches the function we have in the FreeBASIC library. This C listing will provide our entry point and just call ##TestGfx()## before terminating. +Cela va créer notre bibliothèque statique ##libmylib2.a##. Ensuite nous avons besoin d'un programme C qui va appeler la bibliothèque que nous venons de créer. Nous devons ajouter un prototype qui correspondra exactement à la fonction que nous avons dans la bibliothèque FreeBASIC. Ce listing C fournira notre point d'entrée et il suffit d'appeler ##TestGfx()## avant de terminer. %%(c) /* test2.c */ @@ -107,34 +107,34 @@ int main() } %% -To compile and link ##test2.c## directly with ##gcc##, not only do we need to tell ##gcc## that we want to link with ##libmylib2.a##, but also every other library that ##libmylib2.a## needs. +Pour compiler et lier ##test2.c## directement avec ##GCC##, non seulement nous avons besoin de dire à ##GCC## que nous voulons le lier avec ##libmylib2.a##, mais aussi toutes les autres bibliothèques que ##libmylib2.a## nécessite. ##gcc test2.c -L. -lmylib2 -L"C:\FreeBASIC\lib\win32" "C:\FreeBASIC\lib\win32\fbrt0.o" -lfbgfx -lfb -lgdi32 -o test2.exe## -Depending on what our FreeBASIC library uses, it we may use several additional libraries, we must specify all the names of the libraries on the ##gcc## command line. In this example, FreeBASIC is located in "C:\FreeBASIC", but you should specify whatever directory you installed FreeBASIC to. "C:\FreeBASIC\lib\win32\fbrt0.o" is a special startup file that will initialize the FreeBASIC runtime library. More specifically, it is initialized after the C runtime library, but before any of our program code is called. The additional ##-lfbgfx##, ##-lfb##, ##-lgdi32##, are the additional libraries needed to complete linking. The actual libraries will vary depending on which FreeBASIC runtime functions are used, and which platform, for DOS or Linux, the program is being compiled for. +Selon ce que notre bibliothèque FreeBASIC utilise, elle peut utiliser plusieurs bibliothèques supplémentaires, nous devons spécifier tous les noms de ces bibliothèques sur la ligne de commande de CCG. Dans cet exemple, FreeBASIC est situé dans "C:\FreeBasic", mais vous pouvez spécifier n'importe quel autre répertoire où vous avez installé FreeBASIC. "C:\FreeBasic\lib\win32\fbrt0.o" est un fichier spécial de démarrage qui va initialiser la bibliothèque d'exécution FreeBASIC. Plus précisément, il est initialisé après la bibliothèque d'exécution C, mais avant que tout code de notre programme ne soit appelé. ##-lfbgfx##, ##-lfb##, ##-lgdi32##, sont les bibliothèques supplémentaires nécessaires pour compléter la liaison. Les bibliothèques réelles peuvent varier en fonction des fonctions d'exécution FreeBASIC qui sont utilisées, et de la plate-forme, DOS ou Linux, pour laquelle le programme est compilé. -{{anchor name="S3"}}{{fbdoc item="section" value="Using FreeBASIC as a Smart Linker"}} +**Utiliser FreeBASIC comme un "Linker" intelligent** -FreeBASIC has a neat built-in feature that stores a little bit of extra information in the library indicating what compile time options were used, and which dependent libraries are needed. This is a FreeBASIC only feature, so this kind of capability won't be found when using ##gcc## as the main compiler and linker. +FreeBASIC a une fonctionnalité intégrée intéressante qui stocke un peu d'informations supplémentaires dans la bibliothèque indiquant quelles options de compilation ont été utilisées et quelles bibliothèques dépendantes sont nécessaires. C'est une fonctionnalité propre à FreeBASIC, donc ce genre de capacité n'existera pas lors de l'utilisation de ## CCG ## comme compilateur principal et "linker". -If we reuse the examples from the previous section, ##mylib2.bas## and ##test2.c##, but just go about compiling and linking them differently, we can save ourselves a bunch of typing. Plus we usually won't have to know or remember what our FreeBASIC built library's dependencies are. Compile ##mylib2.bas## as before in to a static library. +Si nous réutilisons les exemples de la section précédente, ## mylib2.bas ## et ## test2.c ##, mais juste pour les compiler et les lier différemment, nous pouvons nous épargner un tas d'écriture. Avantage: nous n'avons normalement pas à savoir ou à se rappeler avec quelles dépendances notre bibliothèque FreeBASIC a été construite. Compiler ##mylib2.bas## comme avant en une bibliothèque statique. ##fbc -lib mytest2.bas## -Next we compile our C test program. Notice the '-c' option for the ##gcc## command line. This indicates that we are just going to compile the C source, but not link it yet. ##test2.o## will still have the entry point, but we are going to put it in an object file instead of trying to create an executable right away. +Ensuite, nous compilons notre programme de test en C. Notez l'option '-c' de la commande en ligne de ##GCC##. Cela indique que nous allons nous contenter de compiler le code source en C, mais sans le lier. ##test2.o## aura encore le point d'entrée, mais nous allons le mettre dans un fichier objet au lieu d'essayer de créer un exécutable immédiatement. ##gcc -c test2.c -o test2.o## -Lastly, we use ##fbc## to perform the link step. We are not compiling any basic source files here, but we are going to use the smart linking capabilities of FreeBASIC such that the command line is fairly simple: +Enfin, nous utilisons ##fbc## pour réaliser l'étape lien. Nous ne compilerons pas des fichiers source basiques ici, mais nous allons utiliser les fonctionnalités intelligentes de lien de FreeBASIC de telle sorte que la ligne de commande est assez simple: ##fbc test2.o -l mylib2## -This will create an executable named ##test2.exe## because ##test2.o## was specified first on the command line. FreeBASIC will read the extra information stored in ##libmylib2.a## and automatically know which additional libraries to link with. That's loads easier than using ##gcc## directly, especially when many extra FreeBASIC built libraries are needed. +Cela créera un exécutable nommé ##test2.exe## car ##test2.o## a été spécifié en premier sur la ligne de commande. FreeBASIC lira les informations supplémentaires stockées dans ##libmylib2.a## et connaîtra automatiquement les bibliothèques supplémentaires à lier. C'est plus facile que les charger directement à l'aide de ##gcc##, surtout lorsque de nombreuses bibliothèques supplémentaires FreeBASIC sont nécessaires. {{fbdoc item="see"}} - - ##[[http://www.freebasic.net/wiki/wikka.php?wakka=ProPgStaticLibraries Static Libraries]]## + - ##[[ProPgStaticLibraries Les bibliothèques statiques]]## {{fbdoc item="back" value="CommunityTutorials|Community Tutorials"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/TutUsingLibs.wakka b/fbdocs/manual/cache/TutUsingLibs.wakka index 39405c5ea2..c875d7ea28 100644 --- a/fbdocs/manual/cache/TutUsingLibs.wakka +++ b/fbdocs/manual/cache/TutUsingLibs.wakka @@ -1,115 +1,115 @@ {{fbdoc item="title" value="Using Libraries"}}---- -This is an excerpt from an article published in QBXL Magazine, with permission by SJ Zero, the author. +Ceci est un extrait d'un article publié dans QBXL Magazine, avec la permission de SJ Zero, l'auteur. -FreeBASIC's greatest strength is it's ability to seamlessly integrate with a number of standard C libraries while maintaining the ease of use that is QB. Even before FB had a built-in graphics library, intrepid coders were using SDL to get graphics and sound routines working. Before the current version included a SDL_net and Winsock, a number of coders, myself included, fought with the headers to get network support into FreeBASIC. Today, I'm just going to cover how to get started with three advanced libraries: SDL, fmod, and tinyPTC. After understanding the fundamentals, you'll see that using C libraries is simple enough that with few exceptions, C libraries are no more difficult to use in FreeBASIC than QB libraries were to use. +La plus grande force FreeBasic est sa capacité à intégrer de façon transparente un certain nombre de bibliothèques C standard, tout en conservant la facilité d'utilisation comme QB. Même avant que FB n'ait une bibliothèque graphique intégrée, des codeurs intrépides utilisaient SDL pour avoir des routines graphiques et son fonctionnelles. Avant la version actuelle incluant SDL_net et Winsock, n certain nombre de codeurs, moi y compris, se sont battus avec les en-têtes pour obtenir le support réseau dans FreeBasic. Aujourd'hui, je vais juste couvrir la façon de commencer avec trois bibliothèques avancées: SDL, fmod et tinyPTC. Après avoir compris les principes fondamentaux, vous verrez que l'utilisation de bibliothèques C est assez simple à quelques exceptions près, les bibliothèques C ne sont pas plus difficiles à utiliser en FreeBasic que le sont les bibliothèques QB. -== What are these Libraries, Anyway? == +** Quelles sont ces bibliothèques, en tout cas? ** -These libraries are particularly useful because they tend to provide functions for games. +Ces bibliothèques sont particulièrement utiles parce qu'ils ont tendance à fournir des fonctions de jeux. -SDL is a library with graphics and input support built in, and a bunch of sub-libraries for [[http://SDL_net network]], [[http://SDL_ttf TrueType font support]], and [[http://SDL_mixer audio]]. It can be used with [[OpenGL]], but I won't be covering that today. +SDL est une bibliothèque avec le support intégré des entrées et des graphismes et tout un tas de sous-bibliothèques pour [[http://www.libsdl.org/projects/SDL_net/">le réseau]], [[http://www.libsdl.org/projects/SDL_ttf/">le support des polices TrueType]] et [[http://www.libsdl.org/projects/SDL_mixer/">l'audio]]. Il peut être utilisé avec OpenGL, mais je ne couvrira pas cela aujourd'hui. -TinyPTC is primarily a graphics library, the simplest one available. It does little more than give you a pointer to the graphics reigon to draw to. +TinyPTC est avant tout une bibliothèque graphique, la plus simple disponible. Il ne fait guère plus que de vous donner un pointeur vers la région où on dessine. -[[FMod]] is a 3d sound and music library. Though its license is strange, it works acceptably for playing sounds, and it nicely encapsulates 3D sound. +FMod est une bibliothèque musicale et de son 3D. Quoique sa licence soit bizarre, elle fonctionne de façon acceptable pour lire des sons et elle encapsule bien le son 3D. -== Including the Library == +** Inclure la bibliothèque ** -The first step in getting any of these libraries to work is including their header files in your project. -For SDL, it's simply +La première étape pour obtenir qu'une de ces bibliothèques fonctionne est d'inclure leurs fichiers en-tête dans votre projet. +Pour SDL, c'est tout simplement: %% '$INCLUDE: "SDL\SDL.bi" +%%Pour FMOD, c'est %% -For FMOD, it's +'$Include: 'fmod.bi' + %%et pour TinyPTC, vous aurez %% - '$Include: 'fmod.bi' +'$INCLUDE: 'tinyptc.bi' +%%'2. Initialisation de la bibliothèque, chargement d'un fichier' + De toute évidence, vous ne pouvez pas inclure la lib et démarrer pour faire des trucs de première. +Pour initilize SDL et charger un bitmap dans mémoire, vous devez: %% -and for tinyPTC, you'll want -%% - '$INCLUDE: 'tinyptc.bi' -%% -'''2. Initilizing the library, loading a file''' -Obviously, you can't just include the lib and fire away if it's got to do stuff first. -To initilize SDL and load a bitmap into memory, you must: -%% CONST SCR_WIDTH = 640 CONST SCR_HEIGHT = 480 -DIM MenuScreen AS SDL_Surface ptr 'our bitmap -DIM Shared video AS SDL_Surface ptr 'our screen surface - +DIM MenuScreen AS SDL_Surface ptr 'notre bitmap +DIM Shared video AS SDL_Surface ptr 'notre surface écran SDL_Init ( SDL_INIT_VIDEO ) -video = SDL_SetVideoMode( SCR_WIDTH, SCR_HEIGHT, 32, 0 ) 'sets the video mode for 640x480x32 +video = SDL_SetVideoMode( SCR_WIDTH, SCR_HEIGHT, 32, 0 ) 'mode video 640x480x32 MenuScreen = SDL_LoadBMP("bitmap.bmp") -%% -To initilize FMOD and load a sound into memory, you must: -%% -DIM sound AS INTEGER 'it's just a handle, so it's an int! +%%Pour initialiser FMOD et charger un son dans la mémoire, vous devez taper: +%% +DIM sound AS INTEGER 'c'est juste une poignée (handle), c'est donc un int! IF FSOUND_GetVersion <= FMOD_VERSION THEN -ErrorQuit "FMOD version " + STR$(FMOD_VERSION) + " or greater required" +ErrorQuit "FMOD version " + STR$(FMOD_VERSION) + " ou supérieure requise" End If - If FSOUND_Init(44100, 32, 0) = FALSE Then -ErrorQuit "Can't initialize FMOD" -End If +ErrorQuit "Ne peut pas initialiser FMOD" +End If sound = FSOUND_Sample_Load(FSOUND_FREE,"sound.wav", FSOUND_HW3D, 0, 0) -%% -Finally, there's no data formats to load with tinyPTC because it's so simple, but you initilize it by going: + +%%Enfin, il n'y a pas de formats de données à charger avec TinyPTC parce qu'il est tellement simple, mais vous l'initialiser en allant: %% const SCR_WIDTH = 320 + const SCR_HEIGHT = 200 const SCR_SIZE = SCR_WIDTH*SCR_HEIGHT - if( ptc_open( "tinyPTC test", SCR_WIDTH, SCR_HEIGHT ) = 0 ) then end -1 end if -%% -== Blitting, Playing, or Plotting == - -The most important step, obviously, is to get whatever you want to do to the screen or speakers. This part is relatively easy, and can be encapsulated further into a wrapper function. For SDL, sending an image to the screen means going: +%%** Blitting, Playing, or Plotting ** +L'étape la plus importante, évidemment, est d'obtenir ce que vous voulez à l'écran ou les enceintes. Cette partie est relativement facile, et peut être encapsulée dans une autre fonction enveloppe. Pour SDL, l'envoi d'une image à l'écran, c'est aller: %% -SUB BlitImage(x as integer,y as integer,image as sdl_surface ptr, dest as sdl_surface ptr) -DIM Rectangle as SDL_Rect -DIM Rectangle2 as SDL_Rect +SUB BlitImage(x as integer,y as integer,image as sdl_surface ptr, dest as sdl_surface ptr) +DIM Rectangle as SDL_Rect +DIM Rectangle2 as SDL_Rect +Rectangle.X = 0 +Rectangle.Y = 0 -Rectangle.X = 0 -Rectangle.Y = 0 -rectangle.w = image->w -rectangle.h = image->h -Rectangle2.x = x -Rectangle2.y = y +rectangle.w = image->w +rectangle.h = image->h +Rectangle2.x = x +Rectangle2.y = y -SDL_BlitSurface image, @rectangle, dest, @rectangle2 +SDL_BlitSurface image, @rectangle, dest, @rectangle2 END SUB%% - -For FMOD, the steps to play a sound aren't that difficult either: +Pour FMOD, la étapes pour jouer un son ne sont pas si difficiles que cela soit: %% -FUNCTION fModPlayWave( samp1 as integer ) AS INTEGER -'where samp1 is the number returned by FSOUND_SampleLoad +FUNCTION fModPlayWave( samp1 as integer ) AS INTEGER +'où samp1 est le nombre retourné par FSOUND_SampleLoad DIM position(0 to 2)' as FSound_Vector -DIM vel(0 to 2)' FSound_Vector +DIM vel(0 to 2)' FSound_Vector fModPlayWave = FSOUND_PlaySoundEx(FSOUND_FREE, samp1, NULL, TRUE) - END FUNCTION +%%Et TinyPTC, à nouveau, n'est pas une bibliothèque de haut niveau comme les deux autres, peut tracer des pixels en utilisant la code suivant: %% -And TinyPTC, which is again, not a high level library like the other two, can plot pixels using the following code: -%% + SUB putd(BYREF buffer(), BYVAL x AS INTEGER, BYVAL y AS INTEGER, BYVAL colr as INTEGER) - buffer((y * SCR_WIDTH) + x) = colr - ptc_update @buffer(0) 'This is a pageFlip +buffer((y * SCR_WIDTH) + x) = colr + + +ptc_update @buffer(0) 'Ceci est un pageFlip + END SUB %% +** Arrêter ** +Donc, vous n'avez pas à gérer la mémoire et faire toutes les tâches ennuyeuses et banales, vous devez vous rappeler de fermer la bibliothèque avant que votre programme se termine. Heureusement, les trois programmes permettent cela avec une seule ligne. Si vous ne pouvez pas l'arrêter, la bibliothèque ne se soucie pas. C'est beau. +%% + SDL: SDL_Quit () + %%%%fmod: FSOUND_Close ()%%%%tinyPTC: PTC_Close ()%%Il n'y a plus qu'à se quitter! +Comme vous pouvez le voir, ce n'est pas fondamentalement plus difficile d'utiliser des bibliothèques en FreeBasic qu'en QuickBASIC. En fait, parce que les codeurs n'ont pas besoin de faire des pirouettes pour atteindre la mémoire, c'est en fait beaucoup plus facile, même avec le plus moderne OS et matériel. +%% == Shutting Down == diff --git a/fbdocs/manual/cache/TutUsingMouse.wakka b/fbdocs/manual/cache/TutUsingMouse.wakka index 17c2bca8c9..b34488e284 100644 --- a/fbdocs/manual/cache/TutUsingMouse.wakka +++ b/fbdocs/manual/cache/TutUsingMouse.wakka @@ -1,31 +1,31 @@ -{{fbdoc item="title" value="Using the Mouse in FreeBASIC"}}---- +{{fbdoc item="title" value="Using the Mouse in FreeBASIC"}}----
    -After doing some searches, I quickly noticed that there simply wasn't an official tutorial or technique for manipulating the mouse in a windows console application in FreeBasic. Therefore, I decided to write this technique in order to give such an example to the FreeBasic Community. As you know A Windows Console is already mouse aware by ways of the fact that it is a windows console, which means it's created with the use of the Windows API, which means that the mouse can be accessed from the Console Window. So There's no need to turn the mouse on or off in your code. All you need to do is Get or Set the X and Y coordinates and get the states of the mouse buttons. We will be covering the following subjects in this tutorial. +
    Après avoir fait quelques recherches, j'ai rapidement remarqué qu'il n'y avait tout simplement pas tutoriel ou une technique officielle pour la manipulation de la souris dans une application console Windows dans FreeBasic. Par conséquent, j'ai décidé d'écrire cette technique afin de donner un tel exemple à la Communauté FreeBasic. Comme vous le savez une console de Windows est toujours informée de la souris par du fait qu'il s'agit d'une fenêtre de console, ce qui signifie qu'elle a été créée avec l'utilisation de l'API Windows, ce qui signifie que la souris peut être accessible à partir de la fenêtre de console. Il n'y a donc pas nécessaire d'activer ou de désactiver la souris dans votre code. Tout ce que vous devez faire est de Get ou Set les coordonnées X et Y et d'obtenir les états des boutons de la souris. Nous allons couvrir les sujets suivants dans ce tutoriel:

  • Obtenir les coordonnées de la souris:
  • Le curseur de la souris, quand la souris est déplacée, met à jour sa position continuellement. Vous pouvez obtenir ces valeurs pour déterminer où le pointeur se trouve actuellement à l'écran.

    - -Getting Mouse Coordinates: - The mouse cursor, when the mouse is moved, continuously updates its position. You can get these values to determine where the pointer currently is on the screen. +
  • Paramètrer les coordonnées de la souris:
  • Pour une raison quelconque, il peut être nécessaire pour positionner le pointeur de la souris à un endroit autre que celui où il se trouve actuellement.

    +
  • Obtenir les statuts des boutons de la souris:
  • Tout simplement, lorsque l'utilisateur appuie sur un bouton de la souris, elle retourne une valeur qui dit qu'un bouton est pressé et aussi lequel est pressé. A partir de ces valeurs, vous pouvez décider quelle partie de votre code sera exécutée.

    - -Setting Mouse Coordinates: - For some reason there may be a need to position the mouse pointer at a different location than where the pointer currently is. + Comme avec la plupart des tutoriels, celui-là aussi peut être mieux expliqué à l'aide d'un exemple de programme. Nous allons créer un programme très simple qui agit sur l'interaction de l'utilisateur avec la souris et certaines zones de l'écran. Il devrait fournir les bases de code nécessaires pour opérer efficacement et contrôler la souris dans vos projets personnels de programmation.

    IMPORTANT: Il est impératif que vous fixiez vous-même un mode graphique pour utiliser la souris. Les commandes de la souris retournent toujours une valeur de -1 si le mode graphique n'est pas réglé.

    **LA DESCRIPTION DU PROGRAMME EXEMPLE**

    Dans un souci de programme de démonstration, les choses seront, autant que possible, tout à fait simples et directes. Le programme affiche trois items en haut de l'écran et en fonction de celui sur lequel vous cliquez un message différent s'affiche sur l'écran. Cela devrait vous donner suffisamment d'informations pour savoir comment travailler avec la souris en FreeBasic.

    En FreeBasic, il y a essentiellement 2 commandes dont vous devez vous soucier lorsque vous essayez de manipuler la souris dans vos projets. Here they are with their syntax explained as per the documentation.

    --------------------------------------------------------------------------------

    {{fbdoc item="syntax"}}
    GETMOUSE x, y[, [wheel][, [buttons]]]

    + {{fbdoc item="desc"}}
    GETMOUSE récupère la position de la souris et l'état des boutons.

    La position de la souris est stockée dans X et Y lorsque la fonction est appelée. Si la souris n'est pas dans la fenêtre du programme, X et Y seront à -1.

    **"wheel"** est le compteur de la molette de la souris. La rotation de la roue vers l'avant fait augmenter le comptage, vers l'arrière le fait diminuer. Si la souris n'est pas présente ou hors de la fenêtre du programme, "wheel" sera à -1.

    **"buttons"** stocke l'état des boutons. A la sortie de la fonction, il y aura retour d'un masque binaire indiquant l'état des boutons. Le bit 0 est à 1 si le bouton de gauche est appuyé; le bit 1 à 1 si le bouton de droite est appuyé; le bit 2 à 1 si le bouton du milieu est appuyé.

    *GETMOUSE est utilisé dans les modes graphiques, définis SEULEMENT à l'aide de la commande SCREEEN.*


    ---------------------------------------------------------------------------------

    - -Getting The Mouse Button Statuses: - Quite simply, when the user presses a button on the mouse, it returns a value that says that a button is pressed, and which buttons are pressed, too. From these values you can decide what part of your code gets executed. + {{fbdoc item="syntax"}}
    SETMOUSE x, y, visibility

    + {{fbdoc item="desc"}}
    SETMOUSE fixera les coordonnées X, Y du pointeur de la souris, ainsi que le réglage de sa visibilité.

    La position de la souris est réglée en utilisant les paramètres X et Y.

    La souris sera visible si **"visibility"** est à 1, et invisible lorsque **"visibility"** est à 0.

    *SETMOUSE est destiné aux modes graphiques lancés en utilisant l'instruction SCREEN uniquement*

    --------------------------------------------------------------------------------

    **LE CODAGE COMMENCE**

    Voici un ensemble de constantes que je déclare au début du module. C'est tout simplement pour gagner un peu de clarté dans le reste du code de l'exemple de programmation.
    %%(freebasic) -As with most tutorials, this one too can be better explained with the use of an example program. We will be creating a very simple program that acts upon the user's interaction with the mouse and certain areas of the screen. It should provide the bases of code needed to efficiently operate and control the mouse in your own programming projects. +Const LEFTBUTTON = 1
    Const MIDDLEBUTTON = 4
    Const RIGHTBUTTON = 2
    Const SHOWMOUSE = 1
    Const HIDEMOUSE = 0
    -IMPORTANT: It is mandatory that you set yourself in a graphic mode in order to use the mouse. the mouse commands will always return -1 for a value if the graphic mode is not set. +##
    Dans une première étape de cet exemple, nous allons déclarer des variables que nous allons utiliser tout au long de ce programme. Bien sûr, vous n'avez pas à déclarer vos variables, mais moi, je tiens à le faire parce que quand vous le faites vous savez exactement pourquoi vous déclarez ces variables. Pour moi, c'est une bonne pratique.
    %%(freebasic) -==THE SAMPLE PROGRAM DESCRIPTION== +Dim CurrentX As Integer
    Dim CurrentY As Integer
    Dim MouseButtons As Integer
    Dim CanExit As Integer
    Dim As String A,B,C
    -For the sake of a demonstration program, things will be quite simple and as straightforward as it possibly can. The program will show 3 items at the top of the screen and depending on which one you click a different message will be displayed on the screen. This should give you enough information to know how to work with the mouse in FreeBasic. +##
    L'idée ici est de tout faire dans une boucle de telle sorte que nous pouvons également contrôler la façon dont le programme se termine. Nous allons donc créer une boucle qui se terminera lorsque la variable **"CanExit"** sera égale à 0. Dans du boucle, nous allons Interroger la souris et imprimer certaines valeurs de base. (Cette partie est extraite de l'exemple fourni dans l'explication de la syntaxe de GETMOUSE dans le fichier gfxlib.txt). N'oubliez pas de configurer votre mode graphique car il est indispensable pour obtenir des valeurs de retour valides des commandes de la souris. Nous allons utiliser Screen 12 pour notre exemple.
    %%(freebasic) -In FreeBasic, there's basically 2 commands that you need to worry about when trying to handle the mouse in your projects. Here they are with their syntax explained as per the documentation. +Screen 12
    CanExit = 1

    Do While CanExit <> 0
    GetMouse CurrentX, CurrentY, , MouseButtons
    If CurrentX < 0 Then
    Print "La souris est hors contexte."
    Else
    If MouseButtons And LEFTBUTTON Then A="L"
    If MouseButtons And MIDDLEBUTTON Then B="M"
    If MouseButtons And RIGHTBUTTON Then C="R"
    Print Using "Position de la souris: ###:### Boutons: &&&"; CurrentX; CurrentY;A;B;C
    A="":B="":C=""
    End If
    Loop
    --------------------------------------------------------------------------------- -{{fbdoc item="title" value="GETMOUSE"}} ----- -{{fbdoc item="syntax"}} -GETMOUSE x, y[, [wheel][, [buttons]]] +##
    Cet exemple affichera en permanence essentiellement des informations sur l'endroit où se trouve la souris, si elle est sur la fenêtre du programme et le cas échéant quel bouton la souris est appuyé. L'instruction GETMOUSE basiquement place les coordonnées X et Y courantes dans nos variables **CurrentX** et **CurrentY** et l'état des boutons de la souris dans notre variable **Buttons**. Les trois instructions If afficheront L si le bouton gauche a été appuyé, M si le bouton du milieu (ou la molette) a été appuyé et R si le bouton droit a été appuyé.

    Pour l'étape suivante, comme nous voulons contrôler un peu ce qui se passe avec la souris, nous afficherons quelques choses supplémentaires au début du programme et contrôlerons ce qui se passe par la suite, dans la boucle. C'est un texte ordinaire qui est affiché, cela pourrait être remplacé par une série de commandes en ligne ou quelque chose pour dessiner un bouton pour les différentes options. Mais c'est en dehors du champ d'application de ce tutoriel. En se débarrassant des déclarations d'impression non désirées du code ci-dessus, la boucle doit maintenant ressembler à ceci:
    %%(freebasic) +Screen 12
    SetMouse 1, 1, 1
    CanExit = 1
    Locate 1,1
    Print " | FIRST | SECOND | THIRD | EXIT | "
    Do While CanExit <> 0
    Locate 1,1
    GetMouse CurrentX, CurrentY, , MouseButtons
    Loop
    +##
    Essentiellement nous affichons la ligne qui contient " | FIRST | SECOND | THIRD | EXIT | " en haut de l'écran. Et nous entrons dans la boucle qui interroge la souris. Bien sûr, en ce moment rien ne se passera si vous appuyez sur un bouton, car il n'y a pas de code pour lui. Dans notre exemple, nous allons ajouter du code qui affiche simplement l'option qui a été sélectionnée. Si l'utilisateur sélectionne l'option EXIT, nous imprimerons l'option et nous sortirons de la boucle. Nous allons également ajouter une instruction d'affichage en dehors de la boucle avec un SLEEP pour dire à l'utilisateur que nous sommes vraiment en dehors de la boucle et donc que le programme est terminé. Avec tout cela, la code devrait maintenant ressembler à ceci. Je mets le fichier source complet ici, donc vous pouvez le copier et le coller facilement.
    %%(freebasic) +Const LEFTBUTTON = 1
    Const MIDDLEBUTTON = 4 ' UNUSED IN THIS DEMO
    Const RIGHTBUTTON = 2 ' UNUSED IN THIS DEMO
    Const SHOWMOUSE = 1
    Const HIDEMOUSE = 0

    Dim CurrentX As Integer
    Dim CurrentY As Integer
    Dim MouseButtons As Integer
    Dim CanExit As Integer

    Screen 12
    SetMouse 1, 1, SHOWMOUSE
    CanExit = 1
    Locate 1,1
    Print " | FIRST | SECOND | THIRD | EXIT | "

    Do
    GetMouse CurrentX, CurrentY, , MouseButtons
    If MouseButtons And LEFTBUTTON Then
    If CurrentY <= 12 Then
    If CurrentX >= 0 And CurrentX <=75 Then
    Locate 12, 1
    Print "FIRST Option selectionnee ";
    ElseIf CurrentX >= 76 And CurrentX <= 147 Then
    Locate 12, 1
    Print "SECOND Option selectionnee";
    ElseIf CurrentX >= 148 And CurrentX <=212 Then
    Locate 12, 1
    Print "THIRD Option selectionnee ";
    ElseIf CurrentX >= 213 And CurrentX <=268 Then
    Locate 12, 1
    Print "Derniere Option selectionnee ";
    Exit Do
    End If
    End If
    End If
    Loop While Inkey$ = ""

    SetMouse 1, 1, HIDEMOUSE
    Print
    Print "ET MAINTENANT ON EST EN DEHORS DE LA BOUCLE"
    Sleep
    +##

    Vous pouvez voir les nombreuses instructions IF dans ce dernier morceau de code. Les nombres qui sont là ont été déterminés par rapport aux coordonnées renvoyées par SCREEN 12. Toutefois, elles devraient fonctionner dans tous les modes graphiques, car un pixel est un pixel dans une fenêtre graphique de la console. Chaque IF représente le lieu où les différentes options sont écrites à l'écran. Si vous voulez utiliser une routine de bouton graphique,vous pouvez simplement utiliser les mêmes largeur et hauteur pour dessiner le bouton dans ces instructions IF pour savoir quel bouton a été cliqué.

    **EN CONCLUSION**

    Comme vous pouvez le voir, utiliser la souris est très simple dans FreeBasic. Vous pouvez utiliser une simple instruction comme la commande d'affichage PRINT pour dessiner vos écrans ou vous pouvez utiliser une commande graphique comme LINE pour dessiner vos écrans graphiquement. Peu importe la façon dont vous choisissez d' élaborer vos écrans, les instructions SETMOUSE et GETMOUSE fonctionneront de la même manière et retourneront les mêmes valeurs. Tout ce que vous avez à faire, c'est d'obtenir les informations, et d'obliger vos programmes à faire ce que vous voulez qu'ils fassent si on appuye sur un bouton, sélectionne une option, ou même dans le cas d'un jeu, vous pouvez facilement faire bouger le personnage principal vers l'endroit où vous avez cliqué sur l'écran. A vous de choisir.

    Comme toujours, si vous avez des questions concernant ce tutoriel ou sur tout autre que j'ai écrit, n'hésitez pas à m'envoyer un email et nous verrons ce que nous pouvons faire pour résoudre votre problème particulier.


    MystikShadows
    Stéphane Richard
    srichard@adaworld.com {{fbdoc item="desc"}} GETMOUSE retrieves the mouse position and button status. @@ -163,5 +163,5 @@ As always, if you have any questions regarding this tutorial or any other I've w MystikShadows -Stphane Richard +Stéphane Richard srichard@adaworld.com \ No newline at end of file diff --git a/fbdocs/manual/cache/Unicode.wakka b/fbdocs/manual/cache/Unicode.wakka index 4a379a4856..99a6530daa 100644 --- a/fbdocs/manual/cache/Unicode.wakka +++ b/fbdocs/manual/cache/Unicode.wakka @@ -1,11 +1,11 @@ {{fbdoc item="title" value="Unicode"}}---- -A worldwide standard for storing, categorizing and interpreting characters +Un standard mondial pour le stockage, la catégorisation et l'interprétation des caractères -Unicode is an industry standard designed to allow text and symbols from all of the writing systems of the world to be consistently represented and manipulated by computers. Developed in tandem with the Universal Character Set standard and published in book form as The Unicode Standard, Unicode consists of a character repertoire, an encoding methodology and set of standard character encodings, a set of code charts for visual reference, an enumeration of character properties such as upper and lower case, a set of reference data computer files, and rules for normalization, decomposition, collation and rendering. +Unicode est un standard industriel conçu pour permettre aux textes et aux symboles de tous les systèmes d'écriture du monde d'être constammment représentés et manipulés par des ordinateurs. Développée en tandem avec la norme universelle du caractère et publiée sous forme de livre comme Le Standard Unicode, Unicode est constitué d'un répertoire de caractères, une méthodologie d'encodage et un ensemble de codages de caractères standard, un ensemble de tableaux de codes pour une référence visuelle, une énumération des propriétés de caractère tels que majuscules et minuscules, un ensemble de fichiers de référence de données d'ordinateur, et les règles de la normalisation, la décomposition, la collation et le rendu. -The Unicode Consortium, the non-profit organization that coordinates Unicode's development, has the ambitious goal of eventually replacing existing character encoding schemes with Unicode and its standard Unicode Transformation Format (UTF) schemes, as many of the existing schemes are limited in size and scope, and are incompatible with multilingual environments. Unicode's success at unifying character sets has led to its widespread and predominant use in the internationalization and localization of computer software. The standard has been implemented in many recent technologies, including XML, the Java programming language, and modern operating systems. +Le Consortium Unicode, l'organisation à but non-lucratif qui coordonne le développement d'Unicode's, a le but ambitieux de remplacer éventuellement les schémas d'encodage de caractères existants par Unicode et les schémas de son Format de Transformation Unicode (Unicode Transformation Format-->UTF), car beaucoup des schémas existants sont limités en taille et portée et sont incompatibles avec les environnements multi-langages. Le succès d'Unicode dans l'unification des jeux de caractères a conduit à son utilisation répandue et prédominante dans l'internationalisation et la localisation des logiciels. Le standrd a été implémenté dans de nombreuses technologies récentes, incluant le XML, le langage de programmation Java et les systèmes d'exploitation modernes. -Common Unicode formats include: -- [[http://en.wikipedia.org/wiki/UTF-8 UTF-8]] -- [[http://en.wikipedia.org/wiki/UTF-16 UTF-16]] -- [[http://en.wikipedia.org/wiki/UTF-32 UTF-32]] \ No newline at end of file +Les formats Unicode Commun comprennent: +- [[http://fr.wikipedia.org/wiki/UTF-8">UTF-8]] +- [[http://fr.wikipedia.org/wiki/UTF-16">UTF-16]] +- [[http://fr.wikipedia.org/wiki/UTF-32">UTF-32]] \ No newline at end of file diff --git a/fbdocs/manual/cache/WikiRick.wakka b/fbdocs/manual/cache/WikiRick.wakka index a201dd783e..2acf6630f1 100644 --- a/fbdocs/manual/cache/WikiRick.wakka +++ b/fbdocs/manual/cache/WikiRick.wakka @@ -1,3 +1,3 @@ +{{fbdoc item="title" value="rdc"}}---- Rick Clark aka rdc -rickclark58@yahoo.com -http://rickclark58.bravehost.com/ \ No newline at end of file +rickclark58@yahoo.com \ No newline at end of file diff --git a/fbdocs/manual/cache/compileroptfpmode.wakka b/fbdocs/manual/cache/compileroptfpmode.wakka index 64c0f47975..7d0c920145 100644 --- a/fbdocs/manual/cache/compileroptfpmode.wakka +++ b/fbdocs/manual/cache/compileroptfpmode.wakka @@ -1,27 +1,27 @@ {{fbdoc item="title" value="Compiler Option: -fpmode"}}---- -Selects faster, less accurate or slower, more precise floating-point math. +Sélectionne des mathématiques à virgule flottante plus rapides, moins précises ou plus lentes, plus précises. {{fbdoc item="syntax"}}## **-fpmode** < //mode// > ## {{fbdoc item="param"}} ##//mode//## - The floating point mode: ##FAST## | ##PRECISE##. + Le mode en virgule flottante: ##FAST## | ##PRECISE##. {{fbdoc item="desc"}} - The ##-fpmode## compiler option specifies whether speed or precision is more important for floating point math. If this option is not specified, the default is ##-fpmode PRECISE##. + L'option de compilateur ##-fpmode## spécifie si la vitesse ou la précision est plus importante pour les mathématiques à virgule flottante. Si cette option n'est pas spécifiée, la valeur par défaut est ##-fpmode PRECISE##. - ##-fpmode FAST## will generate faster, less accurate instructions for certain floating point operations. + ##-fpmode FAST## va produire certaines opérations en virgule flottante plus rapides, moins précises. - ##-fpmode PRECISE## will generate standard floating point instructions that operate at the default speed and accuracy of the selected floating point unit. + ##-fpmode PRECISE## va générer des instructions en virgule flottante standard qui fonctionnent à la vitesse et la précision par défaut de l'unité de virgule flottante sélectionnée. - Currently, the only floating point operations that behave differently when using ##-fpmode FAST## are: ##[[KeyPgSin sin]]()##, ##[[KeyPgCos cos]]()##, reciprocal, and reciprocal [[KeyPgSqr square root]], all of which must operate on ##[[KeyPgSingle Single]]## precision values. + Actuellement, les seules opérations en virgule flottante qui se comportent différemment lorsqu'on utilise ##-fpmode FAST## sont: ##[[KeyPgSin Sin]]()##, ##[[KeyPgCos Cos]]()##, réciproques, et réciproque de [[KeyPgSqr racine carrée]], qui toutes doivent opérer sur des valeur ##[[KeyPgSingle Single]]## précision. - Using ##-fpmode PRECISE## is dependent on the ##[[CompilerOptfpu -fpu SSE]]## command line option. Using ##-fpmode PRECISE## without using ##[[CompilerOptfpu -fpu SSE]]## will generate an error. + L'utilisation de ##-fpmode PRECISE## dépend de l'option en ligne de commande ##[[CompilerOptfpu -fpu SSE]]##. Utiliser ##-fpmode PRECISE## sans utiliser ##[[CompilerOptfpu -fpu SSE]]## génèrera une erreur. {{fbdoc item="see"}} - - [[CompilerCmdLine Using the Command Line]] - - [[CompilerOptfpu Compiler Option: -fpu]] + - [[CompilerCmdLine Utilisation de la ligne de commande]] + - [[CompilerOptfpu Option du compilateur: -fpu]] - ##[[KeyPgDdfbfpmode __FB_FPMODE__]]## {{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}} \ No newline at end of file diff --git a/fbdocs/manual/cache/x86.wakka b/fbdocs/manual/cache/x86.wakka index e0dd09bdc7..0e64868e94 100644 --- a/fbdocs/manual/cache/x86.wakka +++ b/fbdocs/manual/cache/x86.wakka @@ -1,3 +1,3 @@ {{fbdoc item="title" value="x86 Microprocessor Architechture"}}---- -x86 or 80x86 is the generic name of a microprocessor architecture first developed and manufactured by Intel. +x86 ou 80x86 est le nom générique d'une architecture de microprocesseur d'abord développée et fabriquée par Intel.Plus d'informations peuvent être obtenues en lisant cet [[http://fr.wikipedia.org/wiki/X86">article Wikipedia]]. More information can be obtained by reading [[http://en.wikipedia.org/wiki/X86_architecture this]] Wikipedia article. \ No newline at end of file