Questions tagged as 'sintaxe'

1
answer

What is the purpose of {} (keys) being used to delimit code in PHP?

In PHP, you can use the keys in any code snippet, for example, to separate blocks aesthetically. Example: { $a = 1; } { class X{} } { { function x() {} } } In these examples, none of them an error is generated. I...
asked by 22.10.2015 / 21:19
1
answer

What is the correct way to declare a struct in C?

Also how to rename struct data types? I have doubt about this because of a Windows Manager that I use has the following code: typedef struct exem exem; struct exem { tiposdedado variavel; };     
asked by 29.10.2016 / 13:52
1
answer

What are other pass applications?

In the documentation the statement pass is defined    pass is a null operation. When executed, nothing happens. It is useful as a placeholder when syntactically a statement is required, but no code needs to be executed....
asked by 19.10.2017 / 23:47
2
answers

Mysql, comment types

I had already realized that mysql may not even be the only case, but I would like an explanation on it to be more objective. I have several types of comments that are accepted: 1) -- ESTA LINHA ESTA COMENTADA ? 2) # ESTA LINHA ESTA COMENTA...
asked by 16.06.2015 / 14:04
1
answer

What happens on these lines in C ++?

This is an encoder reading routine which detects which direction of rotation of the encoder. References are the left and right pins appreciated as MSB and LSB bits. The code works perfectly, but I do not understand what exactly happens in the ex...
asked by 17.05.2016 / 20:50
2
answers

Structures and selection of conditionals

Good afternoon! I am doing a program that reads various cow data: among them age, production, etc. However I am in doubt how I can break the for when typing code = 0. As it is in the program, only other data will be requested if code is diffe...
asked by 21.11.2015 / 16:29
1
answer

Android - Different ways to "set" a listener on objects

Is there a different way ("syntax") to "set" a listener on an object in Android? For example, I only know this form: btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { activit...
asked by 04.02.2015 / 17:06
2
answers

What does && mean! in PHP?

I'm trying to know this, but it appears nowhere. Has a space between & e!. if ( is_home() && ! is_front_page() )     
asked by 24.06.2017 / 18:44
3
answers

Difference between syntax of properties in C # [duplicate]

What I researched, if I did: public int numero { get; set; } is the same as: private int numero; public int Numero { get{ return numero; } set{ numero = value; } } But in the first code snippet every...
asked by 20.07.2017 / 23:29
1
answer

What does the "" operator do in the middle of an arithmetic expression in C ++?

I found this line of code in a proposed solution to a certain problem. excedente = a % 10 + b % 10 + excedente > 9; My question is, what is the role of > 9 in this specific line?     
asked by 24.11.2018 / 21:26