Skip to content

Instantly share code, notes, and snippets.

@hernad
Created October 21, 2011 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hernad/1303280 to your computer and use it in GitHub Desktop.
Save hernad/1303280 to your computer and use it in GitHub Desktop.
github_fpc_compile_run.txt

Kreiram github u HOME direktoriju ako ga nisam ranije napravio:

hernad@macan:~$ mkdir github

Mijenjam direktorij:

hernad@macan:~$ cd github

Uzimam CT_pascal hsamrin repozitoriji sa github-a:

hernad@macan:~/github$ git clone https://github.com/hsamra/CT_pascal.git

Cloning into CT_pascal...
remote: Counting objects: 49, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 49 (delta 16), reused 34 (delta 1)
Unpacking objects: 100% (49/49), done.

Odlazim u CT_pascal direktorij koji sam dobio:

hernad@macan:~/github$ cd CT_pascal/

Compile/Link geometry_calculator-a:

hernad@macan:~/github/CT_pascal$ fpc geometry_calculator.pas

Free Pascal Compiler version 2.4.2 [2010/11/09] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Darwin for i386
Compiling geometry_calculator.pas
Assembling (pipe) geometry_calculator.s
Linking geometry_calculator
300 lines compiled, 0.7 sec 

Pokrećemo geometr_calculator executable direktno na konzoli:

hernad@macan:~/github/CT_pascal$ ./geometry_calculator

Welcome to the program Geometry calculator!

This program will can calculate the volume and area of five geometrical figures: cube, sphere, prism, cone and cylinder

Choose a number according to the geometrical figure whose area or volume you want to calculate

One is for a cube

Two is for a prism

Three is for a sphere

Four is for a cone

Five is for a cylinder

Radi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment