"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.05.0-linux-x86_64/examples/procedures.bas" (31 Jan 2016, 326 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 function AddNumbers( a as integer, b as integer ) as integer
    2     return a + b
    3 end function
    4 
    5 sub hello( )
    6     print "hello"
    7 end sub
    8 
    9 declare sub myprint( num as integer )
   10 
   11     '' Code outside any procedures is the main part of the program
   12     hello( )
   13     print AddNumbers( 1, 1 )
   14     myprint 5
   15 
   16 sub myprint( num as integer )
   17     print num
   18 end sub