{"id":39801655,"url":"https://github.com/melchiorrecaruso/adimpas","last_synced_at":"2026-01-18T12:34:07.986Z","repository":{"id":158425040,"uuid":"619105477","full_name":"melchiorrecaruso/adimpas","owner":"melchiorrecaruso","description":"Type checking of dimensioned quantities at compile time in FreePascal ","archived":false,"fork":false,"pushed_at":"2024-09-15T14:44:02.000Z","size":6195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-15T15:59:02.261Z","etag":null,"topics":["dimensional-analysis","freepascal","lazarus","pascal","type-checking","unit-of-measurement"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melchiorrecaruso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.LGPL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-26T09:35:06.000Z","updated_at":"2024-08-30T17:33:25.000Z","dependencies_parsed_at":"2024-04-14T11:32:20.790Z","dependency_job_id":"697e3e42-4a43-41ec-970c-bb07c00f9730","html_url":"https://github.com/melchiorrecaruso/adimpas","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/melchiorrecaruso/adimpas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melchiorrecaruso%2Fadimpas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melchiorrecaruso%2Fadimpas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melchiorrecaruso%2Fadimpas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melchiorrecaruso%2Fadimpas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melchiorrecaruso","download_url":"https://codeload.github.com/melchiorrecaruso/adimpas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melchiorrecaruso%2Fadimpas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dimensional-analysis","freepascal","lazarus","pascal","type-checking","unit-of-measurement"],"created_at":"2026-01-18T12:34:07.188Z","updated_at":"2026-01-18T12:34:07.947Z","avatar_url":"https://github.com/melchiorrecaruso.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ccenter\u003eADimPas Library\u003c/center\u003e\n\nAnother library for type checking of dimensioned quantities at compile time in FreePascal. From a [circular's](https://github.com/circular17/DimPas) idea.\n\n[\u003ccenter\u003e![Actions Status](https://github.com/melchiorrecaruso/ADimPas/workflows/build-test/badge.svg)\u003c/center\u003e](https://github.com/melchiorrecaruso/ADimPas/actions)\n\n## \u003cu\u003eWhat it's \u003c/u\u003e\n\nEnsuring coherence of physical dimensions in physical equations or mathematical relationships involving various variables is crucial. Dimensional analysis provides a fundamental tool to verify this coherence and correct any errors in the expressions.\n\nThe ADim library allows defining variables and constants in terms of quantity and units of measurement, automating dimensional analysis at compilation time.\n\n## \u003cu\u003eHow to use\u003c/u\u003e\n\n#### Example 1: Calculate speed\n``` pas\nuses\n  ADim;\nvar \n  distance: TMeters;\n  time:     TSeconds;\n  speed:    TMetersPerSecond;  \nbegin\n  distance := 5000*m;\n  time     := 2*hr;\n  speed    := distance/time;\n  \n  writeln('The value of speed is ', speed.ToKilometerPerHour.ToString);\nend;\n```\nOutput: \n``` \nThe value of speed is 2.5 km/h\n``` \n#### Example 2: Calculate Borh radius\n``` pas\nuses\n  ADim;\nvar \n  plank:  TJouleSeconds;\n  e0:     TFaradsPerMeter;\n  ke:     TNewtonSquareMetersPerSquareCoulomb;  \n  mass:   TKilograms;\n  charge: TCoulombs;  \n  radius: TMeters;\nbegin\n  plank  := 6.62607015E-34*J*s;    // Planck constant\n  e0     := 8.8541878128E-12*F/m;  // vacuum permittivity\n  ke     := 1/(4*pi*e0);           // Coulomb constant\n  mass   := 9.1093837015E-31*kg;   // mass of an electron\n  charge := 1.602176634E-19*C;     // charge of an electron   \n  radius := (SquarePower(plank/2/pi)/mass)/(ke*SquarePower(charge)); \n\n  writeln('The value of the Bohr radius is ', radius.ToString(10, 10, [pNano]));      \nend;\n```\nOutput: \n``` \nThe value of the Bohr radius is 0.05291772109 nm\n``` \n\nRefer to the [adimtest](adimtest.pas) source code for additional examples.\n\n## \u003cu\u003eRequirements\u003c/u\u003e\n\n- [FreePascal compiler (recommended trunk version)](https://www.freepascal.org)\n- [Lazarus IDE](https://www.lazarus-ide.org)\n\n## \u003cu\u003eSupported mathematical formulae:\u003cu\u003e\n\n- [Mechanics](doc/mechanics.md)\n- [Fluid Mechanics](doc/fluidmechanics.md)\n- [Electricity and Magnetism](doc/electricityandmagnetism.md)\n- [Heat and Thermodynamics](doc/heatandthermodynamics.md)\n- [Waves and Hearing](doc/waves.md)\n- [Light and Vision](doc/lightandvision.md)\n- [Relativity](doc/relativity.md)\n- [Quantum Mechanics](doc/quantummechanics.md)\n- [Units of measurement](doc/unitsofmeasurement.md)\n\n## References\n\n- [HyperPhysics](http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html)\n- [University Physics Volume 1](https://openstax.org/details/books/university-physics-volume-1)\n- [University Physics Volume 2](https://openstax.org/details/books/university-physics-volume-2)\n- [University Physics Volume 3](https://openstax.org/details/books/university-physics-volume-3)\n- [National Institute of Standards and Technology](https://www.nist.gov/pml/owm/metric-si/si-units)\n- [Bureau international des poids et mesures](https://www.bipm.org/en/)\n\n## LICENSE\n\n[GNU Lesser General Public License v3.0](https://github.com/melchiorrecaruso/ADimPas/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelchiorrecaruso%2Fadimpas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelchiorrecaruso%2Fadimpas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelchiorrecaruso%2Fadimpas/lists"}