From: Vyt <vyt@vzljot.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Re: Mandrake-russian digest, Vol 1 #1434 - 17 msgs
Date: Fri Jul 20 11:42:12 2001
Message-ID: <20010720115902.6f667043.vyt@vzljot.ru> (raw)
In-Reply-To: <9433.010720@infonet.nnov.ru>
On Fri, 20 Jul 2001 10:24:14 +0400
A-X HH <apholdnn@infonet.nnov.ru> wrote:
> Здравствуйте mandrake-russian-request,
>
> Thursday, July 19, 2001, 3:31:13 PM, Вы писали:
>
> > Есть прога на perl.
^^^^
> > В проге по ходу работы, путем чтения строк из дискрипторов,
> > создаются _строковые_ переменные вида:
> > $string1="45493";
> > $string2="0";
> > $string3="0000043";
> > $string4="5601";
> > и тому подобные.
> > Эти строки символизируют собой _целые_десятичные_числа_ именно в
> > том виде как они в стрингах содержатся - 45443; 0; 43; 3404.
> > То есть, в них содержатся _только_ десятичные цыфры в различном
> > количестве. Это контролируется мной и отсекается ежели чего не
> > так.
> >
> > Вопрос:
> > А как бы мне по простому преобразовать эти строки в десятичные
> > _числа_, что бы можно было поработать с ними в _числовом_
> > контексте операторами + - < > == != ++ и тому подобное?
>
> пример:
>
> $blablabla=$string1+($string2-$string3)*$string4;
> print "$blablabla";
>
> получим:
> -195350
>
> просветление наступило? :))
> преобразование сие делается автоматом (не АК-47:) при арифметических
> операциях над строками.
> хинт - конкатенация строк делается не сложением, а вот так:
> $ku = $string1.$string2;
> print "$ku";
Вы с PHP не путаете?
В perl это join, кажется.
<skipped>
--
Regards, Vyt
mailto:vyt@vzljot.ru
next prev parent reply other threads:[~2001-07-20 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-19 16:39 ` Re: [mdk-re] Structural Sisyphus's directories again Andrew Borodin
2001-07-19 16:45 ` cornet
2001-07-19 18:42 ` Aleksey Novodvorsky
2001-07-20 1:29 ` [mdk-re] " Mikhail Zabaluev
2001-07-20 9:58 ` Ivan Kudryashov
2001-07-20 11:34 ` Vyt
2001-07-20 10:16 ` [mdk-re] Re: Mandrake-russian digest, Vol 1 #1434 - 17 msgs A-X HH
2001-07-20 11:42 ` Vyt [this message]
2001-07-20 11:49 ` cornet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010720115902.6f667043.vyt@vzljot.ru \
--to=vyt@vzljot.ru \
--cc=mandrake-russian@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git