Download for Windows Premium
Flash sale to discover Premium
-65% lifetime on all subscriptions
Advertising
static variable
/'stætɪk 'vɛəriəbl/
Definition
variable retaining value after function execution  ... See more
variável estática f
The static variable is initialized once, in this case the first time the function is called.
A variável estática é inicializada uma vez, neste caso na primeira vez em que a função é chamada.
Only one copy of the static variable exists regardless of the number of instances of the class.
Apenas uma cópia da variável estática existe independentemente do número de instâncias de uma classe.
A static variable exists only in a local function scope, but it does not lose its value when program execution leaves this scope.
Uma variável estática existe somente no escopo local da função, mas não perde seu valor quando o nível de execução do programa deixa o escopo.
And all the values of our variables/expression will now be reset because this is a new tick except if any of them is declared as a static variable.
E todos os valores das nossas variáveis/expressões agora serão reiniciados porque essa é uma nova variável se qualquer um deles for declarado como uma variável estática.
All of this is fodder for a future blog post, but what I want to focus on for now is solving the static variable problem.
Tudo isso é matéria prima para um futuro post aqui no blog, mas eu gostaria de focar agora na solução para resolver o problema da variável estática
The following simple function recursively counts to 10, using the static variable $count to know when to stop
A seguinte função recursiva conta até 10, utilizando a variável estática $count para saber quando parar
to a static variable, instead of a pointer in the heap (previously allocated with malloc() or similar).
Estou executando um free() num ponteiro que aponta para uma variável estática, ao invés de uma variável que foi alocada com malloc() ou similar.
static variable, instead of a pointer in the heap (previously allocated with malloc() or similar).
Estou executando um free() num ponteiro que aponta para uma variável estática, ao invés de uma variável que foi alocada com malloc() ou similar.
executing a free() in a pointer to a static variable, instead of a pointer in the heap (previously allocated with malloc() or similar).
Estou executando um free() num ponteiro que aponta para uma variável estática, ao invés de uma variável que foi alocada com malloc() ou similar.
I'm executing a free() in a pointer to a static variable, instead of a pointer in the heap (previously allocated with malloc() or similar).
Estou executando um free() num ponteiro que aponta para uma variável estática, ao invés de uma variável que foi alocada com malloc() ou similar.
On a programming platform such as the JVM or the CLR, a unit test that mutates a static variable can impact the outcome of all subsequent tests in the entire test suite, not just those tests belonging to the same test case.
Em uma plataforma de programação semelhante a JVM ou o CLR, um teste unitário que muda uma variável estática pode impactar o resultado de todos testes subsequentes em uma suite de testes inteira, não só naquele teste que pertence ao mesmo test case.
You can also define the type of data that must be provided by using the propTypes static variable within its class.
Você também pode definir o tipo de dados que devem ser fornecidos usando a variável estática de propTypes dentro de sua classe.
So what do you do when you want the functionality of a static variable in Javascript?
O que você faz quando você quer a funcionalidade de uma variável estática em Javascript?
No results found for this meaning.
Go Premium to unlock millions of translation examples, save and learn unlimited vocabulary, without ads.

Synonyms and analogies of "static variable" in English

Word & Expression of the day
Image of the day
strawberry: sweet red fruit with tiny seeds on the skin
Reveal the word
Advertising

Results: 207. Exact: 21. Elapsed time: 53 ms.

Word index: 1-300, 301-600, 601-900

Expression index: 1-400, 401-800, 801-1200

Phrase index: 1-400, 401-800, 801-1200