Top "Function" questions

A function (also called a procedure, method, subroutine, or routine) is a portion of code intended to carry out a single, specific task.

Function for C++ struct

Usually we can define a variable for a C++ struct, as in struct foo { int bar; }; Can we also define …

c++ function struct
Calling a Javascript Function from Console

In Chrome's JavaScript console, how do I call a function that belongs to a .js file included in the webpage …

javascript function google-chrome-devtools developer-tools
T-SQL - function with default parameters

I have this script: CREATE FUNCTION dbo.CheckIfSFExists(@param1 INT, @param2 BIT = 1 ) RETURNS BIT AS BEGIN IF EXISTS ( bla bla …

tsql function default-parameters
Auto generate function documentation in Visual Studio

I was wondering if there is a way (hopefully keyboard shortcut) to create auto generate function headers in visual studio. …

function visual-studio-2008 header auto-generate
Why JavaScript getTime() is not a function?

I used the following function: function datediff() { var dat1 = document.getElementById('date1').value; alert(dat1);//i get 2010-04-01 …

javascript function date gettime
C++ callback using class member

I know this has been asked so many times, and because of that it's difficult to dig through the cruft …

c++ function callback member
How can I create C header files

I want to be able to create a collection of functions in a header file that I could #include in …

c function header-files modular
How to invoke function from external .c file in C?

My files are // main.c #include "add.c" int main(void) { int result = add(5,6); printf("%d\n", result); } and // add.…

c function external
Static vs class functions/variables in Swift classes?

The following code compiles in Swift 1.2: class myClass { static func myMethod1() { } class func myMethod2() { } static var myVar1 = "" } func doSomething() { myClass.…

function class swift variables static
Proper use of const for defining functions in JavaScript

I am interested if there are any limits to what types of values can be set using const in JavaScript—…

javascript function constants ecmascript-6