May 2018
Beginner
252 pages
6h 19m
English
Here is the complete script, which we'll now discuss:
;-- see Chapter09/currency-rates-gui.red:Red [ title: "Downloading currency exchange rates" needs: 'view (1)]url-base: http://www.floatrates.com/historical-exchange-rates.html?download-rates: does [ (2) url: rejoin [url-base "¤cy_date=" curr-date/text "&base_currency_code=" curr-code/text "&format_type=xml"] rates: read url write %rates-hist.xml rates out/text: "SUCCESS!" (3)]view [ (4) title "Currency rates" (5) below (6) text "Rates for which currency (format like USD):" (7) curr-code: field (8) text "Rates from which date (YYYY-MM-DD):" curr-date: field 100x25 (9) button "Download XML rates file" [download-rates] (10) out: text "" (11)]
In line (1), we ...