Questions tagged as 'sintaxe'

3
answers

I do not know what this syntax is

Someone can help me with this structure, I do not know what it is, nor how it works. var variavel = { 'teste1':'1', 'teste2':'2', 'teste3':'3' }     
asked by 30.06.2016 / 22:00
2
answers

What does "re:" and "im:" mean in Rust?

I want to know what re and im mean / do let mut z = Complex { re: 0.0, im: 0,0 }; I'm learning Rust from the Programming Rust book, and this re: and im: should have already appeared before, but just now I've both...
asked by 03.12.2018 / 13:53
2
answers

How to use C # quotes?

I'm starting to program in C # and I'm having some difficulties with the quotation marks when I need to paste some text. In Python I could use the triple quotation marks to paste some text that there was a line break, already in C # I have no id...
asked by 15.11.2018 / 13:43
2
answers

Parse error: syntax error, unexpected ''

I want to print the value on the screen after the PHP result. public function iniciar() { $msg = ''; $oneclick = null; # login... $this->login(); if ($this->logado()) { $oneclick = $this->pegar_oneclick();...
asked by 16.02.2015 / 16:31
2
answers

Error in JavaScript code

I have a code snippet that looks in a Json field called campo , and inserts it into an array, which can not have repeated values. My array always returned undefined and it took me a while to find the error. Why does JS and even IDE cons...
asked by 29.07.2015 / 16:41
1
answer

Return 0 on Linux and Windows

I'm starting the ADS course and my programming teacher insists on using return 0 at the end of the function. Most use Windows, I realized that return 0 is required in Windows but in Ubuntu (which is what I use) I do not put retu...
asked by 01.09.2017 / 04:57
3
answers

Calculate average between 3 notes

I need the user to enter 3 notes to calculate the media and report whether it is approved, disapproved, or recovered. I believe the error is in the average itself. <html> <head> <title> </title> <script type="te...
asked by 16.10.2016 / 00:41
2
answers

Expression-bodied is recommended? Does it have performance differences?

To what extent is it recommended, or even good practice, to use expression-bodied ? I know that expression-bodied allow properties, methods, operators, and other function members to have bodies defined using lambda expressions ( =>...
asked by 20.08.2018 / 20:33
1
answer

Syntax TypeScript

I'm studying TypeScript but I do not understand the meaning of this example: interface Person { firstname: string; lastname: string; } function greeter(person : Person) { return "Hello, " + person.firstname + " " + person.lastname...
asked by 31.03.2014 / 15:56
1
answer

Is there a difference between the syntax of Self-Invoking-Functions?

I've learned three ways to write Self Invoking Functions , Immediately-Invoked Function Expression (IIFE) , and I wondered if there was any difference between them. (function () { console.log("Olá"); })(); (function () { console.log...
asked by 05.06.2015 / 15:45