Skip to content

Load/import functions/constant from a file instead of redefining them everytime.; Edit: Changed to QnA #69

Closed Answered by lcn2
BilakshanP asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for suggestion, @BilakshanP, before we considered in more detail, we want to be sure you're aware of existing capabilities within calc.

There is a calc startup file that is automatically processed when calc starts (unless you give a -q to the calc command line). See the calc man page for details.

The calc startup file is controlled by the $CALCRC environment variable, which it is does exist will mean that the file .calcrc will be searched for along a path. People usually put a .calcrc file in their home directory for a general purpose, although you may have a .calcrc file in your local directory that will take priority.

Let's assume you have a ~/.calcrc file (in your home direct…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@BilakshanP
Comment options

@lcn2
Comment options

lcn2 Feb 9, 2023
Maintainer

@BilakshanP
Comment options

@lcn2
Comment options

lcn2 Feb 10, 2023
Maintainer

@BilakshanP
Comment options

Answer selected by lcn2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants