of At&T Inc. Examples 1. Extract all HTML directives from the AT&T home page and write them to standard output. import yoix.*.*; URL att = open("https://www.att.com", "r"); String text; int cnt = 0; while (cnt >= 0) { if ((cnt = fscanf(att, " <%[^>]>", &text)) > 0) printf("<%s>\n", text); else cnt = fscanf(att, " %*[^<]"); // discard } 2. Build and display a GUI with two buttons in a titled frame (i.e., window) that also has a titled border. One button pops up a message when pressed, the other quits the example. The window is sized automatically to just fit its components, and some additional code calculates its location to put it in the center of the screen before making it visible. import yoix.*.*; JFrame jf = { Dimension size = NULL; // auto-size window FlowLayout layoutmanager = { int hgap = 18; // 0.25 inch gap }; String title = "Wikipedia Yoix Example"; // window title String border = "Simple Button Example"; // border title Array layout = { new JButton { String text = "Press for Message"; actionPerformed(ActionEvent ev) { showMessageDialog(root, "Hello, world.", "Message Example"); } }, new JButton { String text = "Press to Exit"; actionPerformed(ev) { // ActionEvent declaration can be omitted exit(0); } }, }; }; // set frame location to center of screen now that frame size is known jf.location = new Point { int x = (VM.screen.width - jf.size.width) / 2; int y = (VM.screen.height - jf.size.height) / 2; }; // make it visible jf.visible = TRUE; 3. The code shown here was used to generate the Yoix logo image in PNG format that can be seen in the language description box near the top of this page. Command-line arguments allow the size of the image to be specified as well as select between PNG image output or display in an on-screen window. import yoix.*.*; BuildYoixLogoImage(double height, Color color, int addshadow) { // create the basic image, without shadow GenImage(double height, Color color, Font imagefont, double scale) { Image yoixlogo = { int type = TYPE_RGB_ALPHA; Color imgcolor = color; double scale = scale; Font imagefont = imagefont; Font regfont = imagefont.scalefont(0.5, 0.5); Graphics graphics = { Font font = imagefont; int textantialiasing = TRUE; }; double ywd = stringWidth(graphics.font, "Y"); Dimension size = { double height = height; double width = ywd * 5.25; }; double owd = stringWidth(graphics.font, "o"); double iwd