# Defining a :Function type of function

**URL:** <https://forum.kirupa.com/t/defining-a-function-type-of-function/275069>\
**Category:** Uncategorized\
**Created:** [November 8, 2008, 9:41pm UTC](https://forum.kirupa.com/t/defining-a-function-type-of-function/275069 "2008-11-08T21:41:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nixon](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nixon](https://forum.kirupa.com/u/nixon)\
**Post date:** [November 8, 2008, 9:41pm UTC](https://forum.kirupa.com/t/defining-a-function-type-of-function/275069/1 "2008-11-08T21:41:44Z")

</div>

Hi All,

There may not be a way to do this, but I thought that I would be able to return a function call by doing something like this:

```php

//pass vars 
zoomTo(hotels*);//passes "port" correctly

function zoomTo(whichMov):Function {
    callFunc = "move_"+whichMov; //receives "port" correctly
    return (callFunc);
}

//trying to call this function from zoomTo() above:

function move_port() {
    moveMap(-1600,-1200,300,300,1);
}

```

The variables are being passed correctly, however, I’m not sure how to call a function this way. Any help?
