On Wed, Apr 20, 2016 at 3:23 PM, Austin Zheng via swift-dev
<[email protected]> wrote:
> Hello developers,
>
> Is there a way to import a .swift source file into the interactive REPL?
> There are times I'd like to debug code by importing it into the REPL and then
> typing in various interactive commands. However, copy-pasting does not always
> work properly, especially if the code is long and contains line breaks.
I usually iterate in a separate source file and use the 'swift'
interpreter when I hit issues like this. Not a perfect workflow, but
does the job -- just a suggestion in case you're blocked.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
swift-dev mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-dev