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

Implementar um equivalente ao foreach #21

Open
ErickSimoes opened this issue Mar 28, 2017 · 1 comment · May be fixed by #74
Open

Implementar um equivalente ao foreach #21

ErickSimoes opened this issue Mar 28, 2017 · 1 comment · May be fixed by #74

Comments

@ErickSimoes
Copy link
Collaborator

Uma forma fácil de iterar sobre arrays é usando um foreach, que nada mais é do que um for otimizado. Várias linguagens de programação implementam esse laço de repetição:
PHP:

foreach ( $array as $item )
    echo $item;

Python:

for item in array:
    print item

C#:

foreach (int item in array) {
    System.Console.WriteLine(item);
}

Não há um equivalente direto (nativo) a ele em C/C++, então poderia ser implementado como sugerido aqui.

@ErickSimoes ErickSimoes self-assigned this May 17, 2017
@ErickSimoes ErickSimoes removed their assignment Jul 12, 2017
@renlopes
Copy link
Contributor

Alterações feitas para testes de implementação da ideia no PR #26

@SteffanoP SteffanoP linked a pull request Apr 12, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants