In the first code the loop counter which is cnt2 and assigned by cnt1
In the second code the loop counter is cnt1 and assigned by cnt
I have three variables in both codes
So In the first code decrementing
is before the main arithmetic expression
In the second code I want to combine decrementing and main expressions in one arithmetic expression
The part on the right of the second expression should do the same operation as in the decrementing line of the first code; I think they are the same.
---------- Post updated at 03:38 AM ---------- Previous update was at 01:41 AM ----------
OK I got it!!
You're right the internal variable cnt1 is not assigned to be updated, so I read in a website about assigning variables.
Hi,
When i run the below code in AIX it runs and solaris not ... why ???
#include <stdio.h>
#include <string.h>
#define MAX 1
int main ()
{
char str ="1,2,3,4,5";
char * pch,b;
int a;
printf ("Enter the int to be searched ",str);
scanf("%d",&a);
sprintf(b,"%d",a);
... (2 Replies)
My code for the generation of prime numbers from 2 to a value(given at run time) as fallows is not working. Can you assist me?
clear
echo "Enter the Maximum Number"
read max
for(( i=2; i <= $max; i++ ))
do
if
then
break
else
for(( j=i; j <= $max/2; j++ ))
do
if
then break
else echo... (1 Reply)
below is my code , but for some reason the return part is not working, only file transfer is happening and no exit status is checked .please me help me to fix this code
#!/bin/sh
#set -vx
ftp -nv sitelocation << !
user username password
lcd localdir
cd /remote dir
mget *.*
... (4 Replies)
Dear all,
Some one please help in solving this awk issue in HP.
The below code was working fine in HP version B.11.11 U 9000/800 but when the same was run B.11.31 U ia64 it failed. :o.
if awk 'BEGIN{if ('$var1' > 80); else exit 1}'
then
echo "Greater"
fi (6 Replies)
I am creting a script to delete files from /tmp directory. I have following code but fails to find file name start with id 2754.
What is wrong in : grep { /^(new_grp*|^$fleidb\_*/)/ } readdir(DIR);
#!/usr/bin/perl
my $dir = '/tmp';
my $fleidb = "2754";
print "$fleidb\n";... (1 Reply)
I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work.
This is the code I have added:
for transcriptfile in `$voicemaildir/*.transcript`; do
wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
I am looking for database
PHP Code:
SELECT * FROM table_name WHERE event LIKE '%" . $search . "%' OR date LIKE '%”. $search . "%'
This works fine in Firefox and in IE, but when i try it in safari, it seems to pull up the right results but then straight away changes and... (1 Reply)
Hi Gurus,
I wrote a simple code, but it doesn't work, can body help me to fix the issue.
awk -F',' 'BEGIN{n=0}{
NR == FNR {fname;next}
{
if ($3==fname)
n=1
}
END{if n==0}
}' tmpsrc srcfile.txt
Thanks in advance (4 Replies)
Hi Team,
I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system.
df -h | awk -v host=`hostname` '
BEGIN {
print "<table border="4"... (13 Replies)
"SQLPLUS -S " is not working in one environment where same code is working in another
getting below error
===================================
SQL*Plus: Release 11.2.0.3.0 Production
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus... (1 Reply)
Discussion started by: yogendra.barode
1 Replies
LEARN ABOUT DEBIAN
locale::currency
Locale::Currency(3perl) Perl Programmers Reference Guide Locale::Currency(3perl)NAME
Locale::Currency - standard codes for currency identification
SYNOPSIS
use Locale::Currency;
$curr = code2currency('usd'); # $curr gets 'US Dollar'
$code = currency2code('Euro'); # $code gets 'eur'
@codes = all_currency_codes();
@names = all_currency_names();
DESCRIPTION
The "Locale::Currency" module provides access to standard codes used for identifying currencies and funds, such as those defined in ISO
4217.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 4217
three-letter codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying currencies. The ones currently supported are:
alpha
This is a set of three-letter (uppercase) codes from ISO 4217 such as EUR for Euro.
Two of the codes specified by the standard (XTS which is reserved for testing purposes and XXX which is for transactions where no
currency is involved) are omitted.
This code set is identified with the symbol "LOCALE_CURR_ALPHA".
This is the default code set.
num This is the set of three-digit numeric codes from ISO 4217.
This code set is identified with the symbol "LOCALE_CURR_NUMERIC".
ROUTINES
code2currency ( CODE [,CODESET] )
currency2code ( NAME [,CODESET] )
currency_code2code ( CODE ,CODESET ,CODESET2 )
all_currency_codes ( [CODESET] )
all_currency_names ( [CODESET] )
Locale::Currency::rename_currency ( CODE ,NEW_NAME [,CODESET] )
Locale::Currency::add_currency ( CODE ,NAME [,CODESET] )
Locale::Currency::delete_currency ( CODE [,CODESET] )
Locale::Currency::add_currency_alias ( NAME ,NEW_NAME )
Locale::Currency::delete_currency_alias ( NAME )
Locale::Currency::rename_currency_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Currency::add_currency_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Currency::delete_currency_code_alias ( CODE [,CODESET] )
These routines are all documented in the Locale::Codes man page.
SEE ALSO
Locale::Codes
Locale::Constants
http://www.iso.org/iso/support/currency_codes_list-1.htm
The ISO 4217 data.
AUTHOR
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
Copyright (c) 2001 Michael Hennecke
Copyright (c) 2001-2010 Neil Bowers
Copyright (c) 2010-2011 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-09-26 Locale::Currency(3perl)