This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program CarRace; | |
(***************************************************************************** | |
This program demonstrates ansiCRT unit instead of the standard Pascal's CRT | |
unit. Also showing how to use emoji/unicode on console screen so the output | |
looks more fancy and as if on graphics screen. Of course, this can also be | |
done using the CRT unit. | |
ansiCRT is here: gist.github.com/pakLebah/c5e2bbd0b93c863b2122660111db68d1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program fancyInput; | |
(***************************************************************************** | |
This program demonstrates fancy input mechanism for console application by | |
simply using CRT unit. For example selecting an item from a drop down menu, | |
length-limited phone number input, and yes/no input. Hopefully, new Pascal | |
beginners will learn something from this sample program. Thank you. :) | |
//! WARNING! This program requires FPC v3.2+ with compiler option -S2chij- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program Calc; | |
(****************************************************************************** | |
Program: calc.pas (Calculator) | |
Author : paklebah.github.io | |
Description: | |
Calc calculates value from a simple aritmathical formula. The purpose of | |
this program is to demonstrate a simple parsing algorithm to newbies. | |
Version history: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "lldb", | |
"name": "LLDB", | |
"cwd" : "${workspaceFolder}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTES: | |
# • Don't forget to change every <HOME> in the scripts to your home folder name. | |
# • Copy .plist and .scpt files into your Library/LaunchAgents folder. | |
# • First time execution would require permission. | |
# • Toggle time is hard coded in the script as: | |
# – light mode: 07:00-17:00 (day time) | |
# – dark mode: 17:00-07:00 (night time) | |
# • Execution interval: every 10 minutes (600 seconds). | |
# load task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit ansiCRT; | |
(****************************************************************************** | |
This unit is emulating classic Pascal's CRT unit text color management and | |
cursor movement using ANSI Escape Code sequence. Keyboard input handling & | |
screen windowing is not possible. For keyboard input, better use the FPC's | |
Keyboard unit. | |
ANSI Escape Code list taken from: | |
https://en.wikipedia.org/wiki/ANSI_escape_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ // shortcut: F5 (start debugging) | |
"type": "lldb", | |
"request": "launch", | |
"name": "LLDB Debugger", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program bounce; | |
{$mode objfpc}{$H+} | |
uses | |
{$IFDEF UNIX}{$IFDEF UseCThreads} | |
cthreads, | |
{$ENDIF}{$ENDIF} | |
Interfaces, // this includes the LCL widgetset | |
Forms, lazcontrols, ubounce; |