Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPN calculator mistakes variables as functions if variable starts with function name #744

Closed
drroe opened this issue Aug 2, 2019 · 1 comment
Assignees
Labels

Comments

@drroe
Copy link
Contributor

drroe commented Aug 2, 2019

E.g., the variable sumTotal will be mistakenly identified as the sum() function.

@drroe drroe added the bug label Aug 2, 2019
@drroe drroe self-assigned this Aug 2, 2019
drroe added a commit that referenced this issue Jan 31, 2020
* DRR - Use forward declares.

* DRR - Split ControlBlock class stuff from the Control file.

* DRR - Add missing file.

* DRR - Start trying to split out the various for loop types.

* DRR - Add mask for loop type

* DRR - Most of VarType only needed for mask type loop

* DRR - Have SetVarName prepend the $ automatically

* DRR - Add list for loop type

* DRR - Add begin and end functions.

* DRR - Add ForLoop files, update depends

* DRR - Try to use new ForLoop class. Doesnt appear to work yet...

* DRR - Need to account for prepended $

* DRR - Fix variable name and 'in' for list for loop

* DRR - Add GetVariable function

* DRR - Have loop start use CurrentVars

* DRR - Have BeginFor return the number of iterations.

* DRR - Number of iterations is now determined when loop starts.

* DRR - Allow end argument to be a variable. More informative messages on how many iterations loop will execute.

* DRR - Hide debug and change warning to info

* DRR - Hide some debug info

* DRR - Add MemUsageInBytes to template

* DRR - Add StringVar data set

* DRR - Add STRINGVAR to DataSet

* DRR - Add Add and append functions

* DRR - Add Exec version of the Set command

* DRR - Exec version of show command

* DRR - Start massive changes to move VariableArray functionality to DataSetList

* DRR - More work replacing VariableArray with DataSetList. Add some functions to DataSetList

* DRR - Add another check

* DRR - Add UpdateStringVar routine and make ForLoop_integer use it.

* DRR - Use DataSetList in remaining for loops.

* DRR - DSL can be const& for CheckDone

* DRR - Add list string variables function

* DRR - Finish up show exec. Still not quite working.

* DRR - Add comment

* DRR - Ensure loop variable is set up as a dataset

* DRR - Loop variable cannot be the same as DataSet name anymore

* DRR - Give vectors a name

* DRR - Give RMS sets a name

* DRR - Give distance sets a name

* DRR - Name sets

* DRR - Name sets

* DRR - Ensure final value of integer loops is updated to make behavior consistent with all common integer for loops

* DRR - Make 0 iteration loops a warning instead of an error. Ensure all integer for loops are properly integrated on loop end. Add >= and <= end ops.

* DRR - Make start and end values that will result in no iterations a warning, not an error

* DRR - No such thing as CTL objects anymore

* DRR - Fix help.

* DRR - More fixing up of help

* DRR - Add a check that for loop variable was properly set up. Hide some debug info

* DRR - Hide some more debug info

* DRR - Start adding data set blocks loop

* DRR - Exit if error occurrs setting up loop var

* DRR - More loop setup

* DRR - Make blocksize an unsigned int

* DRR - Start splitting for loop components into separate argument lists

* DRR - Better way of handling individual for loop components; should be no cross-contamination between multiple for loop components of the same type

* DRR - Change index vars to long int; refactor so that data set does not need to exist until loop is actually executed.

* DRR - Add missing file

* DRR - Finish initial loop - still need to actually create the sets

* DRR - Add test of nested loop vars and <= loop operator

* DRR - Enabled dataSetBlocks for loop

* DRR - DataSetList needs to be passed in non-const so that data sets can be created each iteration

* DRR - New class for abstracting data set copies

* DRR - Improve error message when no valid file type can be found for a given data set

* DRR - Use DataSetBlock

* DRR - No need to abstract to DataBlock, just require that DataSet of same type be used in function (now called CopyBlock); this will make it easier to make universal.

* DRR - Add MemAlloc and CopyBlock for mesh

* DRR - Fix up dependencies

* DRR - Start attempt to split DataSet_Vector into two sets, 1 with origins and 1 without

* DRR - Fix up Sync routines, update dependencies

* DRR - Fix shadowed variables

* DRR - Accidentally duplicated a function

* DRR - Add new vector types and group

* DRR - Enable new types in the DataSetList

