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