Questions tagged as 'sintaxe'

1
answer

What is the need to use the suffix "f" in a numeric constant in C?

Is it necessary to add f to a float value within the parameters of a if ? Example: if (a == 2.5f && a > 2.0f) {}     
asked by 28.08.2018 / 17:41
1
answer

How does for (?;) work?

It's probably duplicated, but I did not find it here in SOpt, and I do not know how to search on Google. How does the for loop work in this syntax? for(;;) { //... }     
asked by 20.10.2017 / 18:29
2
answers

Difference between ":" and "." in methods of a Lua table

I came across two different statements that left me confused. obj = {} function obj.Create(name) end function obj:GoGoGo(name) end What is the difference of the function declared with the . (dot) and : (colon)?     
asked by 08.12.2015 / 18:46
1
answer

What does this "point" in Python mean?

What does this point mean between the variable var and index ? Example: var = ['João','Pedro','André','Alice'] var.index('André') Is there a name?     
asked by 21.04.2017 / 15:42
2
answers

Clause similar to MySQL's LIMIT in MSSQL

I need to run the query below in PHP with SQL Server, however I can not use the LIMIT clause missing in Microsoft queries . $SqlTabelaAtual="SELECT * FROM BusinessCadTabPreco RIGHT JOIN BusinessCadTabPrecoItem ON B...
asked by 15.01.2016 / 15:17
1
answer

What is the correct way to declare a main () function?

In some of the research I've done, I've noticed that there are some different ways of doing it, like the examples below: int main() int main(void) void main() // entre outros... I know that the statements are entirely linked to the retu...
asked by 28.10.2015 / 17:44
2
answers

Object-return syntax in JavaScript

Using the Chrome console I used the following code (valid): function foo() { return { prop: "some value" }; } When changed, the syntax style is no longer valid ( { played to next line): function foo() { return...
asked by 31.07.2014 / 19:55
1
answer

Why can not I display the MessageBoxButtons if it is not a string?

Why am I not able to display MessageBoxButtons if it is not a string? static void Main() { string texto = "Minha primeira MessageBox"; MessageBoxButtons botao = MessageBoxButtons.OKCancel; DialogResult result; result = M...
asked by 20.11.2015 / 01:15
1
answer

In PHP 7, can the class method contain a keyword name? this is good or bad?

PHP 7, has released a number of innovations for the PHP language. Also, I noticed that classes can now have methods with keyword names. The strange thing is that classes can not have, but methods can (vixe!) For example, this is valid in PHP7...
asked by 16.05.2016 / 16:38
1
answer

Reading of infinite loop tokens

I have a code that reads tokens from a text. I'm using Visual Studio 2013 in an extensibility project. When reading the text through the scanner and collecting the tokens , the program goes into an infinite loop: public class TestScanne...
asked by 16.06.2014 / 17:00