Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##R, (削除) 85 (削除ここまで) 89 bytes

R, (削除) 85 (削除ここまで) 89 bytes

repeat{if(T>4)T=1;cat("\fLoading...",c("|","/","-","\\")[T],sep="");T=T+1;Sys.sleep(.25)}

Edit: Fixed the answer such that T wont overflow by resetting the counter if greater than 4.

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

##R, (削除) 85 (削除ここまで) 89 bytes

repeat{if(T>4)T=1;cat("\fLoading...",c("|","/","-","\\")[T],sep="");T=T+1;Sys.sleep(.25)}

Edit: Fixed the answer such that T wont overflow by resetting the counter if greater than 4.

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

R, (削除) 85 (削除ここまで) 89 bytes

repeat{if(T>4)T=1;cat("\fLoading...",c("|","/","-","\\")[T],sep="");T=T+1;Sys.sleep(.25)}

Edit: Fixed the answer such that T wont overflow by resetting the counter if greater than 4.

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

added 111 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16

##R, (削除) 85 (削除ここまで) 83 89 bytes

repeat{T=T+1;catif(T>4)T=1;cat("\fLoading...",c("\\","|","/","-","\\")[T%%4+1][T],sep="");Sys;T=T+1;Sys.sleep(.25)}

Edit: Fixed the answer such that T wont overflow by resetting the counter if greater than 4.

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

##R, (削除) 85 (削除ここまで) 83 bytes

repeat{T=T+1;cat("\fLoading...",c("\\","|","/","-")[T%%4+1],sep="");Sys.sleep(.25)}

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

##R, (削除) 85 (削除ここまで) 89 bytes

repeat{if(T>4)T=1;cat("\fLoading...",c("|","/","-","\\")[T],sep="");T=T+1;Sys.sleep(.25)}

Edit: Fixed the answer such that T wont overflow by resetting the counter if greater than 4.

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

added 18 characters in body
Source Link
Billywob
  • 3.5k
  • 13
  • 16

##R, 85(削除) 85 (削除ここまで) 83 bytes

while(1)repeat{T=T+1;cat("\fLoading...",c("\\","|","/","-")[T%%4+1],sep="");Sys.sleep(.25)}

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

##R, 85 bytes

while(1){T=T+1;cat("\fLoading...",c("\\","|","/","-")[T%%4+1],sep="");Sys.sleep(.25)}

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

##R, (削除) 85 (削除ここまで) 83 bytes

repeat{T=T+1;cat("\fLoading...",c("\\","|","/","-")[T%%4+1],sep="");Sys.sleep(.25)}

The only interesting aspect about this answer is the use of R's TRUTHY builtin T. It is effectively a predefined variable set to 1/TRUE which means we don't have to initialize the counter but can start incrementing T.

Source Link
Billywob
  • 3.5k
  • 13
  • 16
Loading

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