* DRR - Ensure MemAlloc routine is declared

* DRR - Start converting to use new types

* DRR - More updates for new vector types

* DRR - prototype test for loop over datasetblocks

* DRR - More changes for new set types

* DRR - Finish fixing up vector action

* DRR - More VECTOR_1D changes

* DRR - More updates for new vector types

* DRR - Finish up vector changes. Still needs testing.

* DRR - Origin is no longer stored when not needed

* DRR - Vector origin no longer included when not needed

* DRR - Handle append of vector data sets inside DataIO_Std to handle case where data being read in type does not match existing set type

* DRR - Add reverse append test

* DRR - Ensure old memory is freed

* DRR - Add MemAlloc and CopyBlock for vector sets

* DRR - Add CopyBlock and MemAlloc routines to float and integer data sets

* DRR - Add initial test for data set blocks loop

* DRR - Improve error message

* DRR - Minor version bump; vector output for vectors with no origin data is different.

* DRR - Add a cumulative mode for datasetblocks

* DRR - Hide some debug info. Use CheckForSet to avoid spurious warnings.

* DRR - Add 'firstblock' keyword to cumulative datasetblocks to set size of first block

* DRR - Fix calculation of number of iterations.

* DRR - Allow 'show' to only show specified string vars

* DRR - If variables are replaced in a command, re-parse the Argument list in case new spaces have been introduced etc. May want to eventually have the ExecuteCommand function just take a string.

* DRR - Add test for cumulative blocks

* DRR - Hide some debug info

* DRR - Improve output message

* DRR - Allow multiple variables to be passed to show

* DRR - Fix loop descriptions

* DRR - Dont write unneeded temp files during test

* DRR - Fix manual entries

* DRR - Start adding advanced help for for loops

* DRR - Fix up for loop help

* DRR - Fix up for loop help in manual.

* DRR - Remove extra whitespace

* DRR - Give created datasetblocks sets an aspect to reduce the chances of collision. Set legend to be more descriptive.

* DRR - Updated set legends.

* DRR - Data set index +1 to be consistent with set legend

* DRR - Fix up for loop manual entry

* DRR - First check if string variable with name exists. This allows string variables to be used in data set name expressions, e.g. $i[phi]

* DRR - Implement data set copying for sets that support CopyBlock - otherwise revert to old behavior of renaming.

* DRR - Add data set copy test

* DRR - Minor version bump, vector output is different.

* DRR - Improve math help and manual entry

* DRR - Use forward declares. When processing expression, first remove all whitespace to make parsing easier.

* DRR - expression has already had all whitespace removed

* DRR - Add array that can be used to ID functions.

* DRR - Add function to identify functions in expression

* DRR - Use new function to look for function names. Should address #744

* DRR - Add test with function names

* DRR - More forward declares.

* DRR - More forward declares

* DRR - Add missing header guard

* DRR - Protect datasetblocks in parallel

* DRR - Allow wildcard expansion in 'for in' loop to fail with a warning.

* DRR - Add for loop over data sets.

* DRR - Enable oversets loop

* DRR - Test loop filename wildcards and oversets loop

* DRR - Add for oversets manual entry

* DRR - Add missing argument to printf.

* DRR - Add missing include.

* DRR - Make it so that list for loops can access script variables.

* DRR - Allow oversets loop to access script variables.

* DRR - Enable label print for grace xydy. Update help.

* DRR - Update manual

* DRR - I give up for now. Reverting DataSet_Vector changes so that pytraj will build and pass tests. I want the rest of the stuff committed before the amber meeting.

* DRR - Revert to DataSet_Vector

* DRR - Add MemAlloc and CopyBlock

* DRR - Reorganize routine order to separate vector and vector with origin functions. Cleanup.

* DRR - Revert to DataSet_Vector

* DRR - Cpptraj: Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector.....

* DRR - Add missing include due to new forward declare

* DRR - Add missing include due to forward declare

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Make sure vector set is in VECTOR_1D group

* DRR - Revert to DataSet_Vector

* DRR - Revert to DataSet_Vector

* DRR - Update dependencies

* DRR - Add missing ref operator

* DRR - Revert tests, origins still printed for non-origin vector sets

* DRR - Decrement minor version; revision bump insteead, vector output now unchanged.
@drroe
Copy link
Contributor Author

drroe commented May 13, 2020

This was addressed way back in #789

@drroe drroe closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant