10 REM ****************** 20 REM Food For Thought 30 REM By Robin Nixon 40 REM ****************** 50 REM NC200 Version 60 REM Downloaded from Tim's Amstrad NC User's Site 70 REM http://www.ncus.org.uk 80 : 90 ON ERROR GOTO 2010 100 PROCsetup:REPEAT:PROCinput:PROCsearch:PROCcard:UNTIL 0 110 : 120 DEF PROCsetup 130 CLS:PRINT "Please wait..." 140 max%=73:DIM cat$(9,1),enum%(max%,4),se$(11),rg$(4),sc$(5),chr$(10,13) 150 FOR n%=0 TO 9:READ cat$(n%,0),cat$(n%,1):NEXT 160 FOR y%=0 TO max%:FOR x%=0 TO 4:READ enum%(y%,x%):NEXT:NEXT 170 FOR n%=0 TO 11:READ se$(n%):NEXT 180 FOR n%=0 TO 4:READ rg$(n%):NEXT 190 FOR n%=0 TO 5:READ sc$(n%):NEXT 200 FOR y%=0 TO 10:FOR x%=0 TO 13:READ chr$(y%,x%):NEXT:NEXT 210 ENDPROC 220 : 230 DEF PROCinput 240 CLS:PRINT TAB(22,9);CHR$(17);"Food for Thought"; 250 PRINT " - The Additive Guide";CHR$(18):PRINT TAB(19,11);CHR$(17); 260 PRINT "Type in the ""E"" Number you wish to identify";CHR$(18) 270 MOVE 218,14:DRAW 266,14:DRAW 266,26:DRAW 218,26:DRAW 218,14:legal%=0 280 REPEAT:VDU 28,37,13,42,13:REPEAT:CLS:INPUT "" e$:UNTIL e$<>"":PRINT e$; 290 IF (ASC(LEFT$(e$,1))AND 223)=69 i%=1 ELSE i%=0 300 e%=VAL(RIGHT$(e$,LEN(e$)-i%)):VDU 26:legal%=FNlegal(e%) 310 IF NOT legal% PRINT TAB(19,15);"Sorry, not a valid ""E"" Number"; 320 IF NOT legal% PRINT " - press SPACE";: REPEAT:UNTIL GET=32 330 IF NOT legal% PRINT TAB(19,15);SPC(45); 340 UNTIL legal%:ENDPROC 350 : 360 DEF FNlegal(n%) 370 IF n%>=100 AND n%<=180 THEN cat%=0:=TRUE 380 IF n%>=200 AND n%<=290 THEN cat%=1:=TRUE 390 IF n%>=300 AND n%<=321 THEN cat%=2:=TRUE 400 IF n%>=322 AND n%<=495 THEN cat%=3:=TRUE 410 IF n%>=500 AND n%<=620 THEN cat%=4:=TRUE 420 IF n%>=621 AND n%<=637 THEN cat%=5:=TRUE 430 IF n%>=900 AND n%<=904 THEN cat%=6:=TRUE 440 IF n%>=905 AND n%<=907 THEN cat%=7:=TRUE 450 IF n%>=920 AND n%<=927 THEN cat%=8:=TRUE 460 IF n%>=1400 AND n%<=1442 THEN cat%=9:=TRUE 470 =FALSE 480 : 490 DEF PROCsearch 500 type$=cat$(cat%,0):note$=cat$(cat%,1) 510 effect$="Not known":group$="":warn$="":num$=STR$(e%) 520 f%=FALSE:FOR a%=0 TO max%:IF e%=enum%(a%,1) m%=a%:f%=TRUE:a%=max% 530 NEXT:IF NOT f% THEN ENDPROC ELSE effect$=se$(enum%(m%,2)) 540 group$=rg$(enum%(m%,3)):warn$=sc$(enum%(m%,4)) 550 IF enum%(m%,0)=1 num$="E" ELSE num$="" 560 num$=num$+STR$(e%):ENDPROC 570 : 580 DEF PROCcard 590 VDU 26:CLS:MOVE 0,0:DRAW 479,0:DRAW 479,58 600 DRAW 50,58:DRAW 48,63:DRAW 0,63:DRAW 0,0: 610 PRINT TAB(9,9);CHR$(17);"Type: ";CHR$(18);type$ 620 PRINT TAB(8,10);CHR$(17);"Notes: ";CHR$(18);note$ 630 PRINT TAB(1,11);CHR$(17);"Side Effects: ";CHR$(18);effect$ 640 PRINT TAB(2,12);CHR$(17);"Risk Groups: ";CHR$(18);group$ 650 PRINT TAB(5,13);CHR$(17);"Warnings: ";CHR$(18);warn$;:PROCenumber 660 PRINT TAB(23,14);CHR$(17);"Press SPACE to try a new additive";CHR$(18) 670 REPEAT:UNTIL GET=32:ENDPROC 680 : 690 DEF PROCenumber 700 len%=LEN(num$):xo%=43-8*len%:yo%=60:FOR n%=1 TO len% 710 PROCbig(MID$(num$,n%,1)):xo%=xo%+8 720 NEXT:ENDPROC 730 : 740 DEFPROCbig(c$) 750 IF c$="E" c%=10 ELSE c%=ASC(c$)-48 760 FOR y%=0 TO 13 770 FOR x%=0 TO 7 780 IF MID$(chr$(c%,y%),x%+1,1)="1" PLOT 69,x%+xo%,yo%-y% 790 NEXT 800 NEXT:ENDPROC 810 : 820 REM Categories and Notes 830 : 840 DATA "Permitted Colouring" 850 DATA "Allowed in all except fresh produce, dried milk, tea or coffee" 860 DATA "Preservative" 870 DATA "Helps ensure food safety. Avoid only when you know food is fresh" 880 DATA "Permitted Antioxidant" 890 DATA "Prevents ready-packed foods reacting adversely with the air" 900 DATA "Emulsifier / Stabiliser" 910 DATA "Alters the handling properties of foods, especially packet mixes" 920 DATA "Miscellaneous Additive" 930 DATA "Part of the firming, gelling and anti-caking agent group" 940 DATA "Flavour Enhancer" 950 DATA "Works by increasing saliva flow or by stimulating taste buds" 960 DATA "Glazing Agent" 970 DATA "Provides a polish to sugar confectionaries such as chewing gum" 980 DATA "Mineral Hydrocarbon" 990 DATA "Prevents some dried foods drying out " 1000 DATA "Bleaching Agent" 1010 DATA "Used to bleach, mature and improve various types of flour" 1020 DATA "Modified Starch" 1030 DATA "Where did you buy this food? This additive is illegal in the UK" 1040 : 1050 REM Additives with noticeable side effects 1060 : 1070 DATA 1,102,3,2,2,1,104,3,2,2,0,107,3,2,2,1,110,3,2,2,1,120,3,2,2 1080 DATA 1,122,3,2,2,1,123,3,2,2,1,124,3,2,2,1,127,1,2,2,0,128,3,2,2 1090 DATA 1,131,2,3,2,1,132,5,3,2,1,133,3,2,2,1,150,1,1,2,1,151,3,2,2 1100 DATA 0,153,0,0,5,0,154,1,1,2,0,155,3,2,2,1,200,3,0,0,1,210,7,2,0 1110 DATA 1,211,2,2,0,1,212,2,2,0,1,213,2,2,0,1,214,2,2,0,1,215,2,2,0 1120 DATA 1,216,2,2,0,1,217,2,2,0,1,218,2,0,0,1,219,2,0,0,1,220,6,0,0 1130 DATA 1,221,11,2,3,1,222,11,2,0,1,223,7,2,3,1,224,11,2,3,1,226,7,2,3 1140 DATA 1,227,7,2,3,1,230,5,0,0,1,231,5,0,0,1,236,3,0,0,1,239,7,0,5 1150 DATA 1,249,8,1,1,1,250,5,1,1,1,251,5,1,1,1,252,7,1,1,1,261,0,4,4 1160 DATA 1,270,8,1,0,1,310,7,2,1,1,311,7,2,1,1,312,7,2,1,1,320,8,1,1 1170 DATA 1,321,8,1,1,1,325,10,1,0,1,385,8,0,0,1,407,6,0,5,1,412,7,0,0 1180 DATA 1,413,3,0,0,1,421,5,0,0,1,430,2,3,0,1,431,3,3,0,0,503,6,0,0 1190 DATA 0,508,6,0,0,0,510,8,4,4,0,514,8,4,4,0,518,10,4,4,0,525,9,0,0 1200 DATA 0,621,4,1,1,0,622,5,1,1,0,623,0,0,1,0,627,0,0,1,0,631,0,0,1 1210 DATA 0,635,0,0,1,0,905,6,0,0,0,924,9,0,0,0,925,3,0,0 1220 : 1230 REM Specific Side Effects 1240 : 1250 DATA "None known" 1260 DATA "Hyperactivity in children" 1270 DATA "Allergic reactions" 1280 DATA "Skin rashes/irritation" 1290 DATA "Headaches and/or dizziness" 1300 DATA "Nausea and/or vomiting" 1310 DATA "Internal irritation" 1320 DATA "Gastric/digestive upsets" 1330 DATA "Metabolic disturbances" 1340 DATA "Severe internal upsets" 1350 DATA "Toxicity" 1360 DATA "Respiratory difficulties" 1370 : 1380 REM Specific groups at risk 1390 : 1400 DATA "None" 1410 DATA "Very young children" 1420 DATA "Asthmatic/aspirin sensitive people" 1430 DATA "People with allergies" 1440 DATA "Kidney and/or heart patients" 1450 : 1460 REM Special Conditions 1470 : 1480 DATA "None" 1490 DATA "Not permitted in foods intended for babies and/or young children" 1500 DATA "Not recommended by the Hyperactive Children's Support Group" 1510 DATA "Should be avoided by asthmatics as potentially dangerous" 1520 DATA "Should be avoided by people with impaired kidneys" 1530 DATA "Suspected carcinogen" 1540 : 1550 REM Sprite Data 1560 : 1570 DATA "00111000","01000100","11000110","11000110","11000110" 1580 DATA "11000110","11000110","11000110","11000110","11000110" 1590 DATA "11000110","11000110","01000100","00111000" 1600 : 1610 DATA "00011000","00111000","01111000","00011000","00011000" 1620 DATA "00011000","00011000","00011000","00011000","00011000" 1630 DATA "00011000","00011000","00011000","01111110" 1640 : 1650 DATA "00111000","01000100","11000110","11000110","00000110" 1660 DATA "00000110","00001100","00011000","00110000","00100000" 1670 DATA "01100000","01000000","11000110","11111110" 1680 : 1690 DATA "00111000","01000100","11000110","11000110","00000110" 1700 DATA "00000100","00011000","00000100","00000110","00000110" 1710 DATA "11000110","11000110","01000100","00111000" 1720 : 1730 DATA "00001100","00001100","00011100","00011100","00101100" 1740 DATA "00101100","01001100","01001100","10001100","10001100" 1750 DATA "11111110","00001100","00001100","00011110" 1760 : 1770 DATA "11111110","11000110","11000000","11000000","11000000" 1780 DATA "11111000","11000100","10000110","00000110","00000110" 1790 DATA "11000110","11000110","01000100","00111000" 1800 : 1810 DATA "00111000","01000100","11000110","11000110","11000000" 1820 DATA "11111000","11000100","11000110","11000110","11000110" 1830 DATA "11000110","11000110","01000100","00111000" 1840 : 1850 DATA "11111110","11000110","11000110","11000110","00000110" 1860 DATA "00000100","00001100","00001000","00011000","00011000" 1870 DATA "00011000","00011000","00011000","00011000" 1880 : 1890 DATA "00111000","01000100","11000110","11000110","11000110" 1900 DATA "01000100","00111000","01000100","11000110","11000110" 1910 DATA "11000110","11000110","01000100","00111000" 1920 : 1930 DATA "00111000","01000100","11000110","11000110","11000110" 1940 DATA "11000110","01000110","00111110","00000110","00000110" 1950 DATA "11000110","11000110","01000100","00111000" 1960 : 1970 DATA "11111110","01100110","01100010","01100000","01100000" 1980 DATA "01100100","01111100","01100100","01100000","01100000" 1990 DATA "01100000","01100010","01100110","11111110" 2000 : 2010 ON ERROR GOTO 2030 2020 VDU 26:CLS:IF ERR=17 THEN CHAIN "AUTO" 2030 REPORT:PRINT" at line ";ERL 2040 PRINT:PRINT"Press [Function][X] for Notepad Main Menu" >*SPOOL