-
-
Save mgng/2089982 to your computer and use it in GitHub Desktop.
配列返す関数で値をうけとるとき
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my ( $a, $b ) = unko(); | |
| print "$a\n"; | |
| print "$b\n"; | |
| sub unko { | |
| return ( 'aaa', 'bbb' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $result = unko(); | |
| $a = $result[0]; | |
| $b = $result[1]; | |
| print "{$a}\n"; | |
| print "{$b}\n"; | |
| function unko() { | |
| return array( 'aaa', 'bbb' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var result = unko(); | |
| var a = result[0]; | |
| var b = result[1]; | |
| console.log(a); | |
| console.log(b); | |
| function unko() { | |
| return [ 'aaa', 'bbb' ]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment