Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 13, 2022 11:15 pm GMT

The switch Statement - SPVM - The Project for Python/NumPy Porting to Perl

The switch statement in SPVM language is a statement for conditional branch.

# switch statementmy $code = 2;my $flag = 1;switch ($code) {  case 1: {    print "1
"; } case 2: { print "2
"; } case 3: { if ($flag) { break; } print "3
"; } case 4: case 5: { print "4 or 5
"; } default: { print "Other
"; }}# switch statement using enumerationclass Foo { enum { ID1, ID2, ID3, } static method main : int () { my $value = 1; switch ($value) { case Foo->ID1: { print "1
"; } case Foo->ID2: { print "2
"; } case Foo->ID3: { if ($flag) { break; } print "3
"; } default: { print "Other
"; } } }}

How to install SPVM::Numpy

cpanm SPVM::Numpy
# Developpercpanm SPVM;git clone https://github.com/yuki-kimoto/SPVM-Numpy.git

See also Installing SPVM::Numpy

What Is SPVM?

SPVM is a static typed language that can be used from Perl. SPVM is the essential part of the Python/numpy porting to Perl. If you haven't heard of Perl's SPVM. Please see also SPVM Language Specification.

How potential dose SPVM have?

Growth is expected in the fields of Bio Tech, AI/ML, Apple/iPhone/iPad Apps, Google/Android Apps, IoT Device, Connected Car, Smart Device, Smart Home, etc.

This is because SPVM can produce an executable file that supports cross platforms and make easy to calculate arrays and bind C/C++ and Nvidia/GPU/cuda.

SPVM Documents

SPVM Modules

This project really needs contributors, sponsors, investors.

This project really needs contributors. I am looking for contributors, sponsors, investors.


Original Link: https://dev.to/yukikimoto/the-switch-statement-spvm-the-project-for-pythonnumpy-porting-to-perl-3fl

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To