commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
e7ff86e5af853c04c6650ec23f1b41e2f6b309a4
Create main.pas
CoolProp/CoolProp,CoolProp/CoolProp,DANA-Laboratory/CoolProp,dcprojects/CoolProp,dcprojects/CoolProp,JonWel/CoolProp,DANA-Laboratory/CoolProp,henningjp/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,DANA-Laboratory/CoolProp,dcprojects/CoolProp,CoolProp/CoolProp,JonWel/CoolProp,henningjp/CoolProp,JonWe...
wrappers/Delphi/main.pas
wrappers/Delphi/main.pas
unit main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, superobject, uMolChart; type TMainForm = class(TForm) ListBox1: TListBox; PaintBox1: TPaintBox; StaticText1: TStaticText; procedure FormActivate(Sender: TObject); ...
mit
Pascal
e27830d3768dd5f688e58b4085f9305191824c8d
Create 1.3.19.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.3.19.pas
1.3.19.pas
var a,b:int64; begin readln(a,b); writeln(a*b); end.
mit
Pascal
9ead646c1fe33896f2918921dd642dfad221084c
Create 2.6.01.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.6.01.pas
2.6.01.pas
var m,t,i,j,ans:longint; v,w:array[0..108]of longint; f:array[0..108,0..1024]of longint; begin read(t,m); for i:=0 to m-1 do read(w[i],v[i]); for i:=0 to t do f[0,i]:=0; f[0,w[0]]:=v[0]; for i:=1 to m-1 do for j:=0 to t do begin f[i,j]:=f[i-1,j]; if (j>=w[i])and(f[i,j]<f[i-1,j-w[i]]+v[i]) then ...
mit
Pascal
8167e480835d35d5050d583595763d5d8194b081
Solve Simple Product in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1004/1004.pas
solutions/uri/1004/1004.pas
Var a : Integer; b : Integer; begin read(a); read(b); WriteLn('PROD = ', a * b); end.
mit
Pascal
dd52a8788105e256d76c6b969559176f00127031
Add entab
bewuethr/software-tools
chapter2/entab.pas
chapter2/entab.pas
{ complete entab } program entabprog (input, output); const ENDFILE = -1; NEWLINE = 10; { ASCII value } BLANK = 32; BACKSPACE = 8; TAB = 9; type character = -1..127; { ASCII, plus ENDFILE } { getc -- get one character from standard input } function getc (var c : character) : character; var...
mit
Pascal
66760740cb26555767b21e0806b325fa5047d5f9
Create 1.5.15.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.15.pas
1.5.15.pas
var eff,tmpeff,compare:extended; i,n,a,e,stda,stde:longint; begin readln(n); readln(stda,stde); eff:=stde/stda; for i:=1 to n-1 do begin readln(a,e); tmpeff:=e/a; compare:=tmpeff-eff; if compare<-0.05 then writeln('worse') else if compare>0.05 then writeln('better') else writeln('same'); ...
mit
Pascal
8375c404585ad307b36ed940709bd73ed3b71f40
Create 1.12.02.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.12.02.pas
1.12.02.pas
var n,ans,tmp,i:longint; begin read(n); ans:=0; for i:=1 to n do begin read(tmp); if tmp mod 70>0 then inc(ans,tmp div 70+1) else inc(ans,tmp div 70); end; writeln(ans*0.1:0:1); end.
mit
Pascal
090920f4d94d95fb1d4927a5300a278293dc746e
Create 2.1.08.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.1.08.pas
2.1.08.pas
var k,n1,n2,n3,n4,n5,depth,a,b,c,d,e:longint; begin readln(k,n1,n2,n3,n4,n5); k:=k*100; for depth:=1 to k do for a:=1 to depth div n1 do begin b:=depth-a*n1; c:=depth-b*n2; d:=depth-c*n3; e:=depth-d*n4; if (b>0)and(c>0)and(d>0)and(e>0)and (a<>b)and(a<>c)and(a<>d)and(a<>e)and (b<>c)and(b<>d)a...
mit
Pascal
d945399aae40b0abdea47a2ab3434b2ec9bf7569
Create 1.6.03.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.03.pas
1.6.03.pas
var i:longint; a:array[1..10]of longint; total:extended; begin for i:=1 to 10 do read(a[i]); total:=a[1]*28.9+a[2]*32.7+a[3]*45.6+a[4]*78+a[5]*35+a[6]*86.2+a[7]*27.8+a[8]*43+a[9]*56+a[10]*65; writeln(total:0:1); end.
mit
Pascal
a5d937c310694334c60e841e8359c0fb3639b25a
Add wordcount
bewuethr/software-tools
wordcount.pas
wordcount.pas
{ complete wordcount } program wordcountprog (input, output); const ENDFILE = -1; NEWLINE = 10; { ASCII value } BLANK = 32; TAB = 9; type character = -1..127; { ASCII, plus ENDFILE } { getc -- get one character from standard input } function getc (var c : character) : character; var ch : c...
mit
Pascal
8328b51239bf8a0e3446278bd9494407beb9a0e2
Create 1.5.31.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.31.pas
1.5.31.pas
var n,i,j:longint; s,sum:qword; begin readln(n); sum:=0; for i:=1 to n do begin s:=1; for j:=1 to i do s:=s*j; sum:=sum+s; end; writeln(sum); end.
mit
Pascal
fc8a23eb37ae55288753efe50da4720c0bdc7676
Add a support file to tests
rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn
spec/support/files/ola_mundo.pas
spec/support/files/ola_mundo.pas
program Ola; begin writeln ('Oi, mundo.') end.
mit
Pascal
97ac24d1a648af1c417b69340ed442affccd77ef
Create uDiamond.pas
exercism/xdelphi,rpottsoh/exercism-delphi,exercism/xpascal
exercises/diamond/uDiamond.pas
exercises/diamond/uDiamond.pas
unit uDiamond; interface type // This is a minimum class with just enough to satisfy the test interface TDiamond = class function Rows(const aLetter: Char): string; end; implementation { TDiamond } function TDiamond.Rows(const aLetter: Char): string; begin end; end.
mit
Pascal
67148aa746699f057bb926ab828d6467375c82e9
Add minimal exe to run any script
ukoloff/directum
Run.dpr
Run.dpr
Program Run; Uses SysUtils, Windows, ShellApi; { $R *.RES} Const Exts='js;vbs;bat;cmd;lnk;url'; Procedure runLink; Var X, R: String; i: Integer; Begin R:=Exts; Repeat i:=Pos(';', R); if 0=i Then i:=1+Length(R); X:=ChangeFileExt(ParamStr(0), '.'+Copy(R, 1, i-1)); if FileExists(X) Then Be...
isc
Pascal
86d6962de0e270aba5bebccdcc52dd8d05cccd93
add unit that returns the correct CPU count on all supported OSes.
PascalCoin/PascalCoin,PascalCoin/PascalCoin,PascalCoin/PascalCoin,PascalCoin/PascalCoin
src/core/ULogicalCPUCount.pas
src/core/ULogicalCPUCount.pas
unit ULogicalCPUCount; // http://wiki.lazarus.freepascal.org/Example_of_multi-threaded_application:_array_of_threads#1._Detect_number_of_cores_available. { Copyright (c) 2018 by Ugochukwu Mmaduekwe Distributed under the MIT software license, see the accompanying file LICENSE or visit http://www.opensource.org/lic...
mit
Pascal
8562d86d702f9be3291f31d1f5bded004942de00
Create Sample.pas
auycro/AESCrypt
Sample.pas
Sample.pas
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; edtText1: TEdit; edtPAss: TEdit; Button3: TButton; Button4: TButton; edtCipher: TEdit; Button5:...
mit
Pascal
87df86f325f41c005e010ebef751bdcb0c3070da
Create 1.5.27.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.27.pas
1.5.27.pas
var m,k,count:longint; f1,f2:boolean; begin readln(m,k); f1:=false; f2:=false; if m mod 19=0 then f1:=true; count:=0; while m>0 do begin if m mod 10=3 then inc(count); m:=m div 10; end; if count=k then f2:=true; if f1 and f2 then writeln('YES') else writeln('NO'); end.
mit
Pascal
23f091b408fc45dafeda1a7cca960e79a1f15167
Create 5.1.07.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
5.1.07.pas
5.1.07.pas
var x,a,y,b:longint; begin readln(x,a,y,b); writeln((a*x-b*y)/(a-b):0:2); end.
mit
Pascal
6b2c304a594904c97a760a911229762ffde9dbb3
Create 1.5.09.pag
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.09.pas
1.5.09.pas
var cal1,cal5,cal10,tmp,i,n:longint; begin readln(n); cal1:=0; cal5:=0; cal10:=0; for i:=1 to n do begin read(tmp); if tmp=1 then inc(cal1); if tmp=5 then inc(cal5); if tmp=10 then inc(cal10); end; writeln(cal1); writeln(cal5); writeln(cal10); end.
mit
Pascal
10897635abb7ec86a7539cbf8b08aa2060e876b7
Create InverseMatrix.pas
LukeStorry/Matrices
InverseMatrix/InverseMatrix.pas
InverseMatrix/InverseMatrix.pas
//Written by Luke Storry //Matrices Project program InverseMatrix; uses crt; type TMatrix = record name : String; columns , rows : Integer; mat : array[1..50,1..50] of Real; end; //of TMatrix defininition var input , inverse : TMatrix; procedure InputMatrix(input:TMatri...
mit
Pascal
20b582c0a8a20463747f0d6d621b7f31b16c68a3
Add managed records snippet
RomanYankovsky/DelphiAST,Wosi/DelphiAST
Test/Snippets/managedrecords.pas
Test/Snippets/managedrecords.pas
unit managedrecords; interface type TMyRecord = record Value: Integer; class operator Initialize (out Dest: TMyRecord); class operator Finalize(var Dest: TMyRecord); end; implementation class operator TMyRecord.Initialize (out Dest: TMyRecord); begin Dest.Value := 10; Log('created' + IntToHex (...
mpl-2.0
Pascal
ca81c1518b1d1ffdf5375447d0427e8c9eda1c1a
Create Algoritmo_01.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmos-em-Pascal/Algoritmo_01.pas
Algoritmos-em-Pascal/Algoritmo_01.pas
program Maior_Menor_inteiro; uses crt; {usar o delay, clrscr, } var N : integer; var Max,Min : integer; var i : integer; begin write ('Insira um numero inteiro: '); read (N); Max := N; Min := N; clrscr; i:=1; while (i=1) do begin write ('Insira um numero inteiro: '); read (N); if (N = 0) then begin i:=0; end; ...
mit
Pascal
e14d4e3502523566b416a029eadd81fc8778406a
Create heap.pas
MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-heap-benchmark,MikeMirzayanov/binary-he...
pascal/heap.pas
pascal/heap.pas
uses dos; const MAXN = 10000000; var h: array[0..MAXN - 1] of longInt; procedure swap(var x, y: longInt); begin x := x xor y; y := x xor y; x := x xor y; end; procedure pushDown(pos, n: longInt); var j: longInt; begin while (2 * pos + 1 < n) do begin j := 2 * pos + 1; if (j + 1 <...
mit
Pascal
ec7ccdbd72cf112f0ff1239e13b835a773eca974
添加Diocp文件服务器客户端演示DEMO, 可以使用IdTcpClient和DiocpBlockTcpClient通信组件(自由切换)。 (感谢[为我喝彩/bei 36581474]对DiocpV5的赞助)
ymofen/diocp-v5
samples/DiocpCoders/IdTCPClientCoderImpl.pas
samples/DiocpCoders/IdTCPClientCoderImpl.pas
(* unit owner: Diocp.Author IdTcpClientʵICoderSocketӿ *) unit IdTCPClientCoderImpl; interface uses uICoderSocket, SysUtils, IdTCPClient, IdGlobal; type TIdTCPClientCoderImpl = class(TInterfacedObject, ICoderSocket) private FReconnect: Boolean; FTcpClient: TIdTCPClient; procedure CheckConnect...
bsd-2-clause
Pascal
00dad47d88267585774f80192c35a010fcb7ee7a
Create uMolChart.pas
dcprojects/CoolProp,henningjp/CoolProp,JonWel/CoolProp,dcprojects/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,DANA-Laboratory/CoolProp,henningjp/CoolProp,dcprojects/CoolProp,JonWel/CoolProp,DANA-Laboratory/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,DANA-Laboratory/CoolProp,JonWel/CoolProp,dcproje...
wrappers/Delphi/uMolChart.pas
wrappers/Delphi/uMolChart.pas
unit uMolChart; interface uses SysUtils, Windows, Graphics, Classes, superobject, cpIntf; type fvec = array of Double; TMolChart = class private FCanvas: TCanvas; R: TRect; FMargin: Integer; x0, x1, y0, y1: Double; lny0, lny1: Double; xf, yf: Double; procedure CalcScaleFactor;...
mit
Pascal
f415de6adc0f1673dceaa1c7688bab50f213137a
Create pasred.pas
besm6/pascal-re,besm6/pascal-re,besm6/pascal-re
pasred.pas
pasred.pas
(*=p-,t-,s5,s8*)program noprog(output); type arg=record buflen, inplen: integer; dummy1, dummy2: integer; buf: record case integer of 1: (w: array[1..26] of alfa); 2: (c: packed array[1..140] of 0..255); end; end; procedure pasinp (var a, b: alfa); fortran; (*=e+*)procedure pasred(var data:...
mit
Pascal
2e7453010a723adc8d0d60b7e279dc92c38b507b
Create 2.1.04.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.1.04.pas
2.1.04.pas
var i,n,k,j:longint; a:array[1..2000]of longint; f:boolean; begin readln(n,k); for i:=1 to n do read(a[i]); f:=false; for i:=1 to n-1 do for j:=i to n do if a[i]+a[j]=k then f:=true; if f then writeln('yes') else writeln('no'); end.
mit
Pascal
4b0da46dd97e6e2b1f31598a10a5a467979e736e
Create 2.6.09.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.6.09.pas
2.6.09.pas
var dp:array [1..100, 1..100] of longint; arr:array[1..100, 1..100] of longint; r,c:longint; res,i,j:longint; function getHeight(i,j:longint):longint; var max,h:longint; begin if (dp[i,j]>1) then begin getHeight:=dp[i,j]; exit; end; max:=1; if (arr[i,j]>arr[i,j-1])and(j-1>=0) then begin h:...
mit
Pascal
eb75b2fdda7aaee56f70cdde57c2a196f09a4287
Create 1.6.02.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.02.pas
1.6.02.pas
var height,i,count:longint; apple:array[1..10]of longint; begin for i:=1 to 10 do read(apple[i]); readln(height); count:=0; for i:=1 to 10 do if height+30>=apple[i] then inc(count); writeln(count); end.
mit
Pascal
9faa311a9657bb11b77f215be143df29203b9099
Add bublesort program that repeats itself 10 times
chovanecm/pascal-truffle,chovanecm/pascal-truffle
benchmarks/bubble10.pas
benchmarks/bubble10.pas
program bubble; var arr : array [1..10000] of integer; var n, i, j : integer; var tmp : integer; var sorted: boolean; var swaps : integer; var runs : integer; begin {run the program 10 times} writeln('Running the program 10 times...'); for runs := 1 to 10 do begin n := 10000; swaps := 0; { generate array } for i:= ...
mit
Pascal
2ad4d673766210c1c9416d61851c96d6b4dcfeca
Create Exercicio_02.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmos_II/Lista_03/Exercicio_02.pas
Algoritmos_II/Lista_03/Exercicio_02.pas
{ Elabore um algoritmo que leia um conjunto de 10 dados numéricos e gere dois vetores, o primeiro (vetor X) com os elementos de ordem par, e o segundo (vetor Y) com os elementos de ordem ímpar. } program Untitled1; var i: integer; var x: array [1..5] of integer; var y: array [1..5] of integer; var index_x: integer; ...
mit
Pascal
30b9cc5c96d2f872d96e7a169f1637fdc966d514
Add pascal functino example
clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone,clinoge/primer-semestre-udone
src/06-funciones/funciones.pas
src/06-funciones/funciones.pas
Program Funciones; Function Capitalizar(nombre: String) : String; Forward; Procedure Saludar(nombre : String); Begin WriteLn('Hola ' + Capitalizar(nombre) + '!'); End; Function Capitalizar(nombre: String) : String; Var capitalizarActual: Boolean; indice: Integer; caracterActual: Char; Begin indice := 1; c...
mit
Pascal
b2fce612d2975adefd18ec9b1f1d24b3c2973c71
Add a new test case.
sighingnow/compiler-work
pl0_cases/test_ref3.pas
pl0_cases/test_ref3.pas
const x=20; var y, z, a: integer; function xel(var arg1, arg2: integer): integer; begin z := 2; arg1 := arg1 + arg2 + x end; begin y := 10; z := 9; a := xel(y, z); if y = 32 then write("reference argument 3 success.") else write("reference argument 3 failed.", ...
mit
Pascal
816cf55a6b9b497742b9f160d72f9668200ac36e
Create 1.6.10.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.10.pas
1.6.10.pas
uses math; type num=record len:longint; storage:array[1..10000]of longint; end; function add(a,b:num):num; var i:longint; begin add.len:=max(a.len,b.len); fillchar(add.storage,sizeof(add.storage),0); for i:=1 to add.len+2 do begin inc(add.storage[i],a.storage[i]+b.storage[i]); if add.storage[i]>=10 th...
mit
Pascal
0add46cb58112db9777fd809dfd926417895a490
Create 1.3.18.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.3.18.pas
1.3.18.pas
var x1,x2,y1,y2,x3,y3,a,b,c,r:extended; begin readln(x1,y1,x2,y2,x3,y3); a:=sqrt(sqr(x1-x2)+sqr(y1-y2)); b:=sqrt(sqr(x2-x3)+sqr(y2-y3)); c:=sqrt(sqr(x3-x1)+sqr(y3-y1)); r:=(a+b+c)/2; writeln(sqrt(r*(r-a)*(r-b)*(r-c)):0:2); end.
mit
Pascal
9b3cf0beb8f24b506df689500b7f848d88f4ce3e
Create 1.5.20.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.20.pas
1.5.20.pas
var tot,per,no,i,needs:longint; begin readln(tot); readln(per); no:=0; for i:=1 to per do begin read(needs); if needs>tot then inc(no) else dec(tot,needs); end; writeln(no); end.
mit
Pascal
48ecc731e0154588c9ec63af41e9ccdd80325091
Solve Difference in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1007/1007.pas
solutions/uri/1007/1007.pas
Uses sysutils; Var a : Integer; b : Integer; c : Integer; d : Integer; begin read(a); read(b); read(c); read(d); WriteLn(Format('DIFERENCA = %d', [a * b - c * d])); end.
mit
Pascal
e0047ca17c66acb4ffb1d158c8e674b224ec8597
Add linecount
bewuethr/software-tools
linecount.pas
linecount.pas
{ complete linecount } program linecountprog (input, output); const ENDFILE = -1; NEWLINE = 10; { ASCII value } type character = -1..127; { ASCII, plus ENDFILE } { getc -- get one character from standard input } function getc (var c : character) : character; var ch : char; begin if (eof) then ...
mit
Pascal
606b69617f80ed3d3092adbaff441b45b313dbe2
Solve Area of a Circle in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1002/1002.pas
solutions/uri/1002/1002.pas
Uses sysutils; Var n : Double; begin read(n); WriteLn(Format('A=%.4f', [n * n * 3.14159])); end.
mit
Pascal
32729bfc8c2c45f56457a52a7e5c85a2ae2586cc
Solve Average 1 in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1005/1005.pas
solutions/uri/1005/1005.pas
Uses sysutils; Var a : Double; b : Double; begin read(a); read(b); WriteLn(Format('MEDIA = %.5f', [(a * 3.5 + b * 7.5) / 11.0])); end.
mit
Pascal
80d6de08195d28bd1d809b89771c20fa9b9639a6
Add missing FPC code
samuell/gccontent-benchmark,samuell/gccontent-benchmark,samuell/gccontent-benchmark,samuell/gccontent-benchmark
fpc.000/gc.pas
fpc.000/gc.pas
program gc; uses Sysutils; var FastaFile: TextFile; CurrentLine: String; GCCount: LongInt; ATCount: LongInt; TotalBaseCount: LongInt; c: Char; GCFraction: Single; PC,PCEnd: PChar; begin ATCount := 0; GCCount := 0; TotalBaseCount := 0; Assign(FastaFile, 'Homo_s...
mit
Pascal
f8b08bcc790b5f44bcc233572ef092a4e0f082c1
Create 1.6.01.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.01.pas
1.6.01.pas
var n,m,i,count:longint; a:array[1..200]of longint; begin readln(n); for i:=1 to n do read(a[i]); readln(m); count:=0; for i:=1 to n do if a[i]=m then inc(count); writeln(count); end.
mit
Pascal
9815fa215d45fb89bef652d6fc2d37736234d8c1
Create pascal.pas
jasterstary/neverending-streaming,jasterstary/neverending-streaming,jasterstary/neverending-streaming,jasterstary/neverending-streaming
example/pascal.pas
example/pascal.pas
program longpolling; {$IFDEF FPC}{$mode objfpc}{$H+}{$ENDIF} {$APPTYPE CONSOLE} uses sysutils, //Powtils aka Pascal Server Pages used: https://github.com/z505/powtils: pwinit, pwmain; var i: integer; begin Randomize; for i:=0 to 9 do begin out('<chunk>Hello ' + inttostr(i) + '!</chunk>'); sleep(...
mit
Pascal
82d4d094b3fc56262f9520ea32b3766e59ed43bf
Create 1.6.09.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.09.pas
1.6.09.pas
type num=record len:longint; storage:array[1..1000]of integer; end; var ans:num; n,i,j:longint; begin readln(n); ans.len:=1; fillchar(ans.storage,sizeof(ans.storage),0); ans.storage[1]:=1; for i:=1 to n do begin for j:=1 to ans.len do ans.storage[j]:=ans.storage[j]*2; for j:=1 to ans.len do if an...
mit
Pascal
5f16133324b7f62dedc6e141510b40309906fa07
Create 1.4.12.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.4.12.pas
1.4.12.pas
var walk,bike:extended; s:longint; begin readln(s); walk:=s/1.2; bike:=s/3+27+23; if walk<bike then writeln('Walk') else if walk=bike then writeln('All') else writeln('Bike'); end.
mit
Pascal
53a3d9982e5e8a486338037b8c4af72572bfd81e
Create 1.6.08.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.08.pas
1.6.08.pas
uses math; type num=record len:longint; storage:array[1..500]of integer; end; var a,b,ans:num; str:string; i:longint; begin readln(str); fillchar(a.storage,sizeof(a.storage),0); fillchar(b.storage,sizeof(b.storage),0); fillchar(ans.storage,sizeof(ans.storage),0); a.len:=length(str); for i:=length...
mit
Pascal
9f13611b51c57bbd82ca4ce93a4c68c2a4fd5f58
Create 1.6.06.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.06.pas
1.6.06.pas
var a:array[0..10000]of boolean; i,j,s,e,count,l,m:longint; begin readln(l,m); fillchar(a,sizeof(a),true); for i:=1 to m do begin readln(s,e); for j:=s to e do a[j]:=false; end; count:=0; for i:=0 to l do if a[i] then inc(count); writeln(count); end.
mit
Pascal
e74744d0c1c8e0dfd2cf7aae275b76ca2a3974fb
Add compress
bewuethr/software-tools
chapter2/compress.pas
chapter2/compress.pas
{ complete compress } program compressprog (input, output); const ENDFILE = -1; NEWLINE = 10; { ASCII value } TILDE = 126; type character = -1..127; { ASCII, plus ENDFILE } { getc -- get one character from standard input } function getc (var c : character) : character; var ch : char; begin ...
mit
Pascal
fc194444bea407cea59ce91a1b82222fb2c456e1
add forgotten Unit KM_Helpers
reyandme/kam_remake,reyandme/kam_remake,reyandme/kam_remake,thibmo/kam_remake,thibmo/kam_remake,reyandme/kam_remake,thibmo/kam_remake,reyandme/kam_remake,thibmo/kam_remake,thibmo/kam_remake
src/utils/KM_Helpers.pas
src/utils/KM_Helpers.pas
unit KM_Helpers; interface uses Vcl.StdCtrls; type TCheckBoxHelper = class helper for TCheckBox procedure SetStateWithoutClick(aState: TCheckBoxState); procedure SetCheckedWithoutClick(aChecked: Boolean); end; implementation uses Classes; { TCheckBoxHelper } procedure TCheckBoxHel...
agpl-3.0
Pascal
de8b6b9a7f9cbc912cd119b889a961a131bdf4c7
Create 2.1.07.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.1.07.pas
2.1.07.pas
var one,two,five,num,n:longint; begin readln(n); num:=0; for five:=0 to n div 5 do for two:=0 to n div 2 do for one:=0 to n do if (one*1+two*2+five*5=n)then begin inc(num); if num<10 then write('00',num) else if num<100 then write('0',num) else if num>=100 then write(num); ...
mit
Pascal
3b8c141bc314cb6f39fab27452be979ce62eddae
fix win-duby compilation
graemeg/fpdebug
dubylib/wintools32.pas
dubylib/wintools32.pas
unit winTools32; interface {$ifdef fpc}{$mode delphi}{$h+}{$endif} uses Windows; type TThreadEntry32 = packed record dwSize : DWORD; cntUsage : DWORD; th32ThreadID : DWORD; th32OwnerProcessID : DWORD; tpBasePri : LONG; tpDeltaPri ...
bsd-2-clause
Pascal
5d6de83e0949ec9cf35e550f6e093d8c06b65097
Create 1.5.18.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.18.pas
1.5.18.pas
var n:qword; begin readln(n); if n=1 then begin writeln('End'); exit; end; repeat if n mod 2=1 then begin writeln(n,'*3+1=',n*3+1); n:=n*3+1; end else begin writeln(n,'/2=',n div 2); n:=n div 2; end; until n=1; writeln('End'); end.
mit
Pascal
5faf81925ad99293c757bc871298db18ac406a7f
Create 1.6.07.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.07.pas
1.6.07.pas
var n,ans,i:longint; a,b:array[1..1000]of longint; begin readln(n); ans:=0; for i:=1 to n do read(a[i]); for i:=1 to n do read(b[i]); for i:=1 to n do inc(ans,a[i]*b[i]); writeln(ans); end.
mit
Pascal
d7b6611a5fc4d737b9a2110610dfea17c6a5e68b
Create topult.pas
besm6/pascal-re,besm6/pascal-re,besm6/pascal-re
topult.pas
topult.pas
(*=p-,t-,s8*) program topult(input, output, isopgost, result); var isopgost: packed array ['_000'..'_177'] of char; result:text; unused, syms, i, j, lines:integer; map:array ['_000'..'_177'] of char; unpline:array[1..80] of char; pckline:packed array[1..80] of char; procedure PASISOCD; external; _( unpack(isopgost, ma...
mit
Pascal
ba73d9653e63208a62fe271c6c18019d3accbb3f
Create Algoritmo_02_Pascal-colorito-.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmo_02_Pascal-colorito-.pas
Algoritmo_02_Pascal-colorito-.pas
program Fludo_de_Estoque; {nome do programa} uses dos,crt; {usar funções para adicionar cores na letra e no fundo} const max = 9; {numero máximo de cadastro de produtos 10 - 0 a 9} var {Variáveis com vetores / array} codigo, quantidade:array [0..max] of integer; {Variaveis com numeros inteiros} valor: array [0..ma...
mit
Pascal
49573d953c23db605ac549512c314220ea786874
update to v1.1.0
exercism/xpascal,rpottsoh/exercism-delphi,exercism/xdelphi,rpottsoh/xdelphi,rpottsoh/xpascal
exercises/rna-transcription/uTestRnaTranscription.pas
exercises/rna-transcription/uTestRnaTranscription.pas
unit uTestRnaTranscription; interface uses DUnitX.TestFramework; const CanonicalVersion = '1.1.0'; type [TestFixture] RnaTranscriptionTest = class(TObject) public [Test] // [Ignore('Comment the "[Ignore]" statement to run the test')] procedure Rna_complement_of_cytosine_is_guanine; [Test] ...
unit uTestRnaTranscription; interface uses DUnitX.TestFramework; type [TestFixture] RnaTranscriptionTest = class(TObject) public [Test] // [Ignore('Comment the "[Ignore]" statement to run the test')] procedure Rna_complement_of_cytosine_is_guanine; [Test] [Ignore] procedure Rna_complemen...
mit
Pascal
1626a1e50460f62958d52907c705d77fb8c77a15
Create 1.3.20.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.3.20.pas
1.3.20.pas
var ans:qword; n,i:longint; begin readln(n); ans:=1; for i:=1 to n do ans:=ans*2; writeln(ans); end.
mit
Pascal
f68d56794c26f4757d2f02924d8a84a72b1e676a
test large frame, 6000x6000
wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI
examples/gui/scrollframe/bigframe_test.lpr
examples/gui/scrollframe/bigframe_test.lpr
program bigframe_test; {$mode objfpc}{$H+} uses Classes, sysutils, fpg_base, fpg_main, fpg_button, fpg_label, fpg_form, fpg_panel, fpg_scrollframe ; procedure create_buttons (f : TfpgFrame); var i, j, ij : integer; b : TfpgButton; const num_button_cols = 4; num_button_rows = 5; begin wi...
lgpl-2.1
Pascal
06b5625ca4d44f840c3141476aea37737c85622e
Add copy.pas
bewuethr/software-tools
copy.pas
copy.pas
{ complete copy -- to show one possible implementation } program copyprog (input, output); const ENDFILE = -1; NEWLINE = 10; { ASCII value } type character = -1..127; { ASCII, plus ENDFILE } { getc -- get one character from standard input } function getc (var c : character) : character; var ch : c...
mit
Pascal
1ede1ee01df7116feec882cc01a29587a6270684
Solve Extremely Basic in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1001/1001.pas
solutions/uri/1001/1001.pas
Var a : Integer; b : Integer; begin read(a); read(b); WriteLn('X = ', a + b); end.
mit
Pascal
c6d81a68b3173f31ac0a46473993abf78fd532b5
Update 20160204-1
novuslogic/Zautomatic,novuslogic/Zautomatic
source/Plugins/API/API_Zip.pas
source/Plugins/API/API_Zip.pas
unit API_Zip; interface uses Classes, SysUtils, Zip, APIBase; type TAPI_Zip = class(TAPIBase) private protected public function ZipCompress: Boolean; function ZipExtractAll: Boolean; function ZipExtractFile(const aArchiveFilename: String; const aFileName: strin...
apache-2.0
Pascal
8b0baff22729f212824b18dbee672a63f9ddd275
Create a.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmos_I/Fluxo_de_Estoque_PASCAL/a.pas
Algoritmos_I/Fluxo_de_Estoque_PASCAL/a.pas
mit
Pascal
3dd9ad28d56800a82b77309582a637fd9459370c
Create Exercicio_01.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmos_II/Lista_03/Exercicio_01.pas
Algoritmos_II/Lista_03/Exercicio_01.pas
{ Elabore um algoritmo que leia um conjunto de 10 dados numéricos inteiros e gere dois vetores, o primeiro (vetor X) contendo os elementos pares e o segundo (vetor Y) contendo os elementos ímpares. } program Untitled1; var num: integer; var x: array [1..10] of integer; var y: array [1..10] of integer; var index_x: i...
mit
Pascal
dfd3f82bcac8b6e0916a977b08b92ce533c59af9
Create Algoritmo_02.pas
carlosvilela/Algoritmos,carlosvilela/Algoritmos,carlosvilela/Algoritmos
Algoritmos-em-Pascal/Algoritmo_02.pas
Algoritmos-em-Pascal/Algoritmo_02.pas
program Cadastro_Bois; uses crt; {usar dalay, clrscr} const num_Cadastro = 90; var codigo : array of integer; {array infinito} var peso : array [0..num_Cadastro] of integer; {array limitado} var Max, Min : integer; var i : integer; begin write ('Insira o Codigo: '); read (codigo[0]); write ('Insira o Peso: ');...
mit
Pascal
073219d91a9ace72c0730944a133a6003f09a836
Add forgotten file
Leporacanthicus/lacsap,Leporacanthicus/lacsap,Leporacanthicus/lacsap
test/popcnt.pas
test/popcnt.pas
program populationcount; begin writeln(popcnt(5):2); writeln(popcnt(16):2); writeln(popcnt(31):2); writeln(popcnt(-1):2); writeln(popcnt(['a'..'z']):3); writeln(popcnt([1..2]):2); end.
isc
Pascal
8699b027a62070be2de2ff9e07b7d2b2ebcb894f
Create 2.6.05.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.6.05.pas
2.6.05.pas
var n,i,j:longint; a,f:array[0..108,0..108]of longint; begin readln(n); for i:=0 to n-1 do for j:=0 to n-1 do read(a[i,j]); f[0,0]:=a[0,0]; for i:=1 to n-1 do begin f[0,i]:=f[0,i-1]+a[0,i]; f[i,0]:=f[i-1,0]+a[i,0]; end; for i:=1 to n-1 do for j:=1 to n-1 do if f[i-1,j]<f[i,j-1] then f[i,j]...
mit
Pascal
6dffce623dcb489b49d69e9267481fcc6dabcf85
Solve Salary in pascal
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1008/1008.pas
solutions/uri/1008/1008.pas
Uses sysutils; Var a : Integer; b : Integer; c : Double; begin read(a); read(b); read(c); WriteLn(Format('NUMBER = %d', [a])); WriteLn(Format('SALARY = U$ %.2f', [b * c])); end.
mit
Pascal
fb2b7bbc372adb9f25805ed69ba9d437124cf84e
Create 1.5.06.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.06.pas
1.5.06.pas
var n,i,g,s,b,sumg,sums,sumb:longint; begin read(n); sumg:=0; sums:=0; sumb:=0; for i:=1 to n do begin read(g,s,b); sumg:=sumg+g; sums:=sums+s; sumb:=sumb+b; end; writeln(sumg,' ',sums,' ',sumb,' ',sumg+sums+sumb); end.
mit
Pascal
4f9375da856026a282e4a5bd6becf8ba522d3f0b
Create 01.pas
ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes,ice1000/OI-codes
POJ/ch0101/01.pas
POJ/ch0101/01.pas
begin writeln('Hello, World!'); end.
agpl-3.0
Pascal
d59853a27a17d475f379159937a4a11ec31761f6
Create 1.6.05.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.6.05.pas
1.6.05.pas
var n,i,age,a,b,c,d:longint; begin readln(n); a:=0; b:=0; c:=0; d:=0; for i:=1 to n do begin read(age); if (0<=age)and(age<=18) then inc(a); if (19<=age)and(age<=35) then inc(b); if (36<=age)and(age<=60) then inc(c); if (61<=age) then inc(d); end; writeln(a/n*100:0:2,'%'); writeln(...
mit
Pascal
d487b6c243a1676bead34a6d97ae647588023ba6
Add bublesort benchmark
chovanecm/pascal-truffle,chovanecm/pascal-truffle
benchmarks/bubble.pas
benchmarks/bubble.pas
program bubble; var arr : array [1..10000] of integer; var n, i, j : integer; var tmp : integer; var sorted: boolean; swaps : integer; begin n := 10000; swaps := 0; { generate array } for i:= 1 to n do begin arr[i] := n - i; end; {bubble sort} for i:=2 to n do begin for j:=n downto i do begin if arr[j] < arr[j...
mit
Pascal
51bf3f57bdff99821f0866d77ecd6f4a8322edf6
Add sieve.pas for now
Leporacanthicus/lacsap,Leporacanthicus/lacsap,Leporacanthicus/lacsap
sieve.pas
sieve.pas
program SieveOfEratosthenes; const maxNum = 100000; nLoops = 10000; type int32 = integer; procedure Sieve; var Data: array [1..maxNum] of boolean; i,j: int32; begin for i := 1 to maxNum do Data[i] := true; for i := 2 to maxNum do begin if Data[i] then begin j := i+i; ...
isc
Pascal
ee13de8387beb204168f604fb3a8362c3e5d47b6
Add file to test cases
Leporacanthicus/lacsap,Leporacanthicus/lacsap,Leporacanthicus/lacsap
case.pas
case.pas
program testcases; type days = (monday, tuesday, wednesday, thursday, friday, saturday, sunday); var i : integer; d : days; procedure numbertotext(n : integer); begin case n of 0 : writeln('zero'); 1 : writeln('one'); 2 : writeln('two'); 3 : writeln('three'); 4 : writeln('...
isc
Pascal
0db02f6fc9d8930e44904bc1277ca6f4bda1a6a3
Add missing test/packunpack.pas
Leporacanthicus/lacsap,Leporacanthicus/lacsap,Leporacanthicus/lacsap
test/packunpack.pas
test/packunpack.pas
program packunpack; type arri = array (.1..10.) of integer; var avi : arri; pavi : packed array [1..10] of integer; i : integer; x : integer; ci : char; cia : array [char] of integer; pcia : packed array [char] of integer; begin for i := 1 to 10 do avi[i] := i+20; pack(avi, 1, ...
isc
Pascal
f038591a1f16ff30cd20c41b9fd4cc47b7e8d22a
Create 2.1.05.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.1.05.pas
2.1.05.pas
begin writeln('l 50'); writeln('q 40'); writeln('z 20'); writeln('s 10'); end.
mit
Pascal
f4256e2dbee421f5e09911d709b5821530cfb042
Create 2.6.08.pas
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
2.6.08.pas
2.6.08.pas
uses math; var n,m:longint; answer:array[1..101,1..11]of longint; function getHeight(n,m:longint):longint; var times,x,y,z,j:longint; begin if m=1 then begin getHeight:=n; exit; end else if n<=1 then begin getHeight:=n; exit; end else begin if (answer[n,m]<>0) then begin getHeight:=ans...
mit
Pascal
eb1b5bf4fdb0faa2390de957d1c80759668c38f9
Create hello_world.pas
WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,WebClub-NITK/Hacktoberfest-2k17,...
hello_world.pas
hello_world.pas
Program HelloWorld; Begin Writeln('Hello World!'); ReadKey; End.
mit
Pascal
9e9f0cd00b72aa09576fc40ddc2e9e6c68efcc61
Create pastime.pas
besm6/pascal-re,besm6/pascal-re,besm6/pascal-re
pastime.pas
pastime.pas
(*=p-,t-,s8,y+*)program pastime(output, (*=s1*)timeold); var timeold : real; function pascodad(a, b: integer): char; external; procedure time; var l2var1z, l2var2z:real; l2var3z: char; _( l2var1z := ord(PASCODAD(0, 630004C)); l2var1z := l2var1z / 50; l2var3z := PASCODAD(0, 630000C); l2var2z := ; write...
mit
Pascal
e76e175358d492f531f2f2b1375d105962563625
add missing 'lazarus application file'
ivere27/node-pascal
gui/project1.lpr
gui/project1.lpr
program project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset Forms, Unit1 { you can add units after this }; {$R *.res} begin RequireDerivedFormResource:=True; Application.Initialize; Application.CreateForm(TF...
agpl-3.0
Pascal
bef93faf42ed1a40a727f67a53e41dbc1e5cdb08
Refactor last program into its own
DirkyJerky/OtherProgrammingClass
PROG_19.dpr
PROG_19.dpr
PROGRAM FactorMe(input, output) { Geoff Yoerger Program 10.19 Due: AHEAD Purpose: TODO } CONST TYPE CharArrayTYPE : array[1..4, 1..4, 1..2] OF char; // TYPEDEF: 4 high school s, 4 quarters, 2 classes VAR ourScores : CharArrayTYPE; usersName : String; yearName : String; className : String; i, i...
mit
Pascal
8650e3a3249676f27bfd49dbb88aa47e396debdd
Create 1.5.07.[as
magetron/NOIP-openjudge,magetron/NOIP-openjudge,magetron/NOIP-openjudge
1.5.07.pas
1.5.07.pas
var m,n,sum,i:longint; begin readln(m,n); sum:=0; for i:=m to n do if (i mod 2=1) then sum:=sum+i; writeln(sum); end.
mit
Pascal
8d3e8a3745a1ab59807b8c209987a21044041a65
Create hc.f
Riccardo990/accessibility-advisor,Riccardo990/unoxtutti,Riccardo990/unoxtutti,Riccardo990/accessibility-advisor
www/res/icon/bada/hc.f
www/res/icon/bada/hc.f
apache-2.0
FORTRAN
51a3271dc807abe63f9382c2a91dd280c816d494
comment superfluous code
scienceopen/spectral_analysis,scienceopen/spectral_analysis,scienceopen/spectral_analysis,scienceopen/spectral_analysis
filters.f90
filters.f90
module filters use, intrinsic:: iso_fortran_env, only: stderr=>error_unit use, intrinsic:: iso_c_binding, only: c_int, c_bool ! use, intrinsic:: ieee_arithmetic, only: ieee_is_nan use comm, only: sp implicit none private ! https://www.doc.ic.ac.uk/~eedwards/compsys/float/nan.html real(sp...
module filters use, intrinsic:: iso_fortran_env, only: stderr=>error_unit use, intrinsic:: iso_c_binding, only: c_int, c_bool use, intrinsic:: ieee_arithmetic, only: ieee_is_nan use comm, only: sp implicit none private ! https://www.doc.ic.ac.uk/~eedwards/compsys/float/nan.html real(sp)...
mit
FORTRAN
f0bcc29f21bf3b78d1f1b1199df5c75c794ddd00
Improve comments
rekka/intro-fortran-2016,rekka/intro-fortran-2016
lec14/implicit_heat.f90
lec14/implicit_heat.f90
program implict_heat implicit none integer :: i, k integer, parameter :: M = 10 ! we store only values at x_2, ..., x_M real, dimension(M - 1) :: u, b real :: h, c, tau, pi = 4. * atan(1.), x, t real :: a0, a1 ! set boundary data a0 = 0. a1 = 0. ! initiialize parameters ...
program implict_heat implicit none integer :: i, k integer, parameter :: M = 10 real, dimension(M - 1) :: u, b real :: h, c, tau, pi = 4. * atan(1.), x, t real :: a0, a1 a0 = 0. a1 = 0. h = 1. / M tau = h c = tau / (h * h) ! initialize do k = 1, M - 1 x = k...
mit
FORTRAN
b832f533b52420b548331a3adec76ff7e2c13c5b
add binning loop, assertions and set seed
laurensdeprez/RMPCDMD,pdebuyl-lab/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD
test/test_common_0.f90
test/test_common_0.f90
program test_common_0 use common use tester implicit none type(tester_t) :: test type(profile_t) :: p double precision :: x0, x1 integer :: i integer :: n integer, parameter :: nloop = 100 integer :: seed_size, clock integer, allocatable :: seed(:) call random_seed(size = seed_size) alloc...
program test_common_0 use common use tester implicit none type(tester_t) :: test type(profile_t) :: p double precision :: x0, x1 integer :: n call test% init() x0 = 7.d0 x1 = 10.d0 n = 19 call p% init(x0, x1, n) call test% assert_positive(p% dx) call test% assert_positive(p% count) ...
bsd-3-clause
FORTRAN
4c94b819aa9b948be7a46dd7704b629145d9aec8
remove erroneous *2 factor in the energy
cphyc/n-body,cphyc/n-body
physics.f90
physics.f90
module physics use constants implicit none private public :: initial_speeds, compute_force, compute_initial_variables, compute_energy, integrate contains subroutine initial_speeds (r, v) real(kind = xp), dimension(:, :), intent(in) :: r real(kind = xp), dimension(:, :), intent(out) :: v real...
module physics use constants implicit none private public :: initial_speeds, compute_force, compute_initial_variables, compute_energy, integrate contains subroutine initial_speeds (r, v) real(kind = xp), dimension(:, :), intent(in) :: r real(kind = xp), dimension(:, :), intent(out) :: v real...
mit
FORTRAN
c26ba0a055ede6b2527538c9ee175af1edf133a2
fix api module passing
scienceopen/glowaurora,scienceopen/glowaurora
fortrancode/egrid.f
fortrancode/egrid.f
! Subroutine EGRID sets up electron energy grid ! ! Stan Solomon, 1/92 ! ! This software is part of the GLOW model. Use is governed by the Open Source ! Academic Research License Agreement contained in the file glowlicense.txt. ! For more information see the file glow.txt. ! SUBROUTINE EGRID (ENER, DEL) us...
agpl-3.0
FORTRAN
5dbdf2e4f2b9966e7df14e51bb579491020bf912
use renaming refactorings added, module intro
ucam-cl-dtg/naps-camfort
samples/foos/foo.f90
samples/foos/foo.f90
program foo implicit none integer :: i integer :: x integer :: y real(kind=8) :: z common x, y x = 3 y = 10 CALL bar(i) print '(i2)', x contains end program foo
program foo use foobar, x => y implicit none integer :: i integer :: x integer :: y real(kind=8) :: z common x, y x = 3 y = 10 CALL bar(i) print '(i2)', x contains end program foo
mit
FORTRAN
c7d7ca798cc50f5d5c6b8da08ba8896ca89da602
Add y to depend list.
ihuston/pyflation,ihuston/pyflation
rk4fortran/rk4fortran.f90
rk4fortran/rk4fortran.f90
subroutine rk4stepks(x, y, h, n, m, yout, derivs) ! Do one step of the classical 4th order Runge Kutta method, ! starting from y at x with time step h and derivatives given by derivs implicit none real, intent(in) :: x real, intent(in) :: h integer :: n, m real, dimension(0:n-1,0:m-1), intent(i...
subroutine rk4stepks(x, y, h, n, m, yout, derivs) ! Do one step of the classical 4th order Runge Kutta method, ! starting from y at x with time step h and derivatives given by derivs implicit none real, intent(in) :: x real, intent(in) :: h integer :: n, m real, dimension(0:n-1,0:m-1), intent(i...
bsd-3-clause
FORTRAN
437a7c8c04d0c6f0bd9806c34c4247cec8377513
Add comment in f90 source about how to build with F2Py
pressel/mpi4py,mpi4py/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py
demo/f2py/helloworld.f90
demo/f2py/helloworld.f90
! ! $ f2py --f90exec=mpif90 -m helloworld -c helloworld.f90 ! subroutine sayhello(comm) use mpi implicit none integer :: comm integer :: rank, size, nlen, ierr character (len=MPI_MAX_PROCESSOR_NAME) :: pname if (comm == MPI_COMM_NULL) then print *, 'You passed MPI_COMM_NULL !!!' return end if ...
subroutine sayhello(comm) use mpi implicit none integer :: comm integer :: rank, size, nlen, ierr character (len=MPI_MAX_PROCESSOR_NAME) :: pname if (comm == MPI_COMM_NULL) then print *, 'You passed MPI_COMM_NULL !!!' return end if call MPI_Comm_rank(comm, rank, ierr) call MPI_Comm_size(comm...
bsd-2-clause
FORTRAN
1fd8f9b88408884edda344ae6cf4749f5b52f330
Build rules for plugins (step 1)
stimpsonsg/moose,friedmud/moose,sapitts/moose,roystgnr/moose,liuwenf/moose,liuwenf/moose,apc-llc/moose,dschwen/moose,markr622/moose,backmari/moose,jessecarterMOOSE/moose,zzyfisherman/moose,jhbradley/moose,tonkmr/moose,Chuban/moose,yipenggao/moose,wgapl/moose,bwspenc/moose,kasra83/moose,shanestafford/moose,YaqiWang/moos...
modules/combined/plugins/solid_mechanics/umattest.f
modules/combined/plugins/solid_mechanics/umattest.f
**************************************************************************************** ** UMAT, FOR ABAQUS/STANDARD INCORPORATING ISOTROPIC ELASTICITY ** **************************************************************************************** *****************************************************...
lgpl-2.1
FORTRAN
8e8dbf2dda9be2c61a69d9413ff7fc71e64126c9
Add mapping that tusesthe disk connectivity (with 5 blocks) to map to a square in [-1.1]x[-1,1] and then applies the pillow disk
ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw
src/mappings/pillowdisk5/mapc2m_pillowdisk5.f
src/mappings/pillowdisk5/mapc2m_pillowdisk5.f
subroutine mapc2m_pillowdisk5(blockno,xc1,yc1, & xp,yp,zp,alpha) implicit none integer blockno double precision xc1, yc1 double precision xc,yc,zc,xp,yp,zp,alpha call mapc2m_fivepatch(blockno,xc1,yc1,xc,yc,zc,alpha) c # Map from [-1,1]x[-1,1] back to [0,1]x[0,1] ...
bsd-2-clause
FORTRAN
4c0cdd8589c71257ac6cef241d2e06bbc4fdd23d
Update FC_STD.f
aaroncnb/comic_dust,aaroncnb/comic_dust,aaroncnb/comic_dust,aaroncnb/comic_dust
FC_STD.f
FC_STD.f
PROGRAM FLUX_CALIBRATION IMPLICIT REAL*8(A-G,O-Z) IMPLICIT INTEGER*4(H-N) REAL*8 SADU(320),WL(320),WLT(692),FL(692) REAL*8 FLCAL(320),FNCAL(320),FLC(320) OPEN(1,FILE="STD_NL.ADU",STATUS="OLD") C Change this file name according to the target being observed... C HD...
PROGRAM FLUX_CALIBRATION IMPLICIT REAL*8(A-G,O-Z) IMPLICIT INTEGER*4(H-N) REAL*8 SADU(320),WL(320),WLT(692),FL(692) REAL*8 FLCAL(320),FNCAL(320),FLC(320) OPEN(1,FILE="STD_NL.ADU",STATUS="OLD") C Change this file name according to the target being observed... O...
apache-2.0
FORTRAN
1c327a620dd40f65ab2e7ed8c1b875848ed50aa1
Update reference for remove3 test case
clementval/claw-compiler,clementval/claw-compiler
test/utilities/remove3/reference.f90
test/utilities/remove3/reference.f90
PROGRAM remove3 CALL dummy ( ) END PROGRAM remove3 SUBROUTINE dummy ( ) INTEGER :: k INTEGER :: i INTEGER :: kend = 5 INTEGER :: iend = 10 DO k = 1 , kend , 1 DO i = 1 , iend , 1 END DO DO i = 1 , iend , 1 END DO END DO END SUBROUTINE dummy
PROGRAM remove3 CALL dummy ( ) END PROGRAM remove3 SUBROUTINE dummy ( ) INTEGER :: k INTEGER :: i INTEGER :: kend = 5 INTEGER :: iend = 10 DO k = 1 , kend , 1 DO i = 1 , iend , 1 END DO DO i = 1 , iend , 1 END DO END DO END SUBROUTINE dummy
bsd-2-clause
FORTRAN
f0688a6f139acf176592ce66f7531b25396ce677
Create verlet_integrator.f95
MrCubanfrog/Gravity-simulation
verlet_integrator.f95
verlet_integrator.f95
module verlet_integrator_mod use object_space_mod implicit none contains subroutine run_verlet_integration(list, siz, timescale, lenght, everyNth, output_file) implicit none integer, intent(in) :: siz, lenght, everyNth real, intent(in) :: timescale type(object_space), intent(inout) :: list(siz) ...
mit
FORTRAN
579d2c656f18728cef30c093ad93e0e0d1a6f8dd
Move swrite.f to selci_swrite.f to avoid name conflicts in ar.
rangsimanketkaew/NWChem
src/selci/selci_swrite.f
src/selci/selci_swrite.f
subroutine selci_swrite(itape,a,n) * * $Id: selci_swrite.f,v 1.1 2003-04-08 00:26:07 windus Exp $ * real*8 a(n) parameter (lenbuf = 512) c if (n.le.0) return left = n nbuf = (n-1)/lenbuf + 1 do 10 ibuf = 1,nbuf m = min(lenbuf, left) call selci_sswrit(itape, a(1 ...
mit
FORTRAN
f1e75f6b80ecc0b5b8ce1b7fe33532068a2658d8
Update reference with new way to transform
clementval/claw-compiler,clementval/claw-compiler
test/openacc/continuation/reference.f90
test/openacc/continuation/reference.f90
PROGRAM openacc_cont !$ACC parallel !$ACC end parallel !$acc data present ( pti,pdp,pclc,pwv,psw,pqlwc,pqiwc,pduco2,pduo3 ) & !$acc present ( paeq1,paeq2,paeq3,paeq4,paeq5,psmu0,palso ) present ( & !$acc palth,pskyview,pfcor ) present ( papre & !$acc ...
PROGRAM openacc_cont !$ACC parallel !$ACC end parallel !$acc data present ( pti,pdp,pclc,pwv,psw,pqlwc,pqiwc,pduco2,pduo3 ) present & !$acc ( paeq1,paeq2,paeq3,paeq4,paeq5,psmu0,palso ) present ( & !$acc palth,pskyview,pfcor ) present ( papre & !$acc ...
bsd-2-clause
FORTRAN
111eb48f3809b3076aa5aec56358ab0aefb41826
Fix fortran warning, clean up indentation (#17766)
bwspenc/moose,milljm/moose,sapitts/moose,harterj/moose,nuclear-wizard/moose,bwspenc/moose,harterj/moose,lindsayad/moose,harterj/moose,lindsayad/moose,andrsd/moose,idaholab/moose,milljm/moose,idaholab/moose,SudiptaBiswas/moose,andrsd/moose,jessecarterMOOSE/moose,SudiptaBiswas/moose,andrsd/moose,sapitts/moose,lindsayad/m...
modules/tensor_mechanics/test/plugins/creep_usr_creep.f
modules/tensor_mechanics/test/plugins/creep_usr_creep.f
C SUBROUTINE CREEP(DECRA,DESWA,STATEV,SERD,EC,ESW,P,QTILD, 1 TEMP,DTEMP,PREDEF,DPRED,TIME,DTIME,CMNAME,LEXIMP,LEND, 2 COORDS,NSTATV,NOEL,NPT,LAYER,KSPT,KSTEP,KINC) C C INCLUDE 'ABA_PARAM.INC' C CHARACTER*8 CMNAME C DIMENSION DECRA(5),DESWA(5),STATEV(*),PREDEF(*),DPRED(*),TIME(2)...
C SUBROUTINE CREEP(DECRA,DESWA,STATEV,SERD,EC,ESW,P,QTILD, 1 TEMP,DTEMP,PREDEF,DPRED,TIME,DTIME,CMNAME,LEXIMP,LEND, 2 COORDS,NSTATV,NOEL,NPT,LAYER,KSPT,KSTEP,KINC) C C INCLUDE 'ABA_PARAM.INC' C CHARACTER*8 CMNAME C DIMENSION DECRA(5),DESWA(5),STATEV(*),PREDEF(*),DPRED(*),TIME(2)...
lgpl-2.1
FORTRAN
349cb26963a0ae277594cde8dece14de27031042
Update reference
clementval/claw-compiler,clementval/claw-compiler
test/claw/sca/sca36/reference_cpu.f90
test/claw/sca/sca36/reference_cpu.f90
MODULE mo_column CONTAINS SUBROUTINE compute ( nz , q , t , z , nproma ) INTEGER , INTENT(IN) :: nproma INTEGER , INTENT(IN) :: nz REAL , INTENT(INOUT) :: t ( : , : ) REAL , INTENT(INOUT) :: q ( : , : ) REAL , INTENT(INOUT) :: z ( 1 : nproma ) CALL compute_column ( nz , q , t , z , nproma = nproma ) EN...
MODULE mo_column CONTAINS SUBROUTINE compute ( nz , q , t , z , nproma ) INTEGER , INTENT(IN) :: nproma INTEGER , INTENT(IN) :: nz REAL , INTENT(INOUT) :: t ( : , : ) REAL , INTENT(INOUT) :: q ( : , : ) REAL , INTENT(INOUT) :: z ( 1 : nproma ) CALL compute_column ( nz , q , t , z , nproma = nproma ) EN...
bsd-2-clause
FORTRAN
8998467d70cf76304ce273ab48e2109f34ba51cc
Set velocity field for no-mapping case
ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw
applications/advection/2d/filament/user_4.6/setaux_nomap.f
applications/advection/2d/filament/user_4.6/setaux_nomap.f
subroutine setaux_nomap(mbc,mx,my,xlower,ylower,dx,dy, & maux,aux) implicit none integer mbc, mx,my, meqn, maux double precision dx,dy, xlower, ylower double precision aux(1-mbc:mx+mbc,1-mbc:my+mbc, maux) double precision t t = 0 call compute_velocity_psi_no...
bsd-2-clause
FORTRAN