* [mdk-re] Кто нить программит ?
@ 2001-12-27 8:52 Sergey Krivulja
2001-12-27 9:33 ` Volkov Serge
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Sergey Krivulja @ 2001-12-27 8:52 UTC (permalink / raw)
To: mandrake-russian; +Cc: mandrake-russian
Hello mandrake-russian,
Кто нить программит на Паскале?
Мне необходимо срочно написать прогу
на Паскале. В ней предусмотреть перенаправление ввода-вывода.
Например так - progr1 par1 par2 < in_file1 > out_file2
progr1 - имя самой программы
par1 - параметр1
par2 - параметр2
in_file1 - входной файл
out_file2 - выходной файл
Неподкажет кто?
--
Best regards,
Sergey mailto:skrivulja@erec.ru
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [mdk-re] Кто нить программит ?
2001-12-27 8:52 [mdk-re] Кто нить программит ? Sergey Krivulja
@ 2001-12-27 9:33 ` Volkov Serge
2001-12-27 10:10 ` Roman Mediakov
` (2 more replies)
2001-12-27 10:06 ` [mdk-re] Кто нить программит ? Roman Mediakov
2001-12-27 17:32 ` [mdk-re] " Mike
2 siblings, 3 replies; 10+ messages in thread
From: Volkov Serge @ 2001-12-27 9:33 UTC (permalink / raw)
To: mandrake-russian
On Thu, 27 Dec 2001 08:57:29 +0300
Sergey Krivulja <skrivulja@erec.ru> wrote:
> Hello mandrake-russian,
>
> Кто нить программит на Паскале?
> Мне необходимо срочно написать прогу
> на Паскале. В ней предусмотреть перенаправление ввода-вывода.
> Например так - progr1 par1 par2 < in_file1 > out_file2
> progr1 - имя самой программы
> par1 - параметр1
> par2 - параметр2
> in_file1 - входной файл
> out_file2 - выходной файл
>
> Неподкажет кто?
Может я чего не понимаю, но решение мне витится такое
как один из вариантов разобрать строку параметров
и после этого если есть "<" и за ним "in_file1" то читаьт из этого файла
если есть ">" и за ним "out_file2" писать в него ???
>
> --
> Best regards,
> Sergey mailto:skrivulja@erec.ru
>
>
>
> _______________________________________________
> Mandrake-russian mailing list
> Mandrake-russian@altlinux.ru
> http://altlinux.ru/mailman/listinfo/mandrake-russian
>
>
>
--
With best wishes, Volkov Serge
Network Administrator/Security Administrator
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [mdk-re] Кто нить программит ?
2001-12-27 9:33 ` Volkov Serge
@ 2001-12-27 10:10 ` Roman Mediakov
2001-12-27 10:27 ` [mdk-re] " Mikhail Zabaluev
2001-12-27 11:57 ` [mdk-re] Кто нить программит на пасквиле? Michael Shigorin
2 siblings, 0 replies; 10+ messages in thread
From: Roman Mediakov @ 2001-12-27 10:10 UTC (permalink / raw)
To: mandrake-russian
> On Thu, 27 Dec 2001 08:57:29 +0300
> Sergey Krivulja <skrivulja@erec.ru> wrote:
>
> > Hello mandrake-russian,
> >
> > Кто нить программит на Паскале?
> > Мне необходимо срочно написать прогу
> > на Паскале. В ней предусмотреть перенаправление ввода-вывода.
> > Например так - progr1 par1 par2 < in_file1 > out_file2
> > progr1 - имя самой программы
> > par1 - параметр1
> > par2 - параметр2
> > in_file1 - входной файл
> > out_file2 - выходной файл
> >
> > Неподкажет кто?
>
> Может я чего не понимаю, но решение мне витится такое
> как один из вариантов разобрать строку параметров
> и после этого если есть "<" и за ним "in_file1" то читаьт из этого файла
> если есть ">" и за ним "out_file2" писать в него ???
Насколько я понял, это шелл делает, а не сама программа. Т.е. если
написать так в командной строке, то bash перенаправит всё сама.
> >
> > --
> > Best regards,
> > Sergey mailto:skrivulja@erec.ru
> >
> >
>
>
> --
> With best wishes, Volkov Serge
> Network Administrator/Security Administrator
^ permalink raw reply [flat|nested] 10+ messages in thread
* [mdk-re] Re: Кто нить программит ?
2001-12-27 9:33 ` Volkov Serge
2001-12-27 10:10 ` Roman Mediakov
@ 2001-12-27 10:27 ` Mikhail Zabaluev
2001-12-27 11:57 ` [mdk-re] Кто нить программит на пасквиле? Michael Shigorin
2 siblings, 0 replies; 10+ messages in thread
From: Mikhail Zabaluev @ 2001-12-27 10:27 UTC (permalink / raw)
To: mandrake-russian
Hello Volkov,
On Thu, Dec 27, 2001 at 09:29:54AM +0300, Volkov Serge wrote:
>
> On Thu, 27 Dec 2001 08:57:29 +0300
> Sergey Krivulja <skrivulja@erec.ru> wrote:
>
> > Hello mandrake-russian,
> >
> > Кто нить программит на Паскале?
> > Мне необходимо срочно написать прогу
> > на Паскале. В ней предусмотреть перенаправление ввода-вывода.
> > Например так - progr1 par1 par2 < in_file1 > out_file2
> > progr1 - имя самой программы
> > par1 - параметр1
> > par2 - параметр2
> > in_file1 - входной файл
> > out_file2 - выходной файл
> >
> > Неподкажет кто?
>
> Может я чего не понимаю, но решение мне витится такое
> как один из вариантов разобрать строку параметров
> и после этого если есть "<" и за ним "in_file1" то читаьт из этого файла
> если есть ">" и за ним "out_file2" писать в него ???
Э-э-э... если речь идет о самой программе, запускаемой из shell,
среди ее параметров не будет никаких < in_file1 и > out_file2. Эти
файлы откроет shell и отдаст программе как stdin и stdout.
P.S. И помните: Real Programmers don't use Pascal ;)
--
Stay tuned,
MhZ JID: mookid@jabber.org
___________
Be wary of strong drink. It can make you shoot at tax collectors and miss.
-- Lazarus Long, "Time Enough for Love"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [mdk-re] Кто нить программит на пасквиле?
2001-12-27 9:33 ` Volkov Serge
2001-12-27 10:10 ` Roman Mediakov
2001-12-27 10:27 ` [mdk-re] " Mikhail Zabaluev
@ 2001-12-27 11:57 ` Michael Shigorin
2 siblings, 0 replies; 10+ messages in thread
From: Michael Shigorin @ 2001-12-27 11:57 UTC (permalink / raw)
To: mandrake-russian
On Thu, Dec 27, 2001 at 09:29:54AM +0300, Volkov Serge wrote:
> Может я чего не понимаю, но решение мне витится такое
> как один из вариантов разобрать строку параметров
> и после этого если есть "<" и за ним "in_file1" то читаьт из этого файла
> если есть ">" и за ним "out_file2" писать в него ???
Да не будет этих параметров. Шелл сделает stdin и stdout из них,
не надо морочиться понапрасну :>
Просто читать/писать из fd 0/1 (не помню уже, как там в
пасквиле).
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ http://visa.chem.univ.kiev.ua/~mike/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [mdk-re] Кто нить программит ?
2001-12-27 8:52 [mdk-re] Кто нить программит ? Sergey Krivulja
2001-12-27 9:33 ` Volkov Serge
@ 2001-12-27 10:06 ` Roman Mediakov
2001-12-27 17:32 ` [mdk-re] " Mike
2 siblings, 0 replies; 10+ messages in thread
From: Roman Mediakov @ 2001-12-27 10:06 UTC (permalink / raw)
To: mandrake-russian
> Кто нить программит на Паскале?
Давно дело было...
> Мне необходимо срочно написать прогу
> на Паскале. В ней предусмотреть перенаправление ввода-вывода.
> Например так - progr1 par1 par2 < in_file1 > out_file2
> progr1 - имя самой программы
> par1 - параметр1
> par2 - параметр2
> in_file1 - входной файл
> out_file2 - выходной файл
Там, по моему, надо просто readln/writeln использовать - они
пишут/читают в стандартный поток. А как аргументы командной строки брать
- не помню, на Борланде работал, там это в каком-то модуле. Поищите на
http://www.filesearch.ru/ борландовский паскаль, попадается иногда, и
почитайте хелп из него.
> Неподкажет кто?
>
> --
> Best regards,
> Sergey mailto:skrivulja@erec.ru
>
>
>
> _______________________________________________
> Mandrake-russian mailing list
> Mandrake-russian@altlinux.ru
> http://altlinux.ru/mailman/listinfo/mandrake-russian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [mdk-re] Re: [mdk-re] Кто нить программит ?
2001-12-27 8:52 [mdk-re] Кто нить программит ? Sergey Krivulja
2001-12-27 9:33 ` Volkov Serge
2001-12-27 10:06 ` [mdk-re] Кто нить программит ? Roman Mediakov
@ 2001-12-27 17:32 ` Mike
2001-12-28 9:48 ` [mdk-re] " Sergey Krivulja
2001-12-28 11:45 ` ROmul
2 siblings, 2 replies; 10+ messages in thread
From: Mike @ 2001-12-27 17:32 UTC (permalink / raw)
To: Sergey Krivulja
SK> Hello mandrake-russian,
SK> Кто нить программит на Паскале?
SK> Мне необходимо срочно написать прогу
SK> на Паскале. В ней предусмотреть перенаправление ввода-вывода.
SK> Например так - progr1 par1 par2 < in_file1 > out_file2
SK> progr1 - имя самой программы
SK> par1 - параметр1
SK> par2 - параметр2
SK> in_file1 - входной файл
SK> out_file2 - выходной файл
SK> Неподкажет кто?
Sergey, не понял, а чем read/write не подошел? Параметры считывает
стандартная функция ParamStr(index : word):string; index - номер параметра
Под дос я похожую прогу не раз писал, а под линукс не пробовал,
компилятора нет ... :(
B4N
Mike,neo_mike@mail.ru, ICQ# 129412998
^ permalink raw reply [flat|nested] 10+ messages in thread
* [mdk-re] Re: [mdk-re] Re: [mdk-re] Кто нить программит ?
2001-12-27 17:32 ` [mdk-re] " Mike
@ 2001-12-28 9:48 ` Sergey Krivulja
2001-12-28 11:45 ` ROmul
1 sibling, 0 replies; 10+ messages in thread
From: Sergey Krivulja @ 2001-12-28 9:48 UTC (permalink / raw)
To: Mike
Hello Mike,
Thursday, December 27, 2001, 5:35:11 PM, you wrote:
M> SK> Hello mandrake-russian,
SK>> Кто нить программит на Паскале?
SK>> Мне необходимо срочно написать прогу
SK>> на Паскале. В ней предусмотреть перенаправление ввода-вывода.
SK>> Например так - progr1 par1 par2 < in_file1 > out_file2
А как на С это выглядеть будет?
SK>> progr1 - имя самой программы
SK>> par1 - параметр1
SK>> par2 - параметр2
SK>> in_file1 - входной файл
SK>> out_file2 - выходной файл
SK>> Неподкажет кто?
--
Best regards,
Sergey mailto:skrivulja@erec.ru
^ permalink raw reply [flat|nested] 10+ messages in thread
* [mdk-re] Re: [mdk-re] Re: [mdk-re] Кто нить программит ?
2001-12-27 17:32 ` [mdk-re] " Mike
2001-12-28 9:48 ` [mdk-re] " Sergey Krivulja
@ 2001-12-28 11:45 ` ROmul
2001-12-28 16:11 ` [mdk-re] " Mike
1 sibling, 1 reply; 10+ messages in thread
From: ROmul @ 2001-12-28 11:45 UTC (permalink / raw)
To: Mike
Мира тебе,Mike,
M> стандартная функция ParamStr(index : word):string; index - номер параметра
M> Под дос я похожую прогу не раз писал, а под линукс не пробовал,
M> компилятора нет ... :(
А как же Free Pascal Compilator?
---
ROmul,
The rubberheart...
HOMEPAGE: http://exit.webzone.ru
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2001-12-28 16:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-27 8:52 [mdk-re] Кто нить программит ? Sergey Krivulja
2001-12-27 9:33 ` Volkov Serge
2001-12-27 10:10 ` Roman Mediakov
2001-12-27 10:27 ` [mdk-re] " Mikhail Zabaluev
2001-12-27 11:57 ` [mdk-re] Кто нить программит на пасквиле? Michael Shigorin
2001-12-27 10:06 ` [mdk-re] Кто нить программит ? Roman Mediakov
2001-12-27 17:32 ` [mdk-re] " Mike
2001-12-28 9:48 ` [mdk-re] " Sergey Krivulja
2001-12-28 11:45 ` ROmul
2001-12-28 16:11 ` [mdk-re] " Mike
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