Bitcoin Forum
July 29, 2024, 03:26:29 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is recursion possible in scripting system  (Read 462 times)
t1mm3h (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 28, 2013, 02:05:01 PM
 #1

A short question for which I didn't find an answer: is recursion possible in the scripting language that Bitcoin uses?
Chrithu
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
May 28, 2013, 02:09:19 PM
 #2

Strange question.

As far as I'm aware most Bitcoin Clients are written in C++.

So yes recursion is possible in C++. Not sure if that will help you though.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4759



View Profile
May 28, 2013, 02:09:40 PM
 #3

https://en.bitcoin.it/wiki/Script

Quote
Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops

With no loops and no user definable functions/subroutines, I can't think of a way to create a recursive action.
niko
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
May 28, 2013, 02:11:41 PM
 #4

A short question for which I didn't find an answer: is recursion possible in the scripting language that Bitcoin uses?
Loops are not possible, if that is what you were wondering. If not, could you clarify by providing an example?

https://en.bitcoin.it/wiki/Script

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
t1mm3h (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 28, 2013, 02:41:43 PM
 #5

https://en.bitcoin.it/wiki/Script

Quote
Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops

With no loops and no user definable functions/subroutines, I can't think of a way to create a recursive action.

Thanks. In that sense I can't think of it either.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!