Home > Default > Re-run a portion of a script

Re-run a portion of a script

November 30Hits:0
While *run me* will re-run a script from its beginning, is there any way to re-run a portion of a script from a specific line or command?


well, thanks for the star, but I don't see any need to close the conversation just quite yet.
you have a (more or less normal) confusion about what it is, exactly, that a computer does. Computers execute; they don't think. A computer program is just a long series of mathematical operations that are executed sequentially; It will continue to do that until it reaches the end of the calculation or reaches a calculation that can't be performed. It's a programmer's job to anticipate and control all the possible states that the calculation might be in, and to decide what commands get executed in which conditions. it's just like if you're doing math on a hand calculator - if you're doing something that needs trigonometry, then you need to anticipate that you'll need a table of trigonometric values (or a subroutine that calculates trigonometric values, which is basically what the sin and cos keys on your average calculator are), and you get to choose when you use it. the calculator won't do either of those things for you. Programming artifices like loops, conditionals, and subroutines are for the programmer, not the computer - they get used the same way a mathematician will use a ∑ symbol instead of writing out a (possibly infinite) list of things to sum.
if you're writing code that requires user input, then you (the programmer) have to decide what inputs are allowable and what aren't, and you have to create structures that exclude and re-request improper input. if you want something more open ended (or you want something artificial-intelligency that "learns") you need to create structures that keep the the state of the program within a bounded set of states that are functionally executable. You as a programmer have to anticipate and exclude possible undesirable states. If you need to do a long series of calculations to determine whether a user input is proper, then you should set that series in a handler of its own, with proper error checking, and just loop through the request for data and a call to the handler until you have an input that you know you can use. everything you leave to chance is an opening for your program to crash (and remember, a program "crashing" just means that the program didn't do what you expected - it happily made precisely the set of calculations you told it to, and has no idea that it's not doing the right thing).

Read other 10 answers


Related Articles

  • Re-run a portion of a scriptNovember 30

    While *run me* will re-run a script from its beginning, is there any way to re-run a portion of a script from a specific line or command?well, thanks for the star, but I don't see any need to close the conversation just quite yet. you have a (more or

  • Getting error while running OIM in built purging script OIM_ReconArch.shOctober 11

    Getting error while running OIM in built purging script OIM_ReconArch.sh bash-3.00$ cat Err_Arch_Recon_2012_11_01_15_36_06.log -- Reconciliation Archival Execution Status BEGIN OIM_SP_ReconArchival('N','N',200000,'ARCHIVE_SELECT_WITH_CONS_DROP_REC','

  • Urgent - How to Run a FM using CATT script tool,October 11

    Hi All, How to Run a FM using CATT script tool, Thanks in advance, KSRchoose  type as "Function module test" (if you are in release less than 6.4 abap) after entering into t.code SCAT. Pl. refer to this documentation for creating function module

  • RE: Running Escript from a UNIX scriptNovember 30

    Hi Doug, Yu can try the following within escript: (using execcmd to generate an escript script and include to execute the generated escript) 1) startup escript from a ksh 2) get to the installedPartition level 3) setOutFile yourOutFile 4) showag 5) s

  • Run a BR or Calc Script within another BRNovember 30

    Is there a way from which I can run one Business Rule/Calculation Script in another Business Rule/Calculation Script (Run one BR/Calc Script within another BR)? Edited by: 930603 on May 3, 2012 4:44 PMHi, Do you want to run two BR's parallel y, why y

  • Running Escript from a UNIX scriptNovember 30

    I'm running a Korn Shell script that uses Escript to navigate down through an applications sub agents to get to the LoadBalancingRouter agent. Now I also need to get to the CommMgr agent in the same fashion. The problem I'm having is that once I get

  • Running reports in SCCM: ActiveX Script ErrorOctober 11

    When I try to run some reports, I authenticate then it throws a Script Error.  Error:  ActiveX component can't create object:  'Microsoft.XMLDOM'. This only happens on some reports and it only happens remotely.  If I try to run the same reports on th

  • How can I run a continuous interactive update script?October 11

    Hi, I've written an interactive update sql statement that will need to be run several times. Typing @f:\folder\file.sql can get time consuming and boring after a couple of times of inputting the data. Is there an easy way to write a procedure that wi

  • On XP SP3 can't run plug-in, get IE script error without running IE, click Yes or No, nothing more happensOctober 11

    I am running XP SP3 and FF 3.6.18. I have been having trouble opening PDFs in FF but not in other browsers. FF tells me to update my Adobe PDF plug-in. I click in the FF list to update, go through the procedure and when I click on run I get the follo

  • How to load the object library at run time from within the script.October 11

    What i am trying to do from my library is that I wanted to load the object library file (.properties) file at run time through the script. I know that open script has a deprecated method "ft.loadObjectLibrary". Is there any other method other th

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.426 s.