I have been learning Julia along side my AP chemistry class and was trying the ChemEquations.jl. It uses keyword ce to define a chemical Equations like this.
balance(ce"Al{3} + Cl{-1} = AlCl3")
What is ce above as a language construct? If I want someone to enter the equation in a text box it will be a string. If I define the equation as a string, how do I trigger the ce to convert?
eq=“Al{3} + Cl{-1} = AlCl3”
Here is my GitHub repository link so you can check equation notebook out if you would like!
As far as I know, you can’t pass the value of a variable to a macro the same way as a string literal. But for your purposes, you can use the ChemEquation(str) method: