passagio di parametri di tipo funzione

English translation: passing functions as parameters

GLOSSARY ENTRY (DERIVED FROM QUESTION BELOW)
Italian term or phrase:passagio di parametri di tipo funzione
English translation:passing functions as parameters
Entered by: Barbara Cochran, MFA

22:58 Oct 6, 2009
Italian to English translations [PRO]
Tech/Engineering - Computers (general) / University Course Description
Italian term or phrase: passagio di parametri di tipo funzione
Contesto:

Linguaggio C: Techniche di programmaz. avanzata [6T + 4E]

**Passaggio di parametri di tipo funzione**

Esercitazione

Passagio di parametri in numero variabile

Esercitazione"

Grazie!

femme
Barbara Cochran, MFA
United States
Local time: 09:45
passing functions as parameters
Explanation:
In C/C++, programming languages, it is possible to pass functions as parameters, which is done through pointers in C/C++. As the following example shows, it is possible in other programming languages as well.

http://www.mathworks.com/company/newsletters/news_notes/win0...

See: MATLAB function handles allow you to efficiently pass functions as parameters to other functions. This is particularly useful for solving numerical optimization problems, where many of the solvers require you to provide them with a function to minimize. In previous versions of MATLAB, you pass functions as parameters by passing in the name of the function as a string. These function name strings are then passed to eval() or feval() to invoke the functions they represent. MATLAB 6 introduces function handles, a new data type that represents functions far more efficiently than strings do.
Selected response from:

Cameron Fordyce
Italy
Local time: 15:45
Grading comment
Thanks.
4 KudoZ points were awarded for this answer



Summary of answers provided
5 +2passing functions as parameters
Cameron Fordyce
5passing function type parameters
James (Jim) Davis
5 -1passing parameters to functions
Jennifer Levey


  

Answers


1 hr   confidence: Answerer confidence 5/5 peer agreement (net): -1
passing parameters to functions


Explanation:
As distinct from, for example, passing parameters to sub-routines.

How to Pass Parameters to Functions - [ Traducir esta página ]
Prefer passing by const reference. Use a non-const reference when the parameter is used to send a result back to the caller.
www.goingware.com/.../parameters/parameters.html - En caché - SimilaresPassing Parameters - [ Traducir esta página ]
We then tell the function which real variables to use in place of those arguments by passing the required variables as parameters. ...
javascript.about.com/library/bltut08.htm - En caché - SimilaresPassing parameters to a function -- Flash CS3 - [ Traducir esta página ]
28 Apr 2008 ... (In this book, the terms parameter and argument are interchangeable.) You can pass parameters (values) to a function. ...
livedocs.adobe.com/flash/9.0/.../00000759.html - En caché - Similares

Jennifer Levey
Chile
Local time: 09:45
Native speaker of: Native in EnglishEnglish
PRO pts in category: 4

Peer comments on this answer (and responses from the answerer)
disagree  Cameron Fordyce: I think that it is more complex, passing functions as parameters, which is technically possible and done through pointers in C/C++.
15 mins
  -> If you post an answer on that basis I will agree (or not)...
Login to enter a peer comment (or grade)

2 hrs   confidence: Answerer confidence 5/5 peer agreement (net): +2
passing functions as parameters


Explanation:
In C/C++, programming languages, it is possible to pass functions as parameters, which is done through pointers in C/C++. As the following example shows, it is possible in other programming languages as well.

http://www.mathworks.com/company/newsletters/news_notes/win0...

See: MATLAB function handles allow you to efficiently pass functions as parameters to other functions. This is particularly useful for solving numerical optimization problems, where many of the solvers require you to provide them with a function to minimize. In previous versions of MATLAB, you pass functions as parameters by passing in the name of the function as a string. These function name strings are then passed to eval() or feval() to invoke the functions they represent. MATLAB 6 introduces function handles, a new data type that represents functions far more efficiently than strings do.

Cameron Fordyce
Italy
Local time: 15:45
Works in field
Native speaker of: Native in EnglishEnglish
PRO pts in category: 8
Grading comment
Thanks.

Peer comments on this answer (and responses from the answerer)
agree  tradu-grace
23 mins

agree  Oliver Lawrence
4 hrs
Login to enter a peer comment (or grade)

8 hrs   confidence: Answerer confidence 5/5
passing function type parameters


Explanation:
It is a long time since I programmed in C and C++ and passed pointers to functions, but once you've managed to do it you don't forget.

I was about to agree with Cameron here but he has omitted an important point and that is the translation of the word "tipo", which is a technical term in most programming languages.
All variables in C and C++ are very heavily typed . It is not sufficient to pass a variable containing a pointer to a function, you have to declare a variable as a "function type" and then declare a pointer to that variable as a "function pointer type". Dead easy one you know how ,-)



Chapter 5: Statement Details
Some of the older C compilers force you to use K&R style parameters. ... Always ** declare a function type**. It is possible to have an integer function that ...
www.oualline.com/style/c05.html - Cached - Similar -

Function Class Annotations and Role Types
In C and C++, you can use a typedef to ** declare a function type**. This is distinct from a **function pointer type** and has not been used very much in most C code ...
msdn.microsoft.com/en-us/library/cc264082.aspx - Cached - Similar -

http://www.google.com/search?hl=en&safe=off&num=100&q=declar...



James (Jim) Davis
Seychelles
Local time: 17:45
Works in field
Native speaker of: Native in EnglishEnglish
PRO pts in category: 63
Login to enter a peer comment (or grade)



Login or register (free and only takes a few minutes) to participate in this question.

You will also have access to many other tools and opportunities designed for those who have language-related jobs (or are passionate about them). Participation is free and the site has a strict confidentiality policy.

KudoZ™ translation help

The KudoZ network provides a framework for translators and others to assist each other with translations or explanations of terms and short phrases.


See also:
Term search
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search