aCombinaciones[nRow, nCol] = (nIndex - 1) MOD 90 + 1 ?????
How I can modify this ? what mean "MOD" ?
the function generated
How I can modify this ? what mean "MOD" ?
the function generated
FUNCTION Main(nChoice)
LOCAL aNumbers[90], nSumCyclo, nSumMath, nDistCyclo, nDistMath
LOCAL nRow, nCol, nIndex
// Inicializar la matriz de n£meros
FOR nIndex = 1 TO 90
aNumbers[nIndex] = nIndex
NEXT
// Mostrar el men£ de opciones
nChoice = Menu()
// Combinar los n£meros seg£n la opci¢n seleccionada
IF nChoice == 1
nSumCyclo = CombinaSumCyclo(aNumbers)
ELSEIF nChoice == 2
nDistCyclo = CombinaDistCyclo(aNumbers)
ELSEIF nChoice == 3
nSumMath = CombinaSumMath(aNumbers)
ELSEIF nChoice == 4
nDistMath = CombinaDistMath(aNumbers)
ENDIF
// Mostrar el resultado en una tabla
FOR nRow = 1 TO 30
FOR nCol = 1 TO 3
IF nChoice == 1
PRINT aNumbers[nSumCyclo[nRow, nCol]]
ELSEIF nChoice == 2
PRINT aNumbers[nDistCyclo[nRow, nCol]]
ELSEIF nChoice == 3
PRINT aNumbers[nSumMath[nRow, nCol]]
ELSEIF nChoice == 4
PRINT aNumbers[nDistMath[nRow, nCol]]
ENDIF
NEXT
PRINT
NEXT
RETURN
/*
FUNCTION Menu()
LOCAL nChoice
PRINT "Seleccione una de las siguientes opciones:"
PRINT "1. Suma ciclometrica"
PRINT "2. Distancia ciclom‚trica"
PRINT "3. Suma matem tica"
PRINT "4. Distancia matem tica"
PRINT
INPUT "Opci¢n: ", nChoice
RETURN nChoice
*/
FUNCTION CombinaSumCyclo(aNumbers)
LOCAL aCombinaciones[30, 3], nIndex, nRow, nCol
// Combinar los n£meros seg£n la suma ciclom‚trica
FOR nRow = 1 TO 30
FOR nCol = 1 TO 3
nIndex = (nRow - 1) * 3 + nCol
aCombinaciones[nRow, nCol] = (nIndex - 1) MOD 90 + 1
NEXT
NEXT
RETURN aCombinaciones
FUNCTION CombinaDistCyclo(aNumbers)
LOCAL aCombinaciones[30, 3], nIndex, nRow, nCol
// Combinar los n£meros seg£n la distancia ciclom‚trica
FOR nRow = 1 TO 30
FOR nCol = 1 TO 3
nIndex = (nRow - 1) * 3 + nCol
aCombinaciones[nRow, nCol] = (nIndex - 1) MOD 90 + 1
NEXT
NEXT
RETURN aCombinaciones
FUNCTION CombinaSumMath(aNumbers)
LOCAL aCombinaciones[30, 3], nIndex, nRow, nCol
// Combinar los n£meros seg£n la suma matem tica
FOR nRow = 1 TO 30
FOR nCol = 1 TO 3
nIndex = (nRow - 1) * 3 + nCol
aCombinaciones[nRow, nCol] = (nIndex - 1) MOD 90 + 1
NEXT
NEXT
RETURN aCombinaciones
FUNCTION CombinaDistMath(aNumbers)
LOCAL aCombinaciones[30, 3], nIndex, nRow, nCol
// Combinar los n£meros seg£n la distancia matem tica
FOR nRow = 1 TO 30
FOR nCol = 1 TO 3
nIndex = (nRow - 1) * 3 + nCol
aCombinaciones[nRow, nCol] = (nIndex - 1) MOD 90 + 1
NEXT
NEXT
RETURN aCombinacionesSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
