"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.05.0-linux-x86_64/examples/manual/proguide/procptrs/passing.bas" (31 Jan 2016, 552 Bytes) of package /linux/privat/FreeBASIC-1.05.0-linux-x86_64.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 '' examples/manual/proguide/procptrs/passing.bas
    2 ''
    3 '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
    4 ''         be included in other distributions without authorization.
    5 ''
    6 '' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=ProPgProcedurePointers
    7 '' --------
    8 
    9 '' .. Add and pFunc as before ..
   10 #include once "pfunc.bi"
   11 
   12 Function DoOperation (a As Integer, b As Integer, operation As Function (As Integer, As Integer) As Integer) As Integer
   13     Return operation(a, b)
   14 End Function
   15 
   16 Print "3 + 4 = " & DoOperation(3, 4, @Add)