Forum archive 2000-2006

Davide P. Cervone - Changes to union_problib/macros

Davide P. Cervone - Changes to union_problib/macros

by Arnold Pizer -
Number of replies: 0
inactiveTopicChanges to union_problib/macros topic started 7/4/2005; 9:03:25 AM
last post 7/4/2005; 10:37:19 AM
userDavide P. Cervone - Changes to union_problib/macros  blueArrow
7/4/2005; 9:03:25 AM (reads: 801, responses: 1)
Some changes made to PGanswermacros.pl a week or so ago require changes in the macro files in the Union College macros in the union_problib/macros directory. I have updated them, so if you are using those macro files you will want to obtain new copies from the CVS repository.

(The change was that the trim_whitespace function now requires an answer hash rather than just a string, as it had in the past. I had been using it as a convenient means of removing leading and trailing white space, but that no longer works. The fix is easy, however: have my own trimString function that does what trim_whitespace used to. I probably should have done that to begin with.)

Davide

<| Post or View Comments |>


userMichael Gage - Re: Changes to union_problib/macros  blueArrow
7/4/2005; 10:37:19 AM (reads: 1072, responses: 0)
Thanks, Davide. I broke some other evaluators with this change as well. I'm in the process of restoring str_filters which will take a string, filter it, and then return the string. I had mistakenly thought that I could dispense with it.

I find I'm having trouble deciding whether filters should deal with answer hash inputs and answer hash outputs or whether they should take a string input and give string outputs.

At first glance both seem equally useful, and I haven't yet come up with a reason to decide consistently one way or another.

The restored str_compare should be in the CVS in an hour or so.

-- Mike

<| Post or View Comments |>