forked from rust-lang/prev.rust-lang.org
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from rust-lang/master
17.2.15.1.44
- Loading branch information
Showing
43 changed files
with
1,422 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<a href="/en-US/">English</a>, | ||
<a href="/es-ES/">Español</a>, | ||
<a href="/fr-FR/">Français</a>, | ||
<a href="/it-IT/">Italiano</a>, | ||
<a href="/ja-JP/">日本語</a>, | ||
<a href="/ko-KR/">한국어</a>, | ||
<a href="/pl-PL/">Polski</a>, | ||
<a href="/pt-BR/">Português</a>, | ||
<a href="/ru-RU/">Русский</a>, | ||
<a href="/vi-VN/">Tiếng việt</a>, | ||
<a href="/zh-CN/">简体中文</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Ten kod można edytować oraz uruchomić! | ||
fn main() { | ||
// Prosty kalkulator dla liczb całkowitych: | ||
// `+` lub `-` oznacza dodanie lub odjęcie 1 | ||
// `*` lub `/` oznacza pomnożenie lub podzielenie przez 2 | ||
|
||
let program = "+ + * - /"; | ||
let mut accumulator = 0; | ||
|
||
for token in program.chars() { | ||
match token { | ||
'+' => accumulator += 1, | ||
'-' => accumulator -= 1, | ||
'*' => accumulator *= 2, | ||
'/' => accumulator /= 2, | ||
_ => { /* ignoruj wszystkie pozostałe znaki */ } | ||
} | ||
} | ||
|
||
println!("Program \"{}\" wylicza wartość {}", | ||
program, accumulator); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<pre class='rust'> | ||
<span class='kw'>fn</span> main() { | ||
<span class='comment'>// Prosty kalkulator dla liczb całkowitych: | ||
// `+` lub `-` oznacza dodanie lub odjęcie 1 | ||
// `*` lub `/` oznacza pomnożenie lub podzielenie przez 2</span> | ||
|
||
<span class='kw'>let</span> program = <span class='string'>"+ + * - /"</span>; | ||
<span class='kw'>let</span> <span class='kw'>mut</span> accumulator = <span class='number'>0</span>; | ||
|
||
<span class='kw'>for</span> token in program.chars() { | ||
<span class='kw'>match</span> token { | ||
<span class='string'>'+'</span> => accumulator <span class='op'>+=</span> <span class='number'>1</span>, | ||
<span class='string'>'-'</span> => accumulator <span class='op'>-=</span> <span class='number'>1</span>, | ||
<span class='string'>'*'</span> => accumulator <span class='op'>*=</span> <span class='number'>2</span>, | ||
<span class='string'>'/'</span> => accumulator <span class='op'>/=</span> <span class='number'>2</span>, | ||
_ => { <span class='comment'>/* ignoruj wszystkie pozostałe znaki */</span> } | ||
} | ||
} | ||
|
||
<span class='prelude-val'>println!</span>(<span class='string'>"Program \"{}\" wylicza wartość {}"</span>, | ||
program, accumulator); | ||
} | ||
</pre> | ||
// Ten kod można edytować oraz uruchomić! | ||
fn main() { | ||
// Prosty kalkulator dla liczb całkowitych: | ||
// `+` lub `-` oznacza dodanie lub odjęcie 1 | ||
// `*` lub `/` oznacza pomnożenie lub podzielenie przez 2 | ||
|
||
let program = "+ + * - /"; | ||
let mut accumulator = 0; | ||
|
||
for token in program.chars() { | ||
match token { | ||
'+' => accumulator += 1, | ||
'-' => accumulator -= 1, | ||
'*' => accumulator *= 2, | ||
'/' => accumulator /= 2, | ||
_ => { /* ignoruj wszystkie pozostałe znaki */ } | ||
} | ||
} | ||
|
||
println!("Program \"{}\" wylicza wartość {}", | ||
program, accumulator); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<!-- Page last generated {{ site.time }} --> | ||
<html lang="pl-PL"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>{{ page.title }}</title> | ||
<meta name="keywords" content="Rust, Rust programming language, Język Programowania Rust, rustlang, rust-lang, Mozilla Rust"> | ||
<meta name="description" content="Systemowy język programowania, który jest niesamowicie szybki, zapobiega naruszeniom pamięci oraz gwarantuje bezpieczeństwo wątków."> | ||
|
||
<link rel="stylesheet" href="/css/bootstrap.css"> | ||
<link rel="stylesheet" href="/css/style.css"> | ||
</head> | ||
|
||
<body class="container"> | ||
<a href="https://github.com/rust-lang/rust"> | ||
<img class="ribbon" style="display: none" src="/logos/forkme.png" alt="Fork me on GitHub" width="298" height="298"> | ||
</a> | ||
|
||
<header> | ||
<ul class="row menu"> | ||
<li class="col-xs-12 col-md-2"> | ||
<a href="/pl-PL/index.html"> | ||
<img class="img-responsive" src="/logos/rust-logo-blk.svg" onerror="this.src='/logos/rust-logo-256x256-blk.png'" height="128" width="128" alt="Rust logo" /> | ||
</a> | ||
</li> | ||
<li class="col-xs-12 col-md-10 menu"> | ||
<h2><a href="/pl-PL/documentation.html">Dokumentacja</a></h2> | ||
<h2><a href="/pl-PL/install.html">Instalacja</a></h2> | ||
<h2><a href="/pl-PL/community.html">Społeczność</a></h2> | ||
<h2><a href="/pl-PL/contribute.html">Wspomóż</a></h2> | ||
</li> | ||
</ul> | ||
</header> | ||
|
||
{{ content }} | ||
|
||
<footer> | ||
<p>Nasza strona w innych językach: | ||
{% include footer.html %} | ||
</p> | ||
</footer> | ||
|
||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', 'UA-58390457-1', 'auto'); | ||
ga('send', 'pageview'); | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
layout: pl-PL/basic | ||
--- | ||
|
||
<div class="content"> | ||
{{ content }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.