Computer Programming with the Nim Programming Language
previous program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 865 页 | 7.45 MB | 1 年前3
Computer Programming with the Nim Programming Language
previous program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 784 页 | 2.13 MB | 1 年前3
Computer Programming with the Nim Programming Languageous program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we loop first. That loop operates under the assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 512 页 | 3.54 MB | 1 年前3
Computer Programming with the Nim Programming Languageprevious program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the 133 assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 508 页 | 3.50 MB | 1 年前3
Computer Programming with the Nim Programming Languageous program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we loop first. That loop operates under the assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 512 页 | 3.53 MB | 1 年前3
Computer Programming with the Nim Programming Languageprevious program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the 133 assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 508 页 | 3.54 MB | 1 年前3
Computer Programming with the Nim Programming Languageprevious program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the 133 assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 508 页 | 3.50 MB | 1 年前3
Computer Programming with the Nim Programming Languageprevious program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the 133 assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 508 页 | 3.52 MB | 1 年前3
Computer Programming with the Nim Programming Languageprevious program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we first. That loop operates under the 133 assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 508 页 | 3.53 MB | 1 年前3
Computer Programming with the Nim Programming Languageous program: var f1 = f # save original f while f1 != nil: write(stdout, "Name to delete: ") n = readline(stdin) if n == "" or n == "quit": break if f1.name == n: f1 = f1.next else: next.next break f1 = f1.next Here, we’re once again using an outer while loop to read in the names we want to delete. That loop uses the condition while f1 != nil: because, naturally, we loop first. That loop operates under the assumption that there are at least two elements in the list, f1, and f1.next. We compare the name of the next entry with n. If they match, then we would have to skip0 码力 | 512 页 | 3.50 MB | 1 年前3
共 30 条
- 1
- 2
- 3













