>Hello,
>I am really new to programming in general but I have this project
>where I need to use C# and I can't figure out something.
Wrong newsgroup.
>The way it works, I need to run an executable file and take a text
>file as input.
>According to the documentation , from DOS, I would simply have to type
>the following:
>C:/program_name.exe C:/program_command.txt
>This is pretty much the same way in Matlab by the way.
>Does anyone know how to do this in C#?
No. If you were asking about C, I'd say system();
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
The *ONLY* way in portable ANSI C to run another program
is system(). And the strings you pass it are system-dependent.
This newsgroup and the above comment apply to C. It may or may not
apply to C#, whatever that is, but my guess is that you don't have
a license to ask questions about this to anyone but Microsoft (nor
does anyone else).
>According to the documentation , from DOS, I would simply have to type
>the following:
>C:/program_name.exe C:/program_command.txt
>This is pretty much the same way in Matlab by the way.
>Does anyone know how to do this in C#?
>I would really appreciate any help as I struggled the last few days
>and it does not seem like something that should be very difficult to
>figure out.
Gordon L. Burditt
> I am really new to programming in general but I have this project
> where I need to use C# and I can't figure out something.
<...>
What the heck is C#? This is a C group.
Try
news:microsoft.public.dotnet.languages.csharp
(Personnal advice : drop C#, stick to C, C++ and Java)
--
-ed- emdel at noos.fr
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
C-library: http://www.dinkumware.com/htm_cl/index.html
"Mal nommer les choses c'est ajouter du malheur au monde."
Albert Camus.
##include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
printf("C# is roughly between %f and %f Hertz\n",
435.0 * pow(2.0, 1.0 / 3.0),
445.0 * pow(2.0, 1.0 / 3.0));
return EXIT_SUCCESS;
}
Robert, supposing there is a "C" answer for more things between heaven and
earth than man can imagine :-)
I think you're a little sharp. Your estimates (halved to bring them
closer to middle C) work out as
274.03282835213491333686830708301
and
280.33243360160927916070436011941
I make C# closer to
271.22255215597958772782727550626
which I derive from 256.0 * pow(2.0, 1.0/12.0)
Perhaps we should take this up in rec.music or whatever. :-)
--
Richard Heathfield : bin...@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
In what system kind of system is C# a half-tone above 256 Hz? It looks
like you have been dealing with binary numbers for too long ;-) What I
would mind about Robert Stankowic's answer is that he assumes that
everyone is tuning his instrument to about A = 440 Hz, which a lot
people don't do.I for one often use a 415 Hz tuning fork (with C# being
261.433618 Hz) - but when you play with people with a keyboard instrument
you have to use what they have anyway ;-) And, of course, these formulas
only work when you use this horrible "well-tempered" (as it is nowadays
falsely called) system of tuning ...
Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Jens.T...@physik.fu-berlin.de
_ | | | | | | AG Moebius, Institut fuer Molekuelphysik
| |_| | | | | | Fachbereich Physik, Freie Universitaet Berlin
\___/ens|_|homs|_|oerring Tel: ++49 (0)30 838 - 53394 / FAX: - 56046
>Robert Stankowic wrote:
>>
>>
>> ##include <stdio.h>
>> #include <stdlib.h>
>> #include <math.h>
>>
>> int main(void)
>> {
>> printf("C# is roughly between %f and %f Hertz\n",
>> 435.0 * pow(2.0, 1.0 / 3.0),
>> 445.0 * pow(2.0, 1.0 / 3.0));
>> return EXIT_SUCCESS;
>> }
>>
>> Robert, supposing there is a "C" answer for more things between heaven and
>> earth than man can imagine :-)
>
>I think you're a little sharp. Your estimates (halved to bring them
>closer to middle C) work out as
>
> 274.03282835213491333686830708301
>
>and
>
> 280.33243360160927916070436011941
>
>
> I make C# closer to
>
> 271.22255215597958772782727550626
>
>which I derive from 256.0 * pow(2.0, 1.0/12.0)
>
>Perhaps we should take this up in rec.music or whatever. :-)
The following is utterly OT, and maybe utterly wrong:
A above middle C is usually taken to be 440 Hz. To get from one note
to the next in the scale, one would multiply the frequency by the 12th
root of 2. C# is 4 notes past A, so the frequency would be about
440*pow(pow(2.0, 1.0/12.0), 4)
Which is about 554.365 Hz. Of course, this isn't the *only* C#. The
one you are looking for is half the frequency (one octave lower), at
about 277.183 Hz.
-Kevin
> The following is utterly OT, and maybe utterly wrong:
>
> A above middle C is usually taken to be 440 Hz. To get from one note
bzzt... middle A (A3) is 440 Hz.
> bzzt... middle A (A3) is 440 Hz.
A4 actually...
>In 'comp.lang.c', Emmanuel Delahaye <emdel...@noos.fr> wrote in
>news:Xns926215C0355...@130.133.1.4:
>
>> bzzt... middle A (A3) is 440 Hz.
>
>A4 actually...
I searched for the terms (middle c frequency) on Google and the first
two documents returned caught my eye. The first contained this quote:
"A440 is the musical note A above middle C."
The second contained this quote:
"If the piano is properly tuned, middle C has a frequency of 256
cycles per second..."
Both of these back up my claim somewhat, but they are inconsistent
with each other. The second explains why Mr. Heathfield was using 256
(which a few of us apparently thought strange).
I suppose it's safe to say that there is more than one standard for
musical pitch.
-Kevin