コンテンツにスキップ

検索結果

  • zero // クロージャ def closureExample = { int x, int y -> x + y } println closureExample(3, 4) // 結果: 7 // 例外のスローとキャッチ def calculateSquareRoot(int number)…
    92キロバイト (11,563 語) - 2024年2月5日 (月) 00:26
  • (defn square [n] (* n n)) (def add-one-and-square (comp square add-one)) add-one関数は、入力の整数に1を足した値を返します。 square関数は、入力の整数を2乗した値を返します。 add-one-and-square
    43キロバイト (6,398 語) - 2023年3月5日 (日) 04:27
  • abstract def to_s(io) abstract def area end class Square < Shape def initialize(x, y, @wh = 0.0) super(x, y) end def to_s(io) io << "Square(#{@x}, #{@y}…
    92キロバイト (11,405 語) - 2024年3月11日 (月) 01:22
  • function square(x) real, intent (in) :: x square = x*x end function program main real :: a, b, square a = 2.0 b = square(a) ! After invoking the square(.) pure…
    16キロバイト (2,324 語) - 2024年2月11日 (日) 22:21
  • struct Square { struct Shape shape; double wh; }; static void printSquare(struct Shape* sp) { struct Square *p = (struct Square *)sp; printf("Square(x:%f…
    45キロバイト (6,312 語) - 2024年5月5日 (日) 06:37
  • 4142135623730951 Help on built-in function sqrt in module math: sqrt(x, /) Return the square root of x. 構文 import モジュール名 また、インポートされた関数をつかうときは、どのモジュールに由来する関数かを、pytho…
    14キロバイト (1,150 語) - 2022年11月12日 (土) 11:06
  • 上記のコードのうち、関数の定義部分は、 def func(a) : print("計算するよ") b = a * 2 print(a,"を2倍したら",b) ↑ この範囲が、関数の定義部分です。 引数のある関数の定義の書式は、 def 関数名(引数) : 処理内容 というふうになります。 「引数」は「ひきすう」と読みます。 def menseki(a…
    1キロバイト (41,670 語) - 2024年6月27日 (木) 05:29
  • fn square(x: i32) -> i32 { x * x } let square_function = square; println!("The square of 5 is {}", square_function(5)); このコードでは、square()関数をsquare
    207キロバイト (27,337 語) - 2024年6月30日 (日) 02:28
  • が可能になりました。さらに、2つ以上の引数を持つ場合の複合型推論もサポートされるようになりました。 def add(x: Int, y: Int) = x + y // 戻り値の型が推論される def pair(x, y) = (x, y) // 複合型推論 Scala 2.10 (2013年)…
    55キロバイト (9,256 語) - 2024年5月23日 (木) 22:39
  • : float { return $this->wh * $this->wh; } } $square = new Square(1, 2, 3); echo '$square --> ', $square, PHP_EOL; class Rectangle extends Shape { public…
    2キロバイト (40,455 語) - 2022年12月7日 (水) 00:06
  • $x = qw(a bc def); my @y = qw(a bc def); my $z = @y; say "\$x --> $x"; say "\@y --> @y"; say "\$z --> $z" 実行結果 $x --> def @y --> a bc def $z --> 3 よくある間違えとしては、セパレーターとして…
    3キロバイト (49,625 語) - 2023年7月5日 (水) 00:13
  • circle") } } class Square : Shape() { override fun draw() { println("Drawing a square") } } 上記の例では、Shape クラスがオープンクラスとして定義されています。Circle と Square クラスが Shape を継承し、draw…
    180キロバイト (28,736 語) - 2024年6月27日 (木) 04:46
  • complex number a] 7 11 √ positive square root (of a real number) \sqrt{} sqrt (square_1:def 4) sqrt a [the square root of a] 7 12 n {\displaystyle {\sqrt[{n}]{}}}…
    42キロバイト (0 語) - 2024年2月21日 (水) 21:17