Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some pt-br pages #9

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Feb 4, 2024

Update some pages

  • basic types
  • imports and modules

Note: I have not translated any more pages at the moment, because I don't know if the access to the contributions for the portuguese speaking people (not only Brazil) is still active.
Also, this repository's pages are out of date. I'll need to copy the pages from the english repository, which seems to be more active.

cc: @sergiors

* basic types
* imports and modules
@kassane
Copy link
Contributor Author

kassane commented Feb 4, 2024

## {SourceCode}
```d
import std.stdio : writeln;
void main()
{
// Números grandes podem ser separados
// utilizando sublinha "_"
// melhorando a legibilidade.
int b = 7_000_000;
// necessário cast
// para conversão explícita
short c = cast(short) b;
uint d = b; // conversão implícita
int g;
assert(g == 0);
// f denota-se ser do tipo float
auto f = 3.1415f;
// typeid(VAR) retorna a informação
// sobre o tipo da expressão.
writeln("type of f is ", typeid(f));
double pi = f; // conversão implícita
// para tipos de ponto flutuante
// permitindo a redução implícita
float demoted = pi;
// acessando as propriedades do tipo
assert(int.init == 0);
assert(int.sizeof == 4);
assert(bool.max == 1);
writeln(int.min, " ", int.max);
writeln(int.stringof); // int
}
```

image

@sergiors sergiors merged commit bff08c2 into dlang-tour:master Feb 5, 2024
1 check passed
@kassane kassane deleted the update-basics branch February 5, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants