Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #8404 > unrolled thread

compile C programs for both sunstudio and Visual studio

Started byhappytoday <ehabaziz2001@gmail.com>
First post2011-07-17 22:49 -0500
Last post2011-07-19 17:40 -0500
Articles 6 on this page of 26 — 13 participants

Back to article view | Back to comp.lang.c


Contents

  compile C programs for both sunstudio and Visual studio happytoday <ehabaziz2001@gmail.com> - 2011-07-17 22:49 -0500
    Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 12:34 +0100
      Re: compile C programs for both sunstudio and Visual studio "Heinrich Wolf" <invalid@invalid.invalid> - 2011-07-18 15:34 +0200
        Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 14:53 +0100
          Re: compile C programs for both sunstudio and Visual studio Virchanza <virtual@lavabit.com> - 2011-07-18 07:31 -0700
            Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 15:38 +0100
              Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-18 14:08 -0400
                Re: compile C programs for both sunstudio and Visual studio Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 19:18 +0100
        Re: compile C programs for both sunstudio and Visual studio Nobody <nobody@nowhere.com> - 2011-07-19 00:41 +0100
          Re: compile C programs for both sunstudio and Visual studio Ian Collins <ian-news@hotmail.com> - 2011-07-19 11:47 +1200
            Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-18 19:08 -0700
              Re: compile C programs for both sunstudio and Visual studio Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-22 14:58 +0300
                Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-22 09:42 -0700
                  Re: compile C programs for both sunstudio and Visual studio Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-22 22:32 +0300
                    Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-22 13:16 -0700
            Re: compile C programs for both sunstudio and Visual studio Nobody <nobody@nowhere.com> - 2011-07-19 12:56 +0100
      Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-18 14:06 -0400
      Re: compile C programs for both sunstudio and Visual studio Keith Thompson <kst-u@mib.org> - 2011-07-18 11:11 -0700
    Re: compile C programs for both sunstudio and Visual studio Geoff <geoff@invalid.invalid> - 2011-07-18 18:06 -0500
    Re: compile C programs for both sunstudio and Visual studio "Waldek M." <wm@localhost.localdomain> - 2011-07-18 18:07 -0500
    Re: compile C programs for both sunstudio and Visual studio BGB <cr88192@hotmail.com> - 2011-07-18 18:07 -0500
    Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-19 17:40 -0500
      Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-20 10:43 +0200
      Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-30 01:48 -0500
      Re: compile C programs for both sunstudio and Visual studio Kenneth Brody <kenbrody@spamcop.net> - 2011-07-30 01:48 -0500
    Re: compile C programs for both sunstudio and Visual studio "io_x" <a@b.c.invalid> - 2011-07-19 17:40 -0500

Page 2 of 2 — ← Prev page 1 [2]


#8463

FromBGB <cr88192@hotmail.com>
Date2011-07-18 18:07 -0500
Message-ID<clcm-20110718-0003@plethora.net>
In reply to#8404
On 7/17/2011 8:49 PM, happytoday wrote:
> I comile C programs for bothe platforms : sunstudio using cc , visual
> studio 6 . Is there a command to differeniate which platform I compile
> for . That in order to use the the system command .
>
> For example :
>
> If (unixplatform)
> system("clear");
> else
> system("cls")

partial answer:
#ifdef

downside:
can get very nasty very fast if wide portability is a concern (but 
generally works well enough in the common case where the number of 
relevant combinations of target OS/CPU/... in question is small enough 
to be counted using a single hand).


others would likely advise not depending on system-specific behaviors 
when possible.
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

[toc] | [prev] | [next] | [standalone]


#8513

From"io_x" <a@b.c.invalid>
Date2011-07-19 17:40 -0500
Message-ID<clcm-20110719-0001@plethora.net>
In reply to#8404
"happytoday" <ehabaziz2001@gmail.com> ha scritto nel messaggio
news:clcm-20110717-0005@plethora.net...
>I comile C programs for bothe platforms : sunstudio using cc , visual
> studio 6 . Is there a command to differeniate which platform I compile
> for . That in order to use the the system command .
>
> For example :
>
> If (unixplatform)
> system("clear");
> else
> system("cls")

// print 80*500 lines
int clear(void)
{unsigned  i;
 for(i=0; i<(80*500); ++i)
       printf("\n");
}

