Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict; use Config;
    ...
    my $c = add( $a, $b );
    
    print $c;
    
  2. or download this
    int add( int a, int b ) {
        int result;
        result = a + b;
        return result;
    }
    
  3. or download this
    XS_EUPXS(XS_main_add) {
        dVAR; dXSARGS;
    ...
        PUSHi((IV)RETVAL);
        XSRETURN(1);
    }
    
  4. or download this
    XS_EXTERNAL(boot_ICexample) {
        dVAR; dXSARGS;
    ...
        newXS("main::add", XS_main_add, file);
       XSRETURN_YES;
    }