PLEASE NOTE: the upgrades to this server, secure.csse.uwa.edu.au, have not yet been completed.
Hopefully the changes will be completed on THURSDAY 8th December.
Web-based programs, such as csmarks, cssubmit, and the help fora, will be unavailable at some time on Thursday 8th.
  It's UWAweek 49

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 2 articles in this topic
Showing 2 of 919 articles.
Currently 3 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
10:33pm Sat 10th Sep, Christofle S.

To what extent will define change the input? Say i #define Mon to 1. Will inputs translate Mon as 1? Will strings with Mon in it turn the Mon part into a 1?


SVG not supported

Login to reply

👍?
helpful
6:37am Sun 11th Sep, Christopher M.

"Christofle Sangkanpara" <23*9*7*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> To what extent will define change the input? Say i #define Mon to 1. Will inputs translate Mon as 1? Will strings with Mon in it turn the Mon part into a 1?
I think there's a lot of confusion here. A line beginning with #define is processed by the C-preprocessor. Your program's C source code is first read by the C-preprocessor, and the C-preprocessor's output is then read by the C compiler. If your question is in the context of our project then, no, you will not be able to use the C-preprocessor to modify input read from the crontab file. You can answer the question of what text is replaced by writing a short program:
#include <stdio.h>

#define Mon         1

int main(void)
{
    int Montezuma   = 2;

    printf("output %i\n", Mon + Montezuma);
    return 0;
}

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  1:17AM Sep 14 2022
Privacy policy