Parameter labeling in Ada
Ada 83 permits position-independent parameters (and default values)
- procedure DRAW_AXES(X_ORIGIN,Y_ORIGIN:COORD:=0; X_SCALE,Y_SCALE:REAL:=1.0; X_SPACING,Y_SPACING:NATURAL:=1; X_LOG,Y_LOG:BOOLEAN:=FALSE; FULL_GRID:BOOLEAN:=FALSE);
- DRAW_AXES(500,500,Y_SCALE=ɬ.5,Y_LOG:=TRUE, X_SPACING=ᡂ,Y_SPACING=ᡂ);
Complicates overloading
- procedure P(X:INTEGER;Y:BOOLEAN:=FALSE);procedure P(X:INTEGER;Y:INTEGER:=0);P(3);