Microsoft Small Basic

Program Listing: KLT327
pp="U:198:526; d:207:526:215:525:223:524:231:523:239:521:247:519:255:516:262:513:270:510:277:506:284:502:290:498:297:493:303:488:309:483:315:478:320:472:325:466:330:460:335:453:339:447:343:440:347:433:350:426:353:418:356:410:358:403:360:395:361:387:362:378:363:370:363:362:363:166:34:166:34:362:34:370:35:378:36:387:37:395:39:403:41:410:44:418:47:426:50:433:54:440:58:447:62:453:67:460:71:466:77:472:82:478:88:483:94:488:100:493:107:498:113:502:120:506:127:510:134:513:142:516:150:519:157:521:165:523:173:524:182:525:190:526:198:526:198:526:; U:198:524; d:207:523:215:523:223:522:231:520:239:518:246:516:254:514:261:511:268:508:275:504:282:500:288:496:295:491:301:487:307:481:312:476:318:470:323:465:328:459:332:452:336:446:340:439:344:432:347:425:350:417:353:410:355:402:357:395:358:387:359:379:360:370:360:362:360:169:37:169:37:362:37:370:38:379:39:387:40:395:42:402:44:410:47:417:50:425:53:432:56:439:60:446:65:452:69:459:74:465:79:470:84:476:90:481:96:487:102:491:108:496:115:500:122:504:129:508:136:511:143:514:150:516:158:518:166:520:174:522:182:523:190:523:198:524:; U:358:166; d:397:77:367:28:318:46:284:7:239:32:198:0:158:32:113:7:79:46:30:28:0:77:39:166:48:162:57:158:67:155:76:151:86:148:96:145:106:143:116:140:126:138:136:137:146:135:156:134:167:133:177:132:188:132:198:131:209:132:219:132:230:133:240:134:251:135:261:137:271:138:281:140:291:143:301:145:311:148:320:151:330:155:339:158:348:162:358:166:; U:357:164; d:396:77:366:29:318:47:283:8:238:34:198:1:158:34:113:8:79:47:30:29:1:77:40:164:49:160:58:156:67:153:77:149:86:146:96:144:106:141:116:139:126:137:136:135:146:133:156:132:167:131:177:130:188:130:198:130:209:130:219:130:230:131:240:132:250:133:261:135:271:137:281:139:291:141:300:144:310:146:320:149:329:153:339:156:348:160:357:164:357:164:; U:355:160; d:392:77:365:33:317:51:294:139:310:143:325:148:340:154:355:160:355:160:; U:367:134; d:376:113:359:106:342:100:325:94:307:89:302:111:318:116:335:121:351:127:367:134:367:134:; U:159:38; d:159:38:114:13:80:51:102:139:118:135:134:132:150:130:166:128:159:38:; U:317:51; d:317:51:283:13:238:38:231:128:247:130:263:132:279:135:294:139:317:51:; U:80:51; d:80:51:32:33:5:77:15:101:41:160:56:154:71:148:87:143:102:139:80:51:; U:198:517; d:206:517:214:516:222:515:229:514:237:512:244:510:251:508:259:505:265:502:272:498:279:494:285:490:291:486:297:481:303:476:308:471:313:466:318:460:323:454:327:448:331:442:335:436:338:429:341:422:344:415:347:408:349:400:350:393:352:385:353:378:353:370:354:362:354:175:43:175:43:362:43:370:44:378:45:385:46:393:48:400:50:408:52:415:55:422:58:429:62:436:66:442:70:448:74:454:79:460:83:466:89:471:94:476:100:481:105:486:112:490:118:494:124:498:131:502:138:505:145:508:152:510:160:512:167:514:175:515:182:516:190:517:198:517:; U:105:175; d:43:175:43:244:105:244:105:175:; U:105:312; d:167:312:167:244:105:244:105:312:; U:43:362; d:43:371:44:380:105:380:105:312:43:312:43:362:43:362:; U:229:312; d:167:312:167:380:229:380:229:312:; U:229:448; d:291:448:291:380:229:380:229:448:; U:291:486; d:297:482:301:477:306:473:311:468:315:464:319:459:323:454:327:448:291:448:291:486:; U:105:448; d:167:448:167:380:105:380:105:448:; U:70:448; d:73:454:77:459:81:464:86:468:90:473:95:477:100:482:105:486:105:448:70:448:; U:209:517; d:219:515:229:514:229:448:167:448:167:514:177:515:187:517:198:517:209:517:; U:352:380; d:353:371:354:362:354:312:291:312:291:380:352:380:; U:229:312; d:291:312:291:244:229:244:229:312:; U:229:175; d:167:175:167:244:229:244:229:175:; U:354:244; d:354:175:291:175:291:244:354:244:; U:77:94; d:79:97:79:100:80:102:80:105:80:108:80:110:79:112:78:114:77:116:76:118:75:120:73:122:71:123:70:125:68:126:66:127:63:128:61:128:59:129:56:129:52:128:48:127:45:126:41:123:39:121:36:117:34:114:33:110:35:112:37:115:39:117:42:118:45:120:48:121:51:122:54:122:56:122:59:121:61:121:63:120:65:119:67:118:69:116:71:115:72:113:74:111:75:109:76:107:77:105:77:103:78:101:78:98:78:96:77:94:; U:97:117; d:113:113:130:110:147:108:164:106:162:83:144:85:126:88:109:91:91:95:97:117:; U:86:73; d:104:69:123:65:141:63:161:61:159:38:149:39:139:40:129:42:119:43:109:45:99:47:90:49:80:51:86:73:86:73:; U:302:111; d:318:116:335:121:351:127:367:134:364:139:349:133:333:127:316:122:300:117:302:111:; U:376:113; d:378:107:361:100:344:94:326:88:309:83:307:89:325:94:342:100:359:106:376:113:376:113:; U:40:59; d:41:59:47:65:55:62:56:62:56:62:54:71:61:76:61:76:60:77:52:79:51:88:51:88:50:88:44:82:36:85:35:85:35:85:37:76:30:71:30:70:31:70:39:68:40:59:; U:360:48; d:360:48:353:54:345:51:344:51:345:51:346:60:340:66:339:66:340:66:348:69:350:77:350:78:350:77:357:72:365:75:365:75:365:74:363:66:370:60:370:60:370:60:362:57:360:48:; U:238:38; d:238:38:198:6:159:38:166:128:182:127:198:127:215:127:231:128:238:38:238:38:; U:198:79; d:198:79:198:79:197:80:197:80:196:81:196:82:195:82:195:82:195:83:195:83:194:83:194:84:194:84:194:85:193:84:192:84:191:83:190:84:190:83:190:83:189:82:188:82:187:82:187:82:186:81:186:81:186:81:186:81:185:81:185:81:187:84:189:87:189:87:189:88:189:88:189:89:189:89:190:89:189:90:189:90:188:89:187:89:186:89:185:89:185:89:185:89:185:91:185:92:186:94:187:95:186:95:184:95:184:96:184:96:184:97:185:98:186:98:187:99:186:100:186:101:186:102:185:103:185:103:185:104:186:104:187:104:188:104:189:104:188:106:188:108:189:108:190:107:190:108:190:109:190:109:190:110:190:110:190:111:192:111:194:110:194:112:194:113:194:114:195:113:196:112:197:111:197:112:197:112:198:113:198:114:198:114:198:114:199:113:201:112:202:112:202:113:203:114:203:113:203:112:203:110:205:111:207:111:207:110:207:110:207:109:207:109:207:108:206:107:208:108:209:108:209:106:208:104:209:104:210:104:211:104:212:104:212:103:212:103:211:102:211:101:210:100:209:99:211:98:212:98:212:97:213:96:213:96:213:95:211:95:210:95:211:94:212:92:212:91:212:89:212:89:212:89:211:89:210:89:209:89:208:90:207:90:207:89:208:89:208:89:208:88:208:88:208:87:208:87:209:86:210:84:211:83:212:81:212:81:211:81:211:81:211:81:210:81:210:82:209:82:208:82:208:82:207:83:207:83:207:84:206:84:205:84:204:84:203:85:203:84:203:84:203:83:202:83:202:83:202:82:202:82:201:82:201:81:200:80:199:80:199:79:; U:180:38; d:180:38:180:38:179:39:179:40:178:41:177:42:177:42:177:42:177:43:177:43:176:43:176:44:176:44:176:45:175:44:174:43:173:43:172:44:172:43:172:43:171:42:170:42:169:42:169:42:168:42:168:42:168:41:168:41:167:41:167:42:169:44:171:47:171:47:171:48:171:48:171:49:172:49:172:49:172:50:172:50:172:50:172:50:170:50:169:49:168:49:167:49:167:49:167:49:167:51:168:53:169:54:170:55:168:56:167:56:167:56:167:56:167:57:168:58:169:59:170:59:169:60:169:61:169:63:168:63:168:64:168:64:169:64:170:64:171:64:172:64:171:66:171:68:172:68:174:67:173:68:173:69:173:69:173:70:173:70:173:70:175:71:177:70:177:72:177:73:178:73:178:73:179:72:180:71:180:71:181:72:181:72:181:73:181:73:182:74:183:73:184:71:185:72:186:73:186:73:186:73:187:71:186:70:188:70:190:70:190:69:190:69:190:68:190:68:190:67:189:67:191:67:192:67:192:65:191:63:192:63:193:63:194:63:195:62:195:62:195:62:194:61:194:60:193:59:192:58:193:57:194:57:195:56:195:55:195:54:195:54:194:54:192:54:193:53:194:51:194:50:194:48:194:47:194:48:193:48:192:48:191:48:190:49:190:48:190:48:190:48:190:47:190:47:190:46:190:46:191:45:192:43:193:42:193:40:193:40:193:40:193:40:192:40:192:40:192:41:191:41:190:41:190:42:189:42:189:42:189:43:188:43:187:43:186:43:185:44:185:44:185:43:185:43:184:43:184:42:184:42:184:41:183:41:182:41:182:40:181:39:180:38:180:38:180:38:180:38:; U:191:44; d:190:44:; U:217:38; d:217:38:217:38:218:39:218:40:219:41:219:42:220:42:220:42:220:43:220:43:221:43:221:44:221:44:221:45:222:44:223:43:224:43:225:44:225:43:225:43:226:42:227:42:228:42:228:42:229:42:229:42:229:41:229:41:230:41:230:42:228:44:226:47:226:47:226:48:226:48:225:49:225:49:225:49:225:50:225:50:225:50:225:50:227:50:228:49:229:49:230:49:230:49:230:49:230:51:229:53:228:54:227:55:229:56:230:56:230:56:230:56:230:57:229:58:228:59:227:59:228:60:228:61:228:63:229:63:229:64:229:64:228:64:227:64:226:64:225:64:226:66:226:68:225:68:223:67:223:68:223:69:223:69:224:70:224:70:224:70:222:71:220:70:220:72:219:73:219:73:219:73:218:72:217:71:217:71:216:72:216:72:215:73:215:73:215:74:214:73:213:71:212:72:211:73:211:73:210:73:210:71:210:70:209:70:207:70:206:69:207:69:207:68:207:68:207:67:207:67:206:67:205:67:205:65:206:63:205:63:204:63:203:63:202:62:202:62:202:62:203:61:203:60:204:59:205:58:203:57:203:57:202:56:201:55:201:54:202:54:203:54:205:54:204:53:203:51:203:50:203:48:203:47:203:48:203:48:204:48:206:48:207:49:207:49:207:48:207:48:207:48:207:47:207:47:206:46:206:46:206:45:205:43:204:42:203:40:203:40:204:40:204:40:204:40:205:40:205:41:206:41:207:41:207:42:208:42:208:42:208:43:209:43:210:43:211:43:212:44:212:44:212:43:212:43:213:43:213:42:213:42:213:41:214:41:214:41:215:40:216:39:217:38:217:38:217:38:; U:206:44; d:206:44:; U:247:57; d:248:57:249:57:250:57:252:57:252:58:253:58:254:58:255:57:257:56:258:55:261:54:263:54:266:53:268:53:270:54:272:55:274:56:276:56:278:57:279:58:282:59:285:59:286:59:287:59:288:59:288:59:288:59:288:60:286:61:284:61:282:61:280:61:278:61:277:60:275:59:273:59:275:60:277:62:280:64:283:66:286:67:290:67:291:67:292:67:293:67:293:67:293:68:293:68:290:69:288:70:286:69:284:69:281:68:279:67:276:65:273:63:270:61:268:60:265:60:263:61:263:61:264:61:265:62:267:62:268:62:268:62:267:63:267:63:266:64:265:64:264:65:264:65:263:65:262:65:261:65:261:64:261:65:260:66:260:66:260:66:261:67:261:68:261:68:261:68:261:69:262:70:262:70:262:70:263:71:263:71:264:72:265:74:266:74:266:75:267:75:267:76:270:76:272:76:274:77:275:78:276:78:277:78:278:78:280:78:282:77:284:78:285:78:286:79:287:79:287:80:288:80:289:79:290:79:291:79:292:79:293:79:294:79:295:79:296:78:297:78:298:78:298:79:298:79:298:80:298:80:298:80:297:81:297:81:296:82:295:82:295:82:295:83:295:84:295:85:294:85:293:85:293:86:292:86:292:86:291:87:291:87:291:88:292:89:291:89:291:89:290:89:290:91:290:92:291:92:291:93:291:93:290:94:291:95:291:95:290:96:289:97:289:98:289:99:288:99:288:99:289:100:289:101:288:101:288:101:288:101:288:102:288:102:287:102:286:103:285:104:284:104:284:104:283:106:281:108:281:109:279:110:279:110:279:111:279:112:279:112:278:113:277:114:276:114:275:114:274:114:273:114:273:113:273:112:273:112:272:112:272:112:272:111:272:111:272:111:273:111:274:110:275:110:275:109:275:109:276:108:276:107:277:107:278:106:280:105:280:104:280:104:281:103:281:102:281:102:281:101:280:101:280:100:279:100:278:99:278:99:278:99:277:99:277:100:276:100:275:101:274:102:273:102:271:103:270:105:270:106:269:106:269:108:268:108:268:108:268:108:268:108:267:108:268:109:267:110:267:110:266:110:264:110:263:110:262:109:262:109:261:108:261:108:262:108:262:107:263:107:263:107:265:106:266:105:267:104:268:104:268:102:269:101:269:101:270:100:270:100:270:100:270:100:270:100:269:99:269:98:269:97:269:97:268:97:267:97:267:97:267:96:266:97:266:97:265:97:265:96:264:97:263:97:262:97:261:97:261:98:261:98:260:99:260:101:259:102:258:103:258:104:258:104:258:106:257:106:257:107:257:107:257:108:257:108:257:108:257:108:257:109:256:110:256:110:255:111:254:111:253:111:252:110:252:110:252:110:251:110:251:110:251:109:251:109:251:109:251:109:251:108:252:108:252:107:253:107:253:107:254:106:254:105:255:104:256:103:256:102:256:102:256:102:256:101:256:101:256:101:256:100:256:99:257:97:257:96:257:95:257:94:256:94:256:94:256:94:255:94:255:95:254:95:254:97:253:98:253:99:253:100:253:101:252:102:252:102:251:102:251:103:251:103:252:104:251:105:250:105:249:106:248:105:247:105:246:105:246:104:245:104:245:103:245:103:246:102:248:101:249:100:249:99:250:98:250:98:250:97:251:96:251:95:252:94:252:93:251:92:251:92:251:91:252:91:252:91:251:90:251:90:251:89:251:89:251:89:250:89:250:89:250:88:250:88:251:88:250:87:250:87:250:87:250:86:250:85:250:84:250:84:249:83:248:83:248:83:249:82:249:81:250:81:250:80:250:79:250:79:250:78:251:78:252:77:252:77:252:76:251:76:251:76:251:75:252:75:252:74:252:74:251:74:250:74:250:73:251:72:250:72:250:71:251:71:252:70:252:69:252:69:251:69:250:70:249:70:248:70:248:69:248:69:247:68:247:68:246:68:246:67:246:67:246:66:247:65:247:65:248:63:250:62:250:61:250:61:249:61:249:60:248:60:248:59:247:59:247:59:247:58:247:57:247:57:; U:284:60; d:286:60:287:59:286:60:284:61:; U:314:106; d:315:105:316:106:317:105:318:105:318:105:319:105:319:105:319:104:319:104:318:104:317:103:317:101:316:101:316:101:315:101:315:101:315:101:315:101:313:100:312:100:312:100:311:99:311:99:311:99:311:99:311:98:311:98:311:97:312:97:312:97:313:97:314:97:315:97:316:96:316:96:316:96:316:96:316:95:316:95:316:95:317:95:317:96:319:96:320:97:321:98:322:98:321:99:321:99:321:100:321:100:321:100:322:101:323:102:325:102:327:102:329:103:332:105:335:106:339:107:339:107:340:107:340:107:340:107:340:107:340:107:344:107:347:107:350:108:352:110:355:110:356:111:358:111:359:112:361:112:364:113:366:114:368:115:368:116:369:116:368:117:368:117:367:118:366:118:366:118:365:118:363:117:361:116:359:115:357:114:356:113:354:113:354:113:353:113:353:113:353:113:354:114:354:114:354:115:354:115:354:116:354:116:354:117:355:118:356:118:357:118:357:119:357:119:358:121:358:122:358:122:359:123:359:123:359:124:359:124:358:124:357:125:356:126:355:126:355:125:354:125:354:125:353:124:354:124:354:124:356:124:356:124:356:123:356:123:356:122:356:122:356:122:354:121:354:120:352:119:350:118:348:118:346:117:345:117:345:117:344:117:343:117:343:117:342:117:342:117:341:117:341:117:340:117:340:118:339:118:338:118:337:118:337:118:337:118:336:118:336:118:335:117:335:117:334:117:334:116:334:116:334:116:334:115:336:116:337:116:338:116:339:115:339:115:339:115:340:115:340:114:338:114:337:114:335:113:334:113:333:113:332:113:331:113:331:113:330:113:330:113:329:113:327:113:326:113:324:113:323:114:322:113:322:113:321:113:320:112:320:112:320:112:319:112:319:111:319:111:320:110:321:111:322:111:322:111:323:111:323:111:324:111:325:111:325:111:326:111:326:110:326:110:326:110:326:110:325:110:325:109:323:109:322:108:321:108:320:108:320:108:319:108:318:108:317:108:316:108:315:107:314:108:313:108:313:107:312:107:311:107:311:106:311:106:311:106:311:106:311:105:312:105:313:106:313:106:314:106:314:106:; U:341:114; d:341:114:341:114:339:114:337:113:335:112:333:112:334:112:335:111:336:111:337:111:339:112:341:112:342:113:343:113:343:113:343:113:343:114:344:114:344:114:344:115:343:115:343:115:342:114:341:114:341:114
GraphicsWindow.Width =1200
GraphicsWindow.Height =800
GraphicsWindow.BackgroundColor ="white
GraphicsWindow.PenColor="red
GraphicsWindow.PenWidth =1
GraphicsWindow.BrushColor ="Red
GraphicsWindow.FillRectangle (0 0 1200 266)
GraphicsWindow.BrushColor ="Blue
GraphicsWindow.FillRectangle (0 532 1200 266)
LDUtilities.ShowNoShapeErrors ="false
bx=400
by=150
GraphicsWindow.Title="Croatian flag
ff=0
pl=ldtext.Split (pp,"; ")
For x=1 To Array.GetItemCount (pl)
If Text.StartsWith (pl[x],"U") Then
zz=ldtext.Split (pl[x],":")

