Programowanie w systemie UNIX/pari: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Linia 94:
 
===wersja===
Jak wydrukować numer wersji biblioteki?<ref>[https://stackoverflow.com/questions/69698712/how-to-print-libpari-version-in-c/69832821#69832821 stackoverflow question: how-to-print-libpari-version-in-c]</ref>
* najpierw użyć funkcji pari_init() aby utworzyć stos pari, na który funkce będą zwracać swoje wartości
 
Zmienne:
* paricfg_version_code encodes in a single long, the Major and minor version numbers as well as the patchlevel.
 
* PARI_VERSION_SHIFT is the number of bits used to store each of the integers M, m, p in the version code.
* paricfg_vcsversion is a version string related to the revision control system used to handle your sources, if any. For instance git-commit hash if compiled from a git repository.
Linia 106 ⟶ 107:
* long PARI_VERSION(long M, long m, long p) produces the version code attached to release M.m.p. Each code id a unique PARI release, and corresponds to the natural total order on the set of releases (bigger code number means more recent release).
* pari_print_version();
 
 
 
pari_print_version powoduje :
 
<source lang=bash>
 
GP/PARI CALCULATOR Version 2.9.4 (released)
amd64 running linux (x86-64/GMP-6.1.2 kernel) 64-bit version
compiled: Dec 19 2017, gcc version 7.3.0 (Ubuntu 7.3.0-1ubuntu1)
threading engine: pthread
(readline v7.0 disabled, extended help enabled)
</source>
 
==gp2c = tworzenie kodu C z pliku gp==