home > 比較編 > Perl, PHP, Python, Ruby > strings >

ForNext

Only Do What Only You Can Do

050. variable interpolation

VBScript

JScript

Perl

my $count = 3;
my $item = "ball";
print "$count ${item}s\n";

PHP

$count = 3;
$item = "ball";
echo "$count ${item}s\n";

Python

count = 3
item = 'ball'
print('{count} {item}s'.format(
  **locals()))

Ruby

count = 3
item = "ball"
puts "#{count} #{item}s"

PowerShell

Scala

F#

C

C++

C++Builder

VC++

C#

Java

Objective-C

D

VB

VB.NET

Delphi

Ada

PL/SQL

T-SQL

関数型

inserted by FC2 system