It's UWAweek 47

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying the 7 articles in this topic
Showing 7 of 828 articles.
Currently 89 other people reading this forum.


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful

I don't really understand what 'the variables arg0, arg1, and so on, provide access to the program's command-line arguments which provide real-valued numbers' means. I would appreciate it if someone could explain what this means. Thank you


SVG not supported

Login to reply

👍?
helpful

i know the what is the mean arg0, arg1... but i couldn't get it "provide access to the program's command-line arguments which provide real-valued numbers' means." here.


SVG not supported

Login to reply

👍?
helpful

I asked other student, we guess they should be a reference of parameter for generated C translation files, you can define like this char* arg0=argv[1] in your c file, and the generated c file can use arg0 directly


SVG not supported

Login to reply

👍?
helpful

Thank you!


SVG not supported

Login to reply

👍?
helpful

"Xiaoqin Fan" <24*5*5*9@s*u*e*t*u*a*e*u*a*> wrote:
> I asked other student, we guess they should be a reference of parameter for generated C translation files, you can define like this char* arg0=argv[1] in your c file, and the generated c file can use arg0 directly
Just make sure to convert argv[1] to a double.


SVG not supported

Login to reply

👍?
helpful

"Joshua Noble" <22*6*9*8@s*u*e*t*u*a*e*u*a*> wrote:
> "Xiaoqin Fan" <24*5*5*9@s*u*e*t*u*a*e*u*a*> wrote: > > > I asked other student, we guess they should be a reference of parameter for generated C translation files, you can define like this char* arg0=argv[1] in your c file, and the generated c file can use arg0 directly > > Just make sure to convert argv[1] to a double.
I wonder after converting a argv[1] to a double ex> argv[1] = 123.ml Is this 123 assigned to the variable like "x <- 123.0" ? thank you


SVG not supported

Login to reply

👍?
helpful

"Jinseok Kim" <24*3*9*7@s*u*e*t*u*a*e*u*a*> wrote:
> "Joshua Noble" <22*6*9*8@s*u*e*t*u*a*e*u*a*> wrote: > > > "Xiaoqin Fan" <24*5*5*9@s*u*e*t*u*a*e*u*a*> wrote: > > > > > I asked other student, we guess they should be a reference of parameter for generated C translation files, you can define like this char* arg0=argv[1] in your c file, and the generated c file can use arg0 directly > > > > Just make sure to convert argv[1] to a double. > > > I wonder after converting a argv[1] to a double > > ex> argv[1] = 123.ml > > Is this 123 assigned to the variable like "x <- 123.0" ? > > thank you
I don't think you completely understand how argument passing works in ml. Have you read these posts? [help2002] [help2002]

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy