Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM

[ARCHIVED THREAD] - Comp Program (Page 1 of 2)

Previous Page
/ 2
Next Page
11/14/2005 6:59:29 PM EDT


Thanks

Scott
11/14/2005 7:00:48 PM EDT
[#1]
Quick question: Why can't you write it yourself?
11/14/2005 7:02:17 PM EDT
[#2]

Quoted:
Quick question: Why can't you write it yourself?



I don't remember how to do it.  I don't have the time.  I have 3 other (more important) project to do.  

I will not be tested over it.

I took the class several years ago.
11/14/2005 7:04:05 PM EDT
[#3]

Quoted:
www.hunt101.com/img/344158.jpg

www.hunt101.com/img/344153.jpg

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



Tell this guy

To ask this guy
11/14/2005 7:04:06 PM EDT
[#4]

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



so, if i write it in php using gd libraries to output graphs and wrap it in c++, do you think your teacher would notice?
11/14/2005 7:06:11 PM EDT
[#5]

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



so, if i write it in php using gd libraries to output graphs and wrap it in c++, do you think your teacher would notice?



I don't know what "php" and "gd" are.
11/14/2005 7:07:36 PM EDT
[#6]

Quoted:

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



so, if i write it in php using gd libraries to output graphs and wrap it in c++, do you think your teacher would notice?



I don't know what "php" and "gd" are.



PHP is a programming language (and a damn fine one at that), and gd is a graphics library.
11/14/2005 7:09:08 PM EDT
[#7]
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?
11/14/2005 7:10:34 PM EDT
[#8]

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.  My teacher for this was from India.  Terrible English.  Nobody had a clue what was going on.  The only reason I got a good grade was he gave out extra credit for showing up to class because the grades were so low.

He doesn't teach the class anymore BTW.

It must be in Fortran or C.
11/14/2005 7:11:28 PM EDT
[#9]

Quoted:

Quoted:

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



so, if i write it in php using gd libraries to output graphs and wrap it in c++, do you think your teacher would notice?



I don't know what "php" and "gd" are.



PHP is a programming language (and a damn fine one at that), and gd is a graphics library.



I don't think that will work.
11/14/2005 7:13:24 PM EDT
[#10]

Quoted:

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.

It must be in Fortran or C.



Okay...

..why?
11/14/2005 7:14:24 PM EDT
[#11]

Quoted:

Quoted:

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.

It must be in Fortran or C.



Okay...

..why?



My instructor only knows Fortran or C.
11/14/2005 7:15:00 PM EDT
[#12]

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



Tell this guy siweb.dss.go.th/Science_Children/images/Rudolph%20Diesel/rudolph_diesel.jpg

To ask this guy www.gr8st8.com/images/Personalities/Bill_Gates.jpg



and those guys can pay this guy to actually make it work:

11/14/2005 7:15:57 PM EDT
[#13]

Quoted:

Quoted:

Quoted:

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.

It must be in Fortran or C.



Okay...

..why?



My instructor only knows Fortran or C.



Eh, fine. Does it have to be compiled for a specific platform? Can I give you a Linux binary?
11/14/2005 7:16:00 PM EDT
[#14]

Quoted:

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



Tell this guy siweb.dss.go.th/Science_Children/images/Rudolph%20Diesel/rudolph_diesel.jpg

To ask this guy www.gr8st8.com/images/Personalities/Bill_Gates.jpg



and those guys can pay this guy to actually make it work:

www.pro-linux.de/NB2/images/indiv/Torvalds_Linus.jpg



11/14/2005 7:16:08 PM EDT
[#15]

Quoted:

Quoted:

Quoted:

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.

It must be in Fortran or C.



Okay...

..why?



My instructor only knows Fortran or C.



lol, then write it in Pearl.

man, you realize that's pretty easy.

when do you need this by?

I can do it in C++
11/14/2005 7:16:35 PM EDT
[#16]

Quoted:

Quoted:

Quoted:
www.hunt101.com/img/344158.jpg</a>

www.hunt101.com/img/344153.jpg</a>

If anyone could write this for me, I am willing to give away free AR parts.  It can be either Fortran, C, or C++ Language.

Thanks

Scott



Tell this guy siweb.dss.go.th/Science_Children/images/Rudolph%20Diesel/rudolph_diesel.jpg

To ask this guy www.gr8st8.com/images/Personalities/Bill_Gates.jpg



and those guys can pay this guy to actually make it work:

www.pro-linux.de/NB2/images/indiv/Torvalds_Linus.jpg



11/14/2005 7:17:20 PM EDT
[#17]

Quoted:

Quoted:

Quoted:

Quoted:

Quoted:
1. Is your problem one of not understanding the math involved, or can you just not write a program?

2. Does it HAVE to be in C or Fortran? Can it be web based?



I have no clue how to write the program and I don't have time to learn.

It must be in Fortran or C.



Okay...

..why?



My instructor only knows Fortran or C.



Eh, fine. Does it have to be compiled for a specific platform? Can I give you a Linux binary?



dude, he's gonna want the source - not the a.out
11/14/2005 7:19:32 PM EDT
[#18]
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.
11/14/2005 7:20:21 PM EDT
[#19]

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



Is this a computer science course or did your instructor just randomly require you to write code? Is knowledge of C or FORTRAN a prereq for the course?
11/14/2005 7:20:48 PM EDT
[#20]

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



if you wanted to be a smart -alec, you could turn in the compiled machine code
11/14/2005 7:21:46 PM EDT
[#21]

Quoted:

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



if you wanted to be a smart -alec, you could turn in the compiled machine code



Or just program it in Assembly. That'd also throw him for a loop.

Fuck him, do it in BASIC
11/14/2005 7:22:43 PM EDT
[#22]
Hey wait a minute...why am I considering doing your homework for you?

What kind of AR parts are we talking, here? How bad do you want this done?
11/14/2005 7:23:14 PM EDT
[#23]

Quoted:

Quoted:

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



if you wanted to be a smart -alec, you could turn in the compiled machine code



Or just program it in Assembly. That'd also throw him for a loop.

Fuck him, do it in BASIC



with that small of values, it wouldn't be hard to do it in X86 assembly.
11/14/2005 7:23:58 PM EDT
[#24]

Quoted:
Hey wait a minute...why am I considering doing your homework for you?

What kind of AR parts are we talking, here? How bad do you want this done?



+1.

- i want an ACOG.
11/14/2005 7:25:54 PM EDT
[#25]

Quoted:

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



Is this a computer science course or did your instructor just randomly require you to write code? Is knowledge of C or FORTRAN a prereq for the course?



It is a Thermo 2 course (mech engineering).

Heres the catch.  We are required to take this Fortran class which I already did.  However it is not a prereq for anything.  They have now changed this course to a MATLAB based course, so they are not even teaching Fortran anymore.  Some people in this Thermo class haven't even had Fortran because they took the computer course after it changed to MATLAB.

He is just making use randomly write code.  He his a computer wiz and gets off on this stuff.
11/14/2005 7:28:45 PM EDT
[#26]

Quoted:

PHP is a programming language (and a damn fine one at that), and gd is a graphics library.



Obviously a network technician and not a software engineer
11/14/2005 7:29:55 PM EDT
[#27]

Quoted:

Quoted:

PHP is a programming language (and a damn fine one at that), and gd is a graphics library.



Obviously a network technician and not a software engineer



You must be one of those multiple inheritance snobs.


11/14/2005 7:30:52 PM EDT
[#28]
10 NEW
20 PRINT "<Begin Chart Generation>See Figure 8-22 on page 464<End of Chart Generation>"
' To throw something fun in...
30 GOTO 20
40 END
11/14/2005 7:32:04 PM EDT
[#29]

Quoted:

Quoted:

Quoted:

PHP is a programming language (and a damn fine one at that), and gd is a graphics library.



Obviously a network technician and not a software engineer



You must be one of those multiple inheritance snobs.




Guilty as charged!  Actually, I like PHP just fine and v5 fixed a lot of my biggest issues with it.   I've been using it since v3, however, and like fine wine it is getting better with age....

...but it's still not C++
11/14/2005 7:35:03 PM EDT
[#30]
if you could post the function used to generate the points on the graph, i'll do it.
11/14/2005 8:04:11 PM EDT
[#31]

Quoted:
It is a Thermo 2 course (mech engineering).

Heres the catch.  We are required to take this Fortran class which I already did.  However it is not a prereq for anything.  They have now changed this course to a MATLAB based course, so they are not even teaching Fortran anymore.  Some people in this Thermo class haven't even had Fortran because they took the computer course after it changed to MATLAB.

He is just making use randomly write code.  He his a computer wiz and gets off on this stuff.



I freakin LOVE MATLAB. That was my best friend in college.
11/14/2005 8:04:12 PM EDT
[#32]
a good template someone may use, i have no idea what function is being graphed.
fill in the "do calculation" part an viola. - i think.


#include <iostream>

using namespace std;

int calc(float r_c, float k, float r_min, float r_max)
{

// z == your funny character;probably should have used an 'n'
float z;

//do calculation

//[insert make-it-work code]

//output values
cout << r_c << ", " << z << endl;
return 0;

}


// use as ./a.out <r_c> <k> <r_min> <r_max>
int main( int argc, char *argv[])
{
if( argc < 5)
{
cout << "usage: requires 4 parameters\n";
       cout << "order of params:   <r_c> <k> <r_min> <r_max>"
exit(1);
}

float r_c = atof(argv[1]);
float k =   atof(argv[2]);
float r_min= atof(argv[3]);
float r_max=   atof(argv[4]);


for(r_min = atof(argv[3]); r_min < r_max; r_min++)
{

//pass in the values used to calculate

      calc(r_c,k,r_min,r_max);

}


return 0;
}

11/14/2005 8:43:47 PM EDT
[#33]

Quoted:

Quoted:

Quoted:

Quoted:

PHP is a programming language (and a damn fine one at that), and gd is a graphics library.



Obviously a network technician and not a software engineer



You must be one of those multiple inheritance snobs.




Guilty as charged!  Actually, I like PHP just fine and v5 fixed a lot of my biggest issues with it.   I've been using it since v3, however, and like fine wine it is getting better with age....

...but it's still not C++



Actually, PHP is just a web friendly extension of C.  Pretty much like Java was in the early days except PHP has the potential to be better.
11/14/2005 10:03:56 PM EDT
[#34]

Quoted:
if you could post the function used to generate the points on the graph, i'll do it.



I will try to get that done.
11/15/2005 4:27:55 AM EDT
[#35]

Quoted:
Actually, PHP is just a web friendly extension of C.  Pretty much like Java was in the early days except PHP has the potential to be better.



I think I'd give it more credit than that; it has a simple object model and is not strongly typed as are C and Java.   For newbies, the lack of pointers makes things easier.    OTOH, it completely lacked the notion of public/private class methods & members until v5 which made it difficult to take as a "real" programming language.   I think it is also very easy to write bad code using PHP, even moreso than other languages, due to the lack of strong type checking.  I like it and think it is awesome for what it was designed for - a server side web scripting tool.   I cringe when I see it forced into doing tasks that would be better suited to something like python, Java, or C++.
11/15/2005 8:22:38 AM EDT
[#36]
I talked to my instructor today.  He says I only have to generate 1 figure out of the 4 present on the graph.

He said to let:

r_min = 2
r_max = 24
delta_r = 0.1

Lets generate r_c = 4

The equation needed is:

n = 1 - (1/(r^(k-1)))*(((rc^k)-1)/(k(rc-1)))
11/15/2005 8:50:20 AM EDT
[#37]
You'll also need the formula for the first derivative dr/dn.
11/15/2005 3:20:17 PM EDT
[#38]
I think the math is right.

Anyway, it works.

name it something like filename.cpp



/***************************************************
Name: Arfcom Looter
Class: CSwannabe
Date: 10/22/.38

Compile using g++ on any *nix system.
g++ <filename>

Run with parameters as follows:
./a.out <r_c> <k> <r_min> <r_max>

for instance: ./a.out 4 1.4 2 24


Output is displayed on the screen and to a file named "data.txt"
******************************************************/

#include <iostream>
#include <math.h>
#include <fstream>

using namespace std;

int calc(float r_c, float k, float r_min, float r_max)
{


float n;

float x = pow(r_min, k-1);
float y = pow(4,1.4);

n = 1 - (1/x)*(y-1)/(1.4*3);

if(n < 0)
{n=0;}

//debug code
//cout << "r_min: " << r_min << endl;
//cout << "x: " << x <<endl;
//cout << "y: " << y << endl;
//cout << "r_c: " << r_c << endl << endl;

cout << "(" <<  r_min << ", " << n << ")" << endl;

//output to file
//not efficient, but good enough
ofstream a_file ( "data.txt", ios::app );
a_file  << "(" <<  r_min << ", " << n << ")" << endl;
a_file.close();

return 0;

}


// use as ./a.out <r_c> <k> <r_min> <r_max>
int main( int argc, char *argv[])
{
       if( argc < 5)
       {
       cout << "usage: requires 4 parameters\n";
       cout << "order of params:   <r_c> <k> <r_min> <r_max>\n";
       exit(1);
       }

float r_c =     atof(argv[1]);
float k =       1.4; //atof(argv[2]);
float r_min=    atof(argv[3]);
float r_max=    atof(argv[4]);
float delta_r = 0.1;

       for(r_min = atof(argv[3]); r_min < r_max; r_min = r_min+delta_r)
       {

       //pass in the values used to calculate

      calc(r_c,k,r_min,r_max);

       }


return 0;
}




sample output (to screen and a file named "data.txt"):

# ./a.out 4 1.4 2 24 | less
(2, 0)
(2.1, 0)
(2.2, 0)
(2.3, 0)
(2.4, 0)
(2.5, 0.0156675)
(2.6, 0.0309894)
(2.7, 0.0455079)
(2.8, 0.0592924)
(2.9, 0.0724044)
(3, 0.0848983)
(3.1, 0.0968223)
(3.2, 0.10822)
(3.3, 0.119129)
(3.4, 0.129585)
(3.5, 0.139619)
(3.6, 0.14926)
(3.7, 0.158533)
(3.8, 0.167461)
(3.9, 0.176067)
(4, 0.184369)
(4.1, 0.192385)
(4.2, 0.200132)
(4.3, 0.207625)
(4.4, 0.214879)
(4.5, 0.221904)
(4.6, 0.228715)
(4.7, 0.235322)
(4.8, 0.241734)
(4.9, 0.247963)
(5, 0.254015)
(5.1, 0.259901)
(5.2, 0.265627)
(5.3, 0.271201)
(5.4, 0.27663)
(5.5, 0.28192)
(5.6, 0.287077)
(5.7, 0.292106)
(5.8, 0.297014)
(5.9, 0.301804)
(6, 0.306482)
(6.1, 0.311053)
(6.2, 0.315519)
(6.3, 0.319886)
(6.4, 0.324157)
(6.5, 0.328335)
(6.6, 0.332425)
(6.7, 0.336428)
(6.8, 0.340349)
(6.9, 0.34419)
(7, 0.347953)
(7.1, 0.351642)
(7.2, 0.35526)
(7.29999, 0.358807)
(7.39999, 0.362287)
(7.49999, 0.365702)
(7.59999, 0.369054)
(7.69999, 0.372344)
(7.79999, 0.375575)
(7.89999, 0.378749)
(7.99999, 0.381867)
(8.09999, 0.384931)
(8.2, 0.387942)
(8.3, 0.390903)
(8.4, 0.393814)
(8.5, 0.396676)
(8.6, 0.399492)
(8.7, 0.402263)
(8.8, 0.404989)
(8.9, 0.407673)
(9, 0.410314)
(9.1, 0.412915)
(9.2, 0.415476)
(9.3, 0.417998)
(9.4, 0.420482)
(9.5, 0.42293)
(9.6, 0.425342)
(9.7, 0.427719)
(9.8, 0.430062)
(9.9, 0.432372)
(10, 0.434649)
(10.1, 0.436895)
(10.2, 0.43911)
(10.3, 0.441295)
(10.4, 0.44345)
(10.5, 0.445576)
(10.6, 0.447674)
(10.7, 0.449745)
(10.8, 0.451788)
(10.9, 0.453806)
(11, 0.455797)
(11.1, 0.457764)
(11.2, 0.459706)
(11.3, 0.461623)
(11.4, 0.463517)
(11.5, 0.465388)
(11.6, 0.467236)
(11.7, 0.469063)
(11.8, 0.470867)
(11.9, 0.47265)
(12, 0.474412)
(12.1, 0.476154)
(12.2, 0.477876)
(12.3, 0.479578)
(12.4, 0.481261)
(12.5, 0.482925)
(12.6, 0.48457)
(12.7, 0.486198)
(12.8, 0.487807)
(12.9, 0.489399)
(13, 0.490974)
(13.1, 0.492531)
(13.2, 0.494073)
(13.3, 0.495598)
(13.4, 0.497107)
(13.5, 0.4986)
(13.6, 0.500078)
(13.7, 0.501541)
(13.8, 0.502989)
(13.9, 0.504422)
(14, 0.505841)
(14.1, 0.507246)
(14.2, 0.508637)
(14.3, 0.510015)
(14.4, 0.511378)
(14.5, 0.512729)
(14.6, 0.514067)
(14.7, 0.515392)
(14.8, 0.516704)
(14.9, 0.518004)
(15, 0.519292)
(15.1, 0.520568)
(15.2, 0.521832)
(15.3, 0.523085)
(15.4, 0.524326)
(15.5, 0.525556)
(15.6, 0.526775)
(15.7, 0.527983)
(15.8, 0.52918)
(15.9, 0.530367)
(16, 0.531543)
(16.1, 0.532709)
(16.2, 0.533865)
(16.3, 0.535011)
(16.4, 0.536147)
(16.5, 0.537274)
(16.6, 0.538391)
(16.7, 0.539499)
(16.8, 0.540597)
(16.9, 0.541686)
(17, 0.542767)
(17.1, 0.543838)
(17.2, 0.544901)
(17.3, 0.545955)
(17.4, 0.547)
(17.5, 0.548038)
(17.6, 0.549067)
(17.7, 0.550087)
(17.8, 0.5511)
(17.9, 0.552105)
(18, 0.553102)
(18.1, 0.554091)
(18.2, 0.555073)
(18.3, 0.556047)
(18.4, 0.557014)
(18.5, 0.557973)
(18.6, 0.558925)
(18.7, 0.55987)
(18.8, 0.560808)
(18.9, 0.561739)
(19, 0.562663)
(19.1, 0.563581)
(19.2, 0.564491)
(19.3, 0.565395)
(19.4, 0.566293)
(19.5, 0.567184)
(19.6, 0.568068)
(19.7, 0.568947)
(19.8, 0.569819)
(19.9, 0.570685)
(20, 0.571545)
(20.1, 0.572399)
(20.2, 0.573247)
(20.3, 0.574089)
(20.4, 0.574925)
(20.5, 0.575756)
(20.6, 0.576581)
(20.7, 0.5774)
(20.8, 0.578214)
(20.9, 0.579022)
(21, 0.579825)
(21.1, 0.580623)
(21.2, 0.581416)
(21.3, 0.582203)
(21.4, 0.582985)
(21.5, 0.583762)
(21.6, 0.584534)
(21.7, 0.5853)
(21.8, 0.586062)
(21.9, 0.58682)
(22, 0.587572)
(22.1, 0.588319)
(22.2, 0.589062)
(22.3, 0.5898)
(22.4, 0.590534)
(22.5, 0.591263)
(22.6, 0.591987)
(22.7001, 0.592707)
(22.8001, 0.593422)
(22.9001, 0.594133)
(23.0001, 0.59484)
(23.1001, 0.595543)
(23.2001, 0.596241)
(23.3001, 0.596935)
(23.4001, 0.597625)
(23.5001, 0.598311)
(23.6001, 0.598992)
(23.7001, 0.59967)
(23.8001, 0.600344)
(23.9001, 0.601013)
#
11/15/2005 3:24:15 PM EDT
[#39]
Man...... All I remember is BASIC on my Commodore 64.
11/15/2005 3:38:34 PM EDT
[#40]
Hey, that graph is from a Cengel and Boles Thermodynamics book!

Ahh, the memories.






Yerg! My BRAIN!!!  


Sorry, I learned some FORTRAN, but I dont remember it. I just recognised the picture.
11/15/2005 3:51:38 PM EDT
[#41]

Quoted:
Man...... All I remember is BASIC on my Commodore 64.



PRINT "Hello World!"
11/15/2005 4:41:09 PM EDT
[#42]

Quoted:

Quoted:
Actually, PHP is just a web friendly extension of C.  Pretty much like Java was in the early days except PHP has the potential to be better.



I think I'd give it more credit than that; it has a simple object model and is not strongly typed as are C and Java.   For newbies, the lack of pointers makes things easier.    OTOH, it completely lacked the notion of public/private class methods & members until v5 which made it difficult to take as a "real" programming language.   I think it is also very easy to write bad code using PHP, even moreso than other languages, due to the lack of strong type checking.  I like it and think it is awesome for what it was designed for - a server side web scripting tool.   I cringe when I see it forced into doing tasks that would be better suited to something like python, Java, or C++.



PHP is written in C as was the early versions of C++ and Java.  I remember writing many programs that had the interim compile step changing C++ to C code.  JVM's are still written in C for the most part.  Does that make PHP less of a language.  Nope.  Consider that C is based upon Assembler.
11/15/2005 4:47:14 PM EDT
[#43]

Quoted:
PHP is written in C as was the early versions of C++ and Java.  I remember writing many programs that had the interim compile step changing C++ to C code.  JVM's are still written in C for the most part.  Does that make PHP less of a language.  Nope.  Consider that C is based upon Assembler.



C... the closest to Assembler you can get... without doing Assembly. God I love it.
11/15/2005 5:29:43 PM EDT
[#44]

Quoted:

Quoted:
PHP is written in C as was the early versions of C++ and Java.  I remember writing many programs that had the interim compile step changing C++ to C code.  JVM's are still written in C for the most part.  Does that make PHP less of a language.  Nope.  Consider that C is based upon Assembler.



C... the closest to Assembler you can get... without doing Assembly. God I love it.



no reason to miss out on the fun... you can code inline assembly into your C code if you know your compiler.
11/15/2005 5:32:23 PM EDT
[#45]

Quoted:

Quoted:

Quoted:
PHP is written in C as was the early versions of C++ and Java.  I remember writing many programs that had the interim compile step changing C++ to C code.  JVM's are still written in C for the most part.  Does that make PHP less of a language.  Nope.  Consider that C is based upon Assembler.



C... the closest to Assembler you can get... without doing Assembly. God I love it.



no reason to miss out on the fun... you can code inline assembly into your C code if you know your compiler.



Oh I know. Sometimes I load up DOSBox and use TASM and make some ASM code for shits and giggles.
11/15/2005 5:37:45 PM EDT
[#46]
Is Fortran still around?  

Gee, I don't know if I can do it without a card punch machine.

Dude, Fortran is more than 35 years old... at least.
11/15/2005 5:39:19 PM EDT
[#47]

Quoted:
PHP is written in C as was the early versions of C++ and Java.  I remember writing many programs that had the interim compile step changing C++ to C code.  JVM's are still written in C for the most part.  Does that make PHP less of a language.  Nope.  Consider that C is based upon Assembler.



Blech...I hated cfront.    

Most popular C compilers today are written in C or C++, as it turns out.  The GNU toolchain is... C.   The IBM line of compilers is... C.    Microsoft's tools?  Largely C, with lots of other stuff broadly used within their IDE.   Watcom's C compiler?  Digital Mar's C compiler?  Yup...C.

It really make sense, if you think about it - most parser generators (including the infamous yacc/lexx duo) spit C code out.  

BTW - my day job is writing compilers

11/15/2005 6:04:00 PM EDT
[#48]

Quoted:
Is Fortran still around?  

Gee, I don't know if I can do it without a card punch machine.

Dude, Fortran is more than 35 years old... at least.



My first language (besides BASIC) was Fortran IV.  It didn't even have a string type.  You had to build arrays of ints and put ASCII character bytes into them.  I don't miss Fortran.  I do miss coding in C which is why I like PHP.
11/15/2005 6:42:44 PM EDT
[#49]

Quoted:
Is Fortran still around?  

Gee, I don't know if I can do it without a card punch machine.

Dude, Fortran is more than 35 years old... at least.



Linux comes with it.
11/15/2005 7:04:02 PM EDT
[#50]

Quoted:

Quoted:

Quoted:
"I need the code as a hardcopy and it available by disk or email."

That is what my instuctor says.



Is this a computer science course or did your instructor just randomly require you to write code? Is knowledge of C or FORTRAN a prereq for the course?



It is a Thermo 2 course (mech engineering).

Heres the catch.  We are required to take this Fortran class which I already did.  However it is not a prereq for anything.  They have now changed this course to a MATLAB based course, so they are not even teaching Fortran anymore.  Some people in this Thermo class haven't even had Fortran because they took the computer course after it changed to MATLAB.He


He's not randomly making you  write code.   If you want to be a mech engineer  and can't see the value of being  able to code Fortran, you should  probably rethink your career choice.   Fortran is one of the simplest  languages I have learned, and it's  used extensively in real-world  engineering.   It's too bad somebody did your homework for you. we call that  cheating at my college, and  you're really hurting yourself by  failing to learn the things your Prof thinks you should.   I can assure you, he's got a  somewhat better handle on  what you need to know than  you do, especially as a sophmore, maybe?
Previous Page
/ 2
Next Page

[ARCHIVED THREAD] - Comp Program (Page 1 of 2)