report

report - string and translated it into the required...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
report a. The main problem that I encountered was that if used a letter such as h, v, t, that was used as a plotting command, as a plot character it would just interpret that as a new plotting command. I fixed this by adding the line commandstring[i+7]=’ ‘; so that it now saw it as a space character. The second problem that I encountered was that, for example, if I wrote “H010110dH02d” it would give me a syntax error at position 4 instead of the correct one. I overcame this by realizing my code was wrong and that I needed to return i+n instead of just n. b. In my program, it firsts defines all the void functions. Then it does moves on to the execute command function which returns an integer. I set this up by grouping all the command functions that have the same number of required integers together. I then wrote code to return an error it there was a non-integer. After, I then had code that turned the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: string and translated it into the required components. Its pretty basic. c. I tested a blank space required to logout. H010110S to test if h worked v010110r- to test if v worked, also to make sure that r was correctly read as a plotting function r01011010*- to test if r worked x- to test if x worked C0606068- to test if C worked F01011010- to test if F worked I01011111j- to test if I worked I also checked, for all of these, what happened when I had variables where numbers were supposed to be. This checked if my syntax error reporter was right. C101006e3 V101005dq These were functions that I have not had time to fix. These dont return syntax errors, even though they should. T0101hdklfah This didnt work either, it doesnt recognize plotting commands for delimiters....
View Full Document

This note was uploaded on 11/10/2011 for the course CS 31 taught by Professor Melkanoff during the Spring '00 term at UCLA.

Ask a homework question - tutors are online