Download for Windows Premium
Publicitate
static variable
/'stætɪk 'vɛəriəbl/
Definiție
variable retaining value after function execution  ... Afișați mai multe
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?
Nici un rezultat pentru acest sens.
Treci la Premium pentru a debloca milioane de exemple de traduceri, a salva și învăța vocabular nelimitat, fără reclame.

Sinonime și analogii pentru "static variable" în limba Română

Cuvântul și expresia zilei
Imaginea zilei
strawberry: sweet red fruit with tiny seeds on the skin
Află cuvântul
Publicitate

Rezultate: 207. Exacte: 21. Timp de răspuns: 47 ms.