From 97041f92d4f189712b2659271efa5ee762ee1a60 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Sun, 31 Dec 2017 23:59:59 +0000 Subject: [PATCH] Remove trailing spaces in file docs/source/developers/guides/code/code_standard.rst --- .../developers/guides/code/code_standard.rst | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/source/developers/guides/code/code_standard.rst b/docs/source/developers/guides/code/code_standard.rst index c4a896a0e..ccab7f79a 100644 --- a/docs/source/developers/guides/code/code_standard.rst +++ b/docs/source/developers/guides/code/code_standard.rst @@ -20,7 +20,7 @@ How to install ``perltidy`` tool: * **[RHEL]** :: yum install perltidy.noarch - + * **[UBUNTU]** :: apt-get install perltidy @@ -31,15 +31,15 @@ Code Standard Example: :: #! /usr/bin/perl - + # This is a perl program example to demo the recommended # style to write perl code - + use strict; use warnings; - + #-------------------------------------------------------------------------------- - + =head3 subroutine_example Descriptions: This a subroutine to demo how to write perl code @@ -51,46 +51,46 @@ Code Standard Example: 0 - success 0 - fail =cut - + #-------------------------------------------------------------------------------- sub subroutine_example { my ($param1, $param2, $param3) = @_; - + print "In the subroutine subroutine_example.\n"; - + return 0; } - - + + # Declare variables my $a_local_scale; my @a_local_array; my %a_local_hash; - + $a_local_scale = 1; - + @a_local_array = ("a", "b", "c"); - + %a_local_hash = ( "v1" => 1, "v2" => 2, "v3" => 3, ); - + # Demo how to check the key of hash if (%a_local_hash and defined($a_local_hash{v1}) and defined($a_local_hash{v2}) and defined($a_local_hash{v3})) { - + # Calculate the sum of values my $sum_of_values = $a_local_hash{v1} + $a_local_hash{v2} + $a_local_hash{v3}; - + print "The sum of values: $sum_of_values.\n"; } - + # Demo how to check whether the array is empty if (@a_local_array) { print "Has element in array: " . join(',', @a_local_array) . "\n"; @@ -102,8 +102,8 @@ Code Standard Example: # None of above print "Get into the default path.\n"; } - + # Call the subroutine subroutine_example() subroutine_example($a_local_scale, \@a_local_array, %a_local_hash); - + exit 0;