comparison scripts/miscellaneous/compare_versions.m @ 7017:a1dbe9d80eee

[project @ 2007-10-12 21:27:11 by jwe]
author jwe
date Fri, 12 Oct 2007 21:27:37 +0000
parents 93c65f2a5668
children 609fd2045523
comparison
equal deleted inserted replaced
7016:93c65f2a5668 7017:a1dbe9d80eee
1 ## Copyright (C) 2006 Bill Denney <denney@seas.upenn.edu> 1 ## Copyright (C) 2006, 2007 Bill Denney
2 ## 2 ##
3 ## This file is part of Octave. 3 ## This file is part of Octave.
4 ## 4 ##
5 ## Octave is free software; you can redistribute it and/or modify it 5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by 6 ## under the terms of the GNU General Public License as published by
60 ## Note that version "1.1-test2" would compare as greater than 60 ## Note that version "1.1-test2" would compare as greater than
61 ## "1.1-test10". Also, since the numeric part is compared first, "a" 61 ## "1.1-test10". Also, since the numeric part is compared first, "a"
62 ## compares less than "1a" because the second string starts with a 62 ## compares less than "1a" because the second string starts with a
63 ## numeric part even though double("a") is greater than double("1"). 63 ## numeric part even though double("a") is greater than double("1").
64 ## @end deftypefn 64 ## @end deftypefn
65
66 ## Author: Bill Denney <denney@seas.upenn.edu>
65 67
66 ## TODO?: This allows a single equal sign "=" to indicate equality, do 68 ## TODO?: This allows a single equal sign "=" to indicate equality, do
67 ## we want to require a double equal since that is the boolean operator? 69 ## we want to require a double equal since that is the boolean operator?
68 70
69 function out = compare_versions(v1, v2, operator) 71 function out = compare_versions(v1, v2, operator)