If ff>0 then
ii=ldShapes.AddPolygon(sx)
LDShapes.SetShapeEvent (ii)
If text.IsSubText("|9|31|5|","|"+ff+"|") then
LDShapes.BrushColour (ii,"#0099dd")
LDShapes.PenColour (ii,"#0099dd")
elseIf text.IsSubText("|7|8|","|"+ff+"|") then
LDShapes.BrushColour (ii,"darkblue")
LDShapes.PenColour (ii,"darkblue")
elseIf text.IsSubText("|27|28|","|"+ff+"|") then
Goto xx

ElseIf text.IsSubText("|24|29|30|32|33|35|37|","|"+ff+"|") then
LDShapes.BrushColour (ii,"yellow")
LDShapes.PenColour (ii,"black")
elseif ff<>10 And ff>1 And ff<>3 And ff<>4 or text.IsSubText("|26|25|","|"+ff+"|") then
LDShapes.BrushColour (ii,"red")
LDShapes.PenColour (ii,"red")
ElseIf ff=39 then
LDShapes.BrushColour (ii,"brown")
LDShapes.PenColour (ii,"black")
ElseIf ff>23 then
LDShapes.BrushColour (ii,"blue")
LDShapes.PenColour (ii,"white")

else
xx:
LDShapes.BrushColour (ii,"white")
LDShapes.PenColour (ii,"white")
endif
sx=0
endif
sx[1][1]=zz[2]+bx
sx[1][2]=zz[3]+by
w=2
ff=ff+1
Else
zz=ldtext.Split (pl[x],":")
For f=2 To Array.GetItemCount (zz) Step 2
sx[w][1]=zz[f]+bx
sx[w][2]=zz[f+1]+by
w=w+1
Endfor
EndIf
endfor
LDShapes.ShapeEvent=see

Sub see
If LDShapes.LastEventType ="MouseDown" Then
GraphicsWindow.Title =LDShapes.LastEventShape
endif
endsub