Page 8: Extra Practice - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Tutorials (https://communities.curl.com/forumdisplay.php?fid=3) +--- Forum: Public Training (https://communities.curl.com/forumdisplay.php?fid=4) +---- Forum: Curl IDE Made Easy (https://communities.curl.com/forumdisplay.php?fid=6) +----- Forum: Try 5: Reading Our Score Data (https://communities.curl.com/forumdisplay.php?fid=13) +----- Thread: Page 8: Extra Practice (/showthread.php?tid=78) |
Page 8: Extra Practice - ashimo - 06-20-2011 Extra Practice Practice Problem 1: Basics Let’s write a program that writes the data displayed by RecordGrid into a file. The program must satisfy the following requirements:
Hint: Use commas to delimit each of the fields of the data in each Record, and then write each Record to one line of the file. Solution Solution Program: c:\Curl\Try5\04_exercise1\start.curl Code: {value Explanation RecordSets, like arrays, are collections, so a RecordSet can be passed to a for loop, which will process the contained Records in order. |