possibly it is a little slow

> -- 
> comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
> have an appropriate newsgroups line in your header for your mail to be seen,
> or the newsgroup name in square brackets in the subject line.  Sorry.
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

[toc] | [prev] | [next] | [standalone]


#8527

From"io_x" <a@b.c.invalid>
Date2011-07-20 10:43 +0200
Message-ID<4e2694bb$0$44211$4fafbaef@reader1.news.tin.it>
In reply to#8513
"io_x" <a@b.c.invalid> ha scritto nel messaggio 
news:clcm-20110719-0001@plethora.net...
> "happytoday" <ehabaziz2001@gmail.com> ha scritto nel messaggio
> news:clcm-20110717-0005@plethora.net...
>>I comile C programs for bothe platforms : sunstudio using cc , visual
>> studio 6 . Is there a command to differeniate which platform I compile
>> for . That in order to use the the system command .
>>
>> For example :
>>
>> If (unixplatform)
>> system("clear");
>> else
>> system("cls")
>
> // print 80*500 lines
> int clear(void)
> {unsigned  i;
> for(i=0; i<(80*500); ++i)
>       printf("\n");
> }
>
> possibly it is a little slow

it is not ok because not position the cursor on pos (0,0)
in the window

[toc] | [prev] | [next] | [standalone]


#8891

From"io_x" <a@b.c.invalid>
Date2011-07-30 01:48 -0500
Message-ID<clcm-20110730-0001@plethora.net>
In reply to#8513
"io_x" <a@b.c.invalid> ha scritto nel messaggio 
news:clcm-20110719-0001@plethora.net...
> "happytoday" <ehabaziz2001@gmail.com> ha scritto nel messaggio
> news:clcm-20110717-0005@plethora.net...
>>I comile C programs for bothe platforms : sunstudio using cc , visual
>> studio 6 . Is there a command to differeniate which platform I compile
>> for . That in order to use the the system command .
>>
>> For example :
>>
>> If (unixplatform)
>> system("clear");
>> else
>> system("cls")
>
> // print 80*500 lines
> int clear(void)
> {unsigned  i;
> for(i=0; i<(80*500); ++i)
>       printf("\n");
> }
>
> possibly it is a little slow

this is wrong because at end i have position
the cursor to the top: in (0, 0)
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

[toc] | [prev] | [next] | [standalone]


#8892

FromKenneth Brody <kenbrody@spamcop.net>
Date2011-07-30 01:48 -0500
Message-ID<clcm-20110730-0002@plethora.net>
In reply to#8513
On 7/19/2011 6:40 PM, io_x wrote:
> "happytoday"<ehabaziz2001@gmail.com>  ha scritto nel messaggio
> news:clcm-20110717-0005@plethora.net...
>> I comile C programs for bothe platforms : sunstudio using cc , visual
>> studio 6 . Is there a command to differeniate which platform I compile
>> for . That in order to use the the system command .
>>
>> For example :
>>
>> If (unixplatform)
>> system("clear");
>> else
>> system("cls")
>
> // print 80*500 lines
> int clear(void)
> {unsigned  i;
>   for(i=0; i<(80*500); ++i)
>         printf("\n");
> }
>
> possibly it is a little slow

And a little inefficient on a DecWriter.

-- 
Kenneth Brody
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

[toc] | [prev] | [next] | [standalone]


#8514

From"io_x" <a@b.c.invalid>
Date2011-07-19 17:40 -0500
Message-ID<clcm-20110719-0002@plethora.net>
In reply to#8404
"happytoday" <ehabaziz2001@gmail.com> ha scritto nel messaggio
news:clcm-20110717-0005@plethora.net...
>I comile C programs for bothe platforms : sunstudio using cc , visual
> studio 6 . Is there a command to differeniate which platform I compile
> for . That in order to use the the system command .
>
> For example :
>
> If (unixplatform)
> system("clear");
> else
> system("cls")

// print 80*500 lines
int clear(void)
{unsigned  i;
 for(i=0; i<(80*500); ++i)
       printf("\n");
}

possibly it is a little slow

> -- 
> comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
> have an appropriate newsgroups line in your header for your mail to be seen,
> or the newsgroup name in square brackets in the subject line.  Sorry.
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c


csiph-web