#define scr_convert /* name = scr_convert assembler = IsmAvatar debugger = Sir Dekar purpose = converts all commas in a file to a newline character argument0 = string containing the name of the file to be read argument1 = optional string containing the name of the file to write to returns 1 if succesful, 0 if failed */ if argument1 = "" { argument1 = argument0 } //overwrite old file if !file_exists(argument0) { return 0 } //no such file m = 0 //initialize variables n=0 file_open_read(argument0) //read each line and replace commas while !file_eof() { line[m] = string_replace_all(file_read_string(),',',chr(13) + chr(10)) m += 1 file_readln() } file_close() file_open_write(argument1) //write new lines repeat(m) { file_write_string(line[n]) n+=1 } file_close() return 1 //success