how to change comma´s in dots (as a decimal seperator) in the data base???

Is there a 'search and replace' method to replace all comma´s by dots (as a decimal seperator). For example 0,78 into 0.78. At this moment several students responses were graded as incorrect while the only error they made was to provide a response using a comma instead of a dot. I can export the data file and use another program to score the responses, but there may be a much more efficient method to modify the responses.

Harry Garst

Axel Vogt's picture

how abou this?

do not know Maple T A, but it sounds like the separator problem on German machines I know from Excel + Maple:

StringTools[SubstituteAll]("0,78",",","."); parse(%);

gives 0.78 (i.e. read in data as strings and replace; take care if there is a 1000 separator as well)

Thanks Axel, I did not tried

Thanks Axel, I did not tried it yet, but it looks good.

Harry

RegSubs

More generally I think you'd want something like

 StringTools:-RegSubs("([0-9]),([0-9])"="\\1.\\2", "0,78 + 23,4");
                                 "0.78 + 23.4"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}