„Feloldójel (informatika)” változatai közötti eltérés

[nem ellenőrzött változat][nem ellenőrzött változat]
Tartalom törölve Tartalom hozzáadva
Tsch81 (vitalap | szerkesztései)
Nincs szerkesztési összefoglaló
Tsch81 (vitalap | szerkesztései)
3. sor:
 
== Példák ==
<!--
 
===Bourne shell===
In [[Bourne shell|sh]], the * character is special, expanding via [[Glob()|globbing]]. In isolation, it expands to the names of all files in the current directory. So to refer to a file literally called * you need to tell the shell to ''not'' interpret it in this way, which you do by preceding it with a backslash (\) -- this ''escapes'' the * character. Compare:
11. sor:
 
<tt>rm \*</tt>
= delete the file named *-->
 
===ProgrammingProgramozási languagesnyelvek===
Számos újabb programozási nyelvben az idézőjel (") karakter
Many modern [[programming language]]s specify the doublequote character (") as a [[delimiter|delimiter]] for a [[string literal]]. The backslash escape character provides one way to include doublequotes inside a string literal. For example, in [[Perl]]:
a karakterlánc-literálok határait jelöli.
<!--as a [[delimiter|delimiter]] for a [[string literal]].
-->Ha az idézőjeleken belül szeretnénk idézőjelet írni azt csak
a visszafelé dőlő perjel (backslash) mint feloldójel
segítségével tehetjük.
 
Például [[Perl]]-ben:
 
print "Nancy said "Hello World!" to the crowd.";
 
produceserre ahibaüzenetet kapunk (syntax error), whereasazonban a:
 
print "Nancy said \"Hello World!\" to the crowd.";
 
kifejezéssel a kívánt hatást érjük el.
produces the intended output.
Néhány nyelvben más módszerekkel is megoldhatjuk ezt a problémát.
 
 
<!--(see e.g. [[Delimiter#Delimiter_collision|delimiter collision]]).-->
 
 
 
Some programming languages also provide other ways to prevent this type of error, without requiring an escape character (see e.g. [[Delimiter#Delimiter_collision|delimiter collision]]).
<!--
== Categories ==