Skip to main content
Stack Overflow
  1. About
  2. For Teams
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Return to Answer

Commonmark migration
Source Link

##HyperTalk: 237 characters

HyperTalk: 237 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept those non-ASCII relational operators I used.

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if i mod 2≠0then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

##HyperTalk: 237 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept those non-ASCII relational operators I used.

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if i mod 2≠0then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

HyperTalk: 237 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept those non-ASCII relational operators I used.

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if i mod 2≠0then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

Shaved 4 characters by changing "if (i+R+R) mod 2 = 1" to "if i mod 2 ≠ 0 then"
Source Link
Joey Adams
  • 43.7k
  • 19
  • 89
  • 115

##HyperTalk: 241237 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept thatthose non-ASCII less-than symbolrelational operators I used (as well as the usual <=).

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if(i+R+R) i mod 2=1then2≠0then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

##HyperTalk: 241 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept that non-ASCII less-than symbol I used (as well as the usual <=).

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if(i+R+R)mod 2=1then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

##HyperTalk: 237 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept those non-ASCII relational operators I used.

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if i mod 2≠0then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

Post Made Community Wiki
Source Link
Joey Adams
  • 43.7k
  • 19
  • 89
  • 115

##HyperTalk: 241 characters

Indentation is not required nor counted. It is added for clarity. Also note that HyperCard 2.2 does accept that non-ASCII less-than symbol I used (as well as the usual <=).

function P R
 put""into t
 put 0into c
 repeat with i=-R to R
 if(i+R+R)mod 2=1then
 repeat with j=-R to R
 if i^2+j^2≤R^2then
 put"*"after t
 add 1to c
 else
 put" "after t
 end if
 end repeat
 put return after t
 end if
 end repeat
 return t&2*c/R/R
end P

Since HyperCard 2.2 doesn't support stdin/stdout, a function is provided instead.

AltStyle によって変換されたページ (->オリジナル) /