Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Inline::SLang::Assoc 1.00

    Download button

    No screenshots available
    Downloads: 294  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Smithsonian Astrophysical Observatory | More programs
    GPL / FREE
    August 6th, 2007, 20:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Inline::SLang::Assoc description

    Inline::SLang::Assoc module contains support for associative arrays.

    Inline::SLang::Assoc module contains support for associative arrays.

    SYNOPSIS

    use Inline 'SLang';

    # you can send hash references to S-Lang
    print_in_slang( { a => 23, "b b" => "foo" } );

    # and get them back from S-Lang
    $href = get_from_slang();
    print "The assoc array contains:n" .
    join( "", map { "t$_ => $$href{$_}n"; } keys %$href );

    __END__
    __SLang__

    define print_in_slang (assoc) {
    message( "SLang thinks you sent it an assoc. array with:" );
    foreach ( assoc ) using ( "keys", "values" ) {
    variable k, v;
    ( k, v ) = ();
    vmessage( " key %s = %S", k, v );
    }
    }
    define get_from_slang() {
    variable x = Assoc_Type [String_Type];
    x["a key"] = "a value";
    x["another key"] = "another value";
    return x;
    }
    The output of this code - which can be found in the source-code distribution as examples/assoc.pl - is:
    SLang thinks you sent it an assoc. array with:
    key a = 23
    key b b = foo
    The assoc array contains:
    another key => another value
    a key => a value

    Product's homepage

    Requirements:

    · Perl v5.6.0 or higher.
    · Test::More module (comes with perl 5.8.0)
    · Inline module version 0.42 or higher.
    · PDL v2.4.0 or higher will be used if installed

      


    TAGS:

    associative arrays | SLang arrays | Perl module | Inline::SLang::Assoc | Slang | associative

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM