Error in docs: Operator ANDALSO

Forum for discussion about the documentation project.
Post Reply
chikega
Posts: 5
Joined: Aug 15, 2021 22:25

Error in docs: Operator ANDALSO

Post by chikega »

There appears to be an error in the docs under the section Operator ANDALSO (Short Circuit Conjunction). More specifically it's concerning the isprime array.

Code: Select all

dim as integer isprime(1 to 10) = { _
	_ ' 1  2  3  4  5  6  7  8  9  10
	    0, 1, 1, 0, 1, 0, 1, 0, 0, 0 _
	}
I believe the second index should be 0 indicating that the value 2 is NOT a prime number. If someone could verify for me. It can be found in both the Wiki docs and the Documentation.Help!.

Cheers
Last edited by chikega on Dec 04, 2023 0:35, edited 1 time in total.
fxm
Moderator
Posts: 12133
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Error in docs: Operator ANDALSO

Post by fxm »

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
2 is a prime number because its only factors are 1 and itself.
2 is the only even prime number.
chikega
Posts: 5
Joined: Aug 15, 2021 22:25

Re: Error in docs: Operator ANDALSO

Post by chikega »

Désolé ... I stand corrected. :)
Post Reply