Files
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

11 lines
472 B
Plaintext

// MatchScore: the score of aligning letter A with letter B: Match when they
// are the same letter, Mismatch otherwise. The simplest substitution score;
// a substitution matrix such as BLOSUM62 replaces it for proteins.
FUNCTION MatchScore(A : CHAR, B : CHAR, Match : INTEGER, Mismatch : INTEGER) RETURNS INTEGER
ENSURE (A == B AND RESULT == Match) OR (A != B AND RESULT == Mismatch)
IF A == B THEN
RETURN Match
ENDIF
RETURN Mismatch
ENDFUNCTION