Created
December 12, 2016 01:07
-
-
Save aled1027/42cf9292caa19a61fbbd10283d84d094 to your computer and use it in GitHub Desktop.
Cole Java stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int input_eg(char[] in) { | |
int d,f=1; | |
char a; | |
a = StdIn.readChar(); | |
d = 0; | |
System.out.printf("%c mark!!!", d); | |
while (f==1) { | |
in[d] = a; | |
d++; | |
a = StdIn.readChar(); | |
if( a=='#'){ | |
in[d] = 13; | |
break; | |
} | |
} | |
return d; // potentially should be d+1 | |
} | |
static int exit_check(char[] in) { | |
// strlen returns the size of the char[] in | |
// If in has 0 size, then return 0, indicating exit | |
int in_len = strlen(in); | |
return in_len; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment