Skip to content

dungwinux/fpconsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FPConsole FPConsole

Download FPConsole Download FPConsole

Debug tool for Pascal Developer

This debug tool helps you directly write input and get output in Free Pascal Compiler without writing a new file.

Note: FPConsole requires Free Pascal Compiler installed on the system. Download here

Instructions:

These instructions are available in latest version ( v1.5.1 ). For old version, checkout wiki page for proper parameter.

Simple Execute

fpconsole [command]

  • Command Prompt : fpconsole [command]
C:\> fpconsole "write('Hello World');"

Command Prompt Example

  • Powershell : .\fpconsole [command]
PS C:\> .\fpconsole "write('Hello World');"

Powershell Example

  • Linux Terminal : ./fpconsole [command]
$ ./fpconsole "write('Hello World');"

Linux Example

Advanced Execute

  • Execute With Custom Parameter

fpconsole [Code] [Parameter]

  • Get Code From a Text File

fpconsole -f [File Include Code] [Parameter]

  • Edit Source File Before Compiling

fpconsole -fe [Parameter]

  • ...or Get The Whole Source Code

fpconsole -fs [Source Code File] [Parameter]

Example

PS C:\> .\fpconsole "write('Hello World')" "-e" "Hello"
# This will execute with parameter "-e" and "Hello"

PS C:\> .\fpconsole -f "Code.dat"
# This will read main program from "Code.dat"

PS C:\> .\fpconsole -fe
# This will open notepad/nano to edit

PS C:\> .\fpconsole -fs "Code.pas"
# This will copy "Code.pas" then compile

(Optional Files)

  • Add UNIT to _unit.dat
sysutils,
graph,
...
  • Add TYPE to _type.dat
Int = -128..128;
a = array[1..100] of integer;
...
  • Add CONST to _const.dat
s = 'Hello';
pi = 3.14;
...
  • Add VAR to _var.dat
s: string;
i,j,m,n: integer;
...

Project's Website

Changelog

Version 1.5.1

  • Fix SysFind(); function not working properly
  • Add icon

Version 1.5

  • Open defualt editor to edit source before compiling (-fe) (#13)
  • Add execution time (#11)
  • Code now can execute with custom parameters
  • Add color
  • Change Input Folder:
Old File Name New File Name
unit.dat _unit.dat
var.dat _var.dat
const.dat _const.dat
type.dat _type.dat

Version 1.3

  • Add support for Linux
  • Fix #5

Version 1.2.2 Build 170326

  • Change Work Folder to %TEMP%.
  • Add Help (-h), Clear (-c), Read Source (-fs).

Version 1.1 Build 170228

  • Automatic Find FPC Directory.

Version 1.0.1 Build 170227

  • Fix Directory.

Version 1.0 Build 170226

  • First Release.

License

MIT License (c) Nguyễn Tuấn Dũng (@winux8yt3)

About

Tool for running Pascal codes directly from console. (REPL-like